Debugging plugins

Tobias Klausmann klausman at schwarzvogel.de
Wed Oct 25 12:08:42 CEST 2006


Hi! 

While debugging it would sometimes be nice to be able to run a
plugin/check from the commandline in exactly the same fashion as
Nagios does.

What I'm after is a way of running (for example):

simulate -c /etc/nagios/nagios.conf -p 'check_http!80!http://somewhere.com'

The macros (like %HOSTADDRESS%) might come from the environment
or additional cmdline options to simulate. This program should
then show all the intermediate steps of unquoting, macro
expansione etc. just like it happens in Nagios and finally
showing the actual command executed (i.e. what's sent to exec()).

That way, finding out you've got a % somewhere or missed
something else would be nice. Also, you'd be able to test drive
check_commands before using them in your configuration.

Is there any such beast? If not, is anyone willing to code it?
I'm no expert at C and I hardly know Nagios' internals, so I
can't write it myself (or rather: I'd shoot off several of my
appendages while doing so).

Regards,
Tobias

-- 
Never touch a burning system.

-------------------------------------------------------------------------
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
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list