"Name" field in EC2 Service Discovery?

104 views
Skip to first unread message

Dave Cadwallader

unread,
Oct 20, 2017, 12:15:05 PM10/20/17
to Prometheus Users
I'm looking at the blog post for EC2 SD feature - great write-up!

One point of confusion is around the recommendations for labeling hosts discovered thru this method.  The screenshot shows the EC2 "Name" field like so: 



I would think that this "Name" field would be the best candidate for labeling the target in Prometheus, since it could tell you exactly what the host is.  The instance ID and public DNS names however are auto-generated strings of alphanumeric gobbly-gook that would not be very useful in an alert situation to tell me where the problem is.

For instance, my "Name" fields are things like:  mongo-server1.staging.company.com, but my ec2 public instance names are like ec2-123.456.789.aws.com.

I didn't see the "Name" field listed in the list of meta labels.  Is it possible to grab it for relabeling purposes?  Or am I thinking about this wrong?

Thanks!
Dave

Tom Wilkie

unread,
Oct 20, 2017, 12:16:58 PM10/20/17
to Dave Cadwallader, Prometheus Users
Name is an ec2 tag, so it will be in the __meta_ec2_tag_Name label.

Thanks

Tom

--
You received this message because you are subscribed to the Google Groups "Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-use...@googlegroups.com.
To post to this group, send email to promethe...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/2eeb4364-081d-4fbc-a9a7-b80a66deb080%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Dave Cadwallader

unread,
Oct 20, 2017, 12:19:35 PM10/20/17
to Prometheus Users
Aha! Thank you Tom!  I assumed "Tag" was its own separate field.  Makes sense now!
Reply all
Reply to author
Forward
0 new messages