Nagios is a popular networking monitoring software. Nagios lets you monitor your IT infrastructure, be it servers, routers, switches or other devices. In this post, I will walk you through the steps of installing and configuring a basic setup of Nagios on CentOS.
At the end of the tutorial you will be have a working Nagios setup to monitor
- local disk space usage
- local system load
- an external website
Whenever there is a problem or recovery with any of the above, Nagios will alert you via email.
Unless you have a strong reason to compile Nagios yourself, you should use the binary packages available for your Linux distribution.
RPMForge provides packages that are not included in CentOS repositories. We will use the Nagios packages from RPMForge.
Enabling RPMForge repository
For 32 bit machines use these commands:
wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.1-1.el5.rf.i386.rpm rpm -ivh rpmforge-release-0.5.1-1.el5.rf.i386.rpm
For 64 bit machines use these commands:
wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.1-1.el5.rf.x86_64.rpm rpm -ivh rpmforge-release-0.5.1-1.el5.rf.x86_64.rpm