Call the UpdateCollectorName to modify the name of the collector.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. After you call an operation, OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request header

This operation uses only the common request header. For more information, see Common request parameters.

Request structure


     POST /openapi/collectors/[ResId]/actions/rename HTTP/1.1 
   

Request parameters

Parameter Type Position Required Example Description
ResId String Path Yes ct-cn-77uqof2s7rg5c****

The collector ID.

ClientToken String Query No 5A2CFF0E-5718-45B5-9D4D-70B3FF****

This parameter is used to ensure the idempotence of the request. The value of this parameter is generated by the client and is unique among different requests. The maximum length is 64 ASCII characters.

RequestBody

The following parameters must be filled in the RequestBody to specify the name of the modified collector.

Parameter

Type

Required

Example

Description

name

String

Yes

collectorName1

The name of the modified collector.

Example:


     { "name": "collectorName1" } 
   

Response parameters

Parameter Type Example Description
RequestId String 5FFD9ED4-C2EC-4E89-B22B-1ACB6FE1****

The ID of the request.

Result Struct

The returned results.

collectorPaths List ["/var/log"]

The fileBeat collection path. It is displayed when the deployment machine of the collector is ECS.

configs Array of configs

The configuration file information of the collector.

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

The content of the remote file.

fileName String fields.yml

The name of the file.

dryRun Boolean false

Whether to verify and create a collector. Then, you can perform the following operations:

  • true: only check and not update
  • false: Check and update
extendConfigs Array of extendConfigs

Collector expansion configuration.

configType String collectorDeployMachine

The type of the configuration. Then, you can perform the following operations:

  • collectorTargetInstance: collector Output
  • collectorDeployMachine: Deployment Machine of Collector
  • collector Elasticsearch ForKibana: Elasticsearch instance information that supports Kibana dashboards
enableMonitoring Boolean true

Whether to enable Monitoring. When configType For collectorTargetInstance , and instanceType For elasticsearch When displayed. Then, you can perform the following operations:

  • true
  • false
groupId String default_ct-cn-5i2l75bz4776****

machine group ID. When configType For collectorDeployMachine When displayed.

host String es-cn-4591jumei000u****-kibana.internal.elasticsearch.aliyuncs.com:5601

The private network access address of Kibana after Kibana Dashboard is enabled. When configType For collectorElasticsearchForKibana When displayed.

hosts List ["es-cn-n6w1o1x*****.elasticsearch.aliyuncs.com:9200"]

Collector Output specifies the list of access addresses of the instance. When configType For collectorTargetInstance When displayed.

instanceId String es-cn-n6w1o1****

The instance ID associated with the collector. When configType For collectorTargetInstance is the instance ID of the collector Output; when configType For collectorDeployMachines , and type For ACKCluster is the ACK cluster ID.

instanceType String elasticsearch

The instance type specified by the collector Output. Support: Elasticsearch, logstash. When configType For collectorTargetInstance When displayed.

kibanaHost String https://es-cn-4591jumei000u****.kibana.elasticsearch.aliyuncs.com:5601

The Internet access address of Kibana after Kibana Dashboard is enabled. When configType For collectorElasticsearchForKibana When displayed.

machines Array of machines

The list of ECS machines deployed by the collector. When configType For collectorDeployMachines , and type For ECSInstanceId When displayed.

agentStatus String heartOk

The status of each collector on ECS. Then, you can perform the following operations: heartOk (normal heartbeat), heartLost (abnormal heartbeat), uninstalled (not installed) and failed (Installation failed).

instanceId String c1b9fde5172b84f82b9928e825a7b8988

The list of ECS machine IDs.

protocol String HTTP

Transport protocol, supported HTTP , HTTPS .

successPodsCount String 8

The number of all successfully collected pod nodes of the ACK cluster. When configType For collectorDeployMachines , and type For ACKCluster When displayed.

totalPodsCount String 10

The number of all collected pod nodes of the ACK cluster. When configType For collectorDeployMachines , and type For ACKCluster When displayed.

type String ECSInstanceId

The type of machine deployed by the collector, when configType For collectorDeployMachine When displayed. Then, you can perform the following operations:

  • ECSInstanceId:ECS instance
  • ACKCluster: the container Kubernetes cluster
userName String elastic

Output specifies the user name of the instance. The default name is elastic. When configType For collectorTargetInstance or collectorElasticsearchForKibana When displayed.

gmtCreatedTime String 2020-06-20T07:26:47.000+0000

The time when the collector was created.

gmtUpdateTime String 2020-06-20T07:26:47.000+0000

The collector update time.

name String ct-test

The name of the collector.

ownerId String 16852099488*****

The ID of the Alibaba Cloud account.

resId String ct-cn-77uqof2s7rg5c****

The collector instance ID.

resType String fileBeat

The collector type, which supports fileBeat, metricBeat, heartBeat, and audiBeat.

resVersion String 6.8.5_with_community

The collector version. The supported versions are related to the deployment machine type of the collector, as follows:

  • ECS:6.8.5_with_community
  • ACK:6.8.13_with_community
status String active

The collector status. Activing (in effect) and active (in effect) are supported.

vpcId String vpc-bp16k1dvzxtma*****

Virtual Private Cloud ID. where the collector is located

Examples

Sample requests


     POST /openapi/collectors/ct-cn-77uqof2s7rg5c **** /actions/rename HTTP/1.1 public request header {"name": "collectorName1" } 
   

Sample success responses

JSON format


     { "Result": { "gmtCreatedTime": "2021-01-14T08:54:42.000+0000", "gmtUpdateTime": "2021-01-18T03:59:20.140+0000", "name": "API_test", "resId": "ct-cn-tfv81t7vs8608****", "resVersion": "6.8.5_with_community", "vpcId": "vpc-bp12nu14urf0upaf4****", "resType": "fileBeat", "ownerId": "168520994880****", "collectorPaths": [ "/opt/test/logs/" ], "configs": [ { "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 ......" } ], "status": "active", "extendConfigs": [ { "configType": "collectorTargetInstance", "instanceId": "es-cn-nif201ihd0012****", "instanceType": "elasticsearch", "hosts": [ "es-cn-nif201ihd0012****.elasticsearch.aliyuncs.com:9200" ], "protocol": "HTTP", "userName": "elastic", "enableMonitoring": false }, { "configType": "collectorDeployMachine", "type": "ECSInstanceId", "machines": [ { "instanceId": "i-bp11u91xgubypcuz****", "agentStatus": "heartOk" } ], "groupId": "default_ct-cn-tfv81t7vs8608****" } ], "dryRun": false }, "RequestId": "9B2BD604-3B93-4F66-91F0-43B4D2D268FF" } 
   

Error codes

For a list of error codes, visit the Error Center.