Using notification scripts
- A Windows batch file that you mustedit before use, which can send any of the following types of notification:
- SMTP e-mail message by means of a Visual Basic (VB) script (provided)
- MAPI e-mail message by means of a Visual Basic (VB) script (provided)
- SMTP e-mail message by means of Blat (not provided)
Blat is a free command-line e-mail client, that you can download from the Web. You can also use any other SMTP-based, command-line e-mail client if you edit the batch file accordingly. For more information, see Editing scripts.
- Perl script that sends e-mail notification by means of Blat.
This section describes the Windows sample scripts, their locations, requirements for use, and editing requirements.
Default script location on Windows
The Windows scripts are located in the %PATROL_HOME%\lib\psl directory and are named as shown in the following table:
Notification script location on Windows
Script requirements
To use these Windows scripts, the server sending the notification must meet the requirements shown in the following table:
Requirements for notification server when using Windows e-mail clients
Editing scripts
Before using the sample scripts, you must edit them.
Editing the Windows batch file
If you use AS_EVSLocalAlertNotify.bat, remove the REM comments from the mail client that you want to use. The script provides sections for MAPI-based e-mail, SMTP-based e-mail, and Blat. For example, to use Blat, in the script shown below, remove the REM comments beginning with the line that starts with set and ending with the line that reads goto BYE.
If you use a third-party command-line e-mail client or if you want to use the script to perform other types of notification, such as paging or trouble tickets, you must add the code to the script that calls the e-mail client or appropriate notification utility.
Editing Perl script for use on Windows
On Windows, you must edit the Perl script before you can use it to send e-mail notifications with Blat. Find the following line in the Perl script and remove the comment (#):
Editing the SMTP VB script
To use the SMTP VB Script (sendmail.vbs ), you must edit the script to add the following information:
- Name of the e-mail server
- The SMTP server port
Add this information in the script as shown in the following code block:
iConf.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserver") ="mail.bmc.com"
' Enter the SMTP Server Port number
iConf.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
Editing scripts when using Blat
If you use Blat and Blat is not installed in the C:\Blat directory, you must edit the script to indicate the appropriate path.
Before you can use PATROL for Microsoft Windows Servers, you must gather information and plan your configuration. You should gather the following information:
- Which servers will send notifications (act as notification servers)
- To whom e-mail or paging notifications are sent (targets)
- Which servers will monitor the notification servers for availability
- Which notification servers will be monitored for availability
- Where to place notification rules (notification server or monitored agent)