monit-general
[Top][All Lists]
Advanced

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

Re: [monit] Newbee question: alert mail is sent only once


From: Martin Pala
Subject: Re: [monit] Newbee question: alert mail is sent only once
Date: Fri, 6 Nov 2009 19:56:20 +0100

Hi,

Monit sends alert email on state change only by default in order to not flood mailbox if the service is down.

You can enable alert repetition using "reminder" option, for example to get alert every failed cycle:

  set alert address@hidden with reminder on 1 cycle

See manual for details:
http://www.mmonit.com/monit/documentation/monit.html#setting_an_error_reminder


Martin



On Nov 6, 2009, at 2:42 PM, Michiel van Es wrote:

Hi,

I am using monit to check a connection on a tcp port.
I started monit in -v verbose mode to see what it is doing.
It is finding that one of the services is down and is also loggin that, but besides the start up alert mail it does not send me any more mails that the service is down.

The logfile:

[CET Nov  6 14:34:12] info     : Starting monit daemon
[CET Nov  6 14:34:12] info     : Monit started
[CET Nov 6 14:34:12] debug : Monit instance changed notification is sent to address@hidden [CET Nov 6 14:34:12] error : 'siteminder_staging_1_bij_ordina' failed, cannot open a connection to INET[195.18.110.83:44441] via TCP [CET Nov 6 14:34:12] debug : Connection failed notification is sent to address@hidden [CET Nov 6 14:34:12] debug : 'siteminder_staging_2_bij_ordina' succeeded connecting to INET[195.18.110.84:44441] via TCP [CET Nov 6 14:34:12] debug : 'siteminder_staging_2_bij_ordina' succeeded testing protocol [DEFAULT] at INET[195.18.110.84:44441] via TCP
[CET Nov  6 14:35:12] info     : Monit has not changed
[CET Nov 6 14:35:12] error : 'siteminder_staging_1_bij_ordina' failed, cannot open a connection to INET[195.18.110.83:44441] via TCP [CET Nov 6 14:35:12] debug : 'siteminder_staging_2_bij_ordina' succeeded connecting to INET[195.18.110.84:44441] via TCP [CET Nov 6 14:35:12] debug : 'siteminder_staging_2_bij_ordina' succeeded testing protocol [DEFAULT] at INET[195.18.110.84:44441] via TCP [CET Nov 6 14:36:12] error : 'siteminder_staging_1_bij_ordina' failed, cannot open a connection to INET[195.18.110.83:44441] via TCP [CET Nov 6 14:36:12] debug : 'siteminder_staging_2_bij_ordina' succeeded connecting to INET[195.18.110.84:44441] via TCP [CET Nov 6 14:36:12] debug : 'siteminder_staging_2_bij_ordina' succeeded testing protocol [DEFAULT] at INET[195.18.110.84:44441] via TCP [CET Nov 6 14:37:12] error : 'siteminder_staging_1_bij_ordina' failed, cannot open a connection to INET[195.18.110.83:44441] via TCP [CET Nov 6 14:37:12] debug : 'siteminder_staging_2_bij_ordina' succeeded connecting to INET[195.18.110.84:44441] via TCP [CET Nov 6 14:37:12] debug : 'siteminder_staging_2_bij_ordina' succeeded testing protocol [DEFAULT] at INET[195.18.110.84:44441] via TCP [CET Nov 6 14:38:12] error : 'siteminder_staging_1_bij_ordina' failed, cannot open a connection to INET[195.18.110.83:44441] via TCP [CET Nov 6 14:38:12] debug : 'siteminder_staging_2_bij_ordina' succeeded connecting to INET[195.18.110.84:44441] via TCP [CET Nov 6 14:38:12] debug : 'siteminder_staging_2_bij_ordina' succeeded testing protocol [DEFAULT] at INET[195.18.110.84:44441] via TCP [CET Nov 6 14:39:12] error : 'siteminder_staging_1_bij_ordina' failed, cannot open a connection to INET[195.18.110.83:44441] via TCP [CET Nov 6 14:39:12] debug : 'siteminder_staging_2_bij_ordina' succeeded connecting to INET[195.18.110.84:44441] via TCP [CET Nov 6 14:39:12] debug : 'siteminder_staging_2_bij_ordina' succeeded testing protocol [DEFAULT] at INET[195.18.110.84:44441] via TCP


My monit.conf:

set daemon 60
#
#
## Set syslog logging with the 'daemon' facility. If the FACILITY option is ## omited, monit will use 'user' facility by default. You can specify the
## path to the file for monit native logging.
#
# set logfile syslog facility log_daemon
#
#
## Set list of mailservers for alert delivery. Multiple servers may be
## specified using comma separator. By default monit uses port 25 - it is
## possible to override it with the PORT option.
#
set mail-format {
   from: address@hidden
   subject: STAGING BCM Siteminder monitoring alert -- $EVENT
   message:

   Info.nl Monitoring discovered:

Er is een Siteminder connectie probleem of de service is weer zo juist opgekomen
   Action: $ACTION
   Service: $SERVICE
   Description: $DESCRIPTION
   Datum: $DATE
   Host: $HOST


 Kind regards,
Bla
   }

#
#
## You can set the alert recipients here, which will receive the alert for
## each service. The event alerts may be restricted using the list.
#
set alert address@hidden

check host siteminder_staging_1_bij_ordina with address 195.18.110.83
   if failed port 44441 type tcp with timeout 15 seconds then alert


check host siteminder_staging_2_bij_ordina with address 195.18.110.84
   if failed port 44441 type tcp with timeout 15 seconds then alert


Does anyone know what could be wrong and the alerts are not being sent every 60 sec?

Kind regards,

Michiel


--
To unsubscribe:
http://lists.nongnu.org/mailman/listinfo/monit-general





reply via email to

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