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?
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.
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.
We use Nagios for monitoring our Windows instances on EC2:
Get Elastic IPs (you need static IP addresses).
Open ping in the EC2 firewall (blocked by default)
Done!
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.