Skip to content

Collector 'AWS-ELB' 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. For example: 'cn-north-1'
See the appendix for the complete list

2. Configuration Example

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 the 'Infrastructure-Resource Catalog' of TrueWatch.

An example of the reported data is as follows:

{
  "measurement": "aws_aelb",
  "tags": {
    "name"                 : "app/openway/8e8d762xxxxxx",
    "RegionId"             : "cn-northwest-1",
    "LoadBalancerArn"      : "arn:aws-cn:elasticloadbalancing:cn-northwest-1:588271xxxxx:loadbalancer/app/openway/8e8d762xxxxxx",
    "State"                : "active",
    "Type"                 : "application",
    "VpcId"                : "vpc-2exxxxx",
    "Scheme"               : "internet-facing",
    "DNSName"              : "openway-203509xxxx.cn-northwest-1.elb.amazonaws.com.cn",
    "LoadBalancerName"     : "openway",
    "CanonicalHostedZoneId": "ZM7IZAIxxxxxx"
  },
  "fields": {
    "CreatedTime"         : "2022-03-09T06:13:31Z",
    "ListenerDescriptions": "{JSON data}",
    "AvailabilityZones"   : "{Availability Zone JSON data}",
    "message"             : "{Instance JSON data}"
  }
}
Note

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

Tip

AWS ELB Measurement sets are divided into four types based on different load balancers:

  1. Application ELB corresponds to the measurement set aws_aelb
  2. Network ELB corresponds to the measurement set aws_nelb
  3. Gateway ELB corresponds to the measurement set aws_gelb
  4. Classic ELB corresponds to the measurement set aws_elb
Tip

The value of tags.name is determined in two ways:

  1. For Classic Load Balancers, it takes the LoadBalancerName field.
  2. For Application, Network, and Gateway Load Balancers, it extracts the end part of the Load Balancer ARN (LoadBalancerArn).

Taking Network Load Balancer as an example:

LoadBalancerArn is arn:awS-cn:elasticloadbalancing:cn-northwest-1:xxxx1335135:loadbalancer/net/k8s-forethou-kodongin-xxxxa46f01/xxxxe75ae81d08c2

The corresponding tags.name is net/k8s-forethou-kodongin-xxxxa46f01/xxxxe75ae81d08c2

!!! tip

- `fields.message`, `tags.AvailabilityZones` are JSON serialized strings
- The `tags.state` field represents the state of Load Balancers, with possible values: `active`, `provisioning`, `active_impaired`, `failed` (this field is not present for "classic" type load balancer instances)
- The `tags.Type` field represents the type of Load Balancers, with possible values: `application`, `network`, `gateway`, `classic`
- The `tags.Scheme` field represents the mode of Load Balancers, with possible values: `internet-facing`, `internal`
- The `fields.ListenerDescriptions` field is the list of listeners for this load balancer
- The `fields.AvailabilityZones` field represents the Amazon Route 53 availability zone information associated with the load balancer

4. IAM Policy Permissions

Tip

If users collect resources by assuming an IAM role, certain permissions need to be enabled.

This collector requires the following operation permissions:

elasticloadbalancing:DescribeLoadBalancers

elasticloadbalancing:DescribeListeners

X. Appendix

Please refer to the AWS official documentation: