I need to run my stats collecting daemon & send alerts, when it is down. I tried thousands of variants.. and last was:
check process collect-stats with pidfile /var/run/nodeutils/collect-stats.pid
start program = "/var/nodeutils/collect-stats.js &> /var/log/nodeutils/collect-stats.log &"
stop program = "/bin/kill `/bin/cat /var/run/nodeutils/collect-stats.pid`"
Anyway, monit is unable to startup this script. I am able to start this daemon myself up from console. Can't get why it is not working. Any ideas?
I even have written init.d script, from console it is working ok.. but monit is unable to start daemon using it :(
Working on debian wheezy.
P.S. adding lines from monit logs:
[MSK Jan 26 04:21:05] error : 'collect-stats' process is not running
[MSK Jan 26 04:21:05] info : 'collect-stats' trying to restart
[MSK Jan 26 04:21:05] info : 'collect-stats' start: /usr/bin/env
[MSK Jan 26 04:21:35] error : 'collect-stats' failed to start