Install Nagios on openSUSE 13.2

ADVERTISEMENT

NagiosNagios is the most widely used open source monitoring tools which help us to monitor the services and application that run’s on Windows,Linux,Routers and other network devices. With the help of Nagios you can monitor basic services and attributes. We can access the Nagios using web interface coming with the bundle and configuration need to be done on the file level.

Whats New:

  • Core Workers are lightweight process whose job is to perform checks, due to this they do perform checks much more quickly than the old process.
  • Nagios Core process using in-memory techniques, eliminating the disk I/O latencies that could previously slow things down in large installation.
  • Each configuration item is verified only once.
  • The host address attribute is now optional.
  • Bothe hosts and services now supports an hourly value attribute.

More feature can be found here.

ADVERTISEMENT
Article will continue after the ad

Services List:

This Tutorial describes how can you monitor “private” services and attributes of Linux/UNIX servers, such as: Attributes:

  • CPU load
  • Memory usage
  • Disk usage
  • Logged in users
  • Running processes
  • etc.

Private Services:

  • HTTP
  • FTP
  • SSH
  • SMTP
  • etc

Prerequisites:

Before installing the Nagios, system need to meet the requirements for installing Nagios; So install the Web Server (httpd) , PHP ,compilers and development libraries. Install all with single command.

zypper install apache2 php5 gcc glibc  gd wget perl make apache2-mod_php5

Create nagios user and nagcmd group (allowing the external commands to be executed through the web interface) , add the nagios and apache user to the part of nagcmd group.

useradd nagios
groupadd nagios
groupadd nagcmd
usermod -a -G nagcmd nagios
usermod -a -G nagcmd wwwrun

Download latest Nagios Core.

cd /tmp/
wget http://prdownloads.sourceforge.net/sourceforge/nagios/nagios-4.0.8.tar.gz
tar -zxvf /tmp/nagios-4.0.8.tar.gz
cd /tmp/nagios-4.0.8/

Compile and Install Nagios:

./configure --with-nagios-group=nagios --with-command-group=nagcmd
make all
make install
make install-init
make install-config
make install-commandmode
make install-webconf

Configure Nagios:

Sample configuration files have now been installed in the /usr/local/nagios/etc directory. These sample files should work fine for getting started with Nagios. You’ll need to make just one change before you proceed… Edit the /usr/local/nagios/etc/objects/contacts.cfg config file with your favorite editor and change the email address associated with the nagiosadmin contact definition to the address you’d like to use for receiving alerts.

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

Change the Email address field to receive the notification.

Configure Web Interface:

Create a nagiosadmin account for logging into the Nagios web interface. Remember the password that you assign to this user – you’ll need it later.

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

Restart Apache to make the new settings take effect.

service apache2 restart

Download and Install Nagios Plugins:

Download Nagios Plugins to /tmp directory.

cd /tmp
wget http://nagios-plugins.org/download/nagios-plugins-2.0.3.tar.gz
tar -zxvf /tmp/nagios-plugins-2.0.3.tar.gz
cd /tmp/nagios-plugins-2.0.3/

Compile and install the plugins.

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

Starting Nagios:

Verify the sample Nagios configuration files.

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

If there are no errors, start Nagios.

service nagios start

Start nagios and apache on system startup.

chkconfig nagios on
systemctl enable apache2.service

Accessing Web Interface:

Now access the Nagios web interface using the following URL. You’ll be prompted for the username (nagiosadmin) and password you specified earlier.

http://ip-address/nagios/
openSUSE 13.2 - Nagios 4.0.8 service details
openSUSE 13.2 – Nagios 4.0.8 service details

Thats All.

ADVERTISEMENT

POSTS YOU MAY LIKE -:)

Share This Post

  • Matt

    Hello,
    I followed your instructions to install Nagios on OpenSuSE 13.2. I have one issue. It looks like it installed the plug-ins into /usr/local/nagios/lib instead of /usr/local/nagios/libexec. The resource config file though points to libexec. So the plugins don’t work. I was just going to change the path for USER1 to point at lib to fix this (do I need to change USER2 as well?). However, will this break anything else? Was there a reason that the plugins installed into lib instead of libexec?

    Thanks.

  • openerp install

    This renders with a qualitative growth in the work and the work process.
    Some ERP software may need lot of these tools
    and software and some may not. This helps in optimizing the redundancy problem and
    excessive hard-copy handling.

  • Randy

    I have Nagios setup and configured on opensuse 13.2. I was wondering, have you been able to set up ssl to work with Nagios?

  • Mike A

    a2enmod version needs to be run before starting apache, otherwise you’ll get “Invalid command ‘<IfVersion'"

Shares