monit-general
[Top][All Lists]
Advanced

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

[monit] Using monit to monitor mythbackend


From: John
Subject: [monit] Using monit to monitor mythbackend
Date: Sun, 11 Nov 2007 11:51:11 -0800 (PST)

I'm trying to monitor mythbackend with monit without
success. I'm using Fedora 8 and I downloaded a package
found on rpm.pbone. The package said it was for Fedora
8 but the package name has a f7. Don't know if this is
a problem. I was a bit confused on the difference
between /etc/monit.conf and monitrc file so I made a
backup of the monit.conf file and used this as my
monit.conf so I'm not sure if this is causing my
issue.

# Monit control file
#
# Comments begin with a '#' and extend through the end
of the line.
# Blank lines between program entries are ignored.
Keywords are case
# insensitive. All path's MUST BE FULLY QUALIFIED,
starting with '/'
#
set daemon  30
set logfile /var/log/monit.log
admin on any event
set httpd port 2812 and
    allow localhost
    allow 127.0.0.1
    allow user:xxxx    


check process mythbackend with pidfile
/var/run/mythtv/mythbackend.pid
 group mythtv
 start program = "/etc/init.d/mythbackend restart"
        as uid mythtv and gid mythtv
 stop program  = "/etc/init.d/mythbackend stop"
        as uid mythtv and gid mythtv
 if failed port 6544 proto http then restart
 mode manual
 depends on mysql

check process mysql with pidfile
/var/run/mysqld/mysqld.pid
 group mythtv
 start program = "/etc/init.d/mysqld start"
 stop program = "/etc/init.d/mysqld stop"
 if failed port 3306 then restart
 mode manual

So I start my mythbackend as

[mythtv]$ /etc/rc.d/init.d/mythbackend start

I then log into the monit web page and click enable
monitoring. I then kill the mythbackend process with
the kill command and then check to see if monit
restarts. It tires but gives me these errors.

[MST Nov 11 10:47:23] info     : 'mythbackend' trying
to restart
[MST Nov 11 10:47:23] debug    : Monitoring disabled
-- service mythbackend
[MST Nov 11 10:47:23] debug    : monit: pidfile
'/var/run/mythtv/mythbackend.pid' does not exist
[MST Nov 11 10:47:23] debug    : monit: pidfile
'/var/run/mythtv/mythbackend.pid' does not exist

I look in my mythbackend log and I see these errors.

2007-11-11 10:57:44.341 Using runtime prefix = /usr
2007-11-11 10:57:44.348 Unable to read configuration
file mysql.txt
2007-11-11 10:57:44.348 Trying to create a basic
mysql.txt file
2007-11-11 10:57:44.349 Could not create //.mythtv
2007-11-11 10:57:44.350 Failed to init MythContext,
exiting.

I don't understand why I can start mythbackend from
the command line but when monit tries the exact same
command it gives me the mysql.txt error.

Anyone know what I'm doing wrong?

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 




reply via email to

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