event_trigger2()
Create an event instance with a specific origin for the PATROL Event Manager.
Syntax
[argument1,...,argument15])
Parameters
Parameter | Definition |
---|---|
origin | character string indicating the application instance or class that originated the event |
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:
|
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* |
severity | integer value indicating the severity of the event *Valid Values* |
arguments | arguments passed to the PATROL Event Manager and displayed in the event detailed report This function permits a maximum of 15 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_trigger2() function creates an event instance that appears in the PATROL Event Manager. The origin of the event instance is origin. The event_trigger2() function assumes that the event catalog and class are already defined.
The event_trigger2() and event_trigger() functions are identical except how they identify the event origin:
- The event_trigger2() function allows you to specify an origin.
- The event_trigger() function always sets the origin to the context in which it executes.
The event_trigger2() 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_trigger2() function:
"myorigin", # origin: myorigin
"ORACLEx", # event catalog: ORACLEx
"ResetCounters", # event class: ResetCounters
"ALARM", # event type: ALARM
"3", # severity: 3
"myarg1", # dynamic argument 1
"myarg2" # dynamic argument 2
);