[Nagiosplug-devel] Wrote a new snmp based plugin

Zietzling, Uwe uwe.zietzling at baw.de
Fri Sep 13 08:36:02 CEST 2002


Hello!

I wrote two plugins for monitoring disk usage. One for unix computers. And
one for windows2000 computers.
With these plugins you dont need to have an addon running on the server
you'd like to monitor. The only thing you have to do on your "Nagios Client"
is to configure your snmp.
The plugin is completely written in unix shell script (bash) and awk. It
uses the snmpdf program of the net-snmp package. So make shure your Nagios
Server has the snmpdf command( IMPORTANT: use the ucd-snmp version 4.2.5 or
higher. The snmpdf of a lower version does not work reliable!).
You can monitor every mountpoint you can see with the local df -k command.
There is an extra check_w2kdisk script because of a different output of
snmpdf from w2k computers( a dammed HD serial number).
Before you use the plugins it's adviceable to try the snmpdf command on your
command line, in order to see if it can get a propper response at all.
The check_unixdisk is proved to work with SuSELinux 7.0 - 8.0. It does not
work with "Nagios Clients" running HP-UX 11.x.
The script creates a /tmp/nagios directory with needed files( keep in mind:
if you start the script the very first time by hand( maybe a test as root)
you have to change the User- and Group name of the /tmp/nagios/* to whatever
your nagios is running with. Otherwise the access to this files will be
denied once the nagios starts the check_unixdisk or the check_w2kdisk
script.).
I hope i mentioned everything important.
Have fun with it, work on it and let me know about importand and helpful
changes. I would be interested in the C code of this program. 
So long.....
Uwe

P.S:  hope you can read and understand my more or less bad english  :-)


 <<check_unixdisk>>  <<check_w2kdisk>> 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: check_unixdisk
Type: application/octet-stream
Size: 3084 bytes
Desc: not available
URL: <https://www.monitoring-plugins.org/archive/devel/attachments/20020913/43edc357/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: check_w2kdisk
Type: application/octet-stream
Size: 3207 bytes
Desc: not available
URL: <https://www.monitoring-plugins.org/archive/devel/attachments/20020913/43edc357/attachment-0001.obj>


More information about the Devel mailing list