Quantcast
Channel: THWACK: All Content - Network Performance Monitor
Viewing all articles
Browse latest Browse all 21870

Custom Query to get not acknowledged Hardware Warnings

$
0
0

Hi,

 

I have the following custom query that works with the mssql database.

 

SELECT
[SolarWindsOrion].[dbo].[Nodes].[NodeID],
[SolarWindsOrion].[dbo].[APM_HardwareItem].[ID],
[SolarWindsOrion].[dbo].[Nodes].[Caption],
[SolarWindsOrion].[dbo].[Nodes].[ObjectName]
FROM [SolarWindsOrion].[dbo].[Nodes]
INNER JOIN [SolarWindsOrion].[dbo].[APM_HardwareItem]
ON [SolarWindsOrion].[dbo].[APM_HardwareItem].[NodeID] = convert(varchar(5),[SolarWindsOrion].[dbo].[Nodes].[NodeID])
INNER JOIN [SolarWindsOrion].[dbo].[AlertStatus]
ON [SolarWindsOrion].[dbo].[AlertStatus].[ActiveObject] = convert(varchar(5),[SolarWindsOrion].[dbo].[APM_HardwareItem].[ID])
WHERE [SolarWindsOrion].[dbo].[Nodes].[ChildStatus] = 3 AND [SolarWindsOrion].[dbo].[AlertStatus].[Acknowledged] = 0

 

This query returns all hardwareitems that have an unacknowledged hardware status. When I paste this query to the custom query it will not work. Does anybody have an idea how to get the result using the swsql custom query?

 

It is ugly to convert the nodeid to varchar but it is necessary because APM_HardwareItem.NodeID is a varchar. Why? It is not very useful to have an int as varchar.

 

Regards

Hans


Viewing all articles
Browse latest Browse all 21870

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>