event_trigger()


Create an event instance for the PATROL Event Manager.

Syntax

event_trigger(catalog,class,type,severity,
[argument1,...,argument20])

 

Parameters

Parameter

Definition

catalog

character string name of the PATROL catalog to which the event belongs To specify the PATROL standard event catalog, use one of following values:

  • STANDARD
  • STD
  • 0

class

character string name of the event in the class to which the event belongs

type

event type as displayed in the PATROL Event Manager

*Valid Values* 
ALARM 
WARNING 
ERROR 
CHANGE_STATUS 
INFORMATION

severity

integer value indicating the severity of the event

*Valid Values* 
0-5 (5 is most severe) 
A severity of 0 will send an event to the PATROL Agent, but the event will not appear in the PATROL Event Manager.

argumentn

arguments passed to the PATROL Event Manager and displayed in the event detailed report This function permits a maximum of 20 arguments.

Note: Avoid using the \" characters in this argument. In some cases, using these characters in this argument can cause a command to fail if the command also uses the EV_DESC and EV_ARGS macros.

 

Description

The event_trigger() function creates an event instance that appears in the PATROL Event Manager. The origin of the event instance is the PSL context under which the event_trigger() function executes. The event_trigger() function assumes that the event catalog and class are already defined. 

The event_trigger() and event_trigger2() functions are identical except how they identify the event origin:

  • The event_trigger() function always sets the origin to the context in which it executes.
  • The event_trigger2() function allows you to specify an origin.

The event_trigger() function can be used to develop event reporting within PATROL Knowledge Modules. 

The return value of this function is the event ID of the event that was created, followed by a vertical bar (|), followed by the timestamp expressed as seconds since 00:00:00 GMT January 1, 1970. The event ID appears in the PATROL Event Manager.

Example

The following is an example of the event_trigger() function:

event_trigger(
"STD", # event catalog : STANDARD
"41", # event class: 41
"INFORMATION", # event type: INFORMATION
"3", # severity: 3
"myarg" # one dynamic argument
);


When entered at the System Output window, this statement displays the event ID of the event that is created by this function. The event ID appears in the PATROL Event Manager.

 %PSL print(event_trigger("STD","41","INFORMATION","3", "myarg");