4. Managing Groups
4.1. About Groups
Table 6. Types of Groups
| Type | Description | Static or Dynamic |
|---|---|---|
| Mixed groups | Contains resources of any resource type. There is no limit to how many or what types of resources can be placed into a mixed group. Mixed groups are useful for granting access permissions to users for a set of grouped resources. | Static |
| Compatible groups | Contains only resources of the same type. Compatible groups make it possible to perform an operation against every member of the group at the same time, removing the need to individually upgrade multiple resources of the same type, or perform other operations one at a time on resources across the entire enterprise. | Static |
| Recursive groups | Contains all the descendant, or child, resources of resources within the group. Recursive groups show both the primary member availability and the child resource availability. | Static (members) and dynamic (children) |
| Autogroups | Shows every resource as part of a resource hierarchy with the platform at the top, and child and descendant resources below the platform. Child resources of the same type are automatically grouped into an autogroup. | Dynamic |
4.1.1. Dynamic and Static Groups
4.1.2. About Autogroups

Figure 28. PostgreSQL Autogroup
4.1.3. Comparing Compatible and Mixed Groups

Figure 29. Compatible Group Entry

Figure 30. Mixed Group Entry
4.2. Creating Dynamic Groups
Note
4.2.1. About Dynamic Groups Syntax
4.2.1.1. General Expression Syntax
expression 1 exprA1 exprA2 groupby exprB1 groupby exprB2 expression 2 exprA2 exprA1 groupby exprB2 groupby exprB1
Note
Table 7. Dynamic Group Properties
| Type | Supported Attributes | ||||||
|---|---|---|---|---|---|---|---|
| Related to the resource itself | |||||||
|
resource
|
| ||||||
| Related to the resource type | |||||||
|
resourceType
|
| ||||||
| Related to the resource configuration | |||||||
|
plug-inConfiguration
|
Any plugin configuration property
| ||||||
|
resourceConfiguration
|
Any resource configuration property
| ||||||
| Related to the resource monitoring data | |||||||
|
traits
|
Any monitoring trait
| ||||||
|
availability
|
The current state, either UP or DOWN
| ||||||
resource.attribute, then it applies to the resource which will be a member of the group. However, it is possible to use an attribute in an ancestor or child entry to identify a group member recursively.
resource.id = 10001
resource.parent:
resource.parent.id = 10001
- resource
- resource.child
- resource.parent
- resource.grandParent
4.2.1.2. Simple Expressions
resource.attribute[string-expression] = value
resource.parent.type.category = Platform
resource.trait is the generic resource attribute, and a sub-attribute like partitionName identifies the actual parameter.
empty keyword searches for resources which have a specific attribute with a null value:
empty resource.attribute[string-expression]
empty keyword is used, then there is no value given with the expression.
not empty keyword, which looks for every resource with that attribute, regardless of the attribute value, as long as it is not null. As with the empty keyword, there is no reason to give a value with the expression, since every value matches the expression.
not empty resource.attribute[string-expression]
4.2.1.3. Pivot Expressions
groupby keyword:
groupby resource.attribute
parent.name attribute creates a unique group based on every parent resource.
groupby resource.parent.name

Figure 31. Resources and Parents
4.2.1.4. Compound Expressions
resource.parent.type.category = Platform
resource.parent.type.category = Platform resource.name.contains = JBossAS
groupby resource.type.plugin groupby resource.type.name groupby resource.parent.name
resource.type.category = server groupby resource.type.plugin groupby resource.type.name groupby resource.parent.name
resource.type.plugin = JBossAS resource.type.name = JBossAS Server empty resource.pluginConfiguration[principal]
4.2.1.5. Dynagroup Expression Examples
Table 8. Dynagroup Examples
| Description | Expression |
|---|---|
| JBoss clusters |
resource.type.plugin = JBossAS resource.type.name = JBossAS Server groupby resource.trait[partitionName] |
| Each operating system type |
resource.type.plugin = Platforms resource.type.category = PLATFORM groupby resource.type.name |
| All autogroups
Note
This could create a large number of groups in large inventories.
|
groupby resource.type.plugin groupby resource.type.name groupby resource.parent.name |
| Just raw measurement tables |
resource.type.plugin= Postgres resource.type.name = Table resource.parent.name = rhq Database resource.name.contains = rhq_meas_data_num_ |
| Just agents configured with multi-cast server detection |
resource.type.plugin= RHQAgent resource.type.name = RHQ Agent resource.resourceConfiguration[rhq.communications.multicast-detector.enabled] = true |
| Just Windows platforms with event tracking |
resource.type.plugin= Platforms resource.type.name = Windows resource.pluginConfiguration[eventTrackingEnabled] = true |
| JBoss AS servers grouped by machine |
groupby resource.parent.trait[Trait.hostname] resource.type.plugin = JBossAS resource.type.name = JBossAS Server |
4.2.2. Creating Dynamic Groups
- Click the Inventory tab in the top menu.
- In the Groups menu box on the left, click the Dynagroup Definitions link.

- Click the button to open the dynamic group definition form.

- Fill in the name and description for the dynamic group. The name can be important because it is prepended to any groups created by the definition, as a way of identifying the logic used to create the group.

- Fill in the search expressions. This can be done by entering expressions directly in the Expression box or by using a saved expression.Saved expressions are have a wizard to help build and validate the expressions. To create a saved expression, click the green button by the drop-down menu. Several options for the expression are active or inactive depending on the other selections; this prevents invalid expressions.
The Expression box at the top shows the currently created expression. - After entering the expressions, set whether the dynamic group is recursive.
- Set an optional recalculation interval. By default, dynamic groups do not recalculate their members automatically, meaning the recalculation value is set to 0. To recalculate the group membership, set the Recalculation interval to the time frequency, in milliseconds.
Note
Recalculating a group definition across large inventories could be resource-intensive for the JBoss ON server, so be careful when setting the recalculation interval. For large inventories, set a longer interval, such as an hour, to avoid affecting the JBoss ON server performance.
4.2.3. Recalculating Group Members
- Click the Inventory tab in the top menu.

- In the Groups menu on the left, click the Dynagroup Definitions link.
- In the list of dynagroups, select the row of the dynagroup definition to calculate.

- Click the Recalculate button at the bottom of the table.
4.3. Creating Groups
- Click the Inventory tab in the top menu.
- In the Groups box in the left menu, select the type of group to create, either compatible or mixed.Compatible groups have resources all of the same type, while mixed groups have members of different types. The differences in the types of members means that there are different ways that compatible and mixed groups can be managed, as covered in Section 4.1.3, “Comparing Compatible and Mixed Groups”.

- Enter a name and description for the group.
Marking mixed groups recursive can make it easier to manage resources, particularly when setting role access controls. For example, administrators can grant users access to the mixed group and automatically include any child resources of the member resources.Note
Be very cautious before marking a compatible group as a recursive group. Recursive groups automatically import all children of the members, and if the children are a different resource type than the parent, then the compatible group becomes a mixed group. This limits the management options for the group because group operations, metrics, and configuration changes are only available for compatible groups. - Select the group members. It is possible to filter the choices based on name, type, and category.

4.4. Changing Group Membership
- In the Inventory tab in the top menu, select the compatible or mixed groups item in the Groups menu on the left.

- Click the name of the group.
- Open the Inventory tab for the group, and open the Members submenu.
- Click the button at the bottom of the page.

- Select the resources to add to the group from the box on the left; to remove members, select them from the box on the right. Use the arrows to move the selected resources. To select multiple resources, use Ctrl+click.

- Click the button.
4.5. Editing Compatible Group Connection Properties
- If all of the resources in the group have identical values for a property, the group connection property is that exact value.
- If even one resource has a different value than the rest of the resources in the group, that property will have a special marker value of ~ Mixed Values ~.
- In the Inventory tab in the top menu, select the Compatible Groups item in the Groups menu on the left.

- Click the name of the compatible group.
- Open the Inventory tab for the group, and click the Connection Settings sub-item.
- To edit a property, click the green pencil by the field.

- To change all resources to the same value, click the Unset checkbox for the field Set all values to.... To change a specific resource, click the Unset checkbox for that resource and then give the new value.

Note

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.