monit-general
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Monit service not logging stdout


From: Michael Mackus
Subject: Monit service not logging stdout
Date: Thu, 28 Apr 2011 11:50:35 -0700

I have a simple monit service set up, so I have something to keep my node.js server running. The service works fine, but I can't get stdout to log to a file. I'm not sure what I'm doing wrong here, if I call the command directly it works fine, but Monit must be wrapping it somehow that stdout is not being written to the file properly. Here is my monit.d script:

check host nodechat with address 127.0.0.1
start program = "/usr/local/bin/node /home/node/chat_blog/chat.js > /var/log/nodechat.log"
stop program = "/usr/bin/pkill -f 'node /home/node/chat_blog/chat.js'"
if failed port 8000 protocol HTTP
request /
with timeout 10 seconds
then restart

If I execute "/usr/local/bin/node /home/node/chat_blog/chat.js > /var/log/nodechat.log" directly (without the quotes) it works fine. 


reply via email to

[Prev in Thread] Current Thread [Next in Thread]