Nagios Plugins configuration

From Bashlinux
Jump to: navigation, search

Almost all the plugins has been developed on Perl. Here is a brief description of every plug-in added to Nagios in order to monitor most of the hardware at Bashlinux.

Configuration

Definition

Every command to be called from Nagios must be defined on /etc/nagios/commands.cfg. The syntax of each command definition is as follows:

define command{
    command_name  COMMAND_NAME
    command_line  COMMAND_LINE -H $ARG1$ -u $ARG2$ ...
}

where:

  • COMMAND_NAME Name of the command under nagios
  • COMMAND_LINE how the command is called from command line
  • -H -u<code> command line options
  • <code>$ARG1$ $ARG2$ Arguments passed from Nagios

Command call

To call a command, it must be difined as explained in the prior section and then it can be called from any service defined, the syntax is as follow

define service{
   use                             <template-name>
   name                            <service-name>
   service_description             <service-description>
   notification_interval           <time-in-minutes>
   contact_groups                  <group-for-notifications>
   notification_options            c,r
   notification_period             24x7
   check_command                   <commandname>!MyArg!MyOtherArg
   register                        0
}

3rd Party Plug-ins

  • check_omsa_snmp.pl Monitor Dell OMSA Servers
  • check_snmp_env.pl Checks routers and switches devices for fan speed, temperature and other environment things.
  • check_snmp_int.pl Checks network interfaces on hosts and routers
  • check_snmp_load.pl Checks and monitor the load on Linux hosts
  • check_snmp_mem.pl Checks RAM, swap and other memories
  • check_snmp_netint.pl Checks network interfaces on routers and switches
  • check_snmp_printer Checks the power and paper status in almost any printer with SNMP access
  • check_snmp_storage.pl Checks available space on any drive or partition mounted on host
  • check_snmp_win.pl Checks windows services and other things commonly found on windows hosts