Hi All,
I am looking for a report from Solarwinds which shows all down nodes with active time and triggered time.
Can someone please help me with the SQL query to fetch the requested data.
Hi I can do you a SWQL one but not SQL....This should get you started, just edit to your requirements.
SELECT TOP 1000 ActiveObject, ObjectType, State, WorkingState, ObjectName, AlertMessage, TriggerTimeStamp, Acknowledged, AcknowledgedBy, AcknowledgedTime, LastUpdateFROM Orion.AlertStatus
If you want it as a report then add the above code into a new report, custom table, and select advanced DB query and just paste the code into the box. Then select the columns you want to appear via edit table.
Be aware, above code will include interfaces, so if you want just nodes, then add WHERE ObjectType LIKE '%Node%' underneath the FRIOM line.
Here is one I use on the main dashboard as a Widget. It is similar to the Down Nodes resource but includes a custom Property called Group which in our environment is the owner of the node. You can change the code to match any Custom Property you may have.
Add it as a Custom Query Widget.
The widget will display down nodes, the Group the node belongs to and the time in went down - ordered by time, newest to oldest.
SELECT NodeName AS [Node Name], '/Orion/images/StatusIcons/Small-' + StatusIcon AS [_IconFor_Node Name], DetailsUrl AS [_LinkFor_Node Name], Nodes.CustomProperties.Group as [Group], --MAX(DOWNEVENT.EVENTTIME) AS [DOWN TIME]MAX(tolocal(DOWNEVENT.EVENTTIME)) AS [DOWN TIME]FROM ORION.NODES NODESINNER JOIN ORION.EVENTS DOWNEVENTON NODES.NODEID = DOWNEVENT.NETWORKNODEWHERE STATUS = 2GROUP BY NodeName, StatusIcon, DetailsUrl, Nodes.CustomProperties.GroupORDER BY [DOWN TIME] DESC
Also just seen this post: https://thwack.solarwinds.com/product-forums/network-performance-monitor-npm/f/forum/91405/node-down-duration-swqlWhich may have your solution.
Thanks for the query. But in this report I can see the data is restricted for only last 30 days.
Thanks Much
This is exactly what I am looking for..