Re: [Nagios-devel] Adding a new command to Nagios?

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] Adding a new command to Nagios?

Post by Guest »

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]
Locked