Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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
share|improve this question
    
In Monit logfile, is the restart event triggered ? –  krisFR Jan 27 at 12:45
    
@user2196728 i am not sure i understand what are you talking about. I see that action "restart" is planned in recevied emails (if you ment this). I've added lines from monit log file. –  avasin Jan 28 at 13:45
    
@user2196728 when i start script manually (using copy-paste from monit config) it starts normally and monit adds "'collect-stats' started" line to log. –  avasin Jan 28 at 13:46

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.