I am querying state property from Orion.AlertStatus and i am getting 2 as a output.
I am guessing "2" means "Critical". Is it ok ?
And let me know any other possible values for state property.
The state column in the Orion.AlertStatus entity is used to track the state of the alert. The values are as follows
1=Trigger Pending
2=Triggered
3=Reset Pending
4=Reset
I am querying
"SELECT A.AlertDefID, A.ObjectType, A.ActiveObject, A.State, A.ObjectName, A.TriggerTimeStamp FROM Orion.AlertStatus A where A.State=2" like this it gives alert triggered data.
But whenever i am trying following query
"SELECT A.AlertDefID, A.ObjectType, A.ActiveObject, A.State, A.ObjectName, A.TriggerTimeStamp FROM Orion.AlertStatus A where A.State=4"
it is giving 0 rows. It doesn't display alert reset data.
I need to get Alert reset data. can you help me
Yo won't be able to get the alert reset info since it doesn't remain in the database long enough. The alert engine will remove the record from the database immediately.
If you query for an alert and it doesn't exist you can assume it has been reset.
Have the alert write the information to the event log when it is reset and query that instead of the alert table (which will not have the entry in it because it only holds active alerts as derhally wrote)