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

How to get Interface status and LED icon on this SQL script

Jump to solution

I need some help whit this SQL script i have used in the Report. Need to get the Status of the interface if its up or down and whit LED icon. Can anyone help whit this?

select

Interfaces.nodeID AS NodeID,

Nodes.Caption AS NodeName

interfaces.caption AS InterfaceName,

interfaces.interfaceIndex,

NodeIPAddresses.IPAddress,

NodeIPAddresses.InterfaceIndex

from

Interfaces

Right join nodes on (nodes.nodeID = interfaces.NodeID)

Left join NodeIPAddresses on (NodeIPAddresses.nodeid = interfaces.nodeid AND NodeIPAddresses.InterfaceIndex = interfaces.interfaceindex)

WHERE (NodeIPAddresses.IPAddress IS NOT NULL AND Nodes.Caption like 'SB1-%')

ORDER BY Nodes.Caption, interfaces.caption

pastedImage_0.png

Tags (2)
0 Kudos
1 Solution

Hi,

you can try something like

select interfaces.nodeid as [nodeid], nodes.caption as [node name], interfaces.caption as [interface name],interfaces.interfaceindex as [interface index],interfaces.status as [status id],statusinfo.statusname as [status],
concat('<img src="/Orion/images/StatusIcons/small-',interfaces.statusled,'"/>')
from interfaces
join nodes on nodes.nodeid = interfaces.nodeid
join statusinfo on statusinfo.statusid = interfaces.status

View solution in original post

0 Kudos
10 Replies