Chapter 7. Discovery and alert interfaces 181
7.3.3 Automating NetView alert
This section provides some samples to perform automation on IBM Tivoli
Monitoring for Network Performance events. As discussed in 7.2.3, “Sample
event automation program” on page 173, there are only two event classes
defined for IBM Tivoli Monitoring for Network Performance: threshold exceeded
event and threshold rearmed event.
For NPDA alert, this event content is further hidden in the sub-vector 31 for the
original TEC event, as shown in Figure 7-12 on page 179. This provides a
challenge on writing the automation program.
We make a sample Message Automation Table (MAT) called ITMNP, as shown
in Example 7-7. This MAT is then inserted to the active processing using the
AUTOTBL MEMBER=ITMNP,FIRST command.
Example 7-7 ITMNP sample MAT
*
* ITMNP Event Automation starts here
*
IF MSUSEG(0000) ¬= '' THEN
BEGIN;
IF HIER(3) = 'ITMNP APPL' THEN
BEGIN;
* Common processing for ITMNP events
EXEC (CMD('ITMNPCMD COMMON') ROUTE(ONE +AUTO1)) CONTINUE(Y);
*
* ITMNP_ThresholdExceeded event
*
IF MSUSEG(0000.31(1).30) = . 'ITMNP_ThresholdExceeded' . THEN
EXEC (CMD('ITMNPCMD DOWN') ROUTE(ONE +AUTO1)) CONTINUE(N);
*
* ITMNP_ThresholdRearmed event
*
IF MSUSEG(0000.31(1).30) = . 'ITMNP_ThresholdRearmed' . THEN
EXEC (CMD('ITMNPCMD UP') ROUTE(ONE +AUTO1)) CONTINUE(N);
END;
END;
The automation called the program ITMNPCMD. This is a REXX program that
will parse the actual event content and perform some processing. This sample
ITMNPCMD program is provided in Example 7-8 on page 182.