Google Plus

Install Nagios 3.2.3 in Fedora 14 from source

Written by Mel Kham on . Posted in Linux tutorials

Nagios is a popular open source computer system and network monitoring software application. It watches hosts and services, alerting usersnagios_logo when things go wrong and again when they get better.

Nagios was originally designed to run under Linux, but also runs well on other Unix variants. It is free software, licensed under the terms of the GNU General Public License version 2 as published by the Free Software Foundation.


This post show you how to install NAGIOS    3.2.3 in Fedora14

 

I -First step :

This installation has been tested by unixmen team in Fedora14/Cenots5.5/RHEL6/ .

1- First install some requered tools :

yum  groupinstall “Development Libraries” “Development Tools”

yum install gd gd-devel jpeg-devel rrdtools-devel

2- Create nagios user :

#/usr/sbin/useradd -m nagios
#passwd nagios

3- Add nagcmd group

/usr/sbin/groupadd nagcmd
/usr/sbin/usermod -a -G nagcmd nagios
/usr/sbin/usermod -a -G nagcmd apache

 

4- Now go to http://www.nagios.org download these files .

nagios-3.2.3.tar.gz nagios-plugins-1.4.15.tar.gz

tar  -zxvf  nagios-3.2.3.tar.gz  
cd  nagios-3.2.3
./configure --with-command-group=nagcmd
 #make all; make install; make install-init; make install-config; make install-commandmode; make install-webconf

5- Edit your email admin address :

To edit your email adress you need to edit the contact.cfg file

vi /usr/local/nagios/etc/objects/contacts.cfg 

 

6- Create a nagiosadmin account for logging into the Nagios web interfaceassign to this you’ll need it later.

htpasswd -c /usr/local/nagios/etc/htpasswd.users nagiosadmin

enter the password.

7- Restart the httpd server :

#Service  httpd   restart

The second step : Extract and install plugins

1- Go to the folder where you downloaded nagios tools, and extract the nagios-plugin file

 tar  -zxvf   nagios-plugins-1.4.15.tar.gz

2- cd nagios-plugins, then make and make install

./configure --with-nagios-user=nagios --with-nagios-group=nagcmd
make; make install

3- Now you have to add nagios to Chkconfig

chkconfig --add nagios
chkconfig nagios on

4- Verify if you have a good config of nagios with the command

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

5- Check if there are no errors displayed; then start nagios with command :

service  nagios  start

To simplify the procedure please disable the selinux and iptables and ip6tables

now open your browser and http://localhost/nagios orr http://ip/nagios

 

For any question please open a new threat on the forum or comment the article. Thanks

For questions please refer to our Q/A forum at : http://ask.unixmen.com

Mel Kham

Founder of Unixmen, Living in Amsterdam. Am working in my free time to help people to understand the Opensource and to explain them in easy way how to make the fist steps to the the light. Working day and night with my Co-founder Zinovsky to keep this website live even with less resources.
  • Rodolfo

    What’s the point on installing from source? A simple "yum install nagios" installs the version 3.2.3-3 (yum data: 2010/11/23; article: 1 day ago)…

  • sedraoui

    with install from source you can see things that you can not see with install from yum

  • estonolose

    Hi,

    I have follow your instructions and all ok until the last point.

    [code]http://localhost/nagios/[/code]

    [code]Forbidden

    You don't have permission to access /nagios/ on this server.[/code]

    which can be the problem?

    Thanks

    • estonolose

      Solved.

      It didn’t have installed php. I have installed php and then restart the httpd server.

  • john

    Hi,

    I followed all the steps, but I’m getting the following error in the last step:

    open your browser and http://localhost/nagios

    this is the error messsage that I get from Firefox:

    [code]
    Forbidden
    You don't have permission to access /nagios/ on this server.
    [/code]

    and this is the error that I get from apache log file:

    [code]
    [Mon Feb 14 15:45:12 2011] [error] [client 127.0.0.1] Directory index forbidden by Options directive: /usr/local/nagios/share/
    [Mon Feb 14 15:45:12 2011] [error] [client 127.0.0.1] File does not exist: /var/www/html/favicon.ico
    [Mon Feb 14 15:45:15 2011] [error] [client 127.0.0.1] File does not exist: /var/www/html/favicon.ico
    [Mon Feb 14 15:46:05 2011] [error] [client 127.0.0.1] Directory index forbidden by Options directive: /var/www/html/
    [Mon Feb 14 15:47:05 2011] [error] [client 127.0.0.1] Directory index forbidden by Options directive: /var/www/html/
    [Mon Feb 14 15:48:05 2011] [error] [client 127.0.0.1] Directory index forbidden by Options directive: /var/www/html/
    [Mon Feb 14 15:49:05 2011] [error] [client 127.0.0.1] Directory index forbidden by Options directive: /var/www/html/
    [root@linuxBox logs]# pwd
    /etc/httpd/logs
    [root@linuxBox logs]#
    [/code]

    do you know how to fix this?

    • john

      solved:

      I forgot to read above post.
      I installed "php", restarted "httpd" and now it works well.

  • http://enteryoursiteURL... TC

    The installation fails on the second line with notes to the effect that rrdtools-devel [sic] and jpeg-devel don’t exist as RPMs.

    It turns out that rrdtool-devel (not rrdtools-devel) exists and can be installed by yum.

    jpeg-devel might refer to libjpeg-turbo-devel.

  • http://enteryoursiteURL... Scott L

    Thanks for the step by step instructions. Everything worked until:

    Logged on to http://localhost/nagios. On the left pane, under the "Current Status" tab none of the options give me a reading. The output on the right pane is as follows:

    "Whoops!

    Error: Could not read object configuration data!"

    Please let me know how to fix. Thank you.

  • pirat9

    enter your message here…[quote=Scott L]Thanks for the step by step instructions. Everything worked until:

    Logged on to http://localhost/nagios. On the left pane, under the "Current Status" tab none of the options give me a reading. The output on the right pane is as follows:

    "Whoops!

    Error: Could not read object configuration data!"

    Please let me know how to fix. Thank you.[/quote]

    Please restart nagios Daemon. and check the space Disk .

    • pirat9
    • Scott L

      That worked. Thank you. Now I can login to the web interface but reading hosts down, even though they are up. I only configured one switch and the localhost. Please see the error message below:

      (Return code of 127 is out of bounds – plugin may be missing)

      I double check with the following command and got 0=warning and 0-errors!

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

      Please help. Trying to get this work for days now! I don’t want to give up. Thanks for all your help.

      Scott

      • pirat9

        HI Scott L.
        check my other article how to add hosts to linux server.
        check Selinux
        Check Iptables

  • noobek

    [b]cos [i]tam[/i][/b]

  • Premkumar

    Hi Team,

    I have installed nagios on local machine, But i want to monitor other remote Linux, Windows machines and network devices and also configure email alerts ? Do I have to install sendmail ? I am having my companies exchange mail id where do I add the exchange mail id in the configuration file so that I get the notification alert ?

    Thank you for your help

    premkumar.waghmare@gmail.com

Like us on Facebook

This week Top Posts

Write for us

Recent Comments

Ladi Oyekanmi

|

Could you please assist in step by step on how to install nagios on solaris

Adhraa

|

Greate tutorial :)

pigmej

|

Just one thing:

What about pep8 in your python code ? How can you give ‘tutorials’ on quite popular website, of such a bad quality ?

Amit Rai

|

I just renamed shared.xml and it logged in and created a new shared.xml.

DB Griffin

|

Larry Page is not being completely honest! The manner in which the PRISM program/project works does not need access from company administrators or owners, so called “direct access”; the access to the information is already there. These tech company CEOs take for granted the actual intelligence of most end users of their products. All it takes is a little digging and reading to go from ignorant to informed on these things especially on exactly how the internet works/functions in the U.S.A. I find Larry Page’s remarks just as laughable as Al Gore’s claim to “inventing” the internet/world wide web!

If you, as an end user, are reading this post; I challenge you to research these matters yourself. It really is quite simple with all the “information sites” that exist on the web today ie Wikipedia, & other online encyclopedias that actually list source material, as well as highly respected tech sites and blogs that also list their source material. Be warned: this is only the tip of the iceberg and these tech CEOs know and understand this; they are scrambling in attempt to perform DAMAGE CONTROL to save the company and what little trust thay have left from their products end users/consumers.

Am I a skeptic? I believe someone has to be or needs to be at this point in time! If your not just a little skeptical of the government, tech companies, and the people that are in charge of these agencies and companies; you need to be, even if just a little skeptic. For your own personal protection and security! I know I was a part of this community for over 14 years!

 
IDG Tech Network
Copyright © 2008-2013 Unixmen.com .
Maintained by Anblik .