Submit a ticketCall us
Home > Success Center > Network Performance Monitor (NPM) > NPM - Knowledgebase Articles > Custom query to create a node downtime report

Custom query to create a node downtime report

Table of contents
Created by Jane Baylon, last modified by Melanie Boyd on Nov 28, 2018

Views: 3,380 Votes: 1 Revisions: 10

Updated Nov 26, 2018


This article provides instructions to create a report that shows the outage duration for each node, including when and how long it was down. You can also include a filter to show only specific nodes.


NPM version 10.7 and later


You can run this query either from your Orion Report Writer or from your Orion server.


  1. Log in to Orion Server with an admin account.
  2. Go to Start > All Programs > SolarWinds Orion > Alerting, Reporting, and Mapping > Report Writer.
  3. Click New and choose Advanced SQL as the type of report.
  4. Run the script below:


 StartTime.EventTime AS DownEventTime,
  SELECT TOP 1 EventTime
  FROM Events AS EndTimeTable
  where EndTimeTable.EventTime >= StartTime.EventTime
   AND EndTimeTable.EventType = 5
   AND EndTimeTable.NetObjectType = 'N'
   AND EndTimeTable.NetworkNode = StartTime.NetworkNode
   AND EventTime IS NOT NULL
  ORDER BY EndTimeTable.EventTime
 ) AS UpEventTime,
DATEDIFF(Mi, StartTime.EventTime,(
   SELECT TOP 1 EventTime FROM Events AS Endtime
   where EndTime.EventTime > StartTime.EventTime AND EndTime.EventType = 5 AND EndTime.NetObjectType = 'N'
    AND EndTime.NetworkNode = StartTime.NetworkNode  ORDER BY EndTime.EventTime)
  ) AS OutageDurationInMinutes
 FROM Events StartTime
 INNER JOIN Nodes ON StartTime.NetworkNode = Nodes.NodeID
 WHERE (StartTime.EventType = 1) AND NodeID = '1'
) AS UpTimeTable
where outageDurationInMinutes IS NOT NULL
ORDER BY Caption ASC, DownEventTime DESC


Note: The highlighted part can be changed from set to custom properties depending on your needs.



Last modified