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

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
Guest

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

Post by Guest »

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: [email protected]
Website: http://www.nagios.org





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