Xymon Mailing List Archive search

Problem with TIME specification in hobbit-alerts.cfg?

5 messages in this thread

list Eric van de Meerakker · Tue, 07 Nov 2006 11:26:01 +0100 ·
Hello,


I'm still having problems with alert configuration in Hobbit. I've
configured notifications as follows:
# On which colors should we alert?
$ALERT_COLORS=COLOR=purple,red

# Mail rule
$MAIL_BEHEER=MAIL user-d1214edfc1fc@xymon.invalid FORMAT=TEXT REPEAT=10069920 RECOVERED NOTICE

# SMS rule
$SMS_SUPPORT=SCRIPT /Hobbit/server/ext/pg/smsalert support FORMAT=SMS REPEAT=30 TIME=W:0800:0900,W:1700:2300,60:0800:2300 DURATION>5 RECOVERED NOTICE

PAGE=<page> $ALERT_COLORS
        $SMS_SUPPORT

HOST=%.* $ALERT_COLORS
        $MAIL_BEHEER

hobbitd_alert --dumpconfig and hobbitd_alert --test seem to think this
configuration is fine.

smsalert is basically a wrapper around smstools' sendsms command, I've
added phone number aliases so the actual phone numbers don't show up in
the info column pages, and I've added basic logging with timestamps and
sendsms exit codes. It has worked fine so far.)

However, this morning at 8:00 AM no SMS was sent on a red condition
which had already lasted for hours (it started at 00:44 AM) and is shown
on the page <page>. A mail alert was sent as soon as the condition
started, but an SMS is never sent and neither notifications.log nor my
smsalert.log show any attempt to send an SMS.

Am I doing something wrong here?


Best regards,

Eric.
list Eric van de Meerakker · Tue, 07 Nov 2006 11:27:37 +0100 ·
Hello,


I'm still having problems with alert configuration in Hobbit. I've
configured notifications as follows:
# On which colors should we alert?
$ALERT_COLORS=COLOR=purple,red

# Mail rule
$MAIL_BEHEER=MAIL user-d1214edfc1fc@xymon.invalid FORMAT=TEXT REPEAT=10069920 RECOVERED NOTICE

# SMS rule
$SMS_SUPPORT=SCRIPT /Hobbit/server/ext/pg/smsalert support FORMAT=SMS REPEAT=30 TIME=W:0800:0900,W:1700:2300,60:0800:2300 DURATION>5 RECOVERED NOTICE

PAGE=<page> $ALERT_COLORS
        $SMS_SUPPORT

HOST=%.* $ALERT_COLORS
        $MAIL_BEHEER
hobbitd_alert --dumpconfig and hobbitd_alert --test seem to think this
configuration is fine.

smsalert is basically a wrapper around smstools' sendsms command, I've
added phone number aliases so the actual phone numbers don't show up in
the info column pages, and I've added basic logging with timestamps and
sendsms exit codes. It has worked fine so far.)

However, this morning at 8:00 AM no SMS was sent on a red condition
which had already lasted for hours (it started at 00:44 AM) and is shown
on the page <page>. A mail alert was sent as soon as the condition
started, but an SMS is never sent and neither notifications.log nor my
smsalert.log show any attempt to send an SMS.

Am I doing something wrong here?


Best regards,

Eric.
list Peter Welter · Tue, 7 Nov 2006 11:45:22 +0100 ·
Not a solution, but to make sure an email is send when the SMS should
be sent as well: copy the SMS-rule below the original rule and change
the SCRIPT to a MAIL command. So if it is a TIME-related issue, the
email would not be send as well. So:

$SMS_SUPPORT=SCRIPT /Hobbit/server/ext/pg/smsalert support FORMAT=SMS
REPEAT=30 TIME=W:0800:0900,W:1700:2300,60:0800:2300 DURATION>5
RECOVERED NOTICE
$TST_SMS_SUPPORT=MAIL mailtest at address FORMAT=SMS REPEAT=30
TIME=W:0800:0900,W:1700:2300,60:0800:2300 DURATION>5 RECOVERED NOTICE

PAGE=<page> $ALERT_COLORS
         $SMS_SUPPORT
         $TST_SMS_SUPPORT

Peter

2006/11/7, Eric van de Meerakker <user-e53cd724a14e@xymon.invalid>:
quoted from Eric van de Meerakker
Hello,


I'm still having problems with alert configuration in Hobbit. I've
configured notifications as follows:
# On which colors should we alert?
$ALERT_COLORS=COLOR=purple,red

# Mail rule
$MAIL_BEHEER=MAIL user-d1214edfc1fc@xymon.invalid FORMAT=TEXT REPEAT=10069920 RECOVERED NOTICE

# SMS rule
$SMS_SUPPORT=SCRIPT /Hobbit/server/ext/pg/smsalert support FORMAT=SMS REPEAT=30 TIME=W:0800:0900,W:1700:2300,60:0800:2300 DURATION>5 RECOVERED NOTICE

PAGE=<page> $ALERT_COLORS
        $SMS_SUPPORT

HOST=%.* $ALERT_COLORS
        $MAIL_BEHEER
hobbitd_alert --dumpconfig and hobbitd_alert --test seem to think this
configuration is fine.

smsalert is basically a wrapper around smstools' sendsms command, I've
added phone number aliases so the actual phone numbers don't show up in
the info column pages, and I've added basic logging with timestamps and
sendsms exit codes. It has worked fine so far.)

However, this morning at 8:00 AM no SMS was sent on a red condition
which had already lasted for hours (it started at 00:44 AM) and is shown
on the page <page>. A mail alert was sent as soon as the condition
started, but an SMS is never sent and neither notifications.log nor my
smsalert.log show any attempt to send an SMS.

Am I doing something wrong here?


Best regards,

Eric.

list Shane Presley · Tue, 7 Nov 2006 07:45:51 -0500 ·
This sounds a lot like the problem I am having, which I haven't found
a solution for yet.

If you have an alert set with no TIME option, and a high REPEAT
counter, it won't process any further alerts that have TIME options
set.  So mail message goes out, service stays down, but it won't
proceed with any other rules until the REPEAT counter is hit.

The only way to fix this for me was to set REPEAT really low on my
initial mail message.

I'm not sure if this is a bug, or if there's a fix?

Shane
quoted from Eric van de Meerakker


On 11/7/06, Eric van de Meerakker <user-e53cd724a14e@xymon.invalid> wrote:
Hello,


I'm still having problems with alert configuration in Hobbit. I've
configured notifications as follows:
# On which colors should we alert?
$ALERT_COLORS=COLOR=purple,red

# Mail rule
$MAIL_BEHEER=MAIL user-d1214edfc1fc@xymon.invalid FORMAT=TEXT REPEAT=10069920 RECOVERED NOTICE

# SMS rule
$SMS_SUPPORT=SCRIPT /Hobbit/server/ext/pg/smsalert support FORMAT=SMS REPEAT=30 TIME=W:0800:0900,W:1700:2300,60:0800:2300 DURATION>5 RECOVERED NOTICE

PAGE=<page> $ALERT_COLORS
        $SMS_SUPPORT

HOST=%.* $ALERT_COLORS
        $MAIL_BEHEER
hobbitd_alert --dumpconfig and hobbitd_alert --test seem to think this
configuration is fine.

smsalert is basically a wrapper around smstools' sendsms command, I've
added phone number aliases so the actual phone numbers don't show up in
the info column pages, and I've added basic logging with timestamps and
sendsms exit codes. It has worked fine so far.)

However, this morning at 8:00 AM no SMS was sent on a red condition
which had already lasted for hours (it started at 00:44 AM) and is shown
on the page <page>. A mail alert was sent as soon as the condition
started, but an SMS is never sent and neither notifications.log nor my
smsalert.log show any attempt to send an SMS.

Am I doing something wrong here?


Best regards,

Eric.
list Henrik Størner · Tue, 7 Nov 2006 23:06:14 +0100 ·
quoted from Shane Presley
On Tue, Nov 07, 2006 at 07:45:51AM -0500, Shane Presley wrote:
If you have an alert set with no TIME option, and a high REPEAT
counter, it won't process any further alerts that have TIME options
set.  So mail message goes out, service stays down, but it won't
proceed with any other rules until the REPEAT counter is hit.

The only way to fix this for me was to set REPEAT really low on my
initial mail message.

I'm not sure if this is a bug, or if there's a fix?
It is a bug, and no - there isn't a fix yet. Sorry.


Regards,
Henrik