Configuring Alarm Server to send page or email to staff based on site
Goals and Symptoms
Summary
Using DOS batch files it is possible to send a page or email to a specified list of people that depends on which site initiated the alarm.
For example, you may have two ION meters at two different stations; StationA and StationB. If an alarm happens at StationA you want to notify PersonA. Similarly for StationB you wish to notify PersonB. Each person has an email address (persona@someplace.com) and pager address (persona.page@someplace.com).
Causes and Fixes
Commissioning Procedure
Construct the pager and email DOS batch files (Details below)
Construct the alarmsrv.cmd file (Details below)
Start AlarmServer with the alarmsrv.cmd file
Test your alarms
Operating Procedure
Add the alarmsrv.cmd file into the Windows startup folder for the user who operates the ION Enterprise system. Alternatively, set up a Windows scheduled task to launch the alarmsrv.cmd file when the machine boots.
Please read the help for configuring Alarm Server before proceeding.
Contents of alarmsrv.cmd
The purpose of this DOS command file is to launch AlarmSrv with all of the necessary parameters. This includes the modem type, the serial communications port, the baud rate, followed by a list of programs to run when an alarm is received. Each program in this list needs to be enclosed in double quotes. Also note that the command is using DOS variables (e.g. %g, %M etc) and these need to be "escaped" so that they are correctly passed onto the command. This is why there are two % signs.
The four programs that AlarmSrv will run when it receives and alarm from a meter are as follows:
"D:\IONEnterprise\pager.bat %%g %%M %%n"
This sends the email and page. We are passing in the site name, message from the meter, and the meter name.
"conman -p900 %%g"
This instructs ION Enterprise to connect with the meter to download logs, events and waveforms.
"net send IONServer %%t %%M Please check the meter: %%n"
This sends a network message, using NET SEND. The message is sent to a machine named IONServer. Substitute a machine name that suits. The message includes the local time, the message from the meter, and the meter name.
All of the following text is placed into a file called alarmsrv.cmd. All of the following is placed on one line.
The purpose of this DOS command file is to send the an email and a page to the appropriate person. It expects three command line arguments; the site name, the meters message and the meter name.
echooff rem Change to the drive where ION Enterprise is installed.
rem Must do this in case DOS environment opens in another drive.
d: rem Change to the directory where ION Enterprise is installed cd \dev
rem ****************************************************************
rem Routine to create message text file
rem ***************************************************************
rem Create the message in the file call body.txt
rem The echo command is followed by some text, a single > and then
rem the file name. The single > directs the text output of the rem echo command into the file. It also creates this file. echo Alert Incident date and time: > body.txt rem Push the date and time into the file. Use >> to append to file. date/t >> body.txt time/t >> body.txt rem Add an empty line into the file echo. >> body.txt rem Add the three command line arguments to the message.
rem WARNING. This sample does not contain any error detection.
rem Production system should check for existence of these parameters. echo Site: %1>> body.txt echo Condition: %2>> body.txt echo Node: %3>> body.txt echo. >> body.txt
rem **************************************************************
rem Send out messages to specific pager based on a site name
rem ****************************************************************
rem Blat available from http://www.blat.net/194/
rem The following assumes you have installed blat.
Legacy KB System (APS) Data: RESL188657 V1.0, Originally authored by KBAdPM on 10/26/2007, Last Edited by KBAdPM on 10/26/2007
Related ranges: ION Enterprise V5.5, ION Enterprise V5.0