Comments on Installing Nagios 3.4.4 On CentOS 6.3

Installing Nagios 3.4.4 On CentOS 6.3 Nagios is a monitoring tool under GPL licence. This tool lets you monitor servers, network hardware (switches, routers, ...) and applications. A lot of plugins are available and its big community makes Nagios the biggest open source monitoring tool. This tutorial shows how to install Nagios 3.4.4 on CentOS 6.3.

16 Comment(s)

Add comment

Please register in our forum first to comment.

Comments

By:

Hi,

thanks for the HOWTO, just my two cents:

* Starting the HOWTO by telling the readers to disable the SELinux is a bad practice. Nagios is working smoothly with SELinux even in enforced mode, but to let the SELinux stay in permissive mode is better than nothing.

 

Hint:

cat /var/log/secure | audit2allow

 

Just pick-up the Nagios entries, create a new policy file with

audit2allow -M

and load with

semodule

 

* Because the strongly preffered software management in CentOS is the RPM packages, and the Nagios 3.3 is in EPEL repo, the alternate end of this HOWTO could be just altering the nagios.spec and build a RPM instead of compiling and installing directly in filesystem...

By: OERNii

nagios is a PITA to get to work under selinux. i have it disabled after 3 days of fight. Also use the RPM, not the source.

By: Marty

The following is from the Nagios Manual:
 
The biggest advantage of installing from source is that the installation process can be repeated on almost any Linux distribution. This aspect is even more important when you consider that whether you install from a RPM repository (CentOS) or from a DEB repository (Ubuntu) the file names and locations for files are different in each case. The implications for documentation are that you must translate any documentation to the installation method that was chosen.
Another significant advantage of compiling from source is that you have more options so the configuration may be altered to meet specific requirements. Of course, any changes to the defaults mean that the documentations and other dependencies must be evaluated per the changes from the default. The installation of Nagios must be performed as root.

By: Anonymous

Not only is advising to disable SELinux bad practice, so is the approach of building as root.

And why would one even build from a tarball when the Fedora EPEL repo already provides an RPM. Rather get that, or build from the SRPM: ftp://ftp.nluug.nl/site/download.fedora.redhat.com/pub/fedora-epel/6/SRPMS/nagios-3.4.4-1.el6.src.rpm

 

By: The Sysadmin Himself

I was able to make this work without disabling SELinux. You essentially have to add the PHP directories with semanage. See my blog post on this: Configuring SELinux for Centeron 2.4 on CentOS 6.3.

A guide to install Centreon on CentOS.

By: Bourne

can't access nagios 3.4.4 web interface

 

Not Found

The requested URL /nagios/ was not found on this server.


Apache/2.2.15 (CentOS) DAV/2 PHP/5.3.3 mod_ssl/2.2.15 OpenSSL/1.0.0-fips Server at 192.168.46.51 Port 80

 

By: Anonymous

Im having the same error. HELP!!!!!!! I dont know why???

Not Found

The requested URL /nagios was not found on this server.


Apache/2.2.15 (CentOS) Server at 127.0.0.1 Port 80

 

By: Anonymous

Did you find why you had this problem? I have the same problem.

By: Anonymous

I got the same error and had to restart httpd process to pick up the conf.d changes.

if that doesn't work, look at the nagios config file in the conf.d dir for apache and look at what the alias and file path for /nagios/ is.

By: Anonymous

how to log out nagios web interface brooo...

By: Joseph

Some useful info here if you got stuck....

By: Stuart Macfarlane

Don't forget to make sure you have "make" and "perl" installed also.

If you don't have "make" installed you won't be able to complete the part after ./configure. Also if you don't have "perl" installed you will have errors at the end of the ./configure command and won't be able to run make all.

By: Abhishek

the information provided by u is really fruitful and accurate.

By: Anonymous

After installing nagios, if you are getting forbidden 403 error then don't forget to add index.php in your httpd.conf index section.

By:

This HOWTO was written for 6.3

 If you are now using centos 6.4+ it can be found in EPEL and installed with yum

By: Ancalagon

First I modified the nagios folder structure's SELinux labels to allow httpd read access:# chcon -R --reference=/var/www/html /usr/local/nagios/share# chcon -R --reference=/var/www/html /usr/local/nagios/var# chcon -R --reference=/var/www/cgi-bin /usr/local/nagios/sbinNext I changed the ~var/rw folder to allow write access via the httpd_sys_rw_content_t label:# chcon -R -t httpd_sys_rw_content_t /usr/local/nagios/var/rw