This discussion has been locked. The information referenced herein may be inaccurate due to age, software updates, or external references.
You can no longer post new replies to this discussion. If you have a similar question you can start a new discussion in this forum.

How to insert the status icon for interfaces into SWQL resource

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?

  • 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

  • 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.

  • 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

  • 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!

  • 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?

  • 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.

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

  • You can try to use this but mileage may vary

    Blah blah as

    ,' ' + nodes.caption AS