Important

   

This documentation space contains information about PATROL Agents when deployed in a TrueSight Operations Management environment. If you are a BMC Helix Operations Management user, see PATROL Agent 22.1 for BMC Helix Operations Management. Open link

event_range_query()

Return PATROL events from a specified event ID range

Syntax

event_range_query(maxcount,delimiter,format,IDrange)

Parameters

Parameter

Definition

maxcount

string that is the maximum number of events that will be returned in the query Specifying the NULL string" " causes maxcount to default to 100.

delimiter

string that is used to separate each event in the list of events returned by the query*Valid Values*

  • "" indicating the characters "||" will separate the entries
  • any valid characters including PSL string literals. For more information, see PSL String Literals.

format

format string used to present each event returned by the query The format string for the event_range_query() function is the same as the format string for the event_query() function. For details of the format specification, see event_query()

Default 
" " is equivalent to the string "%s %s %s %s %s %s %s %s\n" where the eight strings are in the following order:

  • event ID assigned by the PEM
  • event status
  • event type
  • event timestamp
  • host name that produced the event
  • application class or instance that produced the event
  • text string from the event description field
  • text string from the event diary field

IDrange

string that is the range of PATROL event IDs eligible for this query
Valid Values
xevent ID x
x/yevent IDs between and including x and y
-/yevent IDs less than and including y
x/-event IDs greater than and including x
-/-all events
where x and y are integers such that
0 ≤ x ≤ y ≤ 2,147,483,647

Description

The event_range_query() function returns up to maxquery events from the PATROL Event Manager log whose event IDs are within the range IDrange. Each event returned is formatted according to format, and the list of events is separated usingdelimiter

The event_range_query() function returns the NULL string if no events were found whose event IDs are within IDrange.

Choose the value of maxquery with care. Large maxquery values can impact PATROL Agent performance. 

Example

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

event_range_query(
"100", # return a maximum of 100 events
"\n------\n", # separate events by to newline characters and
dashes
# return ID, type, status, and description
"event id: %{EV_ID}\n" .
"type: %{EV_TYPE}\n" .
"status: %{EV_STATUS}\n" .
"description: %{EV_DESC}\n",
"300/1000" # only events with IDs such that 300 <= ID <= 1000
);
Was this page helpful? Yes No Submitting... Thank you

Comments