Adding an event class to an application

This section describes how to add a parameter with command script to the PATROL environment using the PATROL Developer Console for Windows and UNIX. 

Event class properties

The following table describes the properties of a event class. 

 Event class properties 

PropertyRequired/ Optional/ ConditionalDefaultDefinition
General
CategoryOptionalParent object classThe object class to which the event applies. This property is used as a filter used to selectively display events in a PEM console.
Life expectancyOptionalStored

A setting that indicates whether an event of this event class is stored in the PATROL Agent event log, 
or issued and then deleted. Deleting non-critical events saves disk space.

NameRequiredNone

A unique name that identifies a specific event class with its associated attributes and methods. 
The name can be a literal string or an integer.

OwnerOptionalPatrolThe entity or person that owns the event class. This is last entity to act on or modify an event.
SNMP supportOptionalNo Trap

A setting that indicates whether an event of this event class issues SNMP traps to an SNMP console. 
This setting is a customization setting typically used by end-users to set up third-party monitoring of PATROL events.

TypeOptionalInformationA sorting filter that is used to selectively display events by type in a PEM console.
Description
Description text None

A dynamic message for an event class that displays in PEM and PATROLWATCH Consoles 
whenever an event of that event class is triggered.

Escalation, Notification and Acknowledgement commands
TypeRequiredOSSpecifies the command interpreter used to run the escalation command.
Command textOptionalNoneThe text of the command.
Escalation period

Optional 
(Escalation command only)

None

The period of time that the PATROL Agent waits before executing the escalation command if the 
event is not acknowledged, closed, or deleted.

Save in KM (Knowledge Module) or 
Save to a Separate File

 Knowledge module

Save the command in the Knowledge Module file if the command will not be used by other KMs. 
Save the command in a separate file in the \psl directory if you want the command to be referenced 
by other parameters, commands, recovery actions, etc. Only available on Windows.

Expert Advice
Expert advice text None

Text for an event class that can be accessed in PEM and PATROLWATCH Consoles 
whenever an event of that event class is triggered.

Description
Description NoneText for an event class that can be accessed

Adding an event class on Windows

In this task, you add an event class to an application class, and specify the general properties, description, commands, and expert advice.

To add an event class to an application class

  1. Click the APPLICATION_CLASS\Global\Event Catalog folder for the selected application class with the right mouse button.
  2. Select New. The Event Class Properties dialog box appears as shown in the following figure.

To define the general properties

  1. Select the General tab if it is not displayed. 

     Event Class Properties dialog box, General tab 
  2. Select the appropriate options that appear on the General Tab.
  3. Click Apply. The icon for the new event class appears in the PATROL KM Map view under the Event Catalog for the application class.

To add an Escalation, Notification, or Acknowledge command to an event class

You can add command scripts to an event class to provide acknowledgment, escalation, notification, and other even-driven processing.

  1. Select the appropriate command tab. It can be Escalation, Notification or Acknowledge. The Escalation tab is shown in the following figure. 

     Event Class Properties dialog box, Escalation tab 
  2. Select the appropriate language in which the command script will be written from the Type list box.
  3. Type or copy the command script into the command text box.
  4. When the script is finished, click Apply.

To add expert advice to an event class

  1. Select the Expert Advice tab. The Expert Advice text box appears for you to enter the expert information as shown in the following figure. 

     Event Class properties dialog box, Expert Advice tab 

  2. Type the description in the text box that appears.
  3. Click Apply.

To add an event description to an event class

  1. Use the arrow keys in the upper right of the dialog box to reveal the Description tab.
  2. Select the Description tab as shown in the following figure. 

    Event Class Properties dialog box, Description tab
  3. Type the description in the text box that appears. You can enter as many as 20 dynamic arguments using the formatting arguments of the PSL printf() function. Refer to the PSL printf() function in the PATROL Script Language Reference Manual for more information on formatting dynamic arguments. When an event instance is created, the appropriate variables are substituted according to the event's context.
  4. Click Apply.

Adding an event class on UNIX

In this task, you add an event class to an application class, and specify the general properties, description, commands, and expert advice.

To add an event class to an application class

  1. Select the application class to which you wish to add an event class in the List of Application Classes window as shown in the following figure. 

     List of Application Classes window 
  2. Choose Attributes > Events from the List of Application Classes menu bar. The Event Catalog for the selected application class appears as shown in the following figure. 

     Event catalog 

    The Event Catalog lists the Event Classes that have been defined for an application. Event Classes can be created and stored in a catalog, modified, or deleted from a catalog.
  3. Choose Edit > Add from the menu bar.
    The Event Editor dialog box appears as shown in the following figure. 

     Event Editor dialog box 

To set up event class general properties

  1. Access the Event Class Definition dialog box for the appropriate application class event type.
    The general properties options for event class are shown in the following figure. 

     Event Editor dialog box, General Properties 

  2. Set the appropriate general properties options. Click OK to apply the changes and save the event class.
  3. The new event class appears in the Event Catalog for the application class.

To add a command script to an event class

You can add command scripts to an event class to provide acknowledgment, escalation, notification, and other even-driven processing. You can use PEM macros to access and provide useful information about an event instance. You can save an event class command in its associated PATROL KM or as a separate file.

  1. Access the Event Editor dialog box for the appropriate event class. The event class command options for an event class are shown in the following figure. 

     Event Editor dialog box, Event Class Commands 
  2. Select the appropriate event class command, Escalation, Notification or Acknowledge. Select the appropriate language in which the command script will be written from the Command Type list box.
  3. If an Escalation command is being defined, select the appropriate timing for escalation in the Escalation Period text box. It can be between None and 24 hours. An Escalation command is automatically executed if the event is not acknowledged, closed, or deleted within a specific Escalation Period. When an event is escalated, the PATROL product performs the following actions:
    • Adds an entry in the PEM Event diary
    • Changes the event's status to ESCALATED
    • Executes the event's escalation command if one is associated with the event's class.
  4. Click the Command button next to the text field in the Command Definition dialog box for the appropriate alarm or border action. The Command text edit window appears as shown in the following figure. 

     Command text editor window 


    This window will have different menu options and functions depending on the type of command you are entering. Click Help for more information about the window.
  5. Choose one of the following options to create the recovery action:
    • To manually enter the command procedure, type the command string for the command in the window's editing area.
    • To load an existing file that contains a procedure, choose File > Load from the Command window menu bar. You can load previously saved scripts into existing commands and save the combined text as a new file. The saved command text is available for new commands.
  6. Save your command text by selecting File > Save from the Command window menu bar.
  7. Select File > Exit to exit the from the Command edit window menu bar.
  8. Click OK to save dialog box changes and exit the dialog box when finished. The Event Catalog window appears. The new event class appears in the list and its definition has been saved in the PATROL KM file.
  9. Choose File > Exit to exit the Event Catalog window. The Event Catalog has been updated to include the new event.
  10. Click OK to save dialog box changes and exit the dialog box.

To add expert advice to an event class

You can create expert advice for an event class. Users can display the expert advice in PEM and PATROLWATCH Consoles whenever they need assistance or information about an event of that event class.

  1. Access the Event Editor dialog box for the appropriate event class event type. The expert advice option for an event class is shown in the following figure. 

     Event Editor dialog box, Expert Advice 

  2. Type the expert information in the Expert Advice text box.
  3. Click OK to apply the changes and save the event class.

To add an event description to an event class

You can create a dynamic message for an event class that displays in PEM and PATROLWATCH Consoles whenever an event of that event class is triggered.

  1. Access the Event Editor dialog box for the appropriate event class.
    The description option for an event class is shown in the following figure. 

    Event Editor dialog box, Description

  2. Type the description in the Description text box. You can enter as many as 20 dynamic arguments using the formatting arguments of the PSL printf() function. Refer to the PSL printf() function in the PATROL Script Language Reference Manual for more information. When an event instance is created, the appropriate variables are substituted according to the event's context.
  3. Click OK to apply the changes and save the event class.

KM output-application event class

Event class definitions are stored in a file with the same name as the application class with a .ctg extension. If an event class is added to an application class the application_class.ctg file in the %PATROL_HOME%knowledge directory is either created or modified for the event class definition. The following figure shows sample output created by the PATROL Developer Console when you add an event class to the PATROL environment. 

 KM output-event class 

Was this page helpful? Yes No Submitting... Thank you

Comments