Plugin scratchpad string....
Ethan Galstad
nagios at nagios.org
Tue Aug 22 18:23:42 CEST 2006
Peter Åris Krüpl wrote:
> 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
Nagios 3.x will allow for custom (user-specified) variables and macros,
which should help you to accomplish what you need to do. Once I get to
documenting 3.x I'll add some info on this.
Ethan Galstad,
Nagios Developer
---
Email: nagios at nagios.org
Website: http://www.nagios.org
-------------------------------------------------------------------------
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