Skip to content

ELBv2; S3 discovery improvements

Latest
Compare
Choose a tag to compare
@wawastein wawastein released this 01 Sep 20:27

Default Zabbix template version bump to 3.4. If you encounter any backward incompatibility with 3.0 - revert to release 1.0.0 and open an issue.

Improvements by @diegosainz:

S3: filter the discovered buckets to those only in the active region, making all the metrics valid for all the buckets discovered once the items have been created from their protoypes.

ELBv2:

Discovery for each target in the application load balancer:

  1. {#TARGET_GROUP_LOAD_BALANCER_NAME}
  2. {#TARGET_GROUP_PORT}
  3. {#TARGET_GROUP_LOAD_BALANCER_ARN}
  4. {#TARGET_GROUP_VPC_ID}
  5. {#TARGET_GROUP_LOAD_BALANCER_DNS_NAME}
  6. {#TARGET_GROUP_ARN}
  7. {#TARGET_GROUP_NAME}
  8. {#TARGET_COUNT}

Item prototypes:

  1. ELBv2: {#TARGET_GROUP_LOAD_BALANCER_NAME} target group {#TARGET_GROUP_NAME} total targets
    • Calculated: instances[{#TARGET_GROUP_LOAD_BALANCER_NAME}][{#TARGET_GROUP_NAME}]
  2. ELBv2: {#TARGET_GROUP_LOAD_BALANCER_NAME} {#TARGET_GROUP_NAME} UnHealthyHostCount (Formula: {#TARGET_COUNT})
    • External check: cloudwatch.metric[120,UnHealthyHostCount,AWS/ApplicationELB,Maximum,{$REGION},"LoadBalancer={#TARGET_GROUP_LOAD_BALANCER_ARN},TargetGroup={#TARGET_GROUP_ARN}",{$ACCOUNT}]

Trigger prototypes:

  1. ELBv2: No data points for {#TARGET_GROUP_LOAD_BALANCER_NAME} target {#TARGET_GROUP_NAME}
  2. ELBv2: {#TARGET_GROUP_LOAD_BALANCER_NAME} target group {#TARGET_GROUP_NAME} has no active instances
  3. ELBv2: {#TARGET_GROUP_LOAD_BALANCER_NAME} target group {#TARGET_GROUP_NAME} unhealthy nodes

Sample discovery output:

./aws_discovery.py --service elbv2 --region us-west-2 --account zabbix
{
  "data": [
    {
      "{#TARGET_GROUP_LOAD_BALANCER_NAME}": "my-alb",
      "{#TARGET_GROUP_PORT}": 80,
      "{#TARGET_GROUP_LOAD_BALANCER_ARN}": "app/my-alb/b44d85146ca026e4",
      "{#TARGET_GROUP_VPC_ID}": "vpc-2f63274a",
      "{#TARGET_GROUP_LOAD_BALANCER_DNS_NAME}": "my-alb-1547203952.us-west-2.elb.amazonaws.com",
      "{#TARGET_GROUP_ARN}": "targetgroup/my_target_group/991198ea77cd3df1",
      "{#TARGET_GROUP_NAME}": "my_target_group",
      "{#TARGET_COUNT}": 2
    }
  ]
}

Example of an item generated by one of the discovery item protoype's:

cloudwatch.metric[120,UnHealthyHostCount,AWS/ApplicationELB,Maximum,{$REGION},"LoadBalancer=app/my-alb/b44d85146ca026e4,TargetGroup=my_target_group/my-alb-cluster01/124f7add7d583f11",{$ACCOUNT}]

Which would result in the following being executed:

./cloudwatch.metric --interval 120 --metric UnHealthyHostCount --namespace AWS/ApplicationELB --statistic Maximum --region us-west-2 --dimension "LoadBalancer=app/my-alb/b44d85146ca026e4,TargetGroup=targetgroup/`my_target_group/991198ea77cd3df1" --account zabbix