Adding a new command to Nagios?
Hiren Patel
hir3npatel at gmail.com
Thu Oct 1 20:19:52 CEST 2009
Steven D. Morrey wrote:
> Hi Everyone,
>
> I've added a feature to the event profiler so it can be turned on and off at will.
> I then added a command to do this to commands.c
>
> The question I am having trouble finding the answer to is how do I test this?
> I've tried writing the command directly /usr/local/nagios/var/rw/nagios.cmd and watching the results in gdb but I get nothing.
> Maybe I'm doing this wrong but shouldn't this do the trick for debugging purposes?
> echo "DISABLE_PROFILER;ALL" > /usr/local/nagios/var/rw/nagios.cmd
>
if I recall correctly, the format is something like:
[time] command;arg;arg\n
where time is epoch seconds and there can be varying number of args
depending on the command.
> Obviously I'll go ahead and add the command to cmd.cgi when I'm sure it's working properly, I just want to narrow my debugging focus for now and write the command directly to nagios.
> Thoughts?
>
------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
More information about the Developers
mailing list