調(diào)用ListDefaultCollectorConfigurations,獲取采集器的默認(rèn)配置文件。

調(diào)試

您可以在OpenAPI Explorer中直接運(yùn)行該接口,免去您計(jì)算簽名的困擾。運(yùn)行成功后,OpenAPI Explorer可以自動生成SDK代碼示例。

請求頭

該接口使用公共請求頭,無特殊請求頭。請參見公共請求參數(shù)文檔。

請求語法

GET /openapi/beats/default-configurations HTTP/1.1

請求參數(shù)

名稱 類型 位置 是否必選 示例值 描述
resType String Query fileBeat

采集器類型。可選值:

  • fileBeat
  • metricBeat
  • heartBeat
  • auditBeat
resVersion String Query 6.8.5_with_community

采集器版本。采集器部署的機(jī)器類型不同,可選的版本也不同,具體說明如下:

  • ECS:6.8.5_with_community
  • ACK:6.8.13_with_community
sourceType String Query ECS

指定采集器部署機(jī)器的類型,不填則返回全部。可選值:

  • ECS:ECS服務(wù)器
  • ACK:容器Kubernetes集群

返回?cái)?shù)據(jù)

名稱 類型 示例值 描述
RequestId String 8BAE3C32-8E4A-47D6-B4B0-95B5DE643BF5

請求ID。

Result Array of Result

返回結(jié)果。

content String - key: log\n title: Log file content\n description: >\n Contains log file lines.\n fields:\n ......

配置文件內(nèi)容。

fileName String fields.yml

配置文件名稱。

示例

請求示例

GET /openapi/beats/default-configurations?resVersion=6.8.5_with_community&resType=fileBeat&sourceType=ECS HTTP/1.1
公共請求頭

正常返回示例

JSON格式

{
	"Result": [
		{
			"fileName": "fields.yml",
			"content": "- key: log\n  title: Log file content\n  description: >\n    Contains log file lines.\n  fields:\n ......"
		},
		{
			"fileName": "filebeat.yml",
			"content": "###################### Filebeat Configuration Example #########################\n\n# This file is an example configuration file ......"
		}
	],
	"RequestId": "8BAE3C32-8E4A-47D6-B4B0-95B5DE643BF5"
}

錯(cuò)誤碼

訪問錯(cuò)誤中心查看更多錯(cuò)誤碼。