persistent storage for checks Monitoring::Plugin
f at zz.de
Thu Jan 23 11:59:51 CET 2014
is there a way for persistent storage in the checks?
I wrote myself an interface check plugin which gets an
interface name as input and looks through the ifName/ifDescr
table to find its oid.
Now i am caching the result that do not need to do the walk
again on every invocation.
I do verify that the name still matches.
So if i dont have a cache file i do
snmpwalk ifName ifDescr
snmpget ifInOctets ifOutOctets ifName ifDescr
The next invocation i do
snmpget ifInOctets ifOutOctets ifName IfDescr
check if ifName ifDescr still matches
if not do walk again
Currently i simply create a directory and i drop my cache files
somewhere in /var/lib/nagios3/run something but i think it'll be
a good idea to formalize the way to do persistent storage
Florian Lohoff f at zz.de
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 828 bytes
Desc: Digital signature
More information about the Devel