event_report()

Return statistics for PATROL events that match the specified filter.

Syntax

event_report([start-time],[stop-time],[status],[type],[node],
[origin],[pattern],[IDrange],[class],[severity])

Parameters

Parameter

Definition

start-time

time endpoint that specifies the oldest event timestamp that is valid for the
event report
Valid Values
■ " " indicating January 1, 1970 at 00:00:00
■ PSL backward compatible: MMddhhmm[yy]
■ RFC-822: day date month year hh:mm:ss
■ Unix: day month date hh:mm:ss year
■ PSL date(): day month date hh:mm:ss year
The variables have the following values:
day—Sun Mon Tue Wed Thu Fri Sat
MM—01 to 12
month—Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec
dd or date—01 to 31
hh—00 to 23
mm and ss—00 to 59
year—1902 to 2037
[yy]—00 to 99 (19yy is assumed)
In the PSL compatibility format the current year is used when yy is omitted.

stop-time

time endpoint that specifies the most recent event timestamp that is valid for
the event report
Valid Values
■ " " indicating all event timestamps in the repository
■ PSL backward compatible: MMddhhmm[yy]
■ RFC-822: day date month year hh:mm:ss
■ Unix: day month date hh:mm:ss year
■ PSL date(): day month date hh:mm:ss year
The variables have the following values:
day—Sun Mon Tue Wed Thu Fri Sat
MM—01 to 12
month—Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec
dd or date—01 to 31
hh—00 to 23
mm and ss—00 to 59
year—1902 to 2037
[yy]—00 to 99 (19yy is assumed)
In the PSL compatibility format the current year is used when yy is omitted.

status

event status that is valid for the event report

*Valid Values* 
O OPEN 
A ACKNOWLEDGED 
C CLOSED 
E ESCALATED 
D DELETED*Examples*

  • "O,A,C,D" matches all statuses except ESCALATED
  • "O,A,C,E,D" or " " matches all statuses
  • "O,C" matches only statuses OPEN and CLOSED
type

event type that is valid for the event report

*Valid Values* 
I INFORMATION 
S CHANGE_STATUS 
E ERROR 
W WARNING 
A ALARM 
R RESPONSE*Examples*

  • "S,E,W,A,R" matches all event types except INFORMATION
  • "I,S,E,W,A,R" or " " matches all event types
  • "W,A" matches only event types WARNING and ALARM
node

computer system name that is valid for the event report

*Valid Values*

  • " " indicating all computer systems listed in the PEM repository
  • character string indicating a specific host name
origin

application instance or class name that is valid for the event report

*Valid Values*

  • " " for all application classes
  • character string indicating a specific application instance or class
pattern

character string within the event description field that is valid for the event report

*Valid Values*

  • " " indicating any characters
  • character string
IDrange

string that defines the range of PATROL event IDs that are valid for the event
report
Valid Values
x event ID x
x/y event IDs between and including x and y
-/y event IDs less than and including y
x/- event IDs greater than and including x
-/- all events (" " is also valid)
x and y are integers in the following range:
0 ≤ x ≤ y ≤ 2,147,483,647

class

event class that is valid for the event report
Valid Values
■ " " indicating all event classes
■ character string specifying a specific event class

severity

lowest event severity that is valid for the event archival
Valid Values
■ string containing an integer between 1 and 5 with 5 being the most severe
■ entering "1" returns events of all severity
Default Value
" " is the same as "2"

Note

When the two digit year, yy, is specified with the PSL compatible time format for the start-time and stop-time parameters, the function assumes the year is 19 yy. You should either omit the year when using this format, or use a different date format if you need to specify the year. 

Description

The event_report() function returns statistics for events in the PATROL event repository that match the specified filter criteria. The event_report() function returns the empty string if no events match the filter.

Output

The following is a sample of the statistics returned by the event_report() function:

Number of events in the Repository: 821
Number of events in cache: 134
Number of events on disk: 687
Status
OPEN: 821
ACKNOWLEDGED: 0
CLOSED: 0
ESCALATED: 0
DELETED: 0
Type
ALARM: 3
WARNING: 10
ERROR: 0
STATE_CHANGE: 806
INFORMATION: 2
RESPONSE: 0
Time
First event: Tue Mar 19 03:34:43 1996
Last event: Tue Mar 19 08:25:51 1996
Event Id
Smallest Id: 14595
Greatest Id: 16069
Event size:
Average event size: 225 bytes
Maximum event size: 287 bytes

Example

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

print(
"event statistics\n",
event_report( # filter definition starts here:
"", # any start time
"0407101596", # only events before 04-07-96 10:15
"O", # only OPEN status
"A", # only ALARM type
"", # any computer system
"SAP", # only event originating from SAP
"", # any description text
"-/-", # any event ID
"", # any event class
"" # any event severity
)
. "\n"
);


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

Comments