-
Re: How to insert the status icon for interfaces into SWQL resource
bluefunelemental Apr 9, 2014 8:12 AM (in response to dkeyser)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
-
Re: How to insert the status icon for interfaces into SWQL resource
dkeyserApr 9, 2014 11:15 AM (in response to bluefunelemental)
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.
-
Re: How to insert the status icon for interfaces into SWQL resource
bluefunelemental Apr 9, 2014 12:03 PM (in response to dkeyser)1 of 1 people found this helpfulDecided 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
-
Re: How to insert the status icon for interfaces into SWQL resource
dkeyserApr 10, 2014 10:13 AM (in response to bluefunelemental)
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!
-
Re: How to insert the status icon for interfaces into SWQL resource
rsprimMar 2, 2015 5:33 AM (in response to bluefunelemental)
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?
-
Re: How to insert the status icon for interfaces into SWQL resource
dkeyserMar 2, 2015 9:09 AM (in response to rsprim)
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.
-
Re: How to insert the status icon for interfaces into SWQL resource
rsprimMar 2, 2015 3:46 PM (in response to dkeyser)
That did the trick, thanks! Is there a way to put a couple extra spaces between the icon and the caption?
-
Re: How to insert the status icon for interfaces into SWQL resource
bluefunelemental Mar 2, 2015 4:41 PM (in response to rsprim)You can try to use this but mileage may vary
Blah blah as
,' ' + nodes.caption AS
-
-
-
-
-
-