Node-exporter target IPs from EC2 discovery in different VPCs

585 views
Skip to first unread message

ach...@alpha-sense.com

unread,
Feb 13, 2017, 6:18:35 PM2/13/17
to Prometheus Users
In order for Prometheus to monitor EC2 instances in different VPCs, is using VPC Peer the way to go or are there some other way?

And what about if I want to monitor using external IPs (if exist) instead?  Is relabel the way to do that?

brent...@gmail.com

unread,
Jun 23, 2017, 1:07:04 PM6/23/17
to Prometheus Users, ach...@alpha-sense.com
Did you ever find a way to use external IPs?  I just ran into the same issue.  I'm using a t2.small in a VPC (because t2.small isn't avail in EC2-classic) trying to monitor EC2-classic servers (i.e. non-VPC.)  Everything is good to go except the ip's are internal to the VPC so while my yaml does correctly identify the servers I want to monitor via tag names, it's trying to monitor them by internal ip address.

Tobias Schmidt

unread,
Jun 23, 2017, 8:39:13 PM6/23/17
to brent...@gmail.com, Prometheus Users, ach...@alpha-sense.com
In general, I'd recommend to migrate anything into VPCs and not to run Prometheus and your targets in different networks.

The public_ip of an instance is available as meta label https://prometheus.io/docs/operating/configuration/#<ec2_sd_config>. Use relabeling to change the __address__ label.

--
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/856e8db8-2f9c-492b-820d-8141f398ca5b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages