cancel
Showing results for 
Search instead for 
Did you mean: 
Create Post
Level 8

SWQL CUSTOM QUERY TO SHOW INTERFACE PERCENT USAGE LIKE TOP 10 CHARTS with Search option

Hi All,

I configured an SWQL query to show interface percent utilization, but i am unable configure custom search in that script, please help, below is the SWQL script.

SELECT

n.NodeName AS Node,

n.DetailsUrl AS [_Linkfor_Node],

'/Orion/images/SubViewIcons/Network_02.png' AS [_Iconfor_Node],

i.InterfaceName AS Interface,

i.DetailsUrl AS [_Linkfor_Interface],

'/Orion/images/SubViewIcons/Routing.png' AS [_Iconfor_Interface],

i.InPercentUtil AS RECEIVE,

i.OutPercentUtil AS TRANSMIT

FROM

Orion.NPM.Interfaces as i

LEFT JOIN Orion.Nodes as n ON n.NodeID=i.NodeID

WHERE

(i.InterfaceIndex = 6 and i.InterfaceName LIKE 'Se%') OR

i.InterfaceName LIKE 'wan1' OR

i.InterfaceName LIKE 'port1' OR

i.InterfaceName LIKE 'GigabitEthernet0/1'

ORDER BY

PercentUtil DESCENDING

4 Replies
MVP
MVP

Did you try clicking 'Enable search' and then putting ${SEARCH_STRING} in the place where the search string should go? If so, what issues did you run into?

0 Kudos

Hey Steven, thanks for you reply, i already checked the 'enable search' and put the SEARCH_STRING, there was some issue with my coding, it's been resolved now.

0 Kudos

bharat9286

I think many of us would be interested in seeing your final script; would you be willing to post it here in the working form?

0 Kudos

Here is the final script....

Custom SWQL

SELECT

n.NodeName AS Node,

n.DetailsUrl AS [_Linkfor_Node],

'/Orion/images/SubViewIcons/Network_02.png' AS [_Iconfor_Node],

i.InterfaceName AS Interface,

i.DetailsUrl AS [_Linkfor_Interface],

'/Orion/images/SubViewIcons/Routing.png' AS [_Iconfor_Interface],

i.InPercentUtil AS RECEIVE,

i.OutPercentUtil AS TRANSMIT,

FROM

Orion.NPM.Interfaces as i

LEFT JOIN Orion.Nodes as n ON n.NodeID=i.NodeID

WHERE

(i.InterfaceIndex = 6 and i.InterfaceName LIKE 'Se%') OR

i.InterfaceName LIKE 'wan1' OR

i.InterfaceName LIKE 'port1'

ORDER BY

PercentUtil DESCENDING

Search SWQL

SELECT

n.NodeName AS Node,

n.DetailsUrl AS [_Linkfor_Node],

'/Orion/images/SubViewIcons/Network_02.png' AS [_Iconfor_Node],

i.InterfaceName AS Interface,

i.DetailsUrl AS [_Linkfor_Interface],

'/Orion/images/SubViewIcons/Routing.png' AS [_Iconfor_Interface],

i.InPercentUtil AS RECEIVE,

i.OutPercentUtil AS TRANSMIT,

FROM

Orion.NPM.Interfaces as i

LEFT JOIN Orion.Nodes as n ON n.NodeID=i.NodeID

WHERE

NODE LIKE '%${SEARCH_STRING}%' 

and (

(i.InterfaceIndex = 6 and i.InterfaceName LIKE 'Se%') OR

i.InterfaceName LIKE 'wan1' OR

i.InterfaceName LIKE 'port1')

ORDER BY

PercentUtil DESCENDING