monit-general
[Top][All Lists]
Advanced

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

Re: monit with nginx


From: António P . P . Almeida
Subject: Re: monit with nginx
Date: Tue, 26 Oct 2010 08:21:04 +0100
User-agent: Wanderlust/2.15.9 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (Gojō) APEL/10.8 Emacs/23.2 (i486-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO)

On 26 Out 2010 00h29 WEST, address@hidden wrote:

> [1  <multipart/alternative (7bit)>]
> [1.1  <text/plain; ISO-8859-1 (7bit)>]
> Hi All,
>
> I have a number of servers running nginx in my environment.  Also
> using monit to monitor they are up and responding to port 80.
>
> I'm seeing "Server returned status 400" from monit and would like to
> solve this issue.
>
> This combination works fine on monit 5.0.3, however gives the 400
> error on servers running 4.10.1.  I found a few google hits on this
> like this one -
> http://serverfault.com/questions/131888/nginx-wont-respond-to-monit
>
> Does anyone have any ideas?

I'm running monit with Nginx with no problems. It shows up properly in
the access logs.

check process nginx with pidfile /var/run/nginx.pid
  group webserver # webserver group
  start program = "/etc/init.d/nginx start"
  stop program  = "/etc/init.d/nginx stop"
  ## Test port 80 and request the server status page. Restart if the
  ## server is down.
  if failed port 80 protocol http then restart
  ## If the restarts attempts fail then alert.   
  if 3 restarts within 5 cycles then timeout
  depends on nginxd
  depends on nginx_init
  alert address@hidden only on {timeout}    

## Test the nginx binary.
check file nginxd with path /usr/sbin/nginx
   group webserver
   if failed checksum then unmonitor
   if failed permission 755 then unmonitor
   if failed uid root then unmonitor
   if failed gid root then unmonitor
   alert address@hidden  

## Test the init scripts.
check file nginx_init with path /etc/init.d/nginx
   group webserver
   if failed checksum then unmonitor
   if failed permission 755 then unmonitor
   if failed uid root then unmonitor
   if failed gid root then unmonitor
   alert address@hidden

This assumes that 127.0.0.1:80 has Nginx listening in. What does it
shows in the logs?

--- appa




reply via email to

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