remote_event_trigger()


Create an event instance for the PATROL Event Manager of a remote PATROL Agent.

Syntax

remote_event_trigger(sessionID,origin,catalog,class,type,
severity,[argument1,...argument20])

Parameter

Parameter

Definition

sessionID

identifier of the remote PATROL Agent session to which the remote event trigger is directed The sessionID is returned by the remote_open() function when you open a remote PATROL Agent session.

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

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

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

Description

The remote_event_trigger() function creates an event instance that appears in the PATROL Event Manager of a remote PATROL Agent identified by sessionID. The origin of the event instance is origin. The remote_event_trigger() function assumes that the event catalog and class are already defined in the PATROL Event Manager for the remote PATROL Agent. The remote_event_trigger() function returns a 1 for successful execution and a 0 for failure. 

The remote_event_trigger() function is different than the event_trigger() function because the remote_event_trigger() function will not print output to the PATROL console. Therefore, when you use the remote_event_trigger() function, it may appear that notification commands are not executing because they do not appear in the console window.

Note

The remote_event_trigger() function returns immediately after initiating the process. It does not wait for completion of the trigger. Therefore, if you use the remote_event_query() function immediately after theremote_event_trigger() function, the event may not yet exist on the remote host. You may want to use thesleep() function as a delay between the remote_event_trigger() and remote_event_query() functions when they are used together. 

Example

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

remote_event_trigger(
mysession, # session handle returned by remote_open()
"myorigin", # event origin: myorigin
"STD", # event catalog: STANDARD
"41", # event class: 41
"ALARM", # event type: ALARM
"5", # severity: 5 (most severe)
"myarg" # dynamic argument 1
);