日本熟妇hd丰满老熟妇,中文字幕一区二区三区在线不卡 ,亚洲成片在线观看,免费女同在线一区二区

create_logtail_config

更新時(shí)間:

調(diào)用CLI命令創(chuàng)建Logtail采集配置。

請(qǐng)求語法

aliyunlog log create_logtail_config --project_name=<value> --config_detail=<value> [--access-id=<value>] [--access-key=<value>] [--sts-token=<value>] [--region-endpoint=<value>] [--client-name=<value>] [--jmes-filter=<value>] [--format-output=<value>] [--decode-output=<value>]

請(qǐng)求參數(shù)

該命令的必選和特有參數(shù)描述如下。

參數(shù)名稱

數(shù)值類型

是否必選

示例值

描述

--project_name

String

test

Project名稱。

--config_detail

String

file://./logtailconfig.json

Logtail配置文件路徑。更多信息,請(qǐng)參見Logtail配置

關(guān)于該命令的全局參數(shù),請(qǐng)參見全局參數(shù)

示例

  1. 創(chuàng)建logtailconfig.json文件,其中配置名稱為config_name2。其內(nèi)容示例如下:

    {
      "config_name": "config_name2",
      "logstore_name": "logstore-a",
      "file_pattern": "file_pattern",
      "time_format": "time_format",
      "log_path": "/log_path",
      "endpoint": "endpoint",
      "log_parse_regex": "xxx ([\\w\\-]+\\s[\\d\\:]+)\\s+(.*)",
      "log_begin_regex": "xxx.*",
      "reg_keys": [
        "time",
        "value"
      ],
      "topic_format": "none",
      "filter_keys": [
        "time",
        "value"
      ],
      "filter_keys_reg": [
        "time",
        "value"
      ],
      "logSample": "xxx 2017-11-11 11:11:11 hello alicloud."
    }
  2. 使用默認(rèn)賬號(hào)創(chuàng)建名稱為config_name2的Logtail采集配置。

    aliyunlog log create_logtail_config --project_name="aliyun-test-project" --config_detail="file://./logtailconfig.json"
  3. 查詢已創(chuàng)建的Logtail采集配置。命令示例如下:

    aliyunlog log get_logtail_config --project_name="aliyun-test-project" --config_name="config_name2"

    返回結(jié)果如下:

    {
      "configName": "config_name2",
      "createTime": 1719370155,
      "inputDetail": {
        "adjustTimezone": false,
        "delayAlarmBytes": 0,
        "delaySkipBytes": 0,
        "discardNonUtf8": false,
        "discardUnmatch": true,
        "dockerFile": false,
        "enableRawLog": false,
        "enableTag": false,
        "fileEncoding": "utf8",
        "filePattern": "file_pattern",
        "filterKey": [
          "time",
          "value"
        ],
        "filterRegex": [
          "time",
          "value"
        ],
        "key": [
          "time",
          "value"
        ],
        "localStorage": true,
        "logBeginRegex": "xxx.*",
        "logPath": "/log_path",
        "logTimezone": "",
        "logType": "common_reg_log",
        "maxDepth": 1000,
        "maxSendRate": -1,
        "mergeType": "topic",
        "preserve": true,
        "preserveDepth": 0,
        "priority": 0,
        "regex": "xxx ([\\w\\-]+\\s[\\d\\:]+)\\s+(.*)",
        "sendRateExpire": 0,
        "sensitive_keys": [],
        "tailExisted": false,
        "timeFormat": "time_format",
        "timeKey": "time",
        "topicFormat": "none"
      },
      "inputType": "file",
      "lastModifyTime": 1719370155,
      "logSample": "xxx 2017-11-11 11:11:11 hello alicloud.",
      "outputDetail": {
        "endpoint": "cn-hangzhou-intranet.log.aliyuncs.com",
        "logstoreName": "logstore-a",
        "region": "cn-hangzhou",
        "telemetryType": "logs"
      },
      "outputType": "LogService"
    }

錯(cuò)誤碼

如果返回報(bào)錯(cuò)信息,請(qǐng)參見具體接口的錯(cuò)誤碼處理。更多信息,請(qǐng)參見錯(cuò)誤碼

API參考

CreateConfig