best way to run remote shell on critical
Re: best way to run remote shell on critical
Does your command print any output to stdout? If it only prints to stderr this message is expected. It looks like the command is getting run successfully; it's just not receiving the output from the command.
Re: best way to run remote shell on critical
Wish it was the case. There is text that get's output to the screen by default saying it's restarting, but there is nothing being written to the log. I even removed the restart process, so the local restart script looks like this;
I made that file r+w by everyone, put it in the nagios home folder, ran the check script from the server, same error and that log file not written to. I run it local as root and as nagios;
restart: 2012-08-22 - 18:17
instantly appears.... this will be the death of me!
Code: Select all
#!/bin/bash
case "$1" in
CRITICAL )
:
ts=`date "+%F - %H:%M"`
echo restart: $ts >> /home/nagios/glassfish_restart.log
;;
* )
exit
esacrestart: 2012-08-22 - 18:17
instantly appears.... this will be the death of me!