Skip to content

Collector Configuration Manual 「AWS-ELB」

Before reading this article, please read the following first:

Before using this collector, you must install the 'Core Integration package' and its associated third-party dependency packages

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'
Refer to appendix for complete list

2. Configuration Example

Collecting instance data from Ningxia and Beijing regions

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

3. Data Reporting Format

After data synchronization, you can view the data in the 'Infrastructure - Resource Catalog' section of {{( brand_name }}}.

Example of reported data:

JSON
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
{
  "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"   : "{JSON data for availability zones}",
    "message"             : "{JSON data for instances}"
  }
}

Fields in tags and fields may change with subsequent updates

AWS ELB Metrics sets are divided into four types based on different load balancer types

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

Values for tags.name are determined in two ways

  1. For Classic Load Balancers, use the LoadBalancerName field.
  2. For Application, Network, and Gateway Load Balancers, extract the ending part of the load balancer ARN (LoadBalancerArn).

For example, for a Network Load Balancer:

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

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

Tip

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

4. IAM Policy Permissions

If users use IAM roles to collect resources, certain permissions need to be enabled

This collector requires the following operational permissions:

elasticloadbalancing:DescribeLoadBalancers

elasticloadbalancing:DescribeListeners

X. Appendix

Please refer to AWS official documentation: