Page 2 of 2
Re: best way to run remote shell on critical
Posted: Wed Aug 22, 2012 3:46 pm
by agriffin
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
Posted: Wed Aug 22, 2012 5:20 pm
by lraymond
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;
Code: Select all
#!/bin/bash
case "$1" in
CRITICAL )
:
ts=`date "+%F - %H:%M"`
echo restart: $ts >> /home/nagios/glassfish_restart.log
;;
* )
exit
esac
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!