How do I build a CA Client Automation Query to display agents where the collect task status is 'Waiting'?
search cancel

How do I build a CA Client Automation Query to display agents where the collect task status is 'Waiting'?

book

Article ID: 39883

calendar_today

Updated On:

Products

CA Automation Suite for Data Centers - Configuration Automation CA Client Automation - Asset Management CA Client Automation - IT Client Manager CA Client Automation CA Client Automation - Remote Control CA Client Automation - Asset Intelligence CA Client Automation - Desktop Migration Manager CA Client Automation - Patch Manager

Issue/Introduction

Question:  How do I build a CA Client Automation Query to display agents where the collect task status is 'Waiting'?

 

Environment:                                          

CA Client Automation - All Versions

 

Answer: 

The steps below will help to get the correct number of agents with the collect task status - 'Waiting'

 

1. In the Query Designer, click on 'Advanced Argument':

 

<Please see attached file for image>

Query Designer.png

 

2.   Enter the following values:

Pseudo text : Put a text eg: Inventory Configuration in Waiting

Table : -Any-

Additionnal WHERE clause :

SELECT object_uuid FROM (SELECT M.object_uuid, M.moname,M.agent_name,s.status, s.stcount, dateadd ( ss, stdate + datediff(ss,getutcdate(),getdate()), convert(datetime,'19700101')) 'Last Executed' FROM (SELECT DISTINCT m.moname,a.agent_name,a.object_uuid,m.moid, m.domainid FROM ncmodcfg m, linkmod l, ca_agent a WHERE m.moname like 'Inventory Configuration' and l.moid=m.moid and l.mdomid=m.domainid and ( (a.object_uuid=l.object_uuid and l.object_type=1) OR (l.object_type=0 and a.object_uuid in (SELECT m.member_uuid FROM ca_group_member m WHERE m.group_uuid=l.object_uuid)))) AS M LEFT JOIN statmod s ON (s.moid=M.moid and s.mdomid=M.domainid and s.object_uuid=M.object_uuid)) as M2 WHERE status=-1 OR status is NULL

 

Put the query in a single line. Do not cut it with carriage return. Replace 'Inventory Configuration' by the name of Inventory Configuration you want to query.

 

3.       The query will look like below as shown in the screenshot:

 

<Please see attached file for image>

Query Designer 2.png

 

This should return the machines with a 'Waiting' status for the Inventory Configuration Module.

 

<Please see attached file for image>

Query Designer 3.png

 

Environment

Release: UASIT.99000-12.9-Asset Intelligence
Component:

Attachments

1558719614088000039883_sktwi1f5rjvs16ve8.png get_app
1558719612187000039883_sktwi1f5rjvs16ve7.png get_app
1558719610013000039883_sktwi1f5rjvs16ve6.png get_app