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?
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.
CA Client Automation - All Versions
- Create a query using the Query Designer with 'Computer's as target as below:
Collect Task 'Inventory Configuration', Status text = 'OK'
- This will return computers on which the collect task has been run successfully.
- In the Query Designer, right-click on the argument and select "Edit SQL".
- Add following string at the end, just before the closing bracket ')'.
Example for 5 days:
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.