Nagios Plugins

Date of release: 22.04.2014

OEM Vutlan partners can change the names of the scripts and functions.

In file check_element_table.pl there's a line with Vendor identification. OEM Vutlan partners need to change this vendor identification to match their own:
my $vendor_pen = '39052';

39052 - This is Vutlan ID


Nagios Plugins for VTxx checking

Nagios plugin for checking single element (sensor)

Usage:
./check_element.pl [-v] -H <host> -C <snmp_community> [-2] | (-l login -x passwd) -i <ID> [-P <port>] [-t <timeout>] [-V]

Command line options:

-v, --verbose
    print extra debugging information

-h, --help
    print this help message

-H, --hostname=HOST
    name or IP address of host to check

-C, --community=COMMUNITY NAME
    community name for the host's SNMP agent (implies v 1 protocol)

-P, --port=PORT
    SNMPD port (Default 161)

-2, --v2c
        use SNMP v2 (instead of SNMP v1)

-t, --timeout=INTEGER
    timeout for SNMP in seconds (Default : 5)

-V, --version
    prints version number

-i, --id=INTEGER
        element's id

Nagios command configuration example:

commands.cfg
define command { command_name check_snmp_element command_line $USER1$/check_element.pl -H $HOSTADDRESS$ $ARG1$ }

Nagios command using the example (community name: read; element ID: 201001):

services.cfg
define service{ use generic-service # host_name test190 hostgroup_name sc-hosts contact_groups admins service_description Unit Service for element with ID=201001 check_command check_snmp_element! -C read -i 201001 normal_check_interval 1 retry_check_interval 1 process_perf_data 1 }

 

Download:

Nagios plugin for checking single element (sensor)

check_element.pl


Nagios plugin for checking the table of elements (sensors)

This plugin generates the alarm if at least one element is in the alarm, and the warning if at least one element is in the warning.
This plugin generates the performance data only for sensors with valid value field (as sensors with analog and discrete output)

Usage:
./check_element_table.pl [-v] -H <host> -C <snmp_community> [-2] | (-l login -x passwd)  [-P <port>] [-t <timeout>] [-V]

-v, --verbose
    print extra debugging information

-h, --help
    print this help message

-H, --hostname=HOST
    name or IP address of host to check

-C, --community=COMMUNITY NAME
    community name for the host's SNMP agent (implies v 1 protocol)

-P, --port=PORT
    SNMPD port (Default 161)

-2, --v2c
     use SNMP v2 (instead of SNMP v1)

-t, --timeout=INTEGER
     timeout for SNMP in seconds (Default : 5)

-V, --version
    prints version number

Nagios command configuration example:

commands.cfg
define command { command_name check_snmp_element_table command_line $USER1$/check_element_table.pl -H $HOSTADDRESS$ $ARG1$ }

Nagios command using example (community name: read):

services.cfg

 

Download:

Nagios plugin for checking all elements (sensors)

 

check_element_table.pl

Script for Nagios passive checking

This script takes parameters from SNMPTT (SNMP Trap Translator) or others, and appends this to the Nagios passive checking pipe.
For installation put this script to the Nagios plugins/eventhandlers folder
You must add a template for passive testing to the Nagios configuration file, and associate this template, for example, with a group of hosts:

/etc/nagios/objects/schosts.cfg

 

Download:

Script for Nagios passive checking

submit_check_result


Script for Nagios notified by GSM modem of master module

This script provides sending notifications from Nagios by by GSM modem of the master module.

Usage:
./sendsms -H <host> -p <password> -P <phone number> -m <message> 

-H=hostname

    name or IP address of the host to check

-u=user name
    user name of mater module

-p=password
    password for the user of the main module

-P=phone
    phone number of the recipient

-m=message
    message for sending

 

For installation, put this script in the Nagios plugins folder.

Add commands for SMS notification to Nagios commands file:

/etc/nagios/objects/commands.cfg

Add the notify command for contact to the Nagios configuration file as below:

/etc/nagios/objects/contacts.cfg

Download:

Script for Nagios notified by GSM modem

 

sendsms


To allow us better support please leave your comments below or on our forum.