|
|
|
@ -39,6 +39,7 @@ import ( |
|
|
|
|
const ( |
|
|
|
|
ec2Label = model.MetaLabelPrefix + "ec2_" |
|
|
|
|
ec2LabelAZ = ec2Label + "availability_zone" |
|
|
|
|
ec2LabelArch = ec2Label + "architecture" |
|
|
|
|
ec2LabelInstanceID = ec2Label + "instance_id" |
|
|
|
|
ec2LabelInstanceState = ec2Label + "instance_state" |
|
|
|
|
ec2LabelInstanceType = ec2Label + "instance_type" |
|
|
|
@ -219,6 +220,10 @@ func (d *Discovery) refresh(ctx context.Context) ([]*targetgroup.Group, error) { |
|
|
|
|
labels[ec2LabelInstanceLifecycle] = model.LabelValue(*inst.InstanceLifecycle) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if inst.Architecture != nil { |
|
|
|
|
labels[ec2LabelArch] = model.LabelValue(*inst.Architecture) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if inst.VpcId != nil { |
|
|
|
|
labels[ec2LabelVPCID] = model.LabelValue(*inst.VpcId) |
|
|
|
|
labels[ec2LabelPrimarySubnetID] = model.LabelValue(*inst.SubnetId) |
|
|
|
|