Re: [Nagios-devel] Adding a new command to Nagios?
Posted: Thu Oct 01, 2009 5:20 pm
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?
>
This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]
> 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?
>
This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]