Querying incidents in OEM 13c
Unfortunately, the Incident Manager page in Oracle Enterprise Manager 13c is slow, cumbersome, and lacks customization.
Running an SQL query against the OMS repository is extremely quick and efficient and you can get exactly what you need.
Here is a simple query to pull incidents for a particular set of targets:
SELECT
TO_CHAR(a.last_updated_date, 'YYYY-MM-DD') "Last Updated Date",
TO_CHAR(a.last_updated_date, 'HH24:MI:SS') "Last Updated Time",
a.summary_msg "Message",
b.target_type "Target Type",
b.target_name "Target Name",
a.severity "Severity",
a.resolution_state "Resolution State"
FROM
sysman.mgmt$incidents a,
sysman.mgmt$target b
WHERE a.target_guid = b.target_guid
AND a.last_updated_date >= SYSDATE - 30
AND (b.target_name LIKE '%soaprod1%'
OR b.target_name LIKE '/soa_domain/%')
AND a.severity != 'Clear'
AND b.target_type IN (
'host',
'j2ee_application',
'j2ee_application_cluster',
'j2ee_application_domain',
'oracle_apache',
'oracle_coherence',
'oracle_coherence_cache',
'oracle_coherence_node',
'oracle_home',
'oracle_sdpmessagingdriver',
'oracle_sdpmessagingdriver_email',
'oracle_sdpmessagingdriver_smpp',
'oracle_sdpmessagingdriver_xmpp',
'oracle_sdpmessagingserver',
'oracle_soa_composite',
'oracle_soa_folder',
'oracle_soainfra',
'oracle_soainfra_cluster',
'scheduler_service',
'scheduler_service_group',
'weblogic_cluster',
'weblogic_domain',
'weblogic_j2eeserver',
'weblogic_nodemanager')
ORDER BY 1 DESC, 2 DESC
Here is a sample of the output: