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

How to insert the status icon for interfaces into SWQL resource

Jump to solution

We are currently using a node status SWQL query that gives us the small- GroupStatus icon, i.e. small-up.gif, but we are at a loss as how to get the status icon to show for interfaces. We are not seeing something as neat in the interfacecore table as we see in the nodecore table with a column that has the image currently used.

Does anyone know where to find the image for the interface or how to shoe horn one in?

Tags (1)
0 Kudos
1 Solution

Decided against case since it will be too manual and Status Description should work for you - however I have only EOC 1.4.1 and it's kicking back on Status Description so I had to join up StatusInfo and make my own. It's always something...

not sure these links will work for your EOC but you can modify them as needed. BTW - how are you getting SWQL into EOC console?

SELECT i.fullname AS [Interface]

, '/Orion/images/StatusIcons/Small-' + z.StatusName + '.gif' AS [_IconFor_Interface]

, '/Orion/Interfaces/InterfaceDetails.aspx?NetObject=I:' + ToString(InterfaceID) as [_LinkFor_Interface]

, 'Interface is ' + z.StatusName AS [Interface_Status]

FROM EOC.Interface i

INNER JOIN EOC.StatusInfo z on z.StatusID = i.Status

View solution in original post

8 Replies

Edit---I just saw you asked about eoc vs NPM. If the operstatusLED doesn't exist let me know and I'll give you a case statement that will translate numerical status to status icon.

Same icons- I happen to show status first like the interface resources do but you can sub operstatusLED for interfaceicon

SELECT

i.operstatus as Status

, '/Orion/images/StatusIcons/Small-' + i.operstatusLED AS[_IconFor_Status]

, '      ' + i.caption as Interface

, i.detailsurl as [_LinkFor_Interface]

, '/NetPerfMon/images/Interfaces/' + i.interfaceicon AS[_IconFor_Interface]

,  toString(InBandwidth / 1000000) + 'Mb' as Bandwidth

0 Kudos
Level 13

I won't be able to test this until later but I'm pretty sure we tried OperStatusLED and StatusLED but neither gave us what we wanted. Would I be able to call OperStatusLED from the NPM instance by using Orion.website and pull back the /images/small-<name>.gif?

Could you also provide that example for using case with SWQL. I'm not seeing any examples of it in the documentation and was curious if I could use this in SWQL in general. Thank you.

0 Kudos

Decided against case since it will be too manual and Status Description should work for you - however I have only EOC 1.4.1 and it's kicking back on Status Description so I had to join up StatusInfo and make my own. It's always something...

not sure these links will work for your EOC but you can modify them as needed. BTW - how are you getting SWQL into EOC console?

SELECT i.fullname AS [Interface]

, '/Orion/images/StatusIcons/Small-' + z.StatusName + '.gif' AS [_IconFor_Interface]

, '/Orion/Interfaces/InterfaceDetails.aspx?NetObject=I:' + ToString(InterfaceID) as [_LinkFor_Interface]

, 'Interface is ' + z.StatusName AS [Interface_Status]

FROM EOC.Interface i

INNER JOIN EOC.StatusInfo z on z.StatusID = i.Status

View solution in original post

Level 12

I'm trying this code in an EOC resource but I can't get the icons to display correctly.  Where should they be copied in EOC for this to work?

0 Kudos
Level 13

Try using '/images/Small-' instead of /Orion/images/StatusIcons/ for the path. The icons are located in a different directory for EOC as opposed to Orion.

0 Kudos
Level 12

That did the trick, thanks!  Is there a way to put a couple extra spaces between the icon and the caption?

0 Kudos

You can try to use this but mileage may vary

Blah blah as

,' ' + nodes.caption AS

0 Kudos
Level 13

Using this worked great! We now have the interfaces with status Icon and link to the interface details page working. I appreciate your help here. We've hit another snag but I'll post that in another thread as this one has been answered. Much appreciated!

0 Kudos