Custom Email Notifications

With a UNIX/Linux management server you can implement your own notification method by creating a custom notification script. You must save the script in the $BBHOME/ext/pg directory on the BBPAGER server with the proper permissions (the Big Brother user must be able to execute it).

Example script HERE.

You can create your own look for the notification message by using the following environment variables in your script:

Variable

Description

BBALPHAMSG

The text body

ACKCODE

The security associated with the notification

RCPT

The recipient name

BBHOSTNAME

The hostname in  host.name.com format

BBHOSTSVC

The host.name.com.service tag

BBHOSTSVCCOMMAS

The host name and service, with commas (,) replacing periods (.):  host,name,com.service

BBNUMERIC

A 22 or more digit number, in the format: XXXYYYYYYYYYYYYZZZZZZZ

  • XXX is the three-digit code for the service from the svcerrlist parameter in bbwarnsetup.cfg.

  • YYYYYYYYYYYY is the 12-digit IP address of the host.

  • ZZZZZZZ is the seven-digit security code. The first five digits are the event ID code; the last two digits are the user ID code for the recipient.

MACHIP

The 12-digit IP address of the host: AAABBBCCCDDD

BBSVCNAME

Name of the service of the event

BBSVCNUM

The three-digit code for the service from the svcerrlist parameter in bbwarnsetup.cfg

BBCOLORLEVEL

The color level causing the notification

RECOVERED

1 in recovery mode, anything else in non-recovery mode

DOWNSECSMSG

The default recovery message

DOWNSECS

The number of seconds to recovery



You can use the example script to try out this feature, to do so:

1. Copy/Paste the example script into a new file named "customBBnotification.pl" in $BBHOME/ext/pg on the BBPAGER Server.

2. Replace someone\@somewhere.com with a valid email address in the CONFIG SECTION.

3. Replace someone\@somewhere.com with a valid email address in each case where you see $theAdmin = someone\@somewhere.com.

4. Save your changes and make the script executable (chmod 755 customBBnotification.pl).

5. Add a new rule to $BBHOME/etc/bbwarnrules.cfg on the BBPAGER server, like:

*;;*;;*;*;*;ext-customBBnotification.pl-CustomBBNotification

The next time an event occurs that merits a notification, the rule above will execute the customBBnotification.pl script and send an email to the administrator defined in $theAdmin.