How to show just the Monitored Devices in a Dashboard How to just monitored Devices in a Dashboard?
select cs.ip,cs.name,cs.dedicated,cs.dns_name from CM_COMPUTER_SYSTEM cs order by name
But it shows all Devices not just the monitored ones
CM_COMPUTER_SYSTEM table shows ALL devices as Monitored with value '4'
so may need to tie in S_QOS_SNAPSHOT to see which have current data. then again what if they have some systems monitored but just for alarms and no qos
Release : 20.x
Component : UIM Operator Console - Inventory
As per UIM, if a system generated any QoS data in the last 30 minutes then we consider that as a monitored device. Here we don't consider the systems which are monitored just for alarms.
Here is the query we can use in dashboards to get all monitored devices.
SELECT DISTINCT cs.cs_id, cs.name
FROM CM_COMPUTER_SYSTEM cs
JOIN CM_DEVICE d
ON cs.cs_id = d.cs_id
JOIN CM_CONFIGURATION_ITEM ci
ON d.dev_id = ci.dev_id
JOIN CM_CONFIGURATION_ITEM_METRIC cim
ON ci.ci_id = cim.ci_id
JOIN S_QOS_DATA sqd
ON cim.ci_metric_id = sqd.ci_metric_id
JOIN S_QOS_SNAPSHOT sqs
ON sqd.table_id = sqs.table_id AND CAST(sqs.sampletime as datetime) >= DATEADD(MINUTE, -30, CURRENT_TIMESTAMP)
As per UIM, if a system is generated any QoS data in S_QOS_SNAPSHOT table in the last 30 minutes then we consider that as a monitored device. Here we don't consider the systems which are monitored just for alarms.
So the monitoring devices count is not always consistent. Because of the above rule the count of monitoring devices will vary time to time, based on the availability of the last snap shot data stored in the last 30 minutes in the S_QOS_SNAPSHOT table.