Page 1 of 1

[Nagios-devel] Plugin scratchpad string....

Posted: Thu Aug 17, 2006 10:46 pm
by Guest
Hi Group,

I do lots of snmp stuff from nagios, what i do most often is to=20
check an interface
for status, and throughput. The challenge i to acheive this goal=20
with as little snmp traffic
as possible, so i wont load the monitored devices unnecessary.

To do this i currently store a temporary file from the plugin. It=20
would be nice if one could add
another | to the plugin output specifications, so i could have=20
something like:

Checkoutput|Performance data|extra string.

The point of the extra string is that plugins can pass themselves=20
extra information from
invoccation to invoccation. (Per service definition)

Why you ask ?!?!

Ok, my check interface plugin uses the name of the interface not=20
just a static OID value.
So in the first run the plugin get's no extra string passed.=20
Therefore it walks the interface table
to determine the index of the interface. The index is returned in=20
the extra string to nagios.

The next time the plugin runs it gets passed the extra string, now=20
it can check to see if
the interface still has the same index with a single snmpget, if the=20
index is still correct
status is retreived and returned back with the extra string.

Should the passed index be incorrect the plugin has to execute a=20
full snmpwalk again of
the ifAlias table.

This can save alot of snmp traffic especially on boxes with 100+=20
interfaces....

Kind Regards
Peter Kr=FCpl
=20








This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]