monit-general
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: failed http check


From: Noel
Subject: Re: failed http check
Date: Wed, 04 Jan 2012 15:24:04 -0600
User-agent: Mozilla/5.0 (Windows NT 6.1; rv:9.0) Gecko/20111222 Thunderbird/9.0.1

On 1/4/2012 1:38 PM, Mike Zupan wrote:
> I have the following
>
> check process app_thin_8101 with pidfile
> /data/app/current/tmp/pids/thin.8101.pid
>     start = "/etc/init.d/thin start 8101"
>     stop = "/etc/init.d/thin stop 8101"
>     if totalmem > 500.0 MB for 3 cycles then restart
>     if failed host 127.0.0.1 port 8101 protocol http for 3 cycles then restart
>     if 9 restarts within 9 cycles then timeout
>
> The issue is it keeps restarting that thin process. I can curl
> 127.0.0.1:8101 just fine. The issue might be / is a 404 in our app. Is
> there a way to tell monit a 404 is ok or have it hit a url?

Yes, a 404 response is considered an error if you specify "protocol
http".  You can use "request" to specify a file on the server

  if failed host 127.0.0.1 port 8101
  protocol http
  request '/path/to/some/file'
  for 3 cycles then restart

"hostheader" is also handy if you need to check a specific virtual
host name.

or delete the "protocol http" part to just see if the port is open.
  if failed host 127.0.0.1 port 8101 for 3 cycles ...



  -- Noel Jones



reply via email to

[Prev in Thread] Current Thread [Next in Thread]