# Share monit.rc entry for Ferret Drb?

**URL:** <https://www.ruby-forum.com/t/share-monit-rc-entry-for-ferret-drb/114187>\
**Category:** Ferret\
**Created:** [September 9, 2007, 11:14am UTC](https://www.ruby-forum.com/t/share-monit-rc-entry-for-ferret-drb/114187 "2007-09-09T11:14:10Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![turnkeytraders](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/ba8739/32.png) [@turnkeytraders](https://www.ruby-forum.com/u/turnkeytraders)\
**Post date:** [September 9, 2007, 11:14am UTC](https://www.ruby-forum.com/t/share-monit-rc-entry-for-ferret-drb/114187/1 "2007-09-09T11:14:10Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![turnkeytraders](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/ba8739/32.png) [@turnkeytraders](https://www.ruby-forum.com/u/turnkeytraders)\
**Post date:** [October 11, 2007, 9:55pm UTC](https://www.ruby-forum.com/t/share-monit-rc-entry-for-ferret-drb/114187/2 "2007-10-11T21:55:53Z")

</div>

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
