I installed monit to monitor kannel but I cant understand how the control file works.. i have tried this:
check process bearerbox with pidfile /home/sms/kannel/bearerbox.pid start program = "/usr/local/sbin/bearerbox /home/sms/kannel/smskannel.conf" check process smsbox with pidfile /home/sms/kannel/smsbox.pid start program = "/usr/local/sbin/smsbox /home/sms/kannel/smskannel.conf" but i guess it is not enough because i tried to terminate kannel on purpose to see if monit relaunches i, and it didnt. Can Jonathan Houser please indicate what commands did he use in setting up the control file for monit? I checked the manual an I know that there are a bunch of english like commands that can be used. The following is the pseoducode of what I need. I just dont know the correct syntax. If anyone, particularly Johnathan since he has been though it, can help i really appreciate it. 1) if (process with pid [bearerbox.pid] is down) then launch both bearerbox and smsbox and store their pid's in bearerbox.pid and smsbox.pid 2) if (process with pid [smsbox.pid] is down but bearerbox is ok || host 100.100.100.100 port 13013 is down) then launch just smsbox and store pid in smsbox.pid there is an example for monitoring apache with monit. It is a bit difficult to rearrange it for kannel because of the complexity of monitoring two processes, bearerbox and smsbox. Most of the time i just find smsbox down, while bearerbox is ok. In this case, i just need to relaunch smsbox. Thanks in advance for your help. Best Regards, Reuben Sant ______________________ Address: "Soleado", Bidnija Road, Bidnija, Limits of St.Paul's Bay. SPB 13. Malta Mob: (+356) 79 313645 [try this first pls] Tel: (+356) 21 424222 Email: [EMAIL PROTECTED] MSN: [EMAIL PROTECTED] Web: http://www.reubensant.net ----- Original Message ----- From: "Jonathan Houser" <[EMAIL PROTECTED]> To: "Alejandro Ramirez" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]>; <[email protected]> Sent: Friday, September 02, 2005 7:19 PM Subject: Re: Kannel Suicide > > Alejandro, > > > Very interesting this MONIT thing... is it possible to see how your script starts kannel.. my init.d script does not create a PID file in /var/run for smsbox or sqlbox or... any box. How do you manage that?? > > Gentoo uses start-stop-daemon for its services/daemons, and that's > all I use as well. The start-stop-daemon app has the ability to be told > to create a PID file -- just check the man page. > > Jon >
