BB Unix Network Monitor - Message
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: {bb} How to assign $BBALPHAMSG in ext monitor script?
On Sat, 2005-05-28 at 22:40, Flink, Ari wrote:
> Hi list,
>
> Having some issues with $BBALPHAMSG value .. the tail of the monitor
> script looks like this:
>
> $state="green"; $cond="It's All Good!";
> foreach $file (@files) {
> next if ( ! -e $file );
> $st = stat($file);
> $delta = time() - $st->mtime;
> if ( $delta > $limit ) {
> $fwtk_component = "relay" if $file =~ /relay/;
> $fwtk_component = "gwproxy" if $file =~ /gwp/;
> $state="red";
> $cond="$fwtk_component needs to be restarted,
> Toolkit log $file has not been modified for $delta seconds."
> }
> }
>
> $line ="status $host.$test $state $now $cond";
> `$ENV{'BB'} $ENV{'BBDISP'} \"$line\"`;
>
> I'd expect $cond to be assigned to $BBALPHAMSG available for the ext
> notification script but this is not the case.
>
> Did I understand this right? What part exactly from the monitor script
> is assigned to $BBALPHAMSG?
The $BBALPHAMSG variable should contain a "default" paging message,
which has the same layout as standard BB tests. It starts with the
acknowledgment code (enclosed in square brackets) followed by the
log message (everything following the word "status" in the variable
$line from your script) and ends with a URL reference to the
relevant page on your display.
In other words, I'd expect the contents of the variable $cond to
appear in there somewhere, but it's not a straight copy. If this
is not the case, it might help my addled thought processes if you
could show me an example of what $BBALPHAMSG does contain in your
paging script.
Cheers, Phil.
--
There is hopeful symbolism in the fact that flags do not wave in a
vacuum.
(Arthur C. Clarke)
--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-==-=-=-=-=-=-=-=-=-=-=-=
To unsubscribe from this list, or to subscribe to the bb-digest list
send e-mail to mailto:majordomo@bb4.com with unsubscribe bb -and/or-
subscribe bb-digest in the BODY of the message.
Home |
Main Index |
Thread Index