Message management


The following rules and scripts help you to notify operators of important messages.

notifyRd

The notifyRd rule is one of the most basic rules provided. It involves the following steps:

  1. The rule is triggered by a white message.
  2. The rule adds the message to the priority message area of the viewer.
  3. The message is monitored, which means that the rules engine scans console screen updates for changes.
  4. The message either changes color or disappears from the screen.
  5. The clearRd function is called and it removes the message from the priority message of the viewer.

This rule assumes that the console is in roll-delete mode. If the console is in simple roll mode, the messages might be removed from the priority area before it is resolved on the mainframe.

//
// Trigger: notifyRd
//
// Description:
//  This function marks all WHITE messages as being permanent 
//  messages. A monitor is established and clearRd is called
//  when the message scrolls off the screen or changes color.
//  Valid COLOR names are RED, GREEN, BLUE, MAGENTA, CYAN,
//  YELLOW and WHITE.
//
// See Also:
//  clearRd

//

trigger on message.COLOR == WHITE

// add to viewer priority message pane
markMessagePermanent(message)

// monitorMessage will call the function specified by
// the second parameter with 2 parameters, the message
// followed by a reason. You may define your own clearing
// function with additional parameters, see the help
// for monitorMessage
monitorMessage(message, "clearRd")

clearRd

//
// Function: clearRd
//
// Description:
//  This function cancels monitoring and clears the message
//  when it scrolls off the screen or changes color.
//
// See Also:
//  notifyRd
//
function clearRd(message, reason)

unmonitorMessage(message, "clearRd")
    
clearMessagePermanent(message)
    
return 0

clearAllPriority

By default, priority messages remain in the priority message area until they are cleared by a function or rule. This function clears all priority messages.

//
// Function: clearAllPriority
//
// Description:
//  This function removes all messages from the priority message area.
//


function clearAllPriority()

global PERMANENT_MESSAGES
i = PERMANENT_MESSAGES.size() - 1
do while i >=  0                        

    clearMessagePermanent(PERMANENT_MESSAGES[i])
    i =  i -1   
end
        
return 0

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*