Google Plus

How to install Nagios 3.2.2 from source in Opensuse 11.3

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 users 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.

Before to start, if you want to install Nagios in fedora ,RHEL or centos please read our previous tutorial,Also you can check How to install Nagios in ubuntu 9.x and 10. xand How to install nagios3 in LinuxMint debian based.

I- Install Apache, PHP  and  some  needed  libraries

  • First we will install apache , php and needed librairies
zypper install rrdtool php5 php5-gd php5-zlib apache2-mod_php5 perl-SNMP  net-snmp-32bit nmap ncpfs libwavpack1 apache2
  • Now add   nagios user  to the system
 sudo useradd -m nagios
  • Create  a  nagios  home  directory ( is  requiered  to  start nagios)
mkdir  -p  /home/nagios
  • Create  password  for  nagios user
 sudo passwd nagios
  • Add gorup nagcmd
 sudo groupadd nagcmd
  • Add users nagios to group nagcmd  and  nagios  group
sudo usermod  -G nagcmd nagios

II- Install and Configure Nagios :

  • Now install the Nagios tarballs that we downloaded previously:
 tar -xvf nagios-3.2.2.tar.gz
  • Then cd the the extracted folder and install
 cd nagios-3.2.2
sudo ./configure -with-command-group=nagcmd
sudo make all
sudo make install
  • This installs the init script in /etc/rc.d
 sudo make install-init
  • This installs sample config files in /usr/local/nagios/etc
 sudo make install-config
  •  This installs and configures permissions on the directory for holding the external command file
sudo make install-commandmode

Output:
linux-gysk:/home/pirat9/Downloads/nagios-3.2.2 # make install-webconf
/usr/bin/install -c -m 644 sample-config/httpd.conf /etc/apache2/conf.d/nagios.conf

*** Nagios/Apache conf file installed ***

  • Make  a webadmin password for  nagios  admin
htpasswd2 -c /usr/local/nagios/etc/htpasswd.users nagiosadmin

Output

New password:
Re-type new password:
Adding password for user nagiosadmin

  • Restart   your  apache  server
sudo /etc/init.d/apache2 restart

III-Install Nagios Plugins :

Now we have to install Nagios plugins, first download the file from nagios website, then extract it using the command :

tar -xvf nagios-plugins-1.4.15.tar.gz
cd nagios-plugins-1.4.15
sudo ./configure --with-user=nagios --with-group=nagcmd
sudo make
sudo make install
  • Verify the config:
sudo /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg

Output :

Nagios Core 3.2.2
Copyright (c) 2009-2010 Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 09-01-2010
License: GPL

Website: http://www.nagios.org
Reading configuration data…
Read main config file okay…
Processing object config file ‘/usr/local/nagios/etc/objects/commands.cfg’…
Processing object config file ‘/usr/local/nagios/etc/objects/contacts.cfg’…
Processing object config file ‘/usr/local/nagios/etc/objects/timeperiods.cfg’…
Processing object config file ‘/usr/local/nagios/etc/objects/templates.cfg’…
Processing object config file ‘/usr/local/nagios/etc/objects/localhost.cfg’…
Read object config files okay…

Running pre-flight check on configuration data…

Checking services…
Checked 8 services.
Checking hosts…
Checked 1 hosts.
Checking host groups…
Checked 1 host groups.
Checking service groups…
Checked 0 service groups.
Checking contacts…
Checked 1 contacts.
Checking contact groups…
Checked 1 contact groups.
Checking service escalations…
Checked 0 service escalations.
Checking service dependencies…
Checked 0 service dependencies.
Checking host escalations…
Checked 0 host escalations.
Checking host dependencies…
Checked 0 host dependencies.
Checking commands…
Checked 24 commands.
Checking time periods…
Checked 5 time periods.
Checking for circular paths between hosts…
Checking for circular host and service dependencies…
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
linux-324i:/home/pirat9/Downloads/nagios-plugins-1.4.15 #

  • Restart   Nagios
sudo /etc/init.d/nagios restart

And You  are  done.

  • Now you are ready to use Nagios, open your browser and type :
   http://hostname/nagios or http://ip/nagios  

{loadposition user9}

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.
  • Maik

    Hello.
    Nice documentation.
    I followed this instructions but I get Error code 404.

    Maybe this is a issue with the following step:

    sudo make install-commandmode
    Output:
    linux-gysk:/home/pirat9/Downloads/nagios-3.2.2 # make install-webconf
    /usr/bin/install -c -m 644 sample-config/httpd.conf /etc/apache2/conf.d/nagios.conf

    *** Nagios/Apache conf file installed ***

    I received another message (well I use 3.2.3)…
    Could you maybe help?

    Thanks

Like us on Facebook

This week Top Posts

Write for us

Recent Comments

cave

|

it can be used to talk or chat through the internet,

it is using strong encryption.

but for example TOR is using some obfuscation because some countrys try to block all outgoing connections which can not be scanned with DPI

And the TOR Project is facing an arms race in obfuscation and encryption detection.

cave

|

You can friend someone if you give him your public Certificate.

both peers must friend each other.

i suggest to not enter a valid e-mail address. it is not necessary, but pgp needs a mail addy. something@something.so fits perfectly… :)

http://redd.it/18vsq5 <– faq, featurelist, todo, howto, useful links to manual wiki etc, …

you can connect to chatservers, which will give you access to chatlobby, where always some people are lurking.

#1 https://www.f2f-fr.net/w2c/en/
#2 http://retrosharechatserver.no-ip.org/w2c/en/

and in this rooms, you can find other people to talk and friend.

cave

|

http://redd.it/18vsq5
please have a look at this link. it is a FAQ, QuickTip, HowTo, etc etc etc …

If you want to make friends, please use the Chatservers.
#1 https://www.f2f-fr.net/w2c/en/
#2 http://retrosharechatserver.no-ip.org/w2c/en/

if you enter your certificate, the chatserver adds you as his friend and shows his certificate too add him to your friends.

After the connection to the chatservers is established, you can join a few chatrooms where the chatserver is lurking.

in this rooms are other people too help you and make first friends and get into the network.

add friends only with wisdom. if you friend some policeman, it will be problematic like in real life.

best is to add only people you trust in real life or trust from other communitys too. and not to add random unkown strangers.

If you have questions, ask them in the chatlobbys, there is always someone to answer them.

please read http://redd.it/18vsq5

or question me here :)

Ladi Oyekanmi

|

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

Adhraa

|

Greate tutorial :)

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