Nagios-plugins

From openSUSE


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


This package contains actual service checks, which are performed by separate single "plugin" programs which return the status of the checks to Nagios.


Contents

Nagios-plugins
smalllogo7.gif
The Nagios Plug-Ins
Developer: Karl DeBisschop and others
Package Info (pin)
License: GNU GPLv2 or later
Website: http://nagiosplug.sourceforge.net/

Features and documentation

Please refer to the upstream documentation on

The openSUSE package contains most of the currently available plugins.

All plugins are installed in /usr/lib/nagios/plugins/ on every architecture.

Plugins needing special privileges

Plugins needing special privileges

There are at least three check scripts that need root privileges to run:

  • check_dhcp
  • check_icmp
  • check_ide_smart

To be "safe per default", SuSE doesn't install these plugins with the suid bit set. There are two recommended ways about overriding this on your system:

Set the suid bit

Note: Please choose only those examples you need.

  • change the group ownership to the users primary group that executes this check (normally nagios):
   chgrp nagios /usr/lib/nagios/plugins/check_dhcp
   chgrp nagios /usr/lib/nagios/plugins/check_icmp
   chgrp nagios /usr/lib/nagios/plugins/check_ide_smart
  • set the suid bit so the plugin is executed as root:
   chmod 4750 /usr/lib/nagios/plugins/check_dhcp
   chmod 4750 /usr/lib/nagios/plugins/check_icmp
   chmod 4750 /usr/lib/nagios/plugins/check_ide_smart

Use sudo to grant the permission and modify your plugin config

This way you need entries like:

  nagios ALL = NOPASSWD: /usr/lib/nagios/plugins/check_dhcp
  nagios ALL = NOPASSWD: /usr/lib/nagios/plugins/check_icmp
  nagios ALL = NOPASSWD: /usr/lib/nagios/plugins/check_ide_smart

in /etc/sudoers and an adapted command definition like the following:

  define command{
       command_name    check_dhcp
       command_line    /usr/bin/sudo $USER1$/check_dhcp <other_options_here>
  }
  define command{
       command_name    check_icmp
       command_line    /usr/bin/sudo $USER1$/check_icmp <other_options_here>
  }
  define command{
       command_name    check_ide_smart
       command_line    /usr/bin/sudo $USER1$/check_ide_smart <other_options_here>
  }


See Also

External Links