Novell is now a part of Micro Focus

Integrating ManageWise Alarms with E-mail, Mobile Phone, Pager, and Fax Systems

Articles and Tips: article

MARCUS WILLIAMSON
Managing Director, Connectotel, Ltd.
London, U.K.

01 May 1999


Now you don't have to worry that your network problems will go undetected. ManageWise can contact you in a variety of ways when the alarm bell rings.

Introduction

Novell ManageWise includes the powerful facility of being able to call an external program when an alarm message is received at the ManageWise Console. This feature allows the ManageWise administrator to decide precisely how ManageWise should react to the alarms which are generated and to direct those alarms to the most appropriate destination.

This AppNote will describe the concepts of using external programs, show the software and configuration steps necessary for using external programs, and demonstrate examples including the following:

  • Running the Novell SEND command to send a NetWare Broadcast message to one or more users

  • Generating a sound

  • Sending a GroupWise e-mail message

  • Sending an SMTP e-mail message

  • Sending a cc:Mail e-mail message

  • Sending a Short Message Service (SMS) text message to a GSM/PCS mobile phone

  • Sending a pager message

  • Sending a fax

Since this AppNote was written in the U.K., it retains the British spelling used by the author.

Concepts

Before integrating ManageWise with other systems, it is helpful to understand some basic concepts.

Alarm Disposition

The Alarm Disposition setting for an alarm dictates the behaviour of the ManageWise Console when an alarm message is received. To view or edit the alarm disposition for any alarm use the option Fault/Alarm Disposition from the menu of the ManageWise Console.

Figure 1: The ManagerWise Alarm Dispositions Table allows the user to change or edit alarms.

By default, ManageWise provides alerts for approximately 650 alarms.Whilst it may be necessary to make changes to some individual alarms, in most cases the administrator will deal with the alarms "in bulk". To edit multiple alarms, highlight the alarms and then click on the Yellow Pencil icon in the Alarm Disposition window.

For example, to make changes to all Critical alarms, do the following:

  1. Choose Fault | Alarm Disposition from the ManageWise Console menu.

  2. Double click on the Severity column heading to sort in order of alarm severity.

  3. Highlight all Critical alarms.

  4. Click the Yellow Pencil icon to display the Edit Alarm Disposition dialogue (see Figure 2).

Figure 2: The Edit Alarm Disposition dialogue box will allow changes to a specific alarm.

Of the options listed above, it is the Launch Program tickbox, together with the Program and Parameters item, which will be used to execute the programs described in this AppNote.

Although only one program may be launched per alarm, any number of programs may be executed in sequence from a single batch file. This allows the administrator to perform complex processing of incoming alarm messages if required, using simple DOS batch command language in conjunction with any command line-driven program.

Launch Program

The name of the program to be run should be entered in the "Program" entry box shown in Figure 2. If the program does not exist in the C:\MW\NMS\BIN directory, then the full path to the program should be provided. The program may be a COM (executable) file, EXE (executable) file, or BAT (batch) file and must be in DOS 8.3 name format. The examples shown in this AppNote will use DOS batch files.

Parameters

The parameter choice allows the administrator to determine which elements of information will be passed to the external program. Possible parameters are listed in the following table.


Parameter
Description
Example

%a

Alarm ID - the unique numeric ID in the ManageWise database for the alarm which has occurred.

558

%c

Affected class - the type of object which has been affected by the alarm.

3

%o

Affected object number - the unique numeric ID in the ManageWise database for the object which has been affected by the alarm.

393

%t

Alarm type string - Description of the alarm from the Alarm Disposition.

System: NLM Loaded

%v

Severity number:0 - Unknown1 - Critical2 - Major3 - Minor4 - Informational

2

%s

Summary string - the full text of the error message as it appears in the ticker-tape window, usually including the affected node. If the affected node is not included this can be found from the %o parameter

NetWare Text EditorNLM loaded on serverCONNECTOTEL-14

In most cases the "%s" parameter will be used to pass a summary string to the external program. This string contains a full description of the error including the nature of the error and the affected node.

Integrating Additional Alarms

As stated above, ManageWise 2.6 includes around 650 alarms integrated with the product when installed. To integrate additional alarms for third party hardware and software products, it is necessary to obtain the SNMP MIB (Management Information Base) files for the products to be managed.

Some example locations for third-party MIB files are shown in the following table.


Company and Product
MIB
Location

3Com Hubs

FMS.MIB

http://developer.novell.com/support/sample/areas/manwises.htm

APC UPS

POWERNET.MIB

http://www.apc.co.jp/products/software.html

Cheyenne Arcserve 6.1

ASMIB.MIB

Arcserve CD:\NW\ARCSERVE.610\ X86.ENG\ALERTMRG\MIBS

Compaq Insight Manager

CPQHOST.MIB

After Compaq Insight Manager Installation:C:\Program Files\Compaq Networking\MIBS

Compaq Insight Manager

CPQSINFO.MIB

After Compaq Insght Manager Installation:C:\Program Files\Compaq Networking\MIBS

Links to additional MIBs may be found at http://www.connectotel.com/mwise and at http://www.gecko.de/l4.html.

To make use of the alarms (also called SNMP "traps") in MIB files such as these, the MIB file should be copied to the C:\MW\NMS\SNMPMIBS\CURRENT directory, then the Tools | SNMP MIB Compiler option should be chosen on the ManageWise Console menu. Using the Compile option will integrate the alarm traps into the binary file SNMPMIBS.BIN (see Figure 3).

Figure 3: The SNMP MIB Compiler integrates the alarm traps into a binary file.

Samples of External Programs for Forwarding ManageWise Alarms

The external program can perform one or more of the following functions for each of the alarms in the Alarm Disposition table. Examples are shown to:

  • Run the Novell SEND command to send a NetWare Broadcast message to one or more users

  • Generate a sound

  • Send a GroupWise e-mail message

  • Send an SMTP Internet e-mail message

  • Send a cc:Mail e-mail message

  • Send a Short Message Service (SMS) text message to a GSM/PCS mobile phone

  • Send a pager message

  • Send a fax

Sending a NetWare Broadcast Message

Software. This is one of the simplest examples of calling an external program and it is the one which should be tried first to become familiar with the concepts involved. Sending a NetWare Broadcast message requires no additional software. All that is required is a mapping to the SYS:PUBLIC directory on the server where the NetWare SEND.EXE utility can be found.

To demonstrate the use of this external program (as well as the other examples in this AppNote), it is recommended that you use an alarm which is easily simulated, such as the "System: NLM Loaded" alarm (see Figure 4).

Figure 4: Use the "System: NLM Loaded" alarm disposition for testing.

Sample Batch File. ALERTSND.BAT is shown here as an example:

@echo OFF

rem

rem ALERTSND.BAT

rem by Marcus Williamsom

rem

SEND "%1 %2 %3 %4 %5 %6 %7 %8 %9" username

The SEND command line will cause the summary message for the ManageWise alert to be sent to a user (or users) via the NetWare SEND command, when an NLM is loaded on the server console.

If the message is not being sent, check that you have specified the correct context for the "username" and that the user's "Default Server" has been correctly set in NWAdmin.

Note how the parameters are passed as %1, %2, %3 through %9. This is because DOS batch files split any parameter strings separated by spaces into separate parameters. Thus each word in the message becomes one parameter when passed to the receiving program or batch file.

Generating a Sound

Software. To generate sounds from the ManageWise Console, the MS-supplied MPLAYER (for Windows 95/Windows 98) or MPLAY32 (for Windows NT Workstation) programs can be used. The ManageWise Console will require a correctly-configured sound card and speakers if this option is to be used.

Two undocumented parameters for MPLAYER are used in conjunction with this program, these being /PLAY and /CLOSE. Using these parameters, the MPLAYER program will load the requested wave file, play the sound, then close:

MPLAYER filename.wav /PLAY /CLOSE

It's now up to the administrator to choose a suitable sound for the alarms generated at the console. Sounds from the bridge of Star Trek are popular choices here. (Note that this example does not make use of the %s parameter.)

Sample Batch File. ALERTWAV.BAT is shown here as an example:

@echo off

rem

rem ALERTWAV.BAT

rem by Marcus Williamson

rem

MPLAYER /PLAY /CLOSE C:\NOVELL\CLIENT32\PHASERS.WAV

rem

For Windows NT, the following sample batch file should be used:

@echo off

rem

rem ALERTWAV.BAT

rem by Marcus Williamson

rem

MPLAY32 /PLAY /CLOSE C:\WINNT\PHASERS.WAV

rem

The effect of both of these batch files is to invoke the Windows Media Player program (MPLAYER or MPLAY32), load the Windows Wave file PHASERS.WAV, then close the Media Player.

Sending GroupWise E-mail

Software. Sending GroupWise e-mail requires a correctly configured GroupWise API Gateway running on the GroupWise e-mail system. The API Gateway is supplied on the GroupWise 5.x installation CD. A batch file is used to build a message in the correct format to be placed in the API Gateway directory.

Sample Batch File. ALERTGW.BAT is shown here as an example:

@echo off

rem

rem ALERTGW.BAT

rem by Marcus Williamson

rem

rem Create GroupWise mail header

rem

echo WPC-API= 1.2; > ALTERGW.TMP

echo Header-Char= T50; >> ALERTGW.TMP

echo Msg-Type= MAIL; >> ALERTGW.TMP

echo From-Text= ManageWise; >> ALERTGW.TMP

echo To= USERNAME; >> ALERTGW.TMP

echo To-Text= Firstname Lastname; >> ALERTGW.TMP

rem

rem Copy summary string into message header

rem

echo Subject= %1 %2 %3 %4 %5 %6 %7 %8 %9; >> ALERTGW.TMP

echo -END- >> ALERTGW.TMP

rem

rem Map drive to GroupWise API directory on destination server

rem

MAP H:=destserver/destvolume:destpath

rem

rem Copy newly-created file to destination server

rem

COPY ALERTGW.TMP H:

rem

Sending SMTP E-mail

Software. Sending SMTP can be accomplished using one of several Sendmail type programs available on the Internet. The program used in this example, Sendmail for Windows, is obtainable from:

http://www.demobuilder.com/sendmail.htm

This program relies on being passed a file containing an e-mail message in the following format:

Subject: This is the subject

From: John Doe <jdoe@sprynet.com><
To: John Doe <jdoe@srynet.com><
<== A BLANK LINE HERE

Line 1 This is the body of the message

Line 2

etc

The configuration of Sendmail for Windows is controlled by the file SENDMAIL.INI, which should be located in the same directory as the SENDMAIL.EXE program. A sample SENDMAIL.INI file is shown here:

[OPTIONS]

;Mail server's host name

MAILSERVER=mail.connectotel.com

;Default value for senders email address

FROM=managewise@connectotel.com

;Mail server's IP port

PORT=25

;Registration key

REGKEY=none

;Timeout interval value when sending mail in seconds

TIMEOUT=180

;Default value for reply-to address

REPLYTO=

It is important that correct values for MAILSERVER and FROM be specified in the configuration file before attempting to use Sendmail for Windows.

Sample Batch File. ALTSMTP.BAT is shown here as an example:

rem ALTSMTP.BAT

rem by Marcus Williamson

rem

echo Subject: Novell ManageWise Alert (Critical) > ALTSMTP.TMP

echo From: managewise@connectotel.com >> ALTSMTP.TMP

echo To: username@connectotel.com >> ALTSMTP.TMP

echo. >> ALTSMTP.TMP

echo Novell ManageWise Alert (Critical) : >> ALTSMTP.TMP

echo. >> ALTSMTP.TMP

rem

rem Write summary string

rem

if not %1x==x echo %1 %2 %3 %4 %5 %6 %7 %8 %9  >> ALTSMTP.TMP

rem

rem Handle the next 9 parameters on the command line

rem

shift

shift

shift

shift

shift

shift

shift

shift

shift

rem

rem Write the second part of the summary string

rem

if not %1x==x echo %1 %2 %3 %4 %5 %6 %7 %8 %9 >> ALTSMTP.TMP

rem

rem Invoke sendmail

rem

c:\inetpub\scripts\sendmail -t -messagefile=altsmtp.tmp

rem

Sending cc:Mail E-mail

Software. The cc:Mail program has a utility known as IMPORT, usually located in the CCADMIN directory, which allows importing of text files as messages into the cc:Mail system. IMPORT is invoked from a batch file as follows:

IMPORT/Nusername/Ppassword/Dpath_to_ccdata/@import.msg/BATCH

Parameters used on the command line of IMPORT are described here:


Parameter
Description

/N

name of cc:Mail admin user

/P

Password of cc:Mail admin user

/D

path to cc:Mail CCDATA directory

/@

Filename containing prepared message to be sent

/BATCH

Run in batch mode without prompting

Sample Batch File. ALERTCC.BAT is shown here as an example:

@echo off

rem

rem ALERTCC.BAT

rem by Marcus Williamson and Steve Manley

rem

rem Q: is mapped to the volume where ccMail resides

rem

Q:

CD \CCMAIL8\CCADMIN

echo Message:                                    >  import.msg

echo From: Novell ManageWise Console             >> import.msg

echo To: Marcus Williamson                       >> import.msg

echo CC: Novell ManageWise Console               >> import.msg

echo Priority: Urgent                            >> import.msg

echo Subject: Critical Alert from ManageWise     >> import.msg

echo Contents:                                   >> import.msg

echo %1 %2 %3 %4 %5 %6 %7 %8 %9                  >> import.msg

shift

shift

shift

shift

shift

shift

shift

shift

shift

echo %1 %2 %3 %4 %5 %6 %7 %8 %9                  >> import.msg

Q:IMPORT /Nmarcus /Psecret /DQ:\CCDATA /@import.msg /BATCH

rem

Sending an SMS Message

Software. SMSAlert is a command line driven application which allows sending of a short message via dial-up modem to any Short Message Service (SMS) capable GSM/PCS mobile phone. SMSAlert is available from http://www.connectotel.com/ctsms.html.

SMSAlert may be called directly from an icon or command line, or via any other application program, as follows:

SMSALERT provider_name "message" destination_number


Parameter
Description

provider_name

GSM/PCS provider for dial-up service

"message"

Message text to be sent

destination_number

GSM/PCS Mobile telephone number of recipient

For example, the following command will send the specified message to the UK Vodafone GSM subscriber on the number shown:

SMSALERT Vodafone "Database server is down" 44468123456

The definition for each of the providers used by SMSAlert is determined by the files SMSALERT.INI located in the same directory as the smsalert.exe program. Entries can be added for any provider worldwide. Here is a sample entry from the SMSALERT.INI file:

*******Vodafone (UK)

SERVICE PROVIDER=Vodafone

CENTER NUMBER=0385499999

TONE=YES

SET=2400,E,7,1

COM=COM1:

TAP=NO

SCRIPT=vodafone.scp

PASSWORD=NONE

Sample Batch File. ALERTSMS.BAT is shown here as an example:

@echo off

rem

rem ALERTSMS.BAT

rem by Marcus Williamson

rem

rem Invoke SMSAlert program

rem

SMSALERT Vodafone "%1 %2 %3 %4 %5 %6 %7 %8 %9" 

44468123456

rem

Sending a Pager Message

Software. SMSAlert, described above, can also be used to send a message to an alphanumeric (text) pager. This entry from the SMSALERT.INI file describes the configuration for a UK-based pager provider, PageOne Communications, whose dial-up service uses the Telocator Alphanumeric Protocol (TAP).

SERVICE PROVIDER=PageOne

CENTER NUMBER=0640900199

TONE=YES

SET=2400,E,7,1

COM=COM1:

TAP=YES

SCRIPT=NONE

PASSWORD=NONE

Sample Batch File. ALTPAGER.BAT is shown here as an example:

@echo off

rem

rem ALTPAGER.BAT

rem by Marcus Williamson

rem

rem Invoke SMSAlert program

rem

SMSALERT PageOne "%1 %2 %3 %4 %5 %6 %7 %8 %9" 0123456789

rem

Sending a Fax Using a Fax Gateway

Software. There are a number of ways in which ManageWise can send a fax, including the use of fax gateway products such as Cheyenne FaxServe and Tobit FaxWare. ManageWise can interface with both of these fax server products, using the GroupWise e-mail or SMTP e-mail methods described above or using a queue-based protocol. The example below, for Tobit FaxWare, shows a batch file which creates a text file, which is then submitted to the fax print queue using the NPRINT command.

Sample Batch File. ALERTTOB.BAT is shown here as an example:

@echo off

rem

set FAXNUMBER=441711234567

rem

rem ALERTTOB.BAT

rem by Anders Gustafsson

rem

echo Subject: ManageWise Alert (via Fax) > ALERTTOB.TMP

echo From: managewise@connectotel.com >> ALERTTOB.TMP

echo @@NUMBER %FAXNUMBER%  >> ALERTTOB.TMP

echo. >> ALERTTOB.TMP

echo Novell ManageWise Alert (via Fax) : >> ALERTTOB.TMP

echo. >> ALERTTOB.TMP

IF NOT %1x==x echo %1 %2 %3 %4 %5 %6 %7 %8 %9  >> ALERTTOB.TMP

shift

shift

shift

shift

shift

shift

shift

shift

shift

IF NOT %1x==x echo %1 %2 %3 %4 %5 %6 %7 %8 %9 >> ALERTTOB.TMP

nprint ALERTTOB.TMP q=.faxqueue.o.ou nb

Sending a Fax Using the Internet

Software. For organisations which have Internet e-mail connections, one of the simplest way to send a fax is to use an Internet-based fax service such as that provided by The Phone Company (TPC). TPC maintains a network of fax servers which you may use to send a fax to many locations around the world. More information about this service can be found at http://www.tpc.int.

To use the service, it is necessary to send an e-mail message in the following format:

remote-printer.Name/Company@Faxnumber.iddd.tpc.int

In this e-mail address, the parameters used are:


Parameter
Description

Name

Name of fax recipient

Company

Company name of fax recipient

Fax number

Fax number of recipient in International format

The phrases "remote-printer" and "iddd.tpc.int", shown in the example address, are always required.

Sample Batch File. This example uses the Sendmail for Windows program already described above to send an e-mail message to the TPC fax server:

@echo off

rem

set FAXNUMBER=441711234567

rem

rem ALERTFAX.BAT

rem by Marcus Williamson

rem

echo Subject: ManageWise Alert (via Fax) > ALERTFAX.TMP

echo From: managewise@connectotel.com >> ALERTFAX.TMP

echo To: remote-printer.Marcus_Williamson/Connectotel@%FAXNUMBER%

    .iddd.tpc.int >> ALERTFAX.TMP

echo. >> ALERTFAX.TMP

echo Novell ManageWise Alert (via Fax) : >> ALERTFAX.TMP

echo. >> ALERTFAX.TMP

IF NOT %1x==x echo %1 %2 %3 %4 %5 %6 %7 %8 %9  >> ALERTFAX.TMP

shift

shift

shift

shift

shift

shift

shift

shift

shift

IF NOT %1x==x echo %1 %2 %3 %4 %5 %6 %7 %8 %9 >> ALERTFAX.TMP

c:\inetpub\scripts\sendmail -t -messagefile=ALERTFAX.tmp

rem

Other Third-Party Programs

In addition to the examples already shown, a variety of third-party options are available for handling ManageWise alarms. For further information about these, see the ManageWise Third-Party Solutions page at:

http://www.novell.com/products/managewise/partners/

Conclusion

As has been shown by this article, Novell ManageWise offers many possibilities for the handling of alarm messages received at the ManageWise Console. It is hoped that you've been given some ideas which will be of use in your configuration and administration of ManageWise. Further development using these ideas is left to your own imagination and ingenuity.

* Originally published in Novell AppNotes


Disclaimer

The origin of this information may be internal or external to Novell. While Novell makes all reasonable efforts to verify this information, Novell does not make explicit or implied claims to its validity.

© Micro Focus