How can I show the time (or time since) last state change ?
Is there a way to show time for latest state change on a “status” object (ie a DA).
We come into office in the morning and the dashboard are all green – BUT…
we don’t know if everything has been all fine or services has been down all night, but has just gone green.
So, I want to show a time for last state change on status dashboard.
Anyone with a good idea ?
v3.3 will have this functionality easily accessible via the label option. Other functionality shown below:
Failing that, use a custom label on a status tile and use the StateLastModified property. The only thing I will say is that it comes in a somewhat unreadable number value, so would require some tinkering to make it understandable.
I’m looking for a way to show the state of an object (ie. an DA) and next to it, the time or duration since its last state change.
Somewhat like this (this is a capture from our old dashboard solution)
You could run a powershell query to get the result:
Get-SCOMMonitoringObject “name of monitored object” | select statelast*
StateLastModified
—————–
2017-08-30 18:20:05
This SQL query could also be useful to get the last time an object triggered an alert.
SELECT TOP (1)
alt.RaisedDateTime,
vManagedEntity.DisplayName,
vManagedEntity.Path
FROM Alert.vAlertResolutionState AS ars INNER JOIN Alert.vAlertDetail AS adt ON ars.AlertGuid = adt.AlertGuid INNER JOIN
Alert.vAlert AS alt ON ars.AlertGuid=alt.AlertGuid INNER JOIN
vManagedEntity ON alt.ManagedEntityRowId=vManagedEntity.ManagedEntityRowId
WHERE vManagedEntity.Path = ‘monitored object name’ order by alt.RaisedDateTime desc
Answer this question
To reply or comment, use the 'Comment' link on the relevant answer or question.