FlamingMoe
FlamingMoe

Reputation: 2994

Monitoring instances in cloud

I usually use Munin as monitoring software, but this (as others software I presume) needs an IP to make the ICMP or whatever pings to collect data.

In Amazon EC2 instances are created on the fly, with IP's you don't know.

How can they be monitored ?

I was thinking about using amazon console commands to read the IP's of the instances up, and change the monit configuration file on the fly also , but it can be too complicated ... or not?

Any other solution / suggestion ?

Thank you

Upvotes: 3

Views: 909

Answers (3)

littlepea
littlepea

Reputation: 1034

If your Munin master and nodes are all hosted on EC2 than it's better to use internal hosts like domU-00-00-00-00-00-00.compute-1.internal. because this way you don't have to deal with IP addresses and security groups.

You also have to set this in /etc/munin/munin-node.conf:

allow ^.*$

You can read more about it in Monitoring AWS Ubuntu Instances using Munin

But if your Munin master is not on EC2 your best bet is to attach Elastic IP to your EC2 instance.

Upvotes: 0

rdickeyvii
rdickeyvii

Reputation: 171

I use revealcloud to monitor my amazon instances. You can install it once and create an ami from that systen, or bootstrap the install command if that's your method. Since the install is just one command, it's easy enough to put into the rc.local (or similar). You can then see all the instances in the dashboard or topiew as soon as they boot up.

Upvotes: 2

Till
Till

Reputation: 22408

Our instances are bootstrapped using chef recipes, so it's easier for me to provide IPs/hosts as they (= all members of my cluster) get entered into /etc/hosts on start-up. Generally, it doesn't hurt to use elastic IPs for a master server and allow all connections (in /etc/munin/munin.conf by default).

I'd solve the security 'question' on the security groups level. E.g. allow only instances with a certain security group to connect to the munin-node process (on port 4949). The question which remains is.

E.g., using ec2-authorize you can achieve

ec2-authorize mygroup -o monitorgroup -u <AWS-USER-ID>

This means that all instances with group monitorgroup can access resources on instances with mygroup.

Let me know if this helps!

Upvotes: 0

Related Questions