DescribeCollector

Updated at:

Queries the details of a collector instance.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

elasticsearch:DescribeCollector

get

*collectors

acs:elasticsearch:{#regionId}:{#accountId}:collectors/{#collectorsId}

None None

Request syntax

GET /openapi/collectors/{ResId} HTTP/1.1

Path Parameters

Parameter

Type

Required

Description

Example

ResId

string

Yes

The instance ID of the collector.

ct-cn-rg31ahn82m0qd****

Request parameters

Parameter

Type

Required

Description

Example

No parameters required.

Response elements

Element

Type

Description

Example

object

RequestId

string

The ID of the request.

5FFD9ED4-C2EC-4E89-B22B-1ACB6FE1****

Result

object

The returned result.

resId

string

The instance ID of the collector.

ct-cn-rg31ahn82m0qd****

gmtUpdateTime

string

The time when the collector was updated.

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

dryRun

boolean

Specifies whether to validate and create the collector. Valid values:

  • true: Only validates the configuration without creating the collector.

  • false: Validates the configuration and creates the collector.

false

ownerId

string

The ID of the account.

16852099488*****

vpcId

string

The ID of the virtual private cloud (VPC) where the collector resides.

vpc-bp16k1dvzxtma*****

resType

string

The type of the collector. Valid values: fileBeat, metricBeat, heartBeat, and auditBeat.

fileBeat

resVersion

string

The version of the collector.

6.8.5_with_community

gmtCreatedTime

string

The time when the collector was created.

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

status

string

The status of the collector. Valid values:

  • activing: Activating.

  • active: Active.

active

name

string

The name of the collector.

ct-cn-4135is2tj194p****

configs

array<object>

The configuration file information of the collector.

object

content

string

The content of the file.

fileBeat.inputs:xxx

fileName

string

The name of the file.

filebeat.yml

extendConfigs

array<object>

The extended configurations of the collector.

array<object>

successPodsCount

string

The number of pods from which data is successfully collected in the ACK cluster.

8

protocol

string

The transmission protocol, which must be consistent with the access protocol of the instance specified in the collector output. Valid values: HTTP and HTTPS. This parameter is displayed when configType is set to collectorTargetInstance.

HTTP

userName

string

The username used to access the instance specified in the collector output. Default value: elastic. This parameter is displayed when configType is set to collectorTargetInstance or collectorElasticsearchForKibana.

elastic

totalPodsCount

string

The total number of pods from which data is collected in the ACK cluster.

10

type

string

The type of the machine on which the collector is deployed. This parameter is displayed when configType is set to collectorDeployMachine. Valid values:

  • ECSInstanceId: ECS instance.

  • ACKCluster: ACK cluster.

ECSInstanceId

kibanaHost

string

The public network access address of Kibana after the Kibana dashboard is enabled. This parameter is displayed when configType is set to collectorElasticsearchForKibana.

https://es-cn-nif1z89fz003i****.kibana.elasticsearch.aliyuncs.com:5601

enableMonitoring

boolean

Specifies whether to enable monitoring. This parameter is displayed when configType is set to collectorTargetInstance. Valid values:

  • true: Enables monitoring.

  • false: Disables monitoring.

true

configType

string

The configuration type. Valid values:

  • collectorTargetInstance: The output of the collector.

  • collectorDeployMachine: The machine on which the collector is deployed.

  • collectorElasticsearchForKibana: The information about the Elasticsearch instance that supports the Kibana dashboard.

collectorDeployMachine

instanceType

string

The type of the instance specified in the collector output. Valid values: elasticsearch and logstash. This parameter is displayed when configType is set to collectorTargetInstance.

elasticsearch

groupId

string

The ID of the machine group. This parameter is displayed when configType is set to collectorDeployMachine.

default_ct-cn-5i2l75bz4776****

host

string

The private endpoint of Kibana after the Kibana dashboard is enabled. This parameter is displayed when configType is set to collectorElasticsearchForKibana.

es-cn-n6w1o1x0w001c****-kibana.internal.elasticsearch.aliyuncs.com:5601

instanceId

string

Instance ID of the instance associated with the collector. If configType is set to collectorTargetInstance, this parameter indicates instance ID of the instance specified in the collector output. If configType is set to collectorDeployMachines and type is set to ACKCluster, this parameter indicates instance ID of the ACK cluster.

es-cn-n6w1o1****

machines

array<object>

The list of ECS instances on which the collector is deployed. This parameter is displayed when configType is set to collectorDeployMachines and type is set to ECSInstanceId.

object

agentStatus

string

The status of each collector on the ECS instance. Valid values:

  • heartOk: The heartbeat is normal.

  • heartLost: The heartbeat is abnormal.

  • uninstalled: The collector is not installed.

  • failed: The installation failed.

heartOk

instanceId

string

The list of ECS instance IDs.

i-bp1gyhphjaj73jsr****

hosts

array

The list of host addresses of the target instances for the collector.

string

The list of access addresses of the instance specified in the collector output. This parameter is displayed when configType is set to collectorTargetInstance.

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

collectorPaths

array

The list of Filebeat collection paths.

string

The Filebeat collection path.

["/var/log"]

extendConfigs includes three configType values: collectorTargetInstance, collectorElasticsearchForKibana, and collectorDeployMachine. The returned parameters vary based on the deployment machine. The specific combinations are as follows:

  • collectorTargetInstance

    • ECS configType, instanceId, instanceType, hosts, userName, password, protocol, and enableMonitoring

    • ACK configType, instanceId, instanceType, userName, password, protocol, and enableMonitoring

  • collectorElasticsearchForKibana

    • ECS configType, instanceId, host, kibanaHost, userName, password, and protocol

    • ACK configType

  • collectorDeployMachine

    • ECS configType, type, machines, and groupId

    • ACK configType, type, instanceId, totalPodsCount, and successPodsCount

Examples

Success response

JSON format

{
  "RequestId": "5FFD9ED4-C2EC-4E89-B22B-1ACB6FE1****",
  "Result": {
    "resId": "ct-cn-rg31ahn82m0qd****",
    "gmtUpdateTime": "2020-06-20T07:26:47.000+0000",
    "dryRun": false,
    "ownerId": "16852099488*****",
    "vpcId": "vpc-bp16k1dvzxtma*****",
    "resType": "fileBeat",
    "resVersion": "6.8.5_with_community",
    "gmtCreatedTime": "2020-06-20T07:26:47.000+0000",
    "status": "active",
    "name": "ct-cn-4135is2tj194p****",
    "configs": [
      {
        "content": "fileBeat.inputs:xxx",
        "fileName": "filebeat.yml"
      }
    ],
    "extendConfigs": [
      {
        "successPodsCount": "8",
        "protocol": "HTTP",
        "userName": "elastic",
        "totalPodsCount": "10",
        "type": "ECSInstanceId",
        "kibanaHost": "https://es-cn-nif1z89fz003i****.kibana.elasticsearch.aliyuncs.com:5601",
        "enableMonitoring": true,
        "configType": "collectorDeployMachine",
        "instanceType": "elasticsearch",
        "groupId": "default_ct-cn-5i2l75bz4776****",
        "host": "es-cn-n6w1o1x0w001c****-kibana.internal.elasticsearch.aliyuncs.com:5601",
        "instanceId": "es-cn-n6w1o1****",
        "machines": [
          {
            "agentStatus": "heartOk",
            "instanceId": "i-bp1gyhphjaj73jsr****"
          }
        ],
        "hosts": [
          "[\"es-cn-n6w1o1x*****.elasticsearch.aliyuncs.com:9200\"]"
        ]
      }
    ],
    "collectorPaths": [
      "[\"/var/log\"]"
    ]
  }
}

Error codes

HTTP status code

Error code

Error message

Description

400 ComponentCodeValueError component value is disable
401 UserNotOpen Aliyun account is not open elasticsearch
401 StsRoleAccountNoPermission Role account has no permission or expired
401 SubAccountNoPermission Aliyun sub account has no permission, please authorize your sub account in Aliyun RAM
401 UserUnauthorized Authentication required

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.