Introduction:
I need to create a query to return all assets on which the hardware inventory collect task has not run in X days. In the DSM Explorer, I can only create a query based on the status of the collect task, not it's last run date.
Is there a way to achieve this?
Background:
The query below can aid administrators troubleshooting agents that are having issues with the hardware scan
and help locate machine where agents are not sending data in X number of days.
This helps save time of having to look at the last run date under each agent in the CA Client Automation DSM Explorer screen.
Environment:
CA Client Automation - All Versions
Instructions:
<Please see attached file for image>
Example for 5 days:
AND DATEDIFF(ss,'19700101',GETUTCDATE())-stdate>86400*5
<Please see attached file for image>
The query is updated to return machines which have not executed the collect task "Inventory Configuration" in 5 days.
Note: 86400 is the number of seconds in a day.
In the following screenshots, the query returns one machine on which the collect job has not run for more than 5 days.
The collect tasks listing shows that the inventory collection has not run on this machine since July 27, 2014.
<Please see attached file for image>
<Please see attached file for image>