RESTART_PROGRAM ext command not working
Posted: Wed Dec 05, 2018 12:20 pm
Hello Folk,
I am using Nagiosql frontend (3.4) for the core (4.2.4). I noticed "Restart Nagios - Do it" not actually restarting the nagios daemon. Doing some research on that, I got below code which I can try through cli.
However, even after running the above script, I see it makes no difference. I see this in the log when i run the script ,
but its not actually restarting the daemon. Can anyone give your ideas if am missing anything?
I am using Nagiosql frontend (3.4) for the core (4.2.4). I noticed "Restart Nagios - Do it" not actually restarting the nagios daemon. Doing some research on that, I got below code which I can try through cli.
Code: Select all
#!/bin/sh
# This is a sample shell script showing how you can submit the RESTART_PROGRAM 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] RESTART_PROGRAM\n" $now > $commandfile
However, even after running the above script, I see it makes no difference. I see this in the log when i run the script ,
Code: Select all
Dec 5 16:34:17 nagios-core-4 nagios: EXTERNAL COMMAND: RESTART_PROGRAM;
Dec 5 16:34:17 nagios-core-4 nagios: PROGRAM_RESTART event encountered, restarting...