Philip Clark wrote:
On Sat, 2006-09-02 at 03:44, Chris Morrison wrote:
Phil,
The script that I made, as well as devmon, use sockets to communicate to
the BB server. I'm testing the binary method to see if it has the same
affect (which it appears to be).
Even if I replace 'localhost' above with the FQDN of my BB server (which
acts as a BBDISPLAY/BBPAGER), it still has the same result.
It's not the FQDN that is needed, it's the IP number. The other
information that is needed by the "bb" binary is taken from the
environment.
I've tried with the IP as well, same result.
So if I do.. $BBHOME/bin/bb monitor.domain.net "status
test.domain.net.test red `date` Oh No" , I'll look at BB via my web
browser, and see that it has in fact received the red alert.
Unfortunately, still does not send a page.
When I finally do $BBHOME/bin/bb monitor.domain.net "page
test,domain,net.test red `date` Oh No" , I receive the alert via email.
So BB is able to send me the alert, it's just for some reason ignoring
the fact that what I sent previously should have sent me an alert
automatically because of the red status.
The exact same thing happens when I send it via sockets.
In bbwarnsetup.cfg...
bbwarn: TRUE
pagelevels: red purple
pagelevelsmail: yellow purple
ignforall:
pagerecovered: TRUE
pagetype: EVENT
That's OK but, unless you add "yellow" to pagelevels, you will not
receive any alerts for those messages. The pagelevelsmail token
specifies a sub-set of colours (from pagelevels) for which you
wish to suppress non-mail alerts.
That's fine, I've added yellow to pagelevels now.
The really funny thing is, this is only happening with my external
scripts. For all the tests performed directly by the BB server, and all
the BB clients reporting into the BB server, everything works fine.
What's even funnier is that if I go ahead and $BBHOME/bin/bb
monitor.domain.net "status test.domain.net.test green `date` Looking
Good" , it will alert me that it has recovered, without needing another
command to do the page!
About the maint.pl , if I do $BBHOME/bin/bb monitor.domain.net "disable
test.domain.net* 20 Testing" , nothing is created in my bbvar/disabled
directory.
Here is an example of a manual test. First, change directory to BBHOME
(I'm using /usr/local/bb/bb1.9i-btf here):
# cd /usr/local/bb/bb1.9i-btf
# export BBHOME=/usr/local/bb/bb1.9i-btf
# . etc/bbdef.sh
# echo $BBDISP
192.168.0.50
# echo $BBPAGE
192.168.0.50
# echo $PAGELEVELS
red purple
(those appear to be the minimum environment settings for correct
operation)
Ran this test script, got the right results...
<ip address of my BB Display>
monitor.domain.net
red
# $BB $BBDISP "status test,domain,net.test red `date` Oh No"
Note that the hostname part of the test definition needs to be comma
delimited. That should work correctly.
It'll show up on the BB web page as being red, but still no email
notification.
Should I just give up with this and try re-installing BB server, or
upgrading to Hobbit?
|