Sample query result, Summary of all events – HP Neoview Release 2.4 Software User Manual
Page 82
Example A-9 Summary of all Events
This report summarizes all events for a given time period and returns results grouped by SSID
and event number.
SELECT
COUNT(*) AS CNT,
EVENT_NUMBER AS EVENT_NUMBER,
CASE
WHEN LEFT(SSID,6) = 'TANDEM'
THEN SUBSTRING(SUBSTRING(SSID
FROM
CHAR_LENGTH('TANDEM. '))FOR LOCATE('.' ,SUBSTRING(SSID
FROM
CHAR_LENGTH('TANDEM. ')) )-1)
ELSE SSID
END AS SUB_SYS,
MIN(GENERATED_TIMESTAMP_LCT) AS FIRST_TIME,
MAX(GENERATED_TIMESTAMP_LCT) AS LAST_TIME,
TRIM(SUBSTRING(MAX(TEXT)
FROM
CHAR_LENGTH('00:00 01FEB09 001.01.1000 ')) ) AS EXAMPLE_EVENT_TEXT,
SSID AS SSID
FROM
NEO.HP_METRICS.EVENTS_VW1
WHERE
GENERATED_TIMESTAMP_LCT >= TIMESTAMP '$$__FROM_TIME$$' and
GENERATED_TIMESTAMP_LCT <= TIMESTAMP '$$__TO_TIME$$'
GROUP BY
SSID,
EVENT_NUMBER
ORDER BY
CNT DESC FOR READ UNCOMMITTED ACCESS IN SHARE MODE
/*QueryDocumentationStart
(C) COPYRIGHT 2010 HEWLETT-PACKARD DEVELOPMENT COMPANY, LP.
QueryTitle: Summary All EMS Events
Application: Neoview Reports, HPDM
QueryStyleRevNum: S2.0
ReposRevNum: R2.4 SP2
QueryRevNum:Q1
QueryShortDesc:
This report summarizes all EMS event for time period.
The submitter is prompted to enter the time period to summarize.
Results are grouped and counted by event subsystem id (SSID) and event number.
Prompts:
__FROM_TIME = the starting time period to summarize
__TO_TIME = The ending time period to summarize
Columns Returned:
CNT = the total number of occurrences for the SSID, Event number pair.
EVENT_NUMBER = Event management system event number.
SUB_SYS = Shortened version of the subsystem id.
FIRST_TIME = the date and time of the first occurrence of the ssid, event number during the time range
specified
LAST_TIME = the date and time of the last occurrence of the ssid, event number during the time range specified
EXAMPLE EVENT_TEXT = Example event text for the ssid, event number. To view the event text for a single
event, use report Full Event Text.
SSID = full name of subsystem ID
Views Used: EVENTS_VW1
QueryDocumentationEnd*/
;
Sample Query Result
This example shows a report summarizing all events for a given time period and returns results
grouped by SSID and event number.
82
Sample Queries for Event Information