Hi Forum,
Is there a way to report peak interface utilization which exceeds X% for more than XX consecutive minutes during business hours?
Thanks in advance.
@KMSigma.SWI @bobmarley - Can you help please?
I grabbed this query from a recent post. It's probably a good starting point. You could insert something on the Where clause tuned to your interface (or circuit) where H.InAveragebps is greater than x number. Same with H.OutAveragebps
SELECT tolocal (downsample (h.DateTime ,'00:15:00')) as [Timestamp], N.Caption as [Device Name], I.Caption as [Interface Name], I.inBandwidth as [Bandwidth],avg(H.InAveragebps) as [AverageIn],avg(H.OutAveragebps) as [AverageOut]FROM Orion.Nodes NINNER JOIN Orion.NPM.Interfaces AS I ON N.NodeID = I.NodeIDINNER JOIN Orion.NPM.InterfaceTraffic AS H ON I.InterfaceID = H.InterfaceID --below will only show the last hour, adjust as necessaryWHERE N.Caption LIKE '%NODECAPTION%' AND I.Caption LIKE '%CIRCUITNAME%' AND h.DateTime > ADDDATE('Hour', -1, GETDATE())GROUP BY N.Caption, I.Caption, I.inBandwidth, downsample(H.DateTime,'00:15:00')Order By Timestamp DESC
Thank you @bobmarley, and sorry for my delayed response. I have seen this thread. Quick check please - does the query capture results, when the interface was utilized say more than 90% for a continuous time period of XX minutes? Not really good with scripting, sorry about that.
I put some comments in the query below.
The circuit I was using was 10GB or 10,000,000,000. 90 percent of that is 9,000,000,000
That is shown in the Where clause as H.InAveragebps >= '9000000000' also H.OutAveragebps >= '9000000000'
This line tells the query to get only the last hour, adjust to your needs ADDDATE('Hour', -1, GETDATE()
The query will only report results for time periods that exceed 90 percent for each 5 minute average.
--Changed this down to 5 minute intervals to get all polls, match your interface polling timeSELECT tolocal (downsample (h.DateTime ,'00:5:00')) as [Timestamp], N.Caption as [Device Name], I.Caption as [Interface Name], I.inBandwidth as [Bandwidth],avg(H.InAveragebps) as [AverageIn],avg(H.OutAveragebps) as [AverageOut]FROM Orion.Nodes NINNER JOIN Orion.NPM.Interfaces AS I ON N.NodeID = I.NodeIDINNER JOIN Orion.NPM.InterfaceTraffic AS H ON I.InterfaceID = H.InterfaceID --Put your node and interface name here ADDDATE('Hour', -1 tells the query how far to go back. The circuit I used had a bandwidth of 10000000000, 90 percent of that is --9000000000 so this will display only the times when the circuit was over 90 percent.WHERE N.Caption LIKE '%YOURNODENAME%' AND I.Caption LIKE '%YOURCIRCUITNAME%' AND h.DateTime > ADDDATE('Hour', -1, GETDATE()) AND H.InAveragebps >= '9000000000' OR N.Caption LIKE '%bdc-rtr-isp-1111-1-NEW%' AND I.Caption LIKE '% Circuit ID: L4YS750288%' AND h.DateTime > ADDDATE('Hour', -1, GETDATE()) AND H.OutAveragebps >= '9000000000'--Changed this down to 5 minute intervals to get all polls, match your interface polling timeGROUP BYN.Caption, I.Caption, I.inBandwidth, downsample(H.DateTime,'00:5:00')Order By Timestamp DESC