[mythtv-users] Monit for monetring mythbackend

Paolo Asioli paolo.asioli at libero.it
Thu Nov 15 14:16:58 UTC 2007


If someone needs it here is the part I've customized in my monitrc file 
under /etc/monit/

check process mythbackend 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


So far it works like a charm.

I've also customized the mail alert, of course.

Best regards,
    Paolo


David Greaves ha scritto:
> John wrote:
>   
>> I'm trying to use monit to monitor the backend but I
>> can't get it to work properly. I followed the
>> instructions on the MythTv wiki except I start the
>> front and back as a user so I added this to the
>> monitrc file.
>>     
> You say you added this?
> Are you using /etc/init.d/mythtv-backend because that usually specifies the user
> that myth runs as.
>
> Post your monitrc please.
>
>   
>> When monit trys to start the backend, I
>> get Unable to read config file mysql.txt and Could not
>> create //.mythtv. I figured it was a path problem so I
>> did an echo $PATH and it said home/mythtv/bin so I
>> added this to the /etc/rc.d/init.d/mythbackend script
>> but it didn't help.
>>     
> I would restore that to the original state.
>
> I think your problem is that monit should run the starup script as root so the
> startup script can change to the myth user.
>
> You made monit run the script as a user but without proper initialisation (ie
> setting paths etc).
>
> Before you changed it did /etc/rc.d/init.d/mythbackend work?
>
> David
>
>
> _______________________________________________
> mythtv-users mailing list
> mythtv-users at mythtv.org
> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
>   

-- 
*Ing. Paolo Asioli*
	
*Casa:*+39 011 3851662
*Mobile:*+39 335 8430361
	*Email:* paolo.asioli at libero.it <mailto:paolo.asioli at libero.it>
*http://www.linkedin.com/in/paoloasioli*
	

Verifica le nostre conoscenze in comune 
<http://www.linkedin.com/e/wwk/4804055/> 	Vuoi una firma come questa ? 
<http://www.linkedin.com/e/sig/4804055/>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mythtv.org/pipermail/mythtv-users/attachments/20071115/864097a6/attachment.htm 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bg_bluegel_385x42.jpg
Type: image/jpeg
Size: 2327 bytes
Desc: not available
Url : http://mythtv.org/pipermail/mythtv-users/attachments/20071115/864097a6/attachment.jpg 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: icon_in_blue_14x14.gif
Type: image/gif
Size: 146 bytes
Desc: not available
Url : http://mythtv.org/pipermail/mythtv-users/attachments/20071115/864097a6/attachment.gif 


More information about the mythtv-users mailing list