View ocum_report_birt.storagesystemhealthtable | Generated by SchemaSpy |
View Definition:
select (case when (`ocum`.`eventtypevalue`.`severity` = 1) then 'Information' when (`ocum`.`eventtypevalue`.`severity` = 2) then 'Warning' when (`ocum`.`eventtypevalue`.`severity` = 3) then 'Error' when (`ocum`.`eventtypevalue`.`severity` = 4) then 'Critical' else '' end) AS `severity`,`ocum`.`event`.`state` AS `state`,concat(`ocum`.`eventtype`.`name`,'/',`ocum`.`eventtypevalue`.`internalName`,'.pretty') AS `event`,`ocum`.`event`.`eventTimestamp` AS `triggeredTime`,(to_days(coalesce(`ocum`.`event`.`obsoleteTimestamp`,`ocum`.`event`.`resolvedTimestamp`,now())) - to_days(`ocum`.`event`.`eventTimestamp`)) AS `outstandingDays`,`ocum`.`event`.`source_id` AS `sourceId`,`ocum`.`event`.`source_fullName` AS `sourceFullName`,`ocum`.`event`.`source_resourceType` AS `sourceResourceType`,`ocum`.`annotation`.`name` AS `dataPriority`,(case when (`ocum`.`eventtypevalue`.`impactLevel` = 0) then 'Event' when (`ocum`.`eventtypevalue`.`impactLevel` = 1) then 'Risk' when (`ocum`.`eventtypevalue`.`impactLevel` = 2) then 'Incident' else '' end) AS `impactLevel`,`ocum`.`event`.`impactArea` AS `impactArea`,`ocum`.`event`.`assignedTo` AS `assignedTo`,`ocum`.`event`.`assignedTimestamp` AS `assignedTimestamp`,(select count(0) from `ocum`.`eventnote` where (`ocum`.`eventnote`.`event_id` = `ocum`.`event`.`id`)) AS `numberOfNotes`,`ocum`.`event`.`acknowledgedBy` AS `acknowledgedBy`,`ocum`.`event`.`acknowledgedTimestamp` AS `acknowledgedTimestamp`,`ocum`.`event`.`resolvedBy` AS `resolvedBy`,`ocum`.`event`.`resolvedTimestamp` AS `resolvedTimestamp`,`ocum`.`event`.`obsoleteTimestamp` AS `obsoleteTimestamp` from ((((`ocum`.`event` join `ocum`.`eventtypevalue` on((`ocum`.`event`.`value_id` = `ocum`.`eventtypevalue`.`id`))) join `ocum`.`eventtype` on((`ocum`.`eventtype`.`id` = `ocum`.`eventtypevalue`.`type_id`))) left join `ocum`.`annotationresourceobject` on(((`ocum`.`event`.`source_id` = `ocum`.`annotationresourceobject`.`resource_id`) and (`ocum`.`event`.`source_resourceType` = `ocum`.`annotationresourceobject`.`resource_type`)))) left join `ocum`.`annotation` on((`ocum`.`annotationresourceobject`.`annotation_id` = `ocum`.`annotation`.`id`))) where (`ocum`.`eventtype`.`name` not in ('ems.emergency.event','ems.critical.event','ems.warning.event','ems.error.event','ems.informational.event','ems.notice.event','ems.debug.event','ems.alert.event'))