Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

4 Answers 4

up vote 3 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

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

 
discard

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.