Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've got some NT boxes located on EC2 that I'd like to monitor. The problem is that the Nagios box needs to know an IP address it can connect to in order to do the monitoring, and the IPs of the instances change every time they start.

Is there a good way of doing this or am I going to be forced into writing a program that will poll EC2's API?

share|improve this question
// , Good question, although if I was to read the title alone, I would get the impression that it is sort of a matter of opinion. Can you make it a bit more specific, perhaps? Or at least change the title to something like "How do I set up static access points in EC2 for Nagios to monitor?"? – Nathan Basanese Jul 21 '15 at 1:47
up vote 4 down vote accepted

You can use Dynamic DNS. Install a Dynamic-DNS client on every one of your servers and the IP will be updated when it changes.

You'll have to configure Nagios with hostnames instead of IPs. Probably you want a low TTL on the DNS server to avoid the old IP being cached too long.

share|improve this answer
// , Now that is the clever way to do it, for sure. – Nathan Basanese Jul 21 '15 at 1:48

You can look in to Elastic IPs if you need static IP addresses. These are IPs owned by your AWS account that you can assign to any instance you run.

Elastic IP addresses are static IP addresses designed for dynamic cloud computing. An Elastic IP address is associated with your account, not a particular instance, and you control that address until you choose to explicitly release it. Unlike traditional static IP addresses, however, Elastic IP addresses allow you to mask instance or availability zone failures by programmatically remapping your public IP addresses to any instance associated with your account.

share|improve this answer

We use Nagios for monitoring our Windows instances on EC2:

  1. Get Elastic IPs (you need static IP addresses).

  2. Open ping in the EC2 firewall (blocked by default)

  3. Done!

share|improve this answer

Groundwork Open Source 6.4 has a Cloud Connector which uses the EC2 API to autodiscover and add/remove hosts - handy for app/websites which scale up and down.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.