Hi All need help setting up a report for triggered alerts history for past 1 day but only on for the two alerts below
Thanks in advance
Hi All need help setting up a report for triggered alerts history for past 1 day but only on for the two alerts below
Thanks in advance
What Information do you need in the report? Here's something that I think is close, its SWQL.
SELECT AH.AlertObjects.AlertConfigurations.DisplayName as [Alert Name], AH.AlertHistoryID, AH.EventType, AH.Message, AH.TimeStamp, AH.AlertObjects.EntityCaption, AH.AlertObjects.EntityDetailsUrl, AH.AlertObjects.RelatedNodeCaption, AH.AlertObjects.RelatedNodeDetailsUrl FROM Orion.AlertHistory AH Where (AH.AlertObjects.AlertConfigurations.DisplayName like 'Cisco Store Router Down' or AH.AlertObjects.AlertConfigurations.DisplayName like 'Meraki Device Down (P3)' ) and HOURDIFF(AH.TimeStamp , GetDate()) < 24 -- last day in hours and AH.EventType = 0 -- Event for alert trigger Order By AH.TimeStamp DESC
What Information do you need in the report? Here's something that I think is close, its SWQL.
SELECT AH.AlertObjects.AlertConfigurations.DisplayName as [Alert Name], AH.AlertHistoryID, AH.EventType, AH.Message, AH.TimeStamp, AH.AlertObjects.EntityCaption, AH.AlertObjects.EntityDetailsUrl, AH.AlertObjects.RelatedNodeCaption, AH.AlertObjects.RelatedNodeDetailsUrl FROM Orion.AlertHistory AH Where (AH.AlertObjects.AlertConfigurations.DisplayName like 'Cisco Store Router Down' or AH.AlertObjects.AlertConfigurations.DisplayName like 'Meraki Device Down (P3)' ) and HOURDIFF(AH.TimeStamp , GetDate()) < 24 -- last day in hours and AH.EventType = 0 -- Event for alert trigger Order By AH.TimeStamp DESC
I had to edit it, bad copy/paste
Just how many times over the past 24 hours the alert triggered
If you want the count, then try:
SELECT Count( AH.AlertHistoryID) as [Alerts Triggered] FROM Orion.AlertHistory AH Where (AH.AlertObjects.AlertConfigurations.DisplayName like 'Cisco Store Router Down' or AH.AlertObjects.AlertConfigurations.DisplayName like 'Meraki Device Down (P3)' ) and HOURDIFF(AH.TimeStamp , GetDate()) < 24 -- last day in hours and AH.EventType = 0 -- Event for alert trigger
Need to add also the following alert name -
Meraki Device Interface Down (P3) |
Not sure on swql structure for this
SELECT AH.AlertObjects.AlertConfigurations.DisplayName, Count( AH.AlertHistoryID) as [Alerts Triggered] FROM Orion.AlertHistory AH Where (AH.AlertObjects.AlertConfigurations.DisplayName like 'Cisco Store Router Down' or AH.AlertObjects.AlertConfigurations.DisplayName like 'Meraki Device Down (P3)' ) and HOURDIFF(AH.TimeStamp , GetDate()) < 24 -- last day in hours and AH.EventType = 0 -- Event for alert trigger Group By AH.AlertObjects.AlertConfigurations.DisplayName
Is this what you mean? Group counts by name
sorry i didnt make it clear enough i need the following alert added into the swql as well
so basically, it will report on 3 alerts
I missed the word interface, thought it was the same, sorry
SELECT AH.AlertObjects.AlertConfigurations.DisplayName, Count( AH.AlertHistoryID) as [Alerts Triggered] FROM Orion.AlertHistory AH Where (AH.AlertObjects.AlertConfigurations.DisplayName like 'Cisco Store Router Down' or AH.AlertObjects.AlertConfigurations.DisplayName like 'Meraki Device Down (P3)' or AH.AlertObjects.AlertConfigurations.DisplayName like 'Meraki Device Interface Down (P3)' ) and HOURDIFF(AH.TimeStamp , GetDate()) < 24 -- last day in hours and AH.EventType = 0 -- Event for alert trigger Group By AH.AlertObjects.AlertConfigurations.DisplayName
anyway we can add the alert Count to the following swql - Count( AH.AlertHistoryID) as [Alerts Triggered]
SELECT
AH.AlertObjects.AlertConfigurations.DisplayName as [Alert Name],
AH.AlertHistoryID,
AH.EventType,
AH.Message,
AH.TimeStamp,
AH.AlertObjects.EntityCaption,
AH.AlertObjects.EntityDetailsUrl,
AH.AlertObjects.RelatedNodeCaption,
AH.AlertObjects.RelatedNodeDetailsUrl
FROM Orion.AlertHistory AH
Where
(AH.AlertObjects.AlertConfigurations.DisplayName like 'Cisco Store Router Down'
or AH.AlertObjects.AlertConfigurations.DisplayName like 'Meraki Device Down (P3)'
or AH.AlertObjects.AlertConfigurations.DisplayName like 'Meraki Device Interface Down (P3)' )
and HOURDIFF(AH.TimeStamp , GetDate()) < 24 -- last day in hours
and AH.EventType = 0 -- Event for alert trigger
Order By AH.TimeStamp DESC
thanks
SolarWinds solutions are rooted in our deep connection to our user base in the THWACK® online community. More than 195,000 members are here to solve problems, share technology and best practices, and directly contribute to our product development process.