From 296644adeb9a73b1439ee7858a26608668ca3bd6 Mon Sep 17 00:00:00 2001 From: Mitsuhiro Tanda Date: Fri, 21 Oct 2016 19:13:47 +0900 Subject: [PATCH] Expose ec2_instance_type (#2107) --- retrieval/discovery/ec2.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/retrieval/discovery/ec2.go b/retrieval/discovery/ec2.go index 63635e1f2..0d4d0fc2f 100644 --- a/retrieval/discovery/ec2.go +++ b/retrieval/discovery/ec2.go @@ -37,6 +37,7 @@ const ( ec2LabelAZ = ec2Label + "availability_zone" ec2LabelInstanceID = ec2Label + "instance_id" ec2LabelInstanceState = ec2Label + "instance_state" + ec2LabelInstanceType = ec2Label + "instance_type" ec2LabelPublicDNS = ec2Label + "public_dns_name" ec2LabelPublicIP = ec2Label + "public_ip" ec2LabelPrivateIP = ec2Label + "private_ip" @@ -153,6 +154,7 @@ func (ed *EC2Discovery) refresh() (tg *config.TargetGroup, err error) { labels[ec2LabelAZ] = model.LabelValue(*inst.Placement.AvailabilityZone) labels[ec2LabelInstanceState] = model.LabelValue(*inst.State.Name) + labels[ec2LabelInstanceType] = model.LabelValue(*inst.InstanceType) if inst.VpcId != nil { labels[ec2LabelVPCID] = model.LabelValue(*inst.VpcId)