Installing and Configuring Nagios on Fedora 20

In spite of a large corporate installation of Sitescope and Service Center, I decided to take a look into Nagios for the first time. Instead of having to install via source as I expected, I was pleased to see that both Nagios and the Nagios plugins were available in the fc20 repo.

The first thing I noticed was that the instructions were for Fedora 6, when there was no option to install via yum or rpm, but rather from source, so many of the steps could be ignored or had to be altered. For example, to set up login security, here was the sourceforge.net command:

htpasswd -c /usr/local/nagios/etc/htpasswd.users nagiosadmin

Now that nagios was installed via yum, the default installation directory is /etc/nagios, so you have to modify the commands slightly.

I finally got the console to work, only to find that nothing was being reported because apparently of missing plugins (error code 127: out of bounds). In the end, it turned out to be that the plugins were owned by root, and they needed to be owned by the nagios ID. On FC20, the plugins directory (assuming 64 bit) is /usr/lib64/nagios/plugins. These files need to be owned by nagios (and for consistency sake) have the group set to nagios as well. Once I did that, after about 90 seconds all of my monitors cleared and my system was in the green.

Get started at http://www.nagios.org/.

 

Leave a Reply

Your email address will not be published. Required fields are marked *