[Nagiosplug-help] check_snmp help

Michael Markstaller mm at elabnet.de
Tue Dec 23 03:32:05 CET 2003


> These oids are from the net-snmp project's snmp agent and their private
> MIB.  It works on most if not all *nixes. Does not work on windows afaik.
No, its the HOST-RESOURCES-MIB and even M$ managed to support it ;) .. works fine on W2k, jetdirect, linux etc.

> right now check_snmp does not support calculations on retrieved oids.
> in contrib dir you will find a check_disk_snmp.pl which does the
> calculation, but it only support SNMPv3 (there is no v3 support from
> Microsoft as yet).  You could modify this to add v1/v2c support...
Yep, thats what I've already done, but it's still quite a quickhack, but 
it works and should do what you need and even support multiple disks/memory-areas with one run.
call with -D to walk hrstoragetable to see what you can expect from the host.

But please DO NOT add it to the plugins-contrib as it's not the type of code-quality i want to spread,
I'll submit a completely fixed up version to SF when I have some time to clean this up.. 
but anybody willing can use so far.


--- checkcommands.cfg
# 'check_disk_snmp' command definition
# Syntax !Community!DISKS!WARN%!CRIT%
# maybe more than one disk, example !linux-host!public!1,101!80,80!90,90
# Optional: -P 1 (SNMPv1), -
define command{
	command_name	check_disk_snmp
	command_line	$USER1$/local/check_disk_snmp.pl -H $HOSTADDRESS$ -C $ARG1$ -d $ARG2$ -w $ARG3$ -c $ARG4$ $ARG5$ $ARG6$ $ARG7$	
	}

---- services.cfg
define service{
	use				rz-service-info
	host_name			w2k-host
	service_description	disks-mem
	normal_check_interval	15
	check_command		check_disk_snmp!public!2,3,4,5,7!90,90,90,90,75!95,95,95,95,90
	}


Michael
-------------- next part --------------
A non-text attachment was scrubbed...
Name: check_disk_snmp.pl
Type: application/octet-stream
Size: 3964 bytes
Desc: check_disk_snmp.pl
URL: <https://www.monitoring-plugins.org/archive/help/attachments/20031223/eefa1067/attachment.obj>


More information about the Help mailing list