monit-general
[Top][All Lists]
Advanced

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

Having an alert sent when services restored?


From: Stephen Brown
Subject: Having an alert sent when services restored?
Date: Sat, 13 Apr 2013 10:43:48 -0400
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130328 Thunderbird/17.0.5

Running Monit on Debian 6, version 5.1 and I'm using it to do simple ping tests from a remote host to my internet connection for monitoring. It works as expected, but one thing I am having trouble with is how to configure it to send me alerts when my services are restored? Is it possible?

Here is my current config for reference (sensitive IP's/hosts etc sanitized):

include /etc/monit/conf.d/*

set logfile syslog facility log_daemon

set mailserver smtp.gmail.com port 587
    username "address@hidden" password "xxxxxxxxxxxxxxx"
    using tlsv1
    with timeout 30 seconds

set mail-format { from: address@hidden }

check host host-1 with address x.x.x.x
    if failed icmp type echo count 3 with timeout 3 seconds then alert

check host host-2 with address x.x.x.x
    if failed icmp type echo count 3 with timeout 3 seconds then alert

check host host-3 with address x.x.x.x
    if failed icmp type echo count 3 with timeout 3 seconds then alert

check host host-4 with address x.x.x.x
    if failed icmp type echo count 3 with timeout 3 seconds then alert

check host host-5 with address x.x.x.x
    if failed icmp type echo count 3 with timeout 3 seconds then alert

check host host-6 with address x.x.x.x
    if failed icmp type echo count 3 with timeout 3 seconds then alert

set alert address@hidden
set alert address@hidden

I'd like for monit to send me an alert if any of these IP's I am monitoring restores, my internet connection likes to bounce at random times :(






reply via email to

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