diff --git a/discovery/aws/ec2.go b/discovery/aws/ec2.go index 05a44e1a9..0b2bb316b 100644 --- a/discovery/aws/ec2.go +++ b/discovery/aws/ec2.go @@ -228,8 +228,8 @@ func (d *EC2Discovery) refresh(ctx context.Context) ([]*targetgroup.Group, error // Prometheus requires a reload if AWS adds a new AZ to the region. if d.azToAZID == nil { if err := d.refreshAZIDs(ctx); err != nil { - level.Warn(d.logger).Log( - "msg", "Unable to describe availability zones, ensure Prometheus has ec2:DescribeAvailabilityZones", + level.Debug(d.logger).Log( + "msg", "Unable to describe availability zones", "err", err) } } @@ -270,7 +270,7 @@ func (d *EC2Discovery) refresh(ctx context.Context) ([]*targetgroup.Group, error azID, ok := d.azToAZID[*inst.Placement.AvailabilityZone] if !ok && d.azToAZID != nil { level.Debug(d.logger).Log( - "msg", "Availability zone not found, try reloading Prometheus", + "msg", "Availability zone not found", "az", *inst.Placement.AvailabilityZone) } labels[ec2LabelAZID] = model.LabelValue(azID) diff --git a/docs/configuration/configuration.md b/docs/configuration/configuration.md index e48ba6a0b..d5dd52d05 100644 --- a/docs/configuration/configuration.md +++ b/docs/configuration/configuration.md @@ -898,7 +898,7 @@ The following meta labels are available on targets during [relabeling](#relabel_ * `__meta_ec2_ami`: the EC2 Amazon Machine Image * `__meta_ec2_architecture`: the architecture of the instance * `__meta_ec2_availability_zone`: the availability zone in which the instance is running -* `__meta_ec2_availability_zone_id`: the [availability zone ID](https://docs.aws.amazon.com/ram/latest/userguide/working-with-az-ids.html) in which the instance is running +* `__meta_ec2_availability_zone_id`: the [availability zone ID](https://docs.aws.amazon.com/ram/latest/userguide/working-with-az-ids.html) in which the instance is running (requires `ec2:DescribeAvailabilityZones`) * `__meta_ec2_instance_id`: the EC2 instance ID * `__meta_ec2_instance_lifecycle`: the lifecycle of the EC2 instance, set only for 'spot' or 'scheduled' instances, absent otherwise * `__meta_ec2_instance_state`: the state of the EC2 instance