[mythtvnz] OT: monit

Criggie criggie at criggie.dyndns.org
Tue Nov 27 00:58:09 GMT 2007


Nick Rout wrote:
> OK so I am lazy, but how did you set it up for mythbackend?
> I have the problem with it stopping sometimes too.

I'm lazy too...  I just check that there is an app running with that PID.

check process mythtv with pidfile /var/run/mythtv/mythbackend.pid
   start program = "/etc/init.d/mythtv-backend restart"
   stop program = "/etc/init.d/mythtv-backend stop"
   if 5 restarts within 5 cycles then timeout

I was going to do checks on myth port listening, etc.
There's already a separate check for mysql, which should be extended the
same way but I haven't got around to it yet.

check process mysqld with pidfile /var/run/mysqld/mysqld.pid
   start program = "/etc/init.d/mysql restart"
   stop program = "/etc/init.d/mysql stop"
   if 5 restarts within 5 cycles then timeout

Something like this:
   if failed host 127.0.0.1 port 3306 type tcp then restart
   if failed host 127.0.0.1 port 3306 type udp then restart



> (Of course sometimes you want it stopped like when running mythsetup,
> do you have to turn off monit then?)

Yeah - its just a "/etc/init.d/monit stop" , or you could tell monit to
   monit unmonitor mythtv-backend
do stuff
   monit monitor mythtv-backend



> On Nov 27, 2007 7:53 AM, Criggie <criggie at criggie.dyndns.org> wrote:
>> Hey all - after a wee problem with mythtv-backend not running, I have
>> set up an app called monit.
>>
>> http://tildeslash.com/monit/
>> Also packaged in debian and centos
>>
>> It monitors processes and restarts them if they fail or aren't running
>> for
>> some reason.  Also can monitor that ports are open and connectable (ie,
>> is
>> apache actually serving on port 80) and can also monitor the checksum of
>> config or binary files.
>>
>> Fortunately I only missed a bit of Stargate.
>>
>> --
>> Criggie
>>
>> http://criggie.dyndns.org/
>>
>>
>> _______________________________________________
>> mythtvnz mailing list
>> mythtvnz at lists.linuxnut.co.nz
>> http://lists.ourshack.com/mailman/listinfo/mythtvnz
>> Archives http://www.gossamer-threads.com/lists/mythtv/mythtvnz/
>>
>
> _______________________________________________
> mythtvnz mailing list
> mythtvnz at lists.linuxnut.co.nz
> http://lists.ourshack.com/mailman/listinfo/mythtvnz
> Archives http://www.gossamer-threads.com/lists/mythtv/mythtvnz/
>


-- 
Criggie

http://criggie.dyndns.org/






More information about the mythtvnz mailing list