Nagios

From openSUSE


Nagios is a program that will monitor hosts and services on your network. It has the ability to email or page you when a problem arises and when a problem is resolved. Nagios is written in C and is designed to run under Linux (and some other *NIX variants) as a background process, intermittently running checks on various services that you specify.

Contents

Nagios
smalllogo7.gif
Open Source host, service and network monitoring program
Developer: Ethan Galstad is the creator and lead developer of the Nagios.
Package Info (pin)
License: GNU GPLv2
Website: http://nagios.org

Features and documentation

Please have a look at the website of the project. Nagios comes along with a very good documentation about all it's features and complex HowTos.

Setting up a nagios server

openSUSE splitts nagios in different packages:

  • nagios => the main package
  • nagios-www => containig the stuff needed to display informations from nagios via apache
  • nagios-devel => containing stuff only usefull for nagios (-plugin) developers
  • nagios-plugins => mandatory plugins for nagios
  • nagios-plugins-extra => contains additional plugins which might need additional packages. This results in additional required packages.

So normally it should be enough to install "nagios" and "nagios-www". nagios-plugins should be installed automatically via dependencies.

After installing the nagios package, you can directly start (and activate) nagios via Console using

rcnagios start && insserv nagios

or the YaST2-Runlevel editor.

This will result in a running nagios server monitoring your local host. If you want to have a look at the nagios webfrontend, you need to start the apache webserver
rcapache2 start
and add a user and password to access the nagios webfrontend:
htpasswd2 -c /etc/nagios/htpasswd.users nagiosadmin

This will ask you for a password for the user nagiosadmin - you can add other users here without any problems. These users mustn't exist on your system as they are only needed to access the webinterface.

Now you can start a browser on your machine and open the URL http://localhost/nagios/ - insert the username and password you entered in the step bevore - and you can "watch" your nagios server.

If not already done, you can add a mail alias for the user nagiosadmin to your /etc/aliases file, so (for example) root get's informations about failures or recovers. After editing this file, remember to run

newaliases

so the new settings will apply.

All other steps (fine tuning nagios, configuring checks of other hosts, ...) are described in the Nagios Documentation which can also be found in the webfrontend.

See Also

External Links