# \[Slightly OT\] backgroundrb monit config

**URL:** <https://www.ruby-forum.com/t/slightly-ot-backgroundrb-monit-config/103109>\
**Category:** Rails\
**Created:** [May 1, 2007, 11:04pm UTC](https://www.ruby-forum.com/t/slightly-ot-backgroundrb-monit-config/103109 "2007-05-01T23:04:58Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Zack\_C](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/z/eb9ed0/32.png) [@Zack\_C](https://www.ruby-forum.com/u/Zack_C)\
**Post date:** [May 1, 2007, 11:04pm UTC](https://www.ruby-forum.com/t/slightly-ot-backgroundrb-monit-config/103109/1 "2007-05-01T23:04:58Z")

</div>

Anyone have a a good monit config section for backgroundrb?

I’m thinking something like this:

check process backgroundrb with pidfile  
/var/www/apps/foo/current/log/backgroundrb.pid  
start program = “/var/www/apps/foo/current/script/backgroundrb start”  
stop program = “/var/www/apps/foo/current/script/backgroundrb stop”  
if failed host 127.0.0.1 port 2000 then restart  
if 5 restarts within 5 cycles then timeout

Problem is the port test fails - I thought 2000 is the default…

Thanks,

–  
Zack C.  
[http://depixelate.com](http://depixelate.com)

---

<div class="post-metadata">

**Author:** ![Zack\_C](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/z/eb9ed0/32.png) [@Zack\_C](https://www.ruby-forum.com/u/Zack_C)\
**Post date:** [May 2, 2007, 12:28am UTC](https://www.ruby-forum.com/t/slightly-ot-backgroundrb-monit-config/103109/2 "2007-05-02T00:28:11Z")

</div>

On May 1, 2007, at 2:03 PM, Zack C. wrote:

> if failed host 127.0.0.1 port 2000 then restart  
> if 5 restarts within 5 cycles then timeout
> 
> Problem is the port test fails - I thought 2000 is the default…
> 
> Thanks,
> 
> –  
> Zack C.  
> [http://depixelate.com](http://depixelate.com)

Zack-

It depends on what version fo the plugin you are using. The 0.2.x  
branch uses 2000 by default _but_ it also uses unix domain sockets by  
default. So it really is not listening on any port, its using socket  
files to do its communicating. I havent gotten monit port checking to  
work with bdrb so I just monito it for memory and cpu and uptime.

Cheers-  
– Ezra Z.  
– Lead Rails Evangelist  
– removed\_email\_address@domain.invalid  
– Engine Y., Serious Rails Hosting  
– (866) 518-YARD (9273)

---

<div class="post-metadata">

**Author:** ![Zack\_C](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/z/eb9ed0/32.png) [@Zack\_C](https://www.ruby-forum.com/u/Zack_C)\
**Post date:** [May 2, 2007, 2:04am UTC](https://www.ruby-forum.com/t/slightly-ot-backgroundrb-monit-config/103109/3 "2007-05-02T02:04:16Z")

</div>

> > if 5 restarts within 5 cycles then timeout
> 
> ```
> It depends on what version fo the plugin you are using. The 0.2.x
> 
> ```
> 
> branch uses 2000 by default _but_ it also uses unix domain sockets by  
> default. So it really is not listening on any port, its using socket  
> files to do its communicating. I havent gotten monit port checking to  
> work with bdrb so I just monito it for memory and cpu and uptime.
> 
> Cheers-  
> – Ezra Z.

Ezra,

Thanks - I had read about 0.2.x using domain sockets but had  
promptly forgot when updating my monit config.

Thanks,

–  
Zack C.  
[http://depixelate.com](http://depixelate.com)
