We want to pull the list of robots in our UIM Infrastructure to match with our CMDB and validate if we have everything we should.
In the past, I was instructed to use a query to also pull the probes using tables CM_NIMBUS_ROBOT and CM_NIMBUS_PROBE
However, I noticed that the number of robots CM_NIMBUS_ROBOT table returns is much more than those shown on Admin Console per hub.
Is there any other field used to filter active robots on Admin Console? Should we pull this information from a different table?
--This query will display the currently 'ACTIVE' robots:
This query uses the latest sampletime from the s_qos_snapshot table.
select distinct robot from s_qos_data sqd where table_id
in(select table_id from s_qos_snapshot WHERE (CAST(sampletime as datetime) ) >= DATEADD(HOUR, -2, GETDATE())) ;
or
select robot from s_qos_data where table_id
in(select table_id from s_qos_snapshot WHERE sampletime >= DATEADD(HOUR, -2, GETDATE())) group by robot;
Ideally both queries should retrieve the same count.
You can adjust the number of hours to suit your needs, as you may or may not be aware that some robots have been purposely disabled or decommissioned. Note that if you have an HA robot it will not be included in the count since no QOS is being generated by the HA robot when the Primary is active.