Nagios 4.0.1 Released – Install on RHEL/CentOS 6.x/5.x and Fedora 19/18/17

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 Linode referral link if you plan to buy VPS (it starts at only $10/month).
  4. Support us via PayPal donate - Make a Donation
  5. Support us by purchasing our premium books in PDF format.
  6. Support us by taking our online Linux course in 5 Days

We are thankful for your never ending support.

Tarunika Shrivastava

I am a linux server admin and love to play with Linux and all other distributions of it. I am working as System Engineer with a Web Hosting Company.

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

Receive Your Free Complimentary eBook NOW! -

Download Free Linux eBooks

Advanced Bash-Scripting Guide
Linux Bible
A Newbie's Getting Started Guide to Linux
Introduction to Linux - A Hands on Guide

You may also like...

291 Responses

  1. Rishikesh says:

    Hi team,

    I had followed all the steps and done without any errorr but the issue i am facing is not able to open the page . please help

    • Ravi Saive says:

      @Rishi,

      May I know what error you getting while browsing Nagios page? could you share screenshot or error message with me, so that I can help you out right away..

    • Ashok says:

      Disable firewall and try.
      Max. it will work.

  2. Rasel Ahmed says:

    Failed to start LSB : start and stop Nagios Monitoring Server
    What is this and how can I recover from this problem .

    • Ravi Saive says:

      @Rasel,

      Try to run the following command to check the nagios configuration, if its gives Output that means you can able to start Nagios, or check nagios.cfg file for any errors.

      # /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
      
      • Rasel Ahmed says:

        I will check it but there haven’t any problem. I get this report.

        Total Warnings: 0
        Total Errors: 0

        when I type
        #systemctl start nagios.service
        and waiting for long time but can’t get any reply. That’s mean nagios service not working.

        • Ravi Saive says:

          @Rasel,

          That means your nagios setup is perfectly installed and configured, its seems the issue with service itself, let me check and get back to you with solution.

  3. TotalNoob says:

    Hi what IP address should I use? http://ip-address/nagios. Is there a default one? Because when I give the IP address of my PC it does not work. Please help, total noob here

    • Ravi Saive says:

      @Laskura,

      Yes, that’s the default URL to access Nagios, have you getting any errors on the page? could you share with us so that I can help you out..

  4. marian caraiman says:

    Great tutorial , congrats ! I encountered a small issue because my Centos was not having zip and unzip. Could you please add them in the first step ? If they are already in the system, no harm. If not they will be installed and maybe other users won’t spent time undestanding why nagios is not available as context in Apache.

    Cheers.

    • Ravi Saive says:

      @Marian,

      Thanks for the tip, yes, I will surely add those two dependency packages in the requirement section, so that newbies don’t need to face any issues while compiling the Nagios..

  5. Glitter says:

    how to solve this
    [root@centos ~]# chkconfig –add httpd
    error reading information on service httpd: No such file or directory
    everything other work as expect

    • Ravi Saive says:

      @Glitter,

      First find out Apache with locate httpd command and then restart the Apache service, and make sure its running with httpd -S command.

      # locate httpd 
      # service httpd restart
      # httpd -S
      
  6. ckrhel says:

    i have problem while install this below package ? how to resolve this ??

    Error: Package: gd-last-devel-2.1.1-2.el7.remi.x86_64 (remi)
    Requires: libvpx-devel(x86-64)
    You could try using –skip-broken to work around the problem
    You could try running: rpm -Va –nofiles –nodigest

    THIS ARE THE REPOLIST ALL IS ENABLED

    InstallMedia RHEL-7.0 Server.x86_64 disabled
    epel/x86_64 Extra Packages for Enterprise Linux 7 – x86_64 enabled: 9,570
    epel-debuginfo/x86_64 Extra Packages for Enterprise Linux 7 – x86_64 – Debug enabled: 2,138
    epel-source/x86_64 Extra Packages for Enterprise Linux 7 – x86_64 – Source enabled: 0
    epel-testing/x86_64 Extra Packages for Enterprise Linux 7 – Testing – x86_64 enabled: 846
    epel-testing-debuginfo/x86_64 Extra Packages for Enterprise Linux 7 – Testing – x86_64 – Debu enabled: 142
    epel-testing-source/x86_64 Extra Packages for Enterprise Linux 7 – Testing – x86_64 – Sour enabled: 0
    ius/x86_64 IUS Community Packages for Enterprise Linux 7 – x86_64 enabled: 198
    ius-archive/x86_64 IUS Community Packages for Enterprise Linux 7 – x86_64 – Archiv enabled: 1,517
    ius-archive-debuginfo/x86_64 IUS Community Packages for Enterprise Linux 7 – x86_64 – Archiv enabled: 105
    ius-archive-source IUS Community Packages for Enterprise Linux 7 – x86_64 – Archiv enabled: 0
    ius-debuginfo/x86_64 IUS Community Packages for Enterprise Linux 7 – x86_64 – Debug enabled: 31
    ius-dev/x86_64 IUS Community Packages for Enterprise Linux 7 – x86_64 – Dev enabled: 8
    ius-dev-debuginfo/x86_64 IUS Community Packages for Enterprise Linux 7 – x86_64 – Dev De enabled: 4
    ius-dev-source IUS Community Packages for Enterprise Linux 7 – x86_64 – Dev So enabled: 0
    ius-source IUS Community Packages for Enterprise Linux 7 – x86_64 – Source enabled: 0
    ius-testing/x86_64 IUS Community Packages for Enterprise Linux 7 – x86_64 – Testin enabled: 204
    ius-testing-debuginfo/x86_64 IUS Community Packages for Enterprise Linux 7 – x86_64 – Testin enabled: 21
    ius-testing-source IUS Community Packages for Enterprise Linux 7 – x86_64 – Testin enabled: 0
    remi Remi’s RPM repository for Enterprise Linux 7 – x86_64 enabled: 2,740
    remi-debuginfo/x86_64 Remi’s RPM repository for Enterprise Linux 7 – x86_64 – debugin enabled: 1,061
    remi-php55 Remi’s PHP 5.5 RPM repository for Enterprise Linux 7 – x86_64 enabled: 347
    remi-php55-debuginfo/x86_64 Remi’s PHP 5.5 RPM repository for Enterprise Linux 7 – x86_64 – enabled: 237
    remi-php56 Remi’s PHP 5.6 RPM repository for Enterprise Linux 7 – x86_64 enabled: 347
    remi-php56-debuginfo/x86_64 Remi’s PHP 5.6 RPM repository for Enterprise Linux 7 – x86_64 – enabled: 236
    remi-php70 Remi’s PHP 7.0 RPM repository for Enterprise Linux 7 – x86_64 enabled: 223
    remi-php70-debuginfo/x86_64 Remi’s PHP 7.0 RPM repository for Enterprise Linux 7 – x86_64 – enabled: 131
    remi-php70-test Remi’s PHP 7.0 test RPM repository for Enterprise Linux 7 – x86 enabled: 75
    remi-php70-test-debuginfo/x86_64 Remi’s PHP 7.0 test RPM repository for Enterprise Linux 7 – x86 enabled: 5
    remi-safe Safe Remi’s RPM repository for Enterprise Linux 7 – x86_64 enabled: 735
    remi-test Remi’s test RPM repository for Enterprise Linux 7 – x86_64 enabled: 575
    remi-test-debuginfo/x86_64 Remi’s test RPM repository for Enterprise Linux 7 – x86_64 – de enabled: 184
    rhel7 rhel7 enabled: 4,305
    rpmforge RHEL 7Server – RPMforge.net – dag enabled: 245
    rpmforge-extras RHEL 7Server – RPMforge.net – extras enabled: 10
    rpmforge-testing RHEL 7Server – RPMforge.net – testing enabled: 4
    webtatic/x86_64 Webtatic Repository EL7 – x86_64 enabled: 178
    webtatic-archive/x86_64 Webtatic Repository EL7 – x86_64 – Archive enabled: 2,607
    webtatic-archive-debuginfo/x86_64 Webtatic Repository EL7 – x86_64 – Archive Debug enabled: 105
    webtatic-archive-source Webtatic Repository EL7 – x86_64 – Archive Source enabled: 0
    webtatic-debuginfo/x86_64 Webtatic Repository EL7 – x86_64 – Debug enabled: 39
    webtatic-source Webtatic Repository EL7 – x86_64 – Source enabled: 0
    webtatic-testing/x86_64 Webtatic Repository EL7 – x86_64 – Testing enabled: 100
    webtatic-testing-debuginfo/x86_64 Webtatic Repository EL7 – x86_64 – Testing Debug enabled: 6
    webtatic-testing-source Webtatic Repository EL7 – x86_64 – Testing Source enabled: 0
    repolist: 29,279

    • Ravi Saive says:

      @ckrhel,

      Oh man, you’ve so many third-party repositories enabled on the system, try to disable all and install from default system repositories to get rid of conflicts..

  7. ckrhel says:

    i done everthing done as per above steps ..starting services taking to much time it doesnt start the services ,
    i tired to login http://ip/nagios it doesnt works
    here the below settings
    plz reslove this problem

    systemctl status nagios.service
    nagios.service – LSB: start and stop Nagios monitoring server
    Loaded: loaded (/etc/rc.d/init.d/nagios)
    Active: activating (start) since Mon 2016-03-07 13:05:12 EST; 14s ago
    Process: 3287 ExecStart=/etc/rc.d/init.d/nagios start (code=exited, status=0/SUCCESS)
    CGroup: /system.slice/nagios.service
    ├─2657 /usr/local/nagios/bin/nagios -ud /usr/local/nagios/etc/nagios.cfg
    ├─2661 /usr/local/nagios/bin/nagios –worker /usr/local/nagios/var/rw/nagios.qh
    ├─2662 /usr/local/nagios/bin/nagios –worker /usr/local/nagios/var/rw/nagios.qh
    ├─2663 /usr/local/nagios/bin/nagios –worker /usr/local/nagios/var/rw/nagios.qh
    ├─2664 /usr/local/nagios/bin/nagios –worker /usr/local/nagios/var/rw/nagios.qh
    └─2672 /usr/local/nagios/bin/nagios -ud /usr/local/nagios/etc/nagios.cfg

    Mar 07 13:05:12 redhat1.red.com systemd[1]: Starting LSB: start and stop Nagios monitoring server…
    Mar 07 13:05:12 redhat1.red.com nagios[3287]: nagios (pid 2672 2664 2663 2662 2661 2657) is running…
    Mar 07 13:05:12 redhat1.red.com systemd[1]: PID file /var/nagios/nagios.pid not readable (yet?) after start.

    /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg

    Nagios Core 4.0.1
    Copyright (c) 2009-present Nagios Core Development Team and Community Contributors
    Copyright (c) 1999-2009 Ethan Galstad
    Last Modified: 10-15-2013
    License: GPL

    Website: http://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

    systemctl status httpd
    httpd.service – The Apache HTTP Server
    Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled)
    Active: active (running) since Mon 2016-03-07 10:40:06 EST; 1h 53min ago
    Main PID: 5059 (httpd)
    Status: “Total requests: 3; Current requests/sec: 0; Current traffic: 0 B/sec”
    CGroup: /system.slice/httpd.service
    ├─5059 /usr/sbin/httpd -DFOREGROUND
    ├─5060 /usr/libexec/nss_pcache 327683 off /etc/httpd/alias
    ├─5061 /usr/sbin/httpd -DFOREGROUND
    ├─5062 /usr/sbin/httpd -DFOREGROUND
    ├─5063 /usr/sbin/httpd -DFOREGROUND
    ├─5064 /usr/sbin/httpd -DFOREGROUND
    ├─5065 /usr/sbin/httpd -DFOREGROUND
    └─5220 /usr/sbin/httpd -DFOREGROUND

    Mar 07 10:40:02 redhat1.red.com systemd[1]: Starting The Apache HTTP Server…
    Mar 07 10:40:06 redhat1.red.com systemd[1]: Started The Apache HTTP Server.
    Mar 07 12:27:50 redhat1.red.com systemd[1]: Started The Apache HTTP Server.

  8. ck says:

    can nagios be installed with a common user(other than root)?

    • Ravi Saive says:

      @ck,

      Have you gone through the article? the instructions clearly stated in this article, that the Nagios can be installed as normal user i.e. nagios user..

  9. abraham says:

    thanks so much!!

  10. subramanyma shastry says:

    I have completed all steps and when when verified i am getting zero erors but when i tried to start nagios with ” service nagios start” it is taking so much time to execute and finally failing by giving timed out error. I am unabble to find the reason (I am doing his on rhel 7)

Got something to say? Join the discussion.

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

Join Over 150K+ Linux Users
  1. 100,756
  2. 5,113
  3. 36,418

Enter your email to get latest Linux Howto's