Submit a ticketCall us

Training ClassSign up for Network Performance Monitor (NPM) and Scalability instructor-led classes

Attend our instructor-led classes, provided by SolarWinds® Academy, to discuss the more advanced monitoring mechanisms available in NPM as well as how to tune your equipment to optimize its polling capabilities. NPM classes offered:
NPM Custom Monitoring and Polling
Orion Platform Scalability

Reserve your seat.

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,024 Votes: 1 Revisions: 10

Updated Nov 26, 2018

Overview

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.

Environment

NPM version 10.7 and later

Steps

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:

SELECT * FROM (

 SELECT
 Nodes.StatusLED,
 Nodes.Caption,
 Nodes.NodeID,
 StartTime.Message,
 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

Tags

Classifications

Public