[Nagiosplug-help] Perl plugin using Nagios embedded wrapper?

Chris Adams cmadams at hiwaay.net
Tue Aug 7 17:22:31 CEST 2007


I have a wrapper plugin that manages SNMP community strings.  It has a
config file that can list multiple community strings, and it tries each
one (getting system.sysUpTime.0 to see if the community string works).
I've done this to mostly avoid spurious errors while changing community
strings (we change them regularly).

I have another wrapper that can do instance mapping: walk a table
looking for a string or regexp and then append the instance to the
requested variable, caching the table walk in a file.

I have written these as wrappers for existing plugins because I'm
wrapping multiple existing plugins and I don't want to have to modify
them all.

Right now, my wrappers always fork and exec the wrapped plugin (e.g.
check_snmp or check_ifoperstatus).  For check_snmp, there is no other
way (since it is compiled).  However, I thought it might be good for my
wrapper to do the same thing as Nagios and try to use the embedded perl
wrapper for check_ifoperstatus.  Is that practical (or even possible)?

-- 
Chris Adams <cmadams at hiwaay.net>
Systems and Network Administrator - HiWAAY Internet Services
I don't speak for anybody but myself - that's enough trouble.




More information about the Help mailing list