Purpose: Generates an Outage (node detail) report for the past 30 days.
Grouped by node name, Ordered by Event Time
Prerequisite:
none
Optional:Report Scheduler job defined to send report monthly
Thanks, Good report :-)
Is there any way i can filter this using custom properties?
Thanks
This is freaking AWESOME.
Dear Jsherwin,
Download this report and copy in folder where all reports are saved.( i.e \Program Files\Solarwinds\Orion\Reports\ ) .
Then open Orion Report Writer.
Click on OPEN & select desired report.
Shailesh wrote:Sorry...this report seems to be for the last 30 days. Not for last month. Can the author clarify.
Shailesh wrote:
I modified it to show the last previous month....please test it:
DECLARE @StartDate DateTime
DECLARE @EndDate DateTime
SET @StartDate = DATEADD(d, DATEDIFF(d, 0, DATEADD(m, -1, DATEADD(d, 1 - day(getdate()), getdate()))), 0)
SET @EndDate = DATEADD(ms, -2,DATEADD(d, DATEDIFF(d, 0, DATEADD(d, 1 - day(getdate()), getdate())), 0));
SELECT
StartTime.EventTime,
Nodes.Caption,
Nodes.Organization,
Nodes.Type,
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
( EventTime BETWEEN @StartDate AND @EndDate ) AND Nodes.Organization = 'FMHP' AND Nodes.Type = 'Router'
ORDER BY StartTime.EventTime
Correct the report does the past 30 days, and if you schedule it to run (as is) on the first day of the new month it works as written.
This part of the original SQL statement is for the last month
eventtime between dateadd(month, -1, getdate()) and getdate()
this gets the event time and measures it only from the perspective of occurring within the last month.
Your report includes custom properties, I have removed them with the following resulting SQL:
( EventTime BETWEEN @StartDate AND @EndDate )
Both reports accomplish the same result
Thank you!!! This is a great report!!!
Appreciate the share on this one!
Cheryl
Hi @jtimes
This report is awesome, working fine as expected.
I am using your report for last month you shared last in this thread.
I am trying exclude the nodes with null values (no down time) from the report but no luck. Can you help me where i need place the query.
Thanks,
DN