Share monit.rc entry for Ferret Drb?

Hi,

we’re using monit to watch over our mongrels and I want to add an entry
for the ferret Drb server. Would anyone care to share their montit.rc
entry?

Thanks

Matthew

Hey Matthew, I am currently in the process of doing the same.

Here is my entry for the monitrc file:

System services

include /etc/monit/includes/ferret

Then in

/etc/monit/includes/ferret

"

ferret (DRB Server Monitoring):

-------------------------------

check process ferret with pidfile
/var/www/kisscafe/shared/pids/ferret.pid
start program = “/etc/init.d/ferret start”
stop program = “/etc/init.d/ferret stop”
if failed host 127.0.0.1 port 9009 type tcp then alert
if 5 restarts within 5 cycles then timeout
"

I’ve altered a start / stop script I found on the Act_as_ferret manual
to work with our current needs (as we use capistrano for clustering
across machines, so the current directory is where ferret needs to be
launched from) which is:

"
#!/bin/bash

This script starts and stops the ferret DRb server

chkconfig: 2345 89 36

description: Ferret search engine for ruby apps.

save the current directory

CURDIR=pwd
PATH=/usr/local/bin:$PATH

RORPATH="/var/www/site/current/"

case “$1” in
start)
cd $RORPATH
echo “Starting ferret DRb server.”
RAILS_ENV=production
/var/www/site/current/script/ferret_start
;;
stop)
cd $RORPATH
echo “Stopping ferret DRb server.”
RAILS_ENV=production
/var/www/site/current/script/ferret_stop
;;
*)
echo $“Usage: $0 {start, stop}”
exit 1
;;
esac

cd $CURDIR
"

Hope that helps.

Matthew L.ham wrote:

Hi,

we’re using monit to watch over our mongrels and I want to add an entry
for the ferret Drb server. Would anyone care to share their montit.rc
entry?

Thanks

Matthew

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs