Plugin scratchpad string....

Peter Åris Krüpl peter at henet.dk
Fri Aug 18 08:46:04 CEST 2006


Hi Group,

    I do lots of snmp stuff from nagios, what i do most often is to 
check an interface
    for status, and throughput. The challenge i to acheive this goal 
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 
would be nice if one could add
    another | to the plugin output specifications, so i could have 
something like:

    Checkoutput|Performance data|extra string.

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

    Why you ask ?!?!

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

    The next time the plugin runs it gets passed the extra string, now 
it can check to see if
    the interface still has the same index with a single snmpget, if the 
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 
full snmpwalk again of
    the ifAlias table.

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

    Kind Regards
    Peter Krüpl
   




-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642




More information about the Developers mailing list