PLEASE HELP: PAGE not sending alerts
list Jeffrey Williams
Hobbit 4.1.2p1 on Fedora4
I have tried everything and can't get this to work.
The PAGE=/ works but non of the PAGE tags for anything below that do.
Bb-hosts
title Newport Corporation
page usirv USIRV
title USIRV
subpage usirvpivotal Pivotal Servers
title USIRV - Pivotal Servers
10.25.1.35 usirv-piv01 # sql rdp DESCR:server:"Pivotal
main"
10.25.1.14 usirv-piv02 # rdp DESCR:server:"Pivotal Irvine
satellite"
10.25.1.9 usirv-piv03 # sql rdp DESCR:server:"Pivotal HTTP
sync, web store"
10.25.1.59 usirv-pivdev01 # sql rdp DESCR:server:"Pivotal
development"
Hobbit-alert.cfg
PAGE=/
MAIL $jw REPEAT=24h RECOVERED NOTICE
MAIL $dh RECOVERED COLOR=red
PAGE=usirv
MAIL $td RECOVERED
PAGE=usirv/usirvpivotal
MAIL $st RECOVERED
[root at usirv-bb01 hobbit]# /usr/lib/hobbit/server/bin/bbcmd hobbitd_alert
--test usirv-piv01 conn
2006-06-21 12:02:24 Using default environment file
/usr/lib/hobbit/server/etc/hobbitserver.cfg
00013345 2006-06-21 12:02:24 send_alert usirv-piv01:conn state Paging
00013345 2006-06-21 12:02:24 Matching host:service:page 'usirv-piv01:conn:'
against rule line 144
00013345 2006-06-21 12:02:24 *** Match with 'PAGE=/' ***
00013345 2006-06-21 12:02:24 Matching host:service:page 'usirv-piv01:conn:'
against rule line 145
00013345 2006-06-21 12:02:24 *** Match with 'MAIL $jw REPEAT=24h RECOVERED
NOTICE' ***
00013345 2006-06-21 12:02:24 Mail alert with command 'mail -s "Hobbit
[12345] usirv-piv01:conn CRITICAL (RED)"
user-17399b280feb@xymon.invalid'
00013345 2006-06-21 12:02:24 Matching host:service:page 'usirv-piv01:conn:'
against rule line 146
00013345 2006-06-21 12:02:24 *** Match with 'MAIL $dh RECOVERED COLOR=red'
***
00013345 2006-06-21 12:02:24 Mail alert with command 'mail -s "Hobbit
[12345] usirv-piv01:conn CRITICAL (RED)"
user-88ca097bfa4a@xymon.invalid'
00013345 2006-06-21 12:02:24 Matching host:service:page 'usirv-piv01:conn:'
against rule line 147
00013345 2006-06-21 12:02:24 Failed 'PAGE=usirv' (pagename not in include
list)
00013345 2006-06-21 12:02:24 Matching host:service:page 'usirv-piv01:conn:'
against rule line 149
00013345 2006-06-21 12:02:24 Failed 'PAGE=usirv/usirvpivotal' (pagename not
in include list)
I have searched the docs and the archive for this mailing list without
success.
Any help would be appreciated. Even a suggestion on logs or a debug mode
would help.
Thanks...
list Larry Barber
You need to use the full "path" of the page name, as described here<http://www.hswn.dk/hobbiton/2005/05/msg00199.html>;. Thanks, Larry Barber
▸
On 6/23/06, Williams, Jeffrey <user-17399b280feb@xymon.invalid> wrote:
Hobbit 4.1.2p1 on Fedora4
I have tried everything and can't get this to work.
The PAGE=/ works but non of the PAGE tags for anything below that do.
Bb-hosts
title Newport Corporation
page usirv USIRV
title USIRV
subpage usirvpivotal Pivotal Servers
title USIRV - Pivotal Servers
10.25.1.35 usirv-piv01 # sql rdp DESCR:server:"Pivotal
main"
10.25.1.14 usirv-piv02 # rdp DESCR:server:"Pivotal Irvine
satellite"
10.25.1.9 usirv-piv03 # sql rdp DESCR:server:"Pivotal
HTTP sync, web store"
10.25.1.59 usirv-pivdev01 # sql rdp DESCR:server:"Pivotal
development"
Hobbit-alert.cfg
PAGE=/
MAIL $jw REPEAT=24h RECOVERED NOTICE
MAIL $dh RECOVERED COLOR=red
PAGE=usirv
MAIL $td RECOVERED
PAGE=usirv/usirvpivotal
MAIL $st RECOVERED
[root at usirv-bb01 hobbit]# /usr/lib/hobbit/server/bin/bbcmd hobbitd_alert
--test usirv-piv01 conn
2006-06-21 12:02:24 Using default environment file
/usr/lib/hobbit/server/etc/hobbitserver.cfg
00013345 2006-06-21 12:02:24 send_alert usirv-piv01:conn state Paging
00013345 2006-06-21 12:02:24 Matching host:service:page
'usirv-piv01:conn:' against rule line 144
00013345 2006-06-21 12:02:24 *** Match with 'PAGE=/' ***
00013345 2006-06-21 12:02:24 Matching host:service:page
'usirv-piv01:conn:' against rule line 145
00013345 2006-06-21 12:02:24 *** Match with 'MAIL $jw REPEAT=24h RECOVERED
NOTICE' ***
00013345 2006-06-21 12:02:24 Mail alert with command 'mail -s "Hobbit
[12345] usirv-piv01:conn CRITICAL (RED)"
user-17399b280feb@xymon.invalid'
00013345 2006-06-21 12:02:24 Matching host:service:page
'usirv-piv01:conn:' against rule line 146
00013345 2006-06-21 12:02:24 *** Match with 'MAIL $dh RECOVERED COLOR=red'
***
00013345 2006-06-21 12:02:24 Mail alert with command 'mail -s "Hobbit
[12345] usirv-piv01:conn CRITICAL (RED)"
user-88ca097bfa4a@xymon.invalid'
00013345 2006-06-21 12:02:24 Matching host:service:page
'usirv-piv01:conn:' against rule line 147
00013345 2006-06-21 12:02:24 Failed 'PAGE=usirv' (pagename not in include
list)
00013345 2006-06-21 12:02:24 Matching host:service:page
'usirv-piv01:conn:' against rule line 149
00013345 2006-06-21 12:02:24 Failed 'PAGE=usirv/usirvpivotal' (pagename
not in include list)
I have searched the docs and the archive for this mailing list without
success.
Any help would be appreciated. Even a suggestion on logs or a debug mode
would help.
Thanks...
list Jeffrey Williams
Unless I am missing something, and I could be, these are the full paths. usirv is directly under / usirv/usirvpivotal is the full path under / Neither of these work but anything under PAGE=/ works and if I list the hosts under HOST= it works. I could list all of the alerts by HOST=, but that is a big pain. I read the post about hobbitd --test not following paths but I know from the maillog that these are not going out. I have even tried PAGE=%.*/usirvpiotal and that doesn't work. From: Larry Barber [mailto:user-6ef9c2864140@xymon.invalid] Sent: Friday, June 23, 2006 11:28 AM To: user-ae9b8668bcde@xymon.invalid Subject: Re: [hobbit] PLEASE HELP: PAGE not sending alerts You need to use the full "path" of the page name, as described here <http://www.hswn.dk/hobbiton/2005/05/msg00199.html>; .
▸
Thanks,
Larry Barber
On 6/23/06, Williams, Jeffrey <user-17399b280feb@xymon.invalid
<mailto:user-17399b280feb@xymon.invalid> > wrote:
Hobbit 4.1.2p1 on Fedora4 I have tried everything and can't get this to work. The PAGE=/ works but non of the PAGE tags for anything below that do.
Bb-hosts title Newport Corporation page usirv USIRV title USIRV subpage usirvpivotal Pivotal Servers title USIRV - Pivotal Servers 10.25.1.35 <http://10.25.1.35>; usirv-piv01 # sql rdp DESCR:server:"Pivotal main" 10.25.1.14 <http://10.25.1.14>; usirv-piv02 # rdp DESCR:server:"Pivotal Irvine satellite" 10.25.1.9 <http://10.25.1.9>; usirv-piv03 # sql rdp DESCR:server:"Pivotal HTTP sync, web store" 10.25.1.59 <http://10.25.1.59>; usirv-pivdev01 # sql rdp
▸
DESCR:server:"Pivotal development"
Hobbit-alert.cfg
PAGE=/ MAIL $jw REPEAT=24h RECOVERED NOTICE MAIL $dh RECOVERED COLOR=red PAGE=usirv MAIL $td RECOVERED PAGE=usirv/usirvpivotal MAIL $st RECOVERED
[root at usirv-bb01 hobbit]# /usr/lib/hobbit/server/bin/bbcmd hobbitd_alert
--test usirv-piv01 conn 2006-06-21 12:02:24 Using default environment file
/usr/lib/hobbit/server/etc/hobbitserver.cfg 00013345 2006-06-21 12:02:24 send_alert usirv-piv01:conn state Paging 00013345 2006-06-21 12:02:24 Matching host:service:page 'usirv-piv01:conn:'
against rule line 144 00013345 2006-06-21 12:02:24 *** Match with 'PAGE=/' *** 00013345 2006-06-21 12:02:24 Matching host:service:page 'usirv-piv01:conn:'
against rule line 145 00013345 2006-06-21 12:02:24 *** Match with 'MAIL $jw REPEAT=24h RECOVERED
NOTICE' *** 00013345 2006-06-21 12:02:24 Mail alert with command 'mail -s "Hobbit
[12345] usirv-piv01:conn CRITICAL (RED)" user-17399b280feb@xymon.invalid <mailto:user-17399b280feb@xymon.invalid> ' 00013345 2006-06-21 12:02:24 Matching host:service:page 'usirv-piv01:conn:'
▸
against rule line 146 00013345 2006-06-21 12:02:24 *** Match with 'MAIL $dh RECOVERED COLOR=red'
*** 00013345 2006-06-21 12:02:24 Mail alert with command 'mail -s "Hobbit
[12345] usirv-piv01:conn CRITICAL (RED)" user-88ca097bfa4a@xymon.invalid <mailto:user-88ca097bfa4a@xymon.invalid> ' 00013345 2006-06-21 12:02:24 Matching host:service:page 'usirv-piv01:conn:'
▸
against rule line 147 00013345 2006-06-21 12:02:24 Failed 'PAGE=usirv' (pagename not in include
list) 00013345 2006-06-21 12:02:24 Matching host:service:page 'usirv-piv01:conn:'
against rule line 149 00013345 2006-06-21 12:02:24 Failed 'PAGE=usirv/usirvpivotal' (pagename not
in include list)
I have searched the docs and the archive for this mailing list without
success. Any help would be appreciated. Even a suggestion on logs or a debug mode
would help. Thanks...
list Henrik Størner
▸
On Fri, Jun 23, 2006 at 10:25:18AM -0700, Williams, Jeffrey wrote:
Hobbit 4.1.2p1 on Fedora4 I have tried everything and can't get this to work. The PAGE=/ works but non of the PAGE tags for anything below that do. Bb-hosts title Newport Corporation page usirv USIRV title USIRV subpage usirvpivotal Pivotal Servers title USIRV - Pivotal Servers 10.25.1.35 usirv-piv01 # sql rdp DESCR:server:"Pivotal main" 10.25.1.14 usirv-piv02 # rdp DESCR:server:"Pivotal Irvine satellite" 10.25.1.9 usirv-piv03 # sql rdp DESCR:server:"Pivotal HTTP sync, web store" 10.25.1.59 usirv-pivdev01 # sql rdp DESCR:server:"Pivotal development"
All of your hosts here are on the usirv/usirvpivotal page.
▸
Hobbit-alert.cfg
PAGE=/
MAIL $jw REPEAT=24h RECOVERED NOTICE
MAIL $dh RECOVERED COLOR=red
PAGE=usirv
MAIL $td RECOVERED
PAGE=usirv/usirvpivotal
MAIL $st RECOVEREDSo all of these hosts should match the last rule only, i.e. alerts should go to whatever is in the "$st" macro.
[root at usirv-bb01 hobbit]# /usr/lib/hobbit/server/bin/bbcmd hobbitd_alert --test usirv-piv01 conn Using default environment file /usr/lib/hobbit/server/etc/hobbitserver.cfg send_alert usirv-piv01:conn state Paging Matching host:service:page 'usirv-piv01:conn:' against rule line 144
Now, this debug output doesn't match the bb-hosts snippet you included here. The "host:service:page" appears as "usirv-piv01:conn:" - i.e. the usirv-piv01 hosts is found to be located on the top-level page, not the "usirv/usirvpivotal" page.
*** Match with 'PAGE=/' ***
Which fits with this match.
▸
Matching host:service:page 'usirv-piv01:conn:' against rule line 145 *** Match with 'MAIL $jw REPEAT=24h RECOVERED NOTICE' *** Mail alert with command 'mail -s "Hobbit [12345] usirv-piv01:conn CRITICAL (RED)" user-17399b280feb@xymon.invalid' Matching host:service:page 'usirv-piv01:conn:' against rule line 146 *** Match with 'MAIL $dh RECOVERED COLOR=red' *** Mail alert with command 'mail -s "Hobbit [12345] usirv-piv01:conn CRITICAL (RED)" user-88ca097bfa4a@xymon.invalid'
So you get alerts to the $jw and $dh recipients.
▸
Matching host:service:page 'usirv-piv01:conn:' against rule line 147 Failed 'PAGE=usirv' (pagename not in include list) Matching host:service:page 'usirv-piv01:conn:' against rule line 149 Failed 'PAGE=usirv/usirvpivotal' (pagename not in include list)
And not with the pagename you expect. If I cut-and-paste your bb-hosts file and hobbit-alerts.cfg into my own configuration, I get the correct result: $ grep -v "^#" /etc/hobbit/bb-hosts
▸
title Newport Corporation
page usirv USIRV
title USIRV
subpage usirvpivotal Pivotal Servers
title USIRV - Pivotal Servers
10.25.1.35 usirv-piv01 # sql rdp DESCR:server:"Pivotal main"
10.25.1.14 usirv-piv02 # rdp DESCR:server:"Pivotal Irvine satellite"
10.25.1.9 usirv-piv03 # sql rdp DESCR:server:"Pivotal HTTP sync, web store"
10.25.1.59 usirv-pivdev01 # sql rdp DESCR:server:"Pivotal development"
$ grep -v "^#" /etc/hobbit/hobbit-alerts.cfg
$jw=user-a0f2385d0910@xymon.invalid
$dh=user-a7477abeff1c@xymon.invalid
$dt=user-17ef2e5a2fba@xymon.invalid
$st=user-9545a618124f@xymon.invalid
▸
PAGE=/
MAIL $jw REPEAT=24h RECOVERED NOTICE
MAIL $dh RECOVERED COLOR=red
PAGE=usirv
MAIL $td RECOVERED
PAGE=usirv/usirvpivotal
MAIL $st RECOVERED
$ ./common/bbcmd ./hobbitd/hobbitd_alert --test usirv-piv01 conn
2006-06-23 22:59:06 Using default environment file /usr/lib/hobbit/server/etc/hobbitserver.cfg
00017896 2006-06-23 22:59:06 send_alert usirv-piv01:conn state Paging
00017896 2006-06-23 22:59:06 Matching host:service:page 'usirv-piv01:conn:usirv/usirvpivotal' against rule line 121
00017896 2006-06-23 22:59:06 Failed 'PAGE=/' (pagename not in include list)
00017896 2006-06-23 22:59:06 Matching host:service:page 'usirv-piv01:conn:usirv/usirvpivotal' against rule line 124
00017896 2006-06-23 22:59:06 Failed 'PAGE=usirv' (pagename not in include list)
00017896 2006-06-23 22:59:06 Matching host:service:page 'usirv-piv01:conn:usirv/usirvpivotal' against rule line 126
00017896 2006-06-23 22:59:06 *** Match with 'PAGE=usirv/usirvpivotal' ***
00017896 2006-06-23 22:59:06 Matching host:service:page 'usirv-piv01:conn:usirv/usirvpivotal' against rule line 127
00017896 2006-06-23 22:59:06 *** Match with 'MAIL $st RECOVERED' ***
00017896 2006-06-23 22:59:06 Mail alert with command 'mail -s "Hobbit [12345] usirv-piv01:conn CRITICAL (RED)" user-9545a618124f@xymon.invalid'
So my immediate reaction is that you must have these hosts listed twice
in your bb-hosts file - somewhere else than what you have shown here.
If that is not the case, pack your bb-hosts and hobbit-alerts.cfg files
in a tar-file and send them to me for inspection.
Regards,
Henrik
list Jeffrey Williams
I am sorry I should have been clear that these were fragments of the complete config files. Maybe I am miss understanding the way this should work. I assumed that PAGE=/ would match all hosts. And that PAGE=usirv would match all hosts on that page and all subpages. I assumed this because that is sort of the way mine is working. The PAGE=/ matches everything but none of the other rules work at all. In the debug you run I see "Matching host:service:page 'usirv-piv01:conn:usirv/usirvpivotal'", I never see the page location when I run it. I have sent the tar to your user-21089408f91a@xymon.invalid address as the list will not accept emails over 30k.
▸
-----Original Message-----
From: user-ce4a2c883f75@xymon.invalid [mailto:user-ce4a2c883f75@xymon.invalid]
Sent: Friday, June 23, 2006 2:02 PM
To: user-ae9b8668bcde@xymon.invalid
Subject: Re: [hobbit] PLEASE HELP: PAGE not sending alerts
On Fri, Jun 23, 2006 at 10:25:18AM -0700, Williams, Jeffrey wrote:Hobbit 4.1.2p1 on Fedora4 I have tried everything and can't get this to work. The PAGE=/ works but non of the PAGE tags for anything below that do. Bb-hosts title Newport Corporation page usirv USIRV title USIRV subpage usirvpivotal Pivotal Servers title USIRV - Pivotal Servers 10.25.1.35 usirv-piv01 # sql rdp DESCR:server:"Pivotal main" 10.25.1.14 usirv-piv02 # rdp DESCR:server:"Pivotal Irvine satellite" 10.25.1.9 usirv-piv03 # sql rdp DESCR:server:"Pivotal
HTTP sync, web store"
10.25.1.59 usirv-pivdev01 # sql rdp DESCR:server:"Pivotal development"
All of your hosts here are on the usirv/usirvpivotal page.
Hobbit-alert.cfg
PAGE=/
MAIL $jw REPEAT=24h RECOVERED NOTICE
MAIL $dh RECOVERED COLOR=red
PAGE=usirv
MAIL $td RECOVERED
PAGE=usirv/usirvpivotal
MAIL $st RECOVEREDSo all of these hosts should match the last rule only, i.e. alerts should go to whatever is in the "$st" macro.
[root at usirv-bb01 hobbit]# /usr/lib/hobbit/server/bin/bbcmd hobbitd_alert --test usirv-piv01 conn Using default environment file /usr/lib/hobbit/server/etc/hobbitserver.cfg send_alert usirv-piv01:conn state Paging Matching host:service:page 'usirv-piv01:conn:' against rule line 144
Now, this debug output doesn't match the bb-hosts snippet you included here. The "host:service:page" appears as "usirv-piv01:conn:" - i.e. the usirv-piv01 hosts is found to be located on the top-level page, not the "usirv/usirvpivotal" page.
*** Match with 'PAGE=/' ***
Which fits with this match.
Matching host:service:page 'usirv-piv01:conn:' against rule line 145 *** Match with 'MAIL $jw REPEAT=24h RECOVERED NOTICE' *** Mail alert with command 'mail -s "Hobbit [12345] usirv-piv01:conn CRITICAL (RED)" user-17399b280feb@xymon.invalid' Matching host:service:page 'usirv-piv01:conn:' against rule line 146 *** Match with 'MAIL $dh RECOVERED COLOR=red' *** Mail alert with command 'mail -s "Hobbit [12345] usirv-piv01:conn CRITICAL (RED)" user-88ca097bfa4a@xymon.invalid'
So you get alerts to the $jw and $dh recipients.
Matching host:service:page 'usirv-piv01:conn:' against rule line 147 Failed 'PAGE=usirv' (pagename not in include list) Matching host:service:page 'usirv-piv01:conn:' against rule line 149 Failed 'PAGE=usirv/usirvpivotal' (pagename not in include list)
And not with the pagename you expect. If I cut-and-paste your bb-hosts file and hobbit-alerts.cfg into my own configuration, I get the correct result: $ grep -v "^#" /etc/hobbit/bb-hosts title Newport Corporation page usirv USIRV title USIRV subpage usirvpivotal Pivotal Servers title USIRV - Pivotal Servers 10.25.1.35 usirv-piv01 # sql rdp DESCR:server:"Pivotal main" 10.25.1.14 usirv-piv02 # rdp DESCR:server:"Pivotal Irvine satellite" 10.25.1.9 usirv-piv03 # sql rdp DESCR:server:"Pivotal HTTP sync, web store" 10.25.1.59 usirv-pivdev01 # sql rdp DESCR:server:"Pivotal development" $ grep -v "^#" /etc/hobbit/hobbit-alerts.cfg $jw=user-a0f2385d0910@xymon.invalid $dh=user-a7477abeff1c@xymon.invalid $dt=user-17ef2e5a2fba@xymon.invalid $st=user-9545a618124f@xymon.invalid PAGE=/ MAIL $jw REPEAT=24h RECOVERED NOTICE MAIL $dh RECOVERED COLOR=red PAGE=usirv MAIL $td RECOVERED PAGE=usirv/usirvpivotal MAIL $st RECOVERED $ ./common/bbcmd ./hobbitd/hobbitd_alert --test usirv-piv01 conn 2006-06-23 22:59:06 Using default environment file /usr/lib/hobbit/server/etc/hobbitserver.cfg 00017896 2006-06-23 22:59:06 send_alert usirv-piv01:conn state Paging 00017896 2006-06-23 22:59:06 Matching host:service:page 'usirv-piv01:conn:usirv/usirvpivotal' against rule line 121 00017896 2006-06-23 22:59:06 Failed 'PAGE=/' (pagename not in include list) 00017896 2006-06-23 22:59:06 Matching host:service:page 'usirv-piv01:conn:usirv/usirvpivotal' against rule line 124 00017896 2006-06-23 22:59:06 Failed 'PAGE=usirv' (pagename not in include list) 00017896 2006-06-23 22:59:06 Matching host:service:page 'usirv-piv01:conn:usirv/usirvpivotal' against rule line 126 00017896 2006-06-23 22:59:06 *** Match with 'PAGE=usirv/usirvpivotal' *** 00017896 2006-06-23 22:59:06 Matching host:service:page 'usirv-piv01:conn:usirv/usirvpivotal' against rule line 127 00017896 2006-06-23 22:59:06 *** Match with 'MAIL $st RECOVERED' *** 00017896 2006-06-23 22:59:06 Mail alert with command 'mail -s "Hobbit [12345] usirv-piv01:conn CRITICAL (RED)" user-9545a618124f@xymon.invalid' So my immediate reaction is that you must have these hosts listed twice in your bb-hosts file - somewhere else than what you have shown here. If that is not the case, pack your bb-hosts and hobbit-alerts.cfg files in a tar-file and send them to me for inspection. Regards, Henrik
list Henrik Størner
Hi Jeff,
▸
On Fri, Jun 23, 2006 at 02:36:22PM -0700, Williams, Jeffrey wrote:Maybe I am miss understanding the way this should work.
I don't think so. With your original bb-hosts file, it was very easy to reproduce the problem. It's a bug in how Hobbit loads the bb-hosts file. The problem is with the way you've defined your "page" and "subpage" entries in the bb-hosts file. You're using TAB's instead of simple spaces - with that, Hobbit fails to detect your page/subpage settings. So all hosts end up on the top-level page, at least as far as the PAGE settings in hobbit-alerts.cfg goes. The quick fix is to simply replace all of the TAB characters in your bb-hosts file with simple spaces. I'll get a proper fix into the next version of Hobbit. Regards, Henrik