monit-general
[Top][All Lists]
Advanced

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

Monit newbie with a question...


From: Daniel Waite
Subject: Monit newbie with a question...
Date: Wed, 6 Oct 2010 16:08:03 -0700

Hi all. I'm serving web pages with Varnish (no Apache or any other web
server, just Varnish). I'd like to be notified via e-mail if Varnish
ever goes down, or, more (less?) specifically, when my website becomes
unreachable via a browser.

I've confirmed that Monit is working, at least to some degree, by
specifying some rules that send me an e-mail when a file's checksum is
changed.

However, I'm having difficulty getting Monit to e-mail me about my website.

Here is the configuration I am using for Monit:

check process varnishd with pidfile /var/run/varnish.pid
        start program = "/etc/init.d/varnish start" with timeout 60 seconds
        stop program = "/etc/init.d/varnish stop"
        if failed host 127.0.0.1 port 80 protocol http
                then restart
        if 3 restarts within 5 cycles then timeout
        group server

I am testing this setup by making sure both Varnish and Monit are
running, and then issuing "service varnish stop". I expect to get an
e-mail and have Monit attempt to restart Varnish. Neither happen.

I tested again by using the kill command to kill off Varnish's
processes, but I still get no e-mail, and Monit doesn't attempt to
restart Varnish.

varnishd -V
varnishd (varnish-2.1.3 SVN 5049:5055)
Copyright (c) 2006-2009 Linpro AS / Verdens Gang AS

monit -V
This is Monit version 5.2
Copyright (C) 2000-2010 by Tildeslash Ltd. All Rights Reserved.

uname -a
Linux wms 2.6.24-23-xen #1 SMP Mon Jan 26 03:09:12 UTC 2009 x86_64
x86_64 x86_64 GNU/Linux

^ CentOS

Thanks!

- Daniel



reply via email to

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