How to check what Configuration Policies are applied to which Machine/Group?
search cancel

How to check what Configuration Policies are applied to which Machine/Group?

book

Article ID: 117133

calendar_today

Updated On:

Products

CA Client Automation - IT Client Manager CA Client Automation

Issue/Introduction

From DSM Explorer is possible to check what Configuration Policy is applied to every Group or Agent, but this has to be done manually clicking on each Group or Machine in the environment, there is no way to check this globally from the GUI.

How to check what Configuration Policies are applied to which Machine/Group?

Environment

Client Automation - 14.x

Resolution

The following query can re executed in order to do a match between Machine/Group and Configuration Policy:

select policy.dname, grp.dname
from csm_object policy
inner join csm_link link1 on policy.id=link1.child and policy.class=2000
inner join csm_object conf on link1.parent=conf.id
inner join csm_link link2 on link2.child=conf.id
inner join csm_object grp on grp.id=link2.parent

Having:

csm_class -- class definitions (e.g. 2000=policy, 200=group)
csm_link -- link table (between csm_objects, parent/child relationships)
csm_object -- configuration objects (organized by class)
csm_property -- properties relating to an object

Using the above definitions, the query can be modified in order to retrieve more information or add more columns.

 

 

Other SQL Queries :

Following SQL Query returns the links between Configuration Policies and groups :

SELECT distinct o1.name 'Policy Name', o3.name 'Group Name'
FROM csm_object o1
INNER JOIN csm_link l1 ON o1.id=l1.child
INNER JOIN csm_object o2 ON l1.parent=o2.id
INNER JOIN csm_link l2 ON l2.child=o2.id
INNER JOIN csm_object o3 ON l2.parent=o3.id
INNER JOIN ca_group_def g ON UPPER(g.label)=UPPER(o3.name COLLATE SQL_Latin1_General_CP1_CS_AS)
WHERE o1.class=2000 and o3.class=200
ORDER BY 1

Example :

 

Following SQL Query returns the direct links between Configuration Policies and Agents :

SELECT distinct o1.name 'Policy Name', o3.name 'Agent Name'
FROM csm_object o1
INNER JOIN csm_link l1 ON o1.id=l1.child
INNER JOIN csm_object o2 ON l1.parent=o2.id
INNER JOIN csm_link l2 ON l2.child=o2.id
INNER JOIN csm_object o3 ON l2.parent=o3.id
WHERE o1.class=2000 and o3.class=102
ORDER BY 1