External Commands Setup


#1

I have a CentOS 5.4 System running nagios 2.9. I installed nagios & have it setup & running. The only issue I am having is the external commands setup. I have the path configured to write to the /var/log/nagios/rw/nagios.cmd. I have also found the external commands:

I.E.
#!/bin/sh

This is a sample shell script showing how you can submit the ADD_HOST_COMMENT command

to Nagios. Adjust variables to fit your environment as necessary.

now=date +%s
commandfile=’/usr/local/nagios/var/rw/nagios.cmd’

/bin/printf “%lu] ADD_HOST_COMMENT;host1;1;Some Author;This is a test comment\n” $now > $commandfile

My question is where do I put this command to work. Do I need to create a external_commands.cfg files & put that in nagios.cfg? Any help on this would be most appreicated.

-Jim

jrudolph@adayana.com