Nagios 4.2.0 Released – Install on RHEL/CentOS 7.x/6.x/5.x and Fedora 24-19

If You Appreciate What We Do Here On TecMint, You Should Consider:

  1. Stay Connected to: Twitter | Facebook | Google Plus
  2. Subscribe to our email updates: Sign Up Now
  3. Use our Hosting referral link if you planning to start your blog ($3.82/month).
  4. Become a Supporter - Make a contribution via PayPal
  5. Support us by purchasing our premium books in PDF format.
  6. Support us by taking our online Linux courses

We are thankful for your never ending support.

Ravi Saive

I am Ravi Saive, creator of TecMint. A Computer Geek and Linux Guru who loves to share tricks and tips on Internet. Most Of My Servers runs on Open Source Platform called Linux. Follow Me: Twitter, Facebook and Google+

Your name can also be listed here. Got a tip? Submit it here to become an TecMint author.

RedHat RHCE and RHCSA Certification Book
Linux Foundation LFCS and LFCE Certification Preparation Guide

You may also like...

341 Responses

  1. Larry says:

    Thanks for your respond,I explore the site but there was no solution to it .

  2. LARRY says:

    Thanks for your response but still the same issue after disabled selinux

  3. LARRY says:

    This my error_log but cannot figure out what actually wrong with it, I will appreciate if you can help. Thanks

    [root@walezo httpd]# cat error_log
    [Mon Feb 06 22:31:35.777032 2017] [core:notice] [pid 64994] SELinux policy enabled; httpd running as context system_u:system_r:httpd_t:s0
    [Mon Feb 06 22:31:35.791633 2017] [suexec:notice] [pid 64994] AH01232: suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
    AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using localhost.localdomain. Set the 'ServerName' directive globally to suppress this message
    [Mon Feb 06 22:31:35.830763 2017] [auth_digest:notice] [pid 64994] AH01757: generating secret for digest authentication ...
    [Mon Feb 06 22:31:35.832204 2017] [lbmethod_heartbeat:notice] [pid 64994] AH02282: No slotmem from mod_heartmonitor
    [Mon Feb 06 22:31:36.237038 2017] [mpm_prefork:notice] [pid 64994] AH00163: Apache/2.4.6 (CentOS) PHP/5.4.16 configured -- resuming normal operations
    [Mon Feb 06 22:31:36.237134 2017] [core:notice] [pid 64994] AH00094: Command line: '/usr/sbin/httpd -D FOREGROUND'
    [Mon Feb 06 22:32:07.907357 2017] [authn_file:error] [pid 64998] (2)No such file or directory: [client 192.168.80.1:59572] AH01620: Could not open password file: /usr/local/nagios/etc/htpasswd.users
    [Mon Feb 06 22:33:16.880750 2017] [authn_file:error] [pid 64996] (2)No such file or directory: [client 192.168.80.1:59592] AH01620: Could not open password file: /usr/local/nagios/etc/htpasswd.users
    [Mon Feb 06 23:02:55.957411 2017] [authn_file:error] [pid 64997] (2)No such file or directory: [client 192.168.80.1:60862] AH01620: Could not open password file: /usr/local/nagios/etc/htpasswd.users
    [Mon Feb 06 23:03:10.837134 2017] [authn_file:error] [pid 64998] (2)No such file or directory: [client 192.168.80.1:60951] AH01620: Could not open password file: /usr/local/nagios/etc/htpasswd.users
    [Mon Feb 06 23:04:52.027246 2017] [authn_file:error] [pid 64996] (2)No such file or directory: [client 192.168.80.1:61073] AH01620: Could not open password file: /usr/local/nagios/etc/htpasswd.users
    [Mon Feb 06 23:05:15.447494 2017] [authn_file:error] [pid 64997] (2)No such file or directory: [client 192.168.80.1:61084] AH01620: Could not open password file: /usr/local/nagios/etc/htpasswd.users
    [Mon Feb 06 23:21:22.964409 2017] [mpm_prefork:notice] [pid 64994] AH00170: caught SIGWINCH, shutting down gracefully
    [Mon Feb 06 23:21:25.406106 2017] [core:notice] [pid 65963] SELinux policy enabled; httpd running as context system_u:system_r:httpd_t:s0
    [Mon Feb 06 23:21:25.445137 2017] [suexec:notice] [pid 65963] AH01232: suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
    AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using localhost.localdomain. Set the 'ServerName' directive globally to suppress this message
    [Mon Feb 06 23:21:25.486438 2017] [auth_digest:notice] [pid 65963] AH01757: generating secret for digest authentication ...
    [Mon Feb 06 23:21:25.487623 2017] [lbmethod_heartbeat:notice] [pid 65963] AH02282: No slotmem from mod_heartmonitor
    [Mon Feb 06 23:21:25.586846 2017] [mpm_prefork:notice] [pid 65963] AH00163: Apache/2.4.6 (CentOS) PHP/5.4.16 configured -- resuming normal operations
    [Mon Feb 06 23:21:25.586897 2017] [core:notice] [pid 65963] AH00094: Command line: '/usr/sbin/httpd -D FOREGROUND'
    [Mon Feb 06 23:22:00.473180 2017] [authn_file:error] [pid 65966] (2)No such file or directory: [client 192.168.80.1:61428] AH01620: Could not open password file: /usr/local/nagios/etc/htpasswd.users
    [Tue Feb 07 14:24:57.740080 2017] [core:notice] [pid 1434] SELinux policy enabled; httpd running as context system_u:system_r:httpd_t:s0
    [Tue Feb 07 14:24:57.850559 2017] [suexec:notice] [pid 1434] AH01232: suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
    AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using localhost.localdomain. Set the 'ServerName' directive globally to suppress this message
    [Tue Feb 07 14:24:58.142777 2017] [auth_digest:notice] [pid 1434] AH01757: generating secret for digest authentication ...
    [Tue Feb 07 14:24:58.154676 2017] [lbmethod_heartbeat:notice] [pid 1434] AH02282: No slotmem from mod_heartmonitor
    [Tue Feb 07 14:24:58.827323 2017] [mpm_prefork:notice] [pid 1434] AH00163: Apache/2.4.6 (CentOS) PHP/5.4.16 configured -- resuming normal operations
    [Tue Feb 07 14:24:58.827376 2017] [core:notice] [pid 1434] AH00094: Command line: '/usr/sbin/httpd -D FOREGROUND'
    [Tue Feb 07 14:43:05.115516 2017] [authn_file:error] [pid 1918] (2)No such file or directory: [client 192.168.80.1:54213] AH01620: Could not open password file: /usr/local/nagios/etc/htpasswd.users
    [Tue Feb 07 20:39:40.185943 2017] [authn_file:error] [pid 3983] (2)No such file or directory: [client 192.168.80.1:57152] AH01620: Could not open password file: /usr/local/nagios/etc/htpasswd.users
    [Tue Feb 07 20:51:43.842652 2017] [authn_file:error] [pid 1918] (2)No such file or directory: [client 192.168.80.1:57645] AH01620: Could not open password file: /usr/local/nagios/etc/htpasswd.users
    [Tue Feb 07 20:51:50.062736 2017] [authn_file:error] [pid 1926] (2)No such file or directory: [client 192.168.80.1:57646] AH01620: Could not open password file: /usr/local/nagios/etc/htpasswd.users
    [Tue Feb 07 20:51:53.314295 2017] [authn_file:error] [pid 1922] (2)No such file or directory: [client 192.168.80.1:57647] AH01620: Could not open password file: /usr/local/nagios/etc/htpasswd.users
    [Tue Feb 07 20:51:54.588580 2017] [authn_file:error] [pid 3983] (2)No such file or directory: [client 192.168.80.1:57648] AH01620: Could not open password file: /usr/local/nagios/etc/htpasswd.users
    [Wed Feb 08 07:51:55.884658 2017] [authn_file:error] [pid 1918] (2)No such file or directory: [client 192.168.80.1:63897] AH01620: Could not open password file: /usr/local/nagios/etc/htpasswd.users
    [Wed Feb 08 07:52:12.989534 2017] [authn_file:error] [pid 1926] (2)No such file or directory: [client 192.168.80.1:63903] AH01620: Could not open password file: /usr/local/nagios/etc/htpasswd.users
    [Wed Feb 08 08:05:09.656638 2017] [authn_file:error] [pid 3983] (2)No such file or directory: [client 192.168.80.1:64248] AH01620: Could not open password file: /usr/local/nagios/etc/htpasswd.users
    [Wed Feb 08 08:05:28.998158 2017] [autoindex:error] [pid 1918] [client 192.168.80.1:64256] AH01276: Cannot serve directory /var/www/html/: No matching DirectoryIndex (index.html,index.php) found, and server-generated directory index forbidden by Options directive
    [Wed Feb 08 08:05:44.772814 2017] [authn_file:error] [pid 3983] (2)No such file or directory: [client 192.168.80.1:64262] AH01620: Could not open password file: /usr/local/nagios/etc/htpasswd.users
    [Wed Feb 08 09:38:29.962351 2017] [authn_file:error] [pid 10500] (2)No such file or directory: [client 192.168.80.1:49660] AH01620: Could not open password file: /usr/local/nagios/etc/htpasswd.users
    [Wed Feb 08 10:09:07.870433 2017] [authn_file:error] [pid 1918] (2)No such file or directory: [client 192.168.80.1:50066] AH01620: Could not open password file: /usr/local/nagios/etc/htpasswd.users
    [Wed Feb 08 10:09:12.156522 2017] [authn_file:error] [pid 1922] (2)No such file or directory: [client 192.168.80.1:50069] AH01620: Could not open password file: /usr/local/nagios/etc/htpasswd.users
    [Wed Feb 08 10:09:20.490700 2017] [autoindex:error] [pid 10500] [client 192.168.80.1:50074] AH01276: Cannot serve directory /var/www/html/: No matching DirectoryIndex (index.html,index.php) found, and server-generated directory index forbidden by Options directive
    [Wed Feb 08 10:15:31.865684 2017] [mpm_prefork:notice] [pid 1434] AH00170: caught SIGWINCH, shutting down gracefully
    [Wed Feb 08 10:17:40.443778 2017] [core:notice] [pid 1433] SELinux policy enabled; httpd running as context system_u:system_r:httpd_t:s0
    [Wed Feb 08 10:17:40.458947 2017] [suexec:notice] [pid 1433] AH01232: suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
    [Wed Feb 08 10:17:40.780444 2017] [auth_digest:notice] [pid 1433] AH01757: generating secret for digest authentication ...
    [Wed Feb 08 10:17:40.781677 2017] [lbmethod_heartbeat:notice] [pid 1433] AH02282: No slotmem from mod_heartmonitor
    [Wed Feb 08 10:17:42.087364 2017] [mpm_prefork:notice] [pid 1433] AH00163: Apache/2.4.6 (CentOS) PHP/5.4.16 configured -- resuming normal operations
    [Wed Feb 08 10:17:42.087433 2017] [core:notice] [pid 1433] AH00094: Command line: '/usr/sbin/httpd -D FOREGROUND'
    [Wed Feb 08 10:26:13.078998 2017] [authn_file:error] [pid 1955] (2)No such file or directory: [client 192.168.80.1:50277] AH01620: Could not open password file: /usr/local/nagios/etc/htpasswd.users
    [Wed Feb 08 10:29:14.590713 2017] [autoindex:error] [pid 1955] [client 192.168.80.1:50477] AH01276: Cannot serve directory /var/www/html/: No matching DirectoryIndex (index.html,index.php) found, and server-generated directory index forbidden by Options directive
    [Wed Feb 08 10:29:24.180827 2017] [authn_file:error] [pid 3827] (2)No such file or directory: [client 192.168.80.1:50482] AH01620: Could not open password file: /usr/local/nagios/etc/htpasswd.users
    [Wed Feb 08 10:38:53.622638 2017] [authn_file:error] [pid 3828] (2)No such file or directory: [client 192.168.80.1:51047] AH01620: Could not open password file: /usr/local/nagios/etc/htpasswd.users
    [root@walezo httpd]#

  4. larry says:

    Thanks for you response,the configuration look okay
    Website: https://www.nagios.org
    Reading configuration data…
    Read main config file okay…
    Read object config files okay…

    Running pre-flight check on configuration data…

    Checking objects…
    Checked 8 services.
    Checked 1 hosts.
    Checked 1 host groups.
    Checked 0 service groups.
    Checked 1 contacts.
    Checked 1 contact groups.
    Checked 24 commands.
    Checked 5 time periods.
    Checked 0 host escalations.
    Checked 0 service escalations.
    Checking for circular paths…
    Checked 1 hosts
    Checked 0 service dependencies
    Checked 0 host dependencies
    Checked 5 timeperiods
    Checking global event handlers…
    Checking obsessive compulsive processor commands…
    Checking misc settings…

    Total Warnings: 0
    Total Errors: 0

    Things look okay – No serious problems were detected during the pre-flight check

  5. LARRY says:

    Good day I install and configure Nagios and everything seems work fine when i start apache and nagios they both work but i can not access the web. the below was the error i got. I will appreciate if anybody can tell me what to do.Thanks

    Internal Server Error

    The server encountered an internal error or misconfiguration and was unable to complete your request.

    Please contact the server administrator at root@localhost to inform them of the time this error occurred, and the actions you performed just before this error.

    More information about this error may be available in the server error log.

    • Ravi Saive says:

      @Larry,

      Check the apache logs for errors and fix them or try to verify the Nagios configuration and see if any errors throws it..

    • LARRY says:

      Thanks for your response this what i found in my httpd log no issue discovered can you check if there is anything I have to do. Appreciate you effort

      [root@localhost httpd]# cat access_log
      192.168.80.1 - - [06/Feb/2017:22:31:46 -0800] "GET /nagios HTTP/1.1" 401 381 "-" "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36"
      192.168.80.1 - nagiosadmin [06/Feb/2017:22:32:07 -0800] "GET /nagios HTTP/1.1" 500 527 "-" "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36"
      192.168.80.1 - - [06/Feb/2017:22:32:08 -0800] "GET /favicon.ico HTTP/1.1" 404 209 "http://192.168.80.182/nagios" "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36"
      192.168.80.1 - nagiosadmin [06/Feb/2017:22:33:16 -0800] "GET /nagios HTTP/1.1" 500 527 "-" "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36"
      192.168.80.1 - nagiosadmin [06/Feb/2017:23:02:55 -0800] "GET /nagios HTTP/1.1" 500 527 "-" "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36"
      192.168.80.1 - nagiosadmin [06/Feb/2017:23:03:10 -0800] "GET /nagios HTTP/1.1" 500 527 "-" "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36"
      192.168.80.1 - nagiosadmin [06/Feb/2017:23:04:52 -0800] "GET /nagios HTTP/1.1" 500 527 "-" "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36"
      192.168.80.1 - nagiosadmin [06/Feb/2017:23:05:15 -0800] "GET /nagios HTTP/1.1" 500 527 "-" "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36"
      ::1 - - [06/Feb/2017:23:21:23 -0800] "OPTIONS * HTTP/1.0" 200 - "-" "Apache/2.4.6 (CentOS) PHP/5.4.16 (internal dummy connection)"
      ::1 - - [06/Feb/2017:23:21:23 -0800] "OPTIONS * HTTP/1.0" 200 - "-" "Apache/2.4.6 (CentOS) PHP/5.4.16 (internal dummy connection)"
      ::1 - - [06/Feb/2017:23:21:23 -0800] "OPTIONS * HTTP/1.0" 200 - "-" "Apache/2.4.6 (CentOS) PHP/5.4.16 (internal dummy connection)"
      ::1 - - [06/Feb/2017:23:21:23 -0800] "OPTIONS * HTTP/1.0" 200 - "-" "Apache/2.4.6 (CentOS) PHP/5.4.16 (internal dummy connection)"
      ::1 - - [06/Feb/2017:23:21:23 -0800] "OPTIONS * HTTP/1.0" 200 - "-" "Apache/2.4.6 (CentOS) PHP/5.4.16 (internal dummy connection)"
      ::1 - - [06/Feb/2017:23:21:23 -0800] "OPTIONS * HTTP/1.0" 200 - "-" "Apache/2.4.6 (CentOS) PHP/5.4.16 (internal dummy connection)"
      192.168.80.1 - nagiosadmin [06/Feb/2017:23:22:00 -0800] "GET /nagios HTTP/1.1" 500 527 "-" "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36"
      192.168.80.1 - - [07/Feb/2017:14:42:39 -0800] "GET /nagios HTTP/1.1" 401 381 "-" "Mozilla/5.0 (Windows NT 10.0; WOW64; rv:51.0) Gecko/20100101 Firefox/51.0"
      192.168.80.1 - nagiosadmin [07/Feb/2017:14:43:05 -0800] "GET /nagios HTTP/1.1" 500 527 "-" "Mozilla/5.0 (Windows NT 10.0; WOW64; rv:51.0) Gecko/20100101 Firefox/51.0"
      192.168.80.1 - - [07/Feb/2017:14:43:05 -0800] "GET /favicon.ico HTTP/1.1" 404 209 "-" "Mozilla/5.0 (Windows NT 10.0; WOW64; rv:51.0) Gecko/20100101 Firefox/51.0"
      192.168.80.1 - - [07/Feb/2017:14:43:05 -0800] "GET /favicon.ico HTTP/1.1" 404 209 "-" "Mozilla/5.0 (Windows NT 10.0; WOW64; rv:51.0) Gecko/20100101 Firefox/51.0"
      [root@localhost httpd]#

      • Ravi Saive says:

        @Larry,

        Could you check the error log as well and also don’t forget to verify the Nagios configuration as shown:

        # /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
        
  6. Faiz Ahmad says:

    I have installed Nagios successfully and also configured the same but when I am trying to start the service it’s not getting up.
    Below are the steps :

    [root@tech nagios]# service nagios restart
    Running configuration check...
    Stopping nagios:/etc/init.d/nagios: line 142: kill: (29604) - No such process
    done.
    Starting nagios: done.
    [root@tech nagios]# service nagios status
    nagios is not running
    Website: https://www.nagios.org
    Reading configuration data...
    Read main config file okay...
    Read object config files okay...
    Running pre-flight check on configuration data...
    Checking objects...
    Checked 8 services.
    Checked 1 hosts.
    Checked 1 host groups.
    Checked 0 service groups.
    Checked 1 contacts.
    Checked 1 contact groups.
    Checked 24 commands.
    Checked 5 time periods.
    Checked 0 host escalations.
    Checked 0 service escalations.
    Checking for circular paths...
    Checked 1 hosts
    Checked 0 service dependencies
    Checked 0 host dependencies
    Checked 5 timeperiods
    Checking global event handlers...
    Checking obsessive compulsive processor commands...
    Checking misc settings...
    Total Warnings: 0
    Total Errors:   0
    

    Things look okay – No serious problems were detected during the pre-configuration check.

    Thanks in advance, Appreciate your help.

    • Ravi Saive says:

      @Faiz,

      Nagios configuration checks seems fine no errors, don’t know why its not showing as running status.. Could you restart the machine and see? and also confirm the space on the filesystem..

  7. Hussain says:

    How to un-install Nagios?

  8. jyothikumar says:

    Thanks Ravi , its working for Ubuntu 12.04 as well

  9. jyothikumar says:

    Ravi your instructions works for Ubuntu12.4 as well ..Thanks

  10. Shehan says:

    Hi. Can anyone tel me. how do I configure nagios on ubuntu 14.04 with unauthorized access detection’s receiving by email ?

Got something to say? Join the discussion.

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

Join Over 300K+ Linux Users
  1. 202,035
  2. 9,267
  3. 38,621

Are you subscribed?