Dear All,
I have this file monit.conf in my /etc so I set my mail server and set the receiver.
1. I set the mail server
2. set alert *****
3. I un-comment the the message format
Quote:
set mail-format {
from: monit@$HOST
subject: monit alert -- $EVENT $SERVICE
message: $EVENT Service $SERVICE
Date: $DATE
Action: $ACTION
Host: $HOST
Description: $DESCRIPTION
Your faithful employee,
Monit
}
|
Lastly I added this line to check my java process which is ran as a daemon using yajsw
Quote:
check process commServer with pidfile /var/run/wrapper.commServer8000.pid # check your app pid
if failed port 8000 protocol HTTP
then alert
|
So thereafter I ran this command
Quote:
/etc/init.d/monit start
Starting monit: monit: Cannot find the control file at ~/.monitrc, /etc/monitrc, /etc/monitrc, /usr/local/etc/monitrc or at ./monitrc
[FAILED]
|
The I change the monit.conf to monitrc
Quote:
/etc/init.d/monit start
Starting monit: monit: Error opening the idfile '/var/monit/id' -- No such file or directory
Starting monit daemon with http interface at [localhost:2812]
[ OK ]
|
Then lastly I run this to check if monit running but nothing either too. So where could be my mistake?
Quote:
/etc/init.d/monit start
Starting monit: monit: Error opening the idfile '/var/monit/id' -- No such file or directory
Starting monit daemon with http interface at [localhost:2812]
[ OK ]
|