check_processes_ucd
Check Processes via UCD SNMP MIB e.g: used on linux in net-snmp agent
Synopsis:
check_processes_ucd [-H] [-t] [-s] [-C] [-p]
Options:
Flag | Description |
---|---|
-t (--timeout) | Timeout in seconds (default=15) |
-H (--hostname) | Host to monitor |
-s (--snmpvers) | SNMP Version [1|2|3] (default=2) |
-C (--community) | SNMP Community (default=public) |
-p (--port) | SNMP Port (default=161) |
-h (--help) | Help |
-V (--version) | Programm version |
-v (--verbose) | Print some useful information |
-L (--license) | Print license information |
SNMP version 3 specific arguments: | |
-u (--username) | Security Name |
-o (--authpassword) | Authentication password |
-r (--authprotocol) | Authentication protocol [md5|sha] |
-O (--privpassword) | Privacy password |
-R (--privprotocol) | Privacy protocol [des|aes|3des] |
more information concerning the configuration of the UCD SNMP Package:
man snmpd.conf
Required Software:
from search.cpan.org
Net::SNMP Package e.g: Net-SNMP-5.2.0.tar.gz
How to check the server functionality
Example:
snmpwalk 172.29.130.201 -v2c -c public enterprises.2021.2
should return some lines like these:
UCD-SNMP-MIB::prIndex.1 = INTEGER: 1
UCD-SNMP-MIB::prIndex.2 = INTEGER: 2
UCD-SNMP-MIB::prNames.1 = STRING: sendmail
UCD-SNMP-MIB::prNames.2 = STRING: httpd
UCD-SNMP-MIB::prMin.1 = INTEGER: 0
UCD-SNMP-MIB::prMin.2 = INTEGER: 1
UCD-SNMP-MIB::prMax.1 = INTEGER: 10
UCD-SNMP-MIB::prMax.2 = INTEGER: 10
UCD-SNMP-MIB::prCount.1 = INTEGER: 0
UCD-SNMP-MIB::prCount.2 = INTEGER: 0
UCD-SNMP-MIB::prErrorFlag.1 = INTEGER: 0
UCD-SNMP-MIB::prErrorFlag.2 = INTEGER: 1
UCD-SNMP-MIB::prErrMessage.1 = STRING:
UCD-SNMP-MIB::prErrMessage.2 = STRING: Too few httpd running (# = 0)
UCD-SNMP-MIB::prErrFix.1 = INTEGER: 0
UCD-SNMP-MIB::prErrFix.2 = INTEGER: 0
UCD-SNMP-MIB::prErrFixCmd.1 = STRING:
UCD-SNMP-MIB::prErrFixCmd.2 = STRING:
if not, check the configuration file on linux (/etc/snmp/snmpd.conf)
Process checks (Examples)
proc NAME MAX MIN
proc sendmail 10 1
proc httpd 10 1
Definiton:
Copy this plugin to the nagios plugin installation directory e.g.: /usr/lib(64)/nagios/plugin
Command Definiton:
#"check_processes_ucd" command definition
define command{
command_name check_processes_ucd
command_line $USER1$/check_processes_ucd -H $HOSTADDRESS$
}