here's a blog post on suppressing the logging...

"http://www.ruby-forum.com/topic/95146";

here's my bit from my monitrc

******************
if failed port 8000 protocol http and request "/pulse"
     with timeout 10 seconds
     then restart
*******************

  where "pulse" is defined in my routes.rb


Joey Geiger wrote:
> Well, there are a few things to think about.
> 
> 1. I've got a script that checks nginx with a "success" message.
> 2. Are you checking if mongrel is up, or rails?
> If it's mongrel, you might want to write a custom route so it's not
> loading the framework stack every time.
> If it's rails, you should create something like a MonitController that
> will respond with "success" when asked for the index action.
> 
> Doing those things has worked quite well for me so far. Just be sure
> to disable the logging in the monit controller so it doesn't fill your
> logs.
> def logger
> end
> 
> 
> On Wed, Mar 26, 2008 at 6:09 PM, Michael Engelhart
> <[EMAIL PROTECTED]> wrote:
>> Sorry - I was copying  and pasting from an alert email.    The ports
>>  "do" match up in my monit script
>>
>>  Here's a real example:
>>
>>  #8002
>>  check process mongrel_rails_8002 with pidfile 
>> /var/run/mongrel/mongrel.8002.pid
>>   group mongrel
>>   start program = "/usr/local/bin/ruby /usr/local/bin/mongrel_rails
>>  start -d -e production -a 127.0.0.1 -c /opt/rails/radius --user
>>  mongrel --group mongrel -p 8002 -P /var/run/mongrel/mongrel.8002.pid
>>  -l /var/log/mongrel/mongrel.8002.log"
>>   stop program  = "/usr/local/bin/ruby /usr/local/bin/mongrel_rails
>>  stop -P /var/run/mongrel/mongrel.8002.pid"
>>   if totalmem > 100.0 MB for 5 cycles then restart
>>   if failed host 127.0.0.1 port 8002 protocol http
>>
>>     with timeout 10 seconds
>>   then restart
>>
>>
>>
>> On Wed, Mar 26, 2008 at 6:27 PM, John Weir <[EMAIL PROTECTED]> wrote:
>>  > well, something doesn't seem right:
>>  >
>>  >  -> mongrel_rails_8001' failed protocol test [HTTP] at
>>  >
>>  > INET[127.0.0.1:8018]
>>  >                                                                           
>>                                 ^
>>  >  ^^^^^^^^^^^^
>>  >
>>  >  127.0.0.1:8018 <- port 8018? or do you want port 8001?
>>  >
>>  >  also i leave the host parameter out of the monit config.
>>  >
>>  >    if failed port 8015 protocol http
>>  >       with timeout 20 seconds
>>  >       then restart
>>  >
>>  >
>>  >
>>  >  On Mar 26, 2008, at 5:53 PM, Michael Engelhart wrote:
>>  >
>>  >  > Does anyone have any tips for checking to see if the mongrel instance
>>  >  > is responding to HTTP?  I just tried doing this:
>>  >  >
>>  >  > if failed host 127.0.0.1 port 8001 protocol http
>>  >  >    with timeout 10 seconds
>>  >  >  then restart
>>  >  >
>>  >  > but when I have that code in my monit script it gives me this error:
>>  >  > mongrel_rails_8001' failed protocol test [HTTP] at
>>  >  > INET[127.0.0.1:8018] via TCP
>>  >  >
>>  >  >
>>  >  > Thanks for any tips.
>>  >  >
>>  >  > Mike
>>  >
>>  >
>>  > _______________________________________________
>>  >  Mongrel-users mailing list
>>  >  Mongrel-users@rubyforge.org
>>  >  http://rubyforge.org/mailman/listinfo/mongrel-users
>>  >
>>  _______________________________________________
>>  Mongrel-users mailing list
>>  Mongrel-users@rubyforge.org
>>  http://rubyforge.org/mailman/listinfo/mongrel-users
>>




_______________________________________________
Mongrel-users mailing list
Mongrel-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/mongrel-users

Reply via email to