The Method of Installing Nagios: An Important Choice
Server - Nagios


The decision of how you install Nagios is an important one. One of the major decisions you need to make with Nagios is the method of install; compile from source, install from an RPM repository or install from a DEB repository. Once you make a choice you will need to stick with it. The reason for this is that each installation method creates different paths to the configuration files and to the binaries. For example:


NAGIOS Program Location Configuration File Plugins

Compile /usr/local/nagios/bin/nagios /usr/local/nagios/etc/nagios.cfg /usr/local/nagios/libexec

CentOS /usr/bin/nagios /etc/nagios/nagios.cfg /usr/lib/nagios/plugins

Debian/Ubuntu /usr/bin/nagios3 /etc/nagios3/nagios.cfg /usr/lib/nagios/plugins


From this brief example you can see the location is completely different for each option and in the case of Ubuntu the binary is named differently. This means that any additional programs that you implement with Nagios will have to coincide with these locations or the administrator will need to edit each line that indicates a path in any additional configuration files...not nice.


So what is the criteria for choosing an option?


1. What are you going to monitor?

If all you are going to do is monitor a few public ports like 21, 22, 25, 80, and 443 it is easiest to use the RPM repository or Deb repository with the commands yum or apt-get respectively. Note for CentOS you have to use the rpmforge repository as Nagios is not in the CentOS repository. Simple set ups can benefit from these quick easy installs.


If you want to monitor anything beyond the basics, compile not hesitate to take this choice.


2. What Addons will you use?

Addons are applications that can be used with Nagios to enhance the features, like mapping, MySQL backend, graphing, etc. If you want to use Addons, compile. The reason for that is most Addons assume you will compile and if you try to use another option you will continually find configuration issues.


3. Where will you get help?

This is also a major factor in your choice. If you purchase a book, access a web site or ask a friend, you will have to know if that information refers to an installation that was compiled or installed using a repository. If you purchased a book, do what the book says. If you have a favorite web site, do what they do. But whatever you do don't try to mix the information as it can be very confusing. If you have installed using the RPM repository and you read a book that is written for an installation that was compiled, you will need to translate each path to your settings.


In the end the decision in how to install Nagios really is related to simplicity of your install and what you want to monitor. For a very simple set up it will work fine, but if you want to get serious about what Nagios and do, compile.