Setting up Nagios and Munin

Overview

This post is really old and was written when I was only just starting to grasp Linux systems, please take it all with a grain of salt.

Recently I setup Nagios and Munin on a dedicated server in France to monitor some of my mirrors (Now inactive) that I run. So far its been really good, getting it to send emails was a bit of a hassle but I expected that. I’ve got it tracking all the services hosted on the servers along with disk space on all partitions and checking for packetloss etc.

Why Munin, why not Cacti?

Basically I chose Munin over Cacti simply because Munin looked a lot easier plus it integrates with Nagios better. It’ll notify Nagios if it sees trends that it mightn’t understand as it only does static checks, if its up then its fine with it, where as Munin looks at the resources over a period of time. I also chose Munin over Cacti since I remember hearing once that Cacti is more orientated towards cPanel servers and I only run one.

Nagios so far

Nagios is great! Its tracking 3 servers through both remote calls, HTTP, SSH etc. And checking local information through NRPE. NRPE stands for Nagios Remote Plugin Executor and its REALLY easy to setup. It uses xinetd as the Internet daemon on the local machine making it incredibly easy to use. All you have to do is add the commands you want on the local machine into the nrpe.cfg file and then on the monitoring server just add check_nrpe!command as a new service to monitor and you’re done! It’s honestly as easy as that!

The great thing I love about Nagios is that it doesn’t notify you as SOON as something goes down, it waits until it has failed 3 checks so that it can confirm it is actually down. This functionality gets rid of false positives all together.

Munin so far

Munin is even easier to setup than Nagios, its pretty much plug and play through and through. You install a Munin server on a chose machine then you simply just install Munin Node on the machines you want to monitor, change some config files so they talk to each other and you’re done! Once you’ve started recording you are able to get fancy graphs.

Downside with my setup

My major downside is that I’ve got my monitoring server located within the same datacenter as my other servers meaning that it can’t really monitor external packet loss/load time since its always going to be 100% basically. I hope to move it to either a VPS or AWS sometime next week after I fix a couple of kinks here and there.

James Loh

I'm a Sysadmin for a web solutions company deploying clouds across the globe. I learn new things every day.

Australia @itsjloh jloh jloh