Moxi with monit - anyone done this successfully?
I'm having a heck of a time getting monit to play nicely with moxi. At this point it always reports that "moxi failed to start", though I see the process running. This is a monit issue I'm sure, but I imagine most people who deal with moxi want to have it monited somehow. I'm posting my monit snippet below. I can confirm that the pidfile is being created and the server does, in fact, start up. Monit reports the process is not monitor and /var/log/syslog shows "moxi failed to start" reported by monit.
Also, I don't use "/bin/kill -9 `cat /var/run/moxi/moxi.pid`" because, surprise surprise, it never works in monit.
Any ideas from people who know monit better than I?
* * *
check process moxi
with pidfile /var/run/moxi/moxi.pid
start program = "/opt/moxi/bin/moxi -P /var/run/moxi/moxi.pid -d -Z usr=Administrator,pwd=XXXX -z /etc/moxi/hosts.cfg -u ubuntu"
stop program = "/usr/bin/killall -9 moxi"
if 5 restarts with 5 cycles then timeout
if cpu is greater than 80% for 5 cycles then alert