You can create resource group templates to generate resource groups, which search your
topology database for instances that match its conditions. These resource groups are then listed on
the Resource management page.
Before you begin
You must have the admin role inasm_admin assigned to you. See the Configuring DASH user roles topic for more
information.
About this task
You can create a new template, or edit or delete an existing template.
To create a new template, you construct a topology view centered around a seed resource. This
lets you search your database for topologies with resources and relationships that match the
conditions defined in the template.
These defined topologies are dynamically generated, maintained and updated, and can be searched
for and accessed via the Resource management page. Resource groups are dynamically refreshed when accessed.
- Dynamic changes to resource group
- If edges or resources are removed that render an existing resource group that has already been
indexed incomplete, it will remain available, and can therefore still be found and displayed via the
search functionality, or via a previously created direct URL.
- If edges or resources are added or changed that render a resource group that was not indexed
previously complete, the resource group will be indexed automatically, thereby becoming accessible
via the search service.
Restriction: If you delete a template and
associated rule, and then immediately recreate the same template and rule with the
same name,
the resource groups are not dynamically recreated when an observer job is run. To avoid this, do one
of the following:
- Before recreating the template and rule with the same name, run an observation to remove
the initial
groupTokens
parameter from the resources. If you then recreate the
template and rule following this step, the new groupTokens
parameter will be
applied and the desired resource groups will be recreated during any subsequent observations.
- Alternatively, give the new template a different name.
Tip: Searching for and then rendering resources is described in more detail in the
Search
section of the UI reference topic.
Template types: Choose from the different template types to group your resources.
- Dynamic template
- A dynamic template automatically finds and updates multiple resource groups based on your
criteria, and on how your applications and infrastructure change.
- A dynamic template builds multiple resource groups that are similar to the specified seed
resource, and relationship or resource type criteria. Resource group creation and membership is
dynamically maintained based on the available topology data and how it changes.
- For example, you can use a dynamic template to create dynamic resource groups, one for each of
your virtual machines and the Kubernetes services they are running. Resource groups are then added,
removed, and updated as you add or remove virtual machines or services running on them.
- Tag-based template
- This template creates and updates a single resource group containing the resources that have a
specified set of tags.
- Resource group membership is dynamically maintained to reflect changes in the topology for
resources that gain or lose the specified tags.
- For example, you can use a tag-based template to create a dynamic resource group tagged with
both 'red' and 'green'. Then, when you add new resources with both of those tags, the resource group
will be updated to include them.
- Token templates
- A token template applies rules to resources as they are received via observer jobs.
- Token templates are based on rules which use resource parameters as tokens, whose values then
become group names for groups which will contain the resources to which each rule is applied. A
distinct group is created for each token value.
- To form group names from multiple resource property values, you can construct rule tokens using
variable substitution (as is possible with all rules).
- Exact template
- An exact template creates and updates a single resource group centered on a specified
seed resource, on your criteria, and on how your applications and infrastructure change.
- The membership of the resulting resource group includes the seed resource and those matching the
specified relationship or resource type criteria. Resource group membership is dynamically
maintained for the resulting resource group provided the specified seed resource type remains
unchanged.
- For example, you can use an exact template to create a resource group only for a specific
Jenkins build pipeline, any new builds or physical servers, and its connected network switch.
- As a further refinement, you can adjust your layout by
manually positioning the resources in the topology, and this layout is then replicated when you
generate a resource group from any exact template that you build from this topology.
Procedure
Access the Resource group templates page
- Log in to the console.
-
From the main navigation, click
.
The Topology management
page is displayed.
- Click Configure on the Group templates
card.
The
Resource group templates page is displayed listing existing
templates in a table format by name, type, number of resource groups, description, user, and date
modified.
Tip: To reduce the number of templates displayed in the table, use the
Filter table text field. The items displayed are filtered as you enter the
search text.
From here, you can perform the following actions:
- To reload the templates, click Refresh (top right). This can be useful if
other users are customizing the templates.
- To delete an existing template, select it in the table, then click Delete topology
template. If you intend to recreate the template, be aware of the restrictions.
- To edit an existing template, select it in the table, then click Edit topology
template.
Note: When you edit an existing template, the template definition and topology
areas are already populated. Also, the Name and Type
parameters cannot be edited. You edit the other parameters as for a new template, and when you do,
the template definition and topology areas will change. If you require a template with a different
name, you must create a new template.
- To create a new template, click Create a new template (top right). You
are presented with a choice of template types. Select either a Dynamic,
Tag based, Token, or Exact
template, then click
Start.
Define a template
The Template
builder page is displayed, consisting of a topology view area on the right, and a number
of template definition fields on the left.
-
For new templates, enter a unique Template name (required).
- Enter/edit the Description (optional).
-
For new templates, select an existing type from the Resource group type
drop-down, or select Custom type from the drop-down.
If you select Custom type, a new text box opens, where you type a name for your new resource
group type.
- Define a resource group name or naming pattern.
- For tag templates
- Provide a resource group name.
- For token templates
- No resource group name is defined, as groups are automatically named based on the rule
tokens.
- For Dynamic and Exact templates
- The seed name of the resource group is used when a resource group is generated, but you can
define either a prefix, suffix, or both to create an appropriate name for each of the dynamically
generated resource group.
-
Remember: Although an exact template type focuses on a single resource, it remains
dynamic, which means as long as the seed resource itself remains unchanged, the defined topology can
change through the removal or addition of connected resources or relationships.
-
Choose an icon to associate with the template from the drop-down, or click
(+) to create a new icon.
All resource groups based on this template will display the icon.
- Enable or disable correlation of event groups on topologies:
For more information, see: Displaying analytics details for an event
group
-
Enter a tag to be appended to each resource group, then click Add
tag.
Restriction: The following special characters are
not supported when specifying
tags:
. ? + * | { } [ ] ( ) " \ # @ & < > ~
- Complete the following steps (depending on the type of template you are building):
- For Exact templates
- Select the Maintain displayed resource position toggle to use the exact
resource layout when generating a new resource group.
-
Remember: For exact templates, you can also create a view with an exact layout in the
Topology viewer and then use the context menu to create the template.
- For Dynamic, Tag and Exact templates
- Use Search for a seed resource (or tag).
-
- As you insert your cursor into the Search field, the five most recent searches are listed and
can be selected. You can delete a recent search by clicking the delete button
(X) to the right of the suggested search.
- If you type in a search term, suggested search results are listed, which contain results both
from the topology database and from recent searches, with your entered search text highlighted.
- When you select a search result, the found resources are listed by 'Resource name', 'Type' and
'Tags'. You can expand a resource to display its properties and values, or click its name to render
a basic topology view centered around the resource as seed. The topology is displayed on the right
of the Template builder.
- For Token templates
- Use the right hand side of the screen to define a new rule.
-
- Details
- Enter a unique Name for the rule.
- Define the Tokens for the rule, then click Add+.
You
can use variable substitution to combine more than one property value if required.
- Conditions
- Select observers to which this rule applies from the Observer name
drop-down, or leave empty for all observers.
- Select providers to which this rule applies from the Provider name
drop-down, or leave empty for all providers.
- Select resource types to which this rule applies from the Resource type
drop-down, or leave empty for all resource types.
- Set the Token filter mode to either Exclude or
Include, then define a filter (or filters) in the format of a regular
expression.
- Exclude
- Tokens which match any one of the expressions will not be applied to resources.
- Include
- Only tokens which match one of the expressions will be applied to the applicable
resources.
- Optionally, you can validate the filters using the Validate token filters
button.
Refine the template (`Exact` and `Dynamic` templates
only)
-
Use the topology view tools to refine the topology.
Use the context (right-click) menu to view the resource's details, see which observer job
generated it and when, get its neighbors, or follow adjacent relationships. You can increase the hop
count, open a timeline view, or change its layout. For more information on working with topologies,
see the
Viewing a topology topic.
As you define the topology and with it the template conditions, a preview function
retrieves information from the topology database, indicating the number of matches.
Tip: The previous limit of 5,000 no longer applies, but you may want to consider that a large number of
matches will take longer to generate and maintain.
-
You can define additional tags and other optional elements for the template.
Preview and generate resource groups
- Depending on template type, complete the following steps.
- For `Exact`, `Dynamic` and `Tag` templates: You can preview the resource groups that
will be discovered by the template.
- Click Preview resource groups. A list of resource groups is displayed.
- Preview individual resource group topologies to verify that they meet your requirement. If they
do not, refine your template further.
- Once your template meets all of its required conditions, click Save template &
generate resource groups.
- For `Token` templates: A token template only applies its rules and creates groups as
new observations are received from its designated observers, and therefore cannot be previewed.
- Define a default layout for the resource groups.
When a resource group based on this template is selected in the Topology Dashboard, the
default layout you specify here is used.
Results
Resource groups created from the templates are saved in the topology database, and can be viewed
on the
Resource management page and the
Topology dashboard.
Remember: Resource groups are updated automatically when the topology database is updated, and generated
dynamically as they are displayed.
What to do next
Resource groups can be searched for by operators using the standard Search functionality,
and then accessed as topologies, or added to applications. Searching for and then rendering
resources is described in more detail in the Search
section of the UI reference topic, and in the Managing services and viewing topologies
topics.