Skip to content

Collector "AWS-OpenSearch" Configuration Manual

Before reading this document, please read:

Tip

Before using this collector, you must install the "Integration Core Package" and its accompanying third-party dependencies.

1. Configuration Structure

The configuration structure of this collector is as follows:

Field Type Required Description
regions list Required List of regions to collect data from
regions[#] str Required Region ID. Example: 'cn-north-1'
See appendix for the full list

2. Configuration Example

Specify Region

Collect instance data from Ningxia and Beijing regions

collector_configs = {
    'regions': [ 'cn-northwest-1', 'cn-north-1' ]
}

3. Data Reporting Format

After data is successfully synchronized, you can view the data in TrueWatch's "Infrastructure - Resource Catalog".

An example of the reported data is as follows:

{
  "measurement": "aws_opensearch",
  "tags": {
    "name"                  : "df-prd-es",
    "EngineVersion"         : "Elasticsearch_7.10",
    "DomainId"              : "5882XXXXX135/df-prd-es",
    "DomainName"            : "df-prd-es",
    "ClusterConfig"         : "{JSON data of instance types and counts in the domain}",
    "ServiceSoftwareOptions": "{JSON data of the current state of the service software}",
    "region"                : "cn-northwest-1",
    "RegionId"              : "cn-northwest-1"
  },
  "fields": {
    "EBSOptions": "{JSON data of the elastic block storage for the specified domain}",
    "Endpoints" : "{JSON data of the mapping of domain endpoints for submitting index and search requests}",
    "message"   : "{JSON data of the instance}"
  }
}
Note

The fields in tags and fields may change with subsequent updates.

Tip

The value of tags.name is the instance ID, which serves as the unique identifier.

Tip

The data field corresponding to tags.name in this script is DomainName. When using this script, ensure that there are no duplicate DomainName values across multiple AWS accounts.

Tip

tags.ClusterConfig, tags.Endpoint, tags.ServiceSoftwareOptions, fields.message, fields.EBSOptions, and fields.Endpoints are all JSON serialized strings.

4. IAM Policy Permissions

Note

If users use the IAM role method to collect resources, certain operation permissions need to be enabled.

This collector requires the following permissions:

es:ListDomainNames

es:DescribeDomains

X. Appendix

Please refer to the AWS official documentation: