LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 05-12-2012, 09:31 AM   #1
newbie14
Member
 
Registered: Sep 2011
Posts: 646

Rep: Reputation: Disabled
Problem starting my monit


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 ]
 
Old 05-27-2012, 07:36 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599
Quote:
Originally Posted by newbie14 View Post
So where could be my mistake?
As root 'mkdir /var/monit; chmod 0755 /var/monit'
 
Old 05-27-2012, 10:47 AM   #3
robertjinx
Member
 
Registered: Oct 2007
Location: Prague, CZ
Distribution: RedHat / CentOS / Ubuntu / SUSE / Debian
Posts: 749

Rep: Reputation: 73
Monit configuration file has to be named monitrc and should be in /etc, something like /etc/monitrc. Change the same of the config file and all should be fine.
 
Old 05-27-2012, 10:49 AM   #4
newbie14
Member
 
Registered: Sep 2011
Posts: 646

Original Poster
Rep: Reputation: Disabled
Dear Robert,
Just to share yes that works on some of the source but those from EPEL does not need this monitrc file it works with the default monit.conf.
 
Old 05-27-2012, 11:04 AM   #5
robertjinx
Member
 
Registered: Oct 2007
Location: Prague, CZ
Distribution: RedHat / CentOS / Ubuntu / SUSE / Debian
Posts: 749

Rep: Reputation: 73
Well then follow what unSpawn said, create /var/monit as root user, of course.

Code:
mkdir -m 0750 -p /var/monit
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Postfix / cron / monit problem on CentOS Gethyn Linux - Server 5 03-31-2011 04:32 AM
Monit grob115 Linux - Server 3 02-28-2010 06:53 AM
Monit parameters linuxfia Linux - Software 8 06-04-2009 10:55 AM
Problem with Setting up monit helptonewbie Linux - Software 2 07-29-2007 04:24 PM
postfix/ldap/monit : where does the problem lie topcat Linux - Software 1 11-23-2004 10:28 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 08:59 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration