Hello,
I have a request to show the current response time vs the average. Has anyone created a resource using the custom query resource that mirrors the data from the built in "Nodes with High Response Time"?
I modified a "Down Nodes" query I wrote years ago and I'm unsure why it isn't working. Can someone take a look? Also, is there a way to turn the text red like the built in resource does?
SELECT NodeName AS [Node Name], '/Orion/images/StatusIcons/Small-' + StatusIcon AS [_IconFor_Node Name], DetailsUrl AS [_LinkFor_Node Name],MinResponseTime AS [Minimum], ResponseTime AS [Current], MaxResponseTime AS [Maximum], PercentLoss AS [% Loss]FROM ORION.NODES NODESGROUP BY NodeName, StatusIcon, DetailsUrl, MinResponseTime, ResponseTime, MaxResponseTime, PercentLossORDER BY ReponseTime DESC
Not sure if there is a text/font glitch or something but the following works for me when I retyped it out (copy/pasting your query errored out on ResponseTime).
SELECT NodeName AS [Node Name], '/Orion/images/StatusIcons/Small-' + StatusIcon AS [_IconFor_Node Name], DetailsUrl AS [_LinkFor_Node Name], TOSTRING(MinResponseTime) + ' ms' AS [Minimum], TOSTRING(ResponseTime) + ' ms' AS [Current], TOSTRING(AvgResponseTime) + ' ms' AS [Average], TOSTRING(MaxResponseTime) + ' ms' AS [Maximum], TOSTRING(PercentLoss) + ' %' AS [% Loss]FROM Orion.NodesORDER BY ResponseTime DESC
This is the only way I know to change the font colour/size in the Custom Query resource. It involves replacing the out-of-the-box Custom Query widget with a modified one that accepts HTML and you can apply a style with a CASE statement. I haven't tried it myself and not sure if it's still valid in the newer versions with the increased security.
thwack.solarwinds.com/.../custom-query-resource-with-colors-and-styles
You'd probably need a CASE statement for the down/unmanaged nodes to replace the text with "No response" or "Unmanaged" if you don't want the -1/-2 ms values.
Thanks! It looks to have worked. How would I filter out any nodes with 'Satellite' in the node name/caption? I'm assuming it is a WHERE clause, but I'm not sure how to filter it.
On the built in high response time resource I'm using the following SWQL query:
Nodes.Caption not like '%Satellite%'
Yes, you should be able to put a WHERE line between the FROM and ORDER BY lines.
SELECT NodeName AS [Node Name], '/Orion/images/StatusIcons/Small-' + StatusIcon AS [_IconFor_Node Name], DetailsUrl AS [_LinkFor_Node Name], TOSTRING(MinResponseTime) + ' ms' AS [Minimum], TOSTRING(ResponseTime) + ' ms' AS [Current], TOSTRING(AvgResponseTime) + ' ms' AS [Average], TOSTRING(MaxResponseTime) + ' ms' AS [Maximum], TOSTRING(PercentLoss) + ' %' AS [% Loss]FROM Orion.NodesWHERE Caption NOT LIKE '%Satellite%'ORDER BY ResponseTime DESC