[Top][All Lists]

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

[monit] Monit "connection failure" for apache

From: The Presence
Subject: [monit] Monit "connection failure" for apache
Date: Tue, 23 Oct 2007 18:54:41 -0600

Hey guys,

I have monit set up on my freebsd webserver, and everything seems to be working, but there is a problem.  On the monit service manager page (and with "monit status" it shows "Connection Failed" as the status for my apache service.  When I run "monit validate" I get no errors.

Here is my monitrc related to that monitoring setup:

check process apache with pidfile /var/run/
    start program = "/usr/local/etc/rc.d/apache22 start"
    stop program  = "/usr/local/etc/rc.d/apache22 stop"
    if cpu > 60% for 2 cycles then alert
    if cpu > 80% for 5 cycles then restart
    if totalmem > 6144.0 MB for 5 cycles then restart
    if children > 500 then restart
    if loadavg(5min) greater than 10 for 8 cycles then stop
    if failed host port 80 protocol http
       request "/monit/token"
       then restart
#   monit will only monit/give alert in this mode.
    mode passive
    if 5 restarts within 5 cycles then timeout

I had to put monit into passive mode so it wont keep restarting apache.  The output from "monit status" is below:

Process 'apache'
  status                            Connection failed
  monitoring status                 monitored
  pid                               14561
  parent pid                        1
  uptime                            54m
  childrens                         264
  memory kilobytes                  13168
  memory kilobytes total            4443884
  memory percent                    0.3%
  memory percent total              121.3%
  cpu percent                       11.2%
  cpu percent total                 11.2%
  port response time                0.008s to [HTTP via TCP]
  data collected                    Tue Oct 23 18:50:38 2007

The port response time tells me that it does receive the token which just contains the text "Monit is running.".  If I connect to the webserver and request this file, it confirms I can request it, and that I get the contents.

How do I get it to work properly?  Every configuration I have checked is similar to mine...most are even less detailed.

Climb to the top of the charts!  Play Star Shuffle:  the word scramble challenge with star power. Play Now!

reply via email to

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