mirror of
https://github.com/prometheus/prometheus.git
synced 2024-11-09 23:24:05 -08:00
Incorporate feedback
Signed-off-by: George Brighton <george@gebn.co.uk>
This commit is contained in:
parent
2d8f9c6f61
commit
1f752b6910
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue