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

SWQL - Application StatusLED

Jump to solution

I'm working on a SWQL custom query for a widget that will show me all our applications in a "down-ish" mode.  It works great, except I can't get the StatusLED to display for the application.  Any ideas as to what the key might be to fixing this?

pastedImage_5.png

SELECT ACP.Application.StatusDescription, ACP.Application.Name as ApplicationName, Ticket, ACP.Application.Node.Caption as Node, 'https://orion.uwsp.edu/Orion/NetPerfMon/NodeDetails.aspx?NetObject=N:' + ToString(ACP.Application.NodeID)  as [_LinkFor_Node],'/Orion/images/StatusIcons/Small-' +  ACP.Application.node.StatusLED AS [_IconFor_Node], 'https://orion.uwsp.edu/Orion/NetPerfMon/NodeDetails.aspx?NetObject=AA:' + ToString(ACP.Application.ApplicationID)  as [_LinkFor_ApplicationName],  '/Orion/images/StatusIcons/Small-' + ACP.Application.StatusLED AS [_IconFor_ApplicationName]

FROM Orion.APM.ApplicationCustomProperties ACP

Where ACP.Application.Status <> 1 and ACP.Application.Status <> 9 AND ACP.Application.Status <> 12 and ACP.Application.Status <> 14

Order by ACP.Application.Node.Nodename, ACP.Application.name

0 Kudos
1 Solution

This is the syntax I use for status icons on applications

,'/Orion/images/StatusIcons/Small-' + a.StatusDescription + '.gif' AS [_IconFor_Application]

- Marc Netterfield, Github

View solution in original post

7 Replies

Having looked at it properly this morning I can see why your struggling. You are looking for StatusLED, but Orion.APM.Application doesn't have one, it has StatusDescription, so make your line:

'/Orion/images/StatusIcons/Small-' + ACP.Application.StatusDescription  + '.gif' AS [_IconFor_ApplicationName]

OR

'/Orion/APM/images/StatusIcons/Small-App-' + ACP.Application.StatusDescription  + '.gif' AS [_IconFor_ApplicationName]

The second one will be the Application status Icons, the first is just the standard Up/Down icons.

- David Smith

I’m on my iPad so I can’t check, but I suspect it’s because you need a TOSTRING At the front of the syntax for your Icon.

Also, Is there a StatusLED field in ApplicationCustomProperties? From memory the last time I did app status it was a different location for the images and I had to add the .gif myself. I will check tomorrow.

- David Smith
0 Kudos

This is the syntax I use for status icons on applications

,'/Orion/images/StatusIcons/Small-' + a.StatusDescription + '.gif' AS [_IconFor_Application]

- Marc Netterfield, Github

View solution in original post

One more question - do you know what the field StatusIconHint is for?  I can't find anything on THWACK for it.

0 Kudos

To be honest it seems like something internal that isn't in regular use, I have checked a bunch of tables and it is null everywhere.  I try to avoid even looking at the inherited properties (the ones that show up in green in swql studio) because they are inconsistent at best.  Most tables have them, and most of them are blank or placeholders or formatted in ways that makes them not useful for the stuff I do.  Turns out that statusled is one of those inherited properties for all the tables in APM, but it is a real column in orion.nodes

- Marc Netterfield, Github
0 Kudos

Thank-you!  Exactly what I was looking for!

pastedImage_0.png

SELECT ACP.Application.Name as ApplicationName, Ticket, ACP.Application.Node.Caption as Node, 'https://orion.uwsp.edu/Orion/NetPerfMon/NodeDetails.aspx?NetObject=N:' + ToString(ACP.Application.NodeID)  as [_LinkFor_Node],'/Orion/images/StatusIcons/Small-' +  ACP.Application.node.StatusLED AS [_IconFor_Node], 'https://orion.uwsp.edu/Orion/NetPerfMon/NodeDetails.aspx?NetObject=AA:' + ToString(ACP.Application.ApplicationID)  as [_LinkFor_ApplicationName], '/Orion/images/StatusIcons/Small-' + ACP.Application.StatusDescription + '.gif' AS [_IconFor_ApplicationName]

FROM Orion.APM.ApplicationCustomProperties ACP

Where ACP.Application.Status <> 1 and ACP.Application.Status <> 9 AND ACP.Application.Status <> 12 and ACP.Application.Status <> 14

Order by ACP.Application.Node.Nodename, ACP.Application.name

0 Kudos

There you go jdumke​ the syntax above should work for you just change your query to incorporate this

Thx mesverrum

- David Smith
0 Kudos