Community
Command Central
MVP Program
Monthly Mission
Blogs
Groups
Events
Media Vault
Products
Observability
Network Management
Application Management
IT Security
IT Service Management
System Management
Database Management
Content Exchange
SolarWinds Platform
Server & Application Monitor
Database Performance Analyzer
Server Configuration Monitor
Network Performance Monitor
Network Configuration Manager
SQL Sentry
Web Help Desk
Free Tools & Trials
Home
Products
Network Performance Monitor (NPM)
SQL statement for Time Range?
wildweaselmi
With all the virus activity my customer wants SolarWinds reports of outage duration time network devices down. This is easy if it is within a 24 hour period.
Could someone help me find or create a SQL statement that I could paste into Orion Report Writer to generate an Outage Duration Report for a specific time range? If that isn't possible, what would be good is to be able to have a SQL template that all you have to do is input the date range you require an Outage Duration Report for.
This is the Outage Duration Report SQL code I have been trying to alter to get this to work.
SELECT
StartTime.EventTime,
Nodes.Caption,
StartTime.Message,
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 (StartTime.NetObjectType = 'N')
AND (Nodes.SysName LIKE '%GMACN%')
AND eventtime between dateadd(day, -1, getdate()) and getdate()
ORDER BY StartTime.EventTime DESC
Find more posts tagged with
Accepted answers
All comments
There are no accepted answers yet
Quick Links
All Categories
Recent Posts
Activity
Unanswered
Groups
Help
Best Of