Tags simplify searches for related services, process groups, and hosts in your environment. They also facilitate the collection of related metrics into meaningful groups for analysis. Tags can also be used to develop custom dashboard charts for your server-side services, process groups, or hosts and to assign responsibility to specific team members or groups.
To support tagging, Dynatrace provides both a manual approach (Settings > Tags > Manually applied tags) and an automated, rule-based approach (Settings > Tags > Automatically applied tags).
Dynatrace offers two ways to manually attach a tag to an entity. The first way is to select the respective option from the navigation menu:
- Go to Settings > Tags > Manually applied tags.
- Type in a tag in the text box.
- Click Add. Your tag will be alphabetically inserted in the list below.
- Select your newly created tag to manually apply it to the desired entities.
- From the listed entities eligible for tagging, select the entities you want to apply your tag to by clicking the respective tick box on the right. You can filter the entities appearing in the list by their type (e.g. service, process, etc. ) or based on whether they are tagged. You can also use the search mechanism to search for a specific entity.
- When you are finished, click Done.
Alternatively, you can manually attach a tag to an entity through its overview page.
- Go to the overview page of the entity by selecting the corresponding entity category (e.g. Transactions & services) from the navigation menu and selecting the entity you want to tag.
- Expand the Properties and tags.
- Click Add tag.
- Type in a tag for this entity.
- Click Add.
In dynamic or large environments, manual tagging can be impractical. In such cases, it’s recommended that you use automated, rule-based tagging. Automatically applied tags behave just like the manually-applied, except they’re applied automatically to new entities that match defined rules. Automatically applied tags can’t be removed manually from individual services, process groups, or hosts. Automatically applied tags are removed automatically once an entity no longer matches a defined rule.
Note: You can also set up automated tagging of the entities in your environment using the Smartscape and topology API.
How to define an automatically applied tag
To define an automatically applied tag:
Go to Settings > Tags > Automatically applied tags.
Type a name for the new tag in the Add new custom tag field and click the Add button to add your new tag. The newly created tag then appears in the list below.
Select the newly defined tag to define rules for the tag.
Click Add new rule.
From the first list box, choose whether you want to apply the rule to a service, a process group, or a host.
Optionally restrict the rule to a specific process group, technology, or service type using the respective drop lists (see image below).
You can add one or more conditions to the rule that the entity (i.e., service, process group, or host) must meet before the tag is applied by clicking Add condition. Conditions check for specific values of any property that is available within the Conditions drop list on the left.
For example, a condition for a service can be based on the Web application ID. Select equals from the drop list and type the specific ID in the text field. To find the correct Web application ID or other property of a service, go to the service's page by selecting Transactions & services from the navigation menu. Select the service you want and expand the Properties and tags section (see below).
You can also propagate a rule to the underlying entities (i.e., process groups and hosts in case of services) by selecting the corresponding check boxes at the bottom of the rule.
Click the Preview button to verify the results returned by the specific rule. Note that to be tagged, an entity must meet all the specified conditions of a rule.
Click Save to save the rule. You can define multiple rules for each tag. Rules are executed in order. You can change the order in which rules are applied by clicking the Move up/down arrows. You can edit or delete a defined rule or activate/deactivate a rule at any time via the Off/On switch.
To save your tag, click Done at the top of the page.
When you select a tag, you can see the rules currently defined for the tag as well as the entities that match all the defined rules in the Matching entities area (an OR relationship exists between rules). Automatically applied tags are applied to all existing and newly detected entities (i.e., services, process groups, or hosts). Note that it can take up to a minute before your new tag is applied. Once a tag is applied to an entity, the tag is listed on that entity's page. For example, with services, each new tag is listed on the service's page within the Properties and tags section (see image above).
Automatically applied tags cannot be used in conditions for automated rule-based tagging.
Service and process group properties available for tagging
The service and process group properties available for tagging vary based on technology type.
To find out which properties a service provides:
- Select Transactions & services from the navigation menu.
- Select the service that you want to tag.
- Click Properties and tags to display the available properties.
To find out which properties a process group provides
- Select Hosts from the navigation menu.
- Select the host that includes the process group you want to tag.
- Click Properties and tags to display the available properties.
Properties supported by Dynatrace for automated tagging
- Custom service class name
- Database name
- Database topology
- Database vendor
- Detected service name
- Endpoint path
- Public domain name
- Service name
- Service port
- Service tags
- Web application ID
- Web context root
- Web server host
- Web server name
- Web service name
- Web service namespace
- Apache Spark master IP address
- Apache configuration path
- Azure host name of process
- Azure site name of process
- Catalina base
- Catalina home
- Cloud Foundry application
- Cloud Foundry instance index
- Cloud Foundry space
- Cloud Foundry space ID
- ColdFusion JVM configuration file
- ColdFusion service name
- Detected group name
- Detected process name
- Docker container name
- Docker image name
- Dotnet command
- Dynatrace custom cluster ID
- Dynatrace custom node ID
- Elasticsearch cluster name
- Elasticsearch node name
- EXE name
- EXE path
- GlassFish domain name
- GlassFish instance name
- IIS application pool
- IIS role name
- JBoss home
- JBoss mode
- JBoss server name
- Java JAR file
- Java JAR path
- Java main class
- Kubernetes base pod name
- Kubernetes container name
- Kubernetes full pod name
- Kubernetes namespace
- Kubernetes pod uid
- Listen port
- Node.js application name
- Node.js script name
- Process group name
- Process name
- Ruby application root path
- Ruby script path
- Varnish instance name
- WebLogic home
- WebLogic name
- WebSphere cell name
- WebSphere cluster name
- WebSphere node name
- WebSphere server name
- AWS availability zone
- Azure SKU
- Azure compute mode
- Azure web application host name
- Azure web application site name
- Cloud type
- Detected AWS Availability Zone
- Detected host name
- EC2 Instance ID
- Host IP address
- Host group name
- Host name
- Host tags
- Hypervisor type
- Local EC2 host name
- OS type
- OS version
- PaaS type
- Public EC2 host name
Rule examples for defining automatically applied tags
The image below shows two rules. The first rule filters services that are of type Web service, running on Tomcat, that include the string
BB in their process group names. The second rule returns services that run on Tomcat and whose Web application ID contains the word
The rule example below matches all services that are built on Java-based service technologies, run in a Cloud Foundry space called
development, have the PaaS setup type
cloud foundry, and include the string
spring within their detected process group name.
The example below shows a rule that applies a tag to all Azure websites services on process groups where the Detected group name does not begin with
IIS app pool ~.
The image below shows a rule that tags specific process groups through the selection of the checkbox—thereby additionally applying the tag to the underlying hosts.
The Host tab includes the hosts to which the tag has been propagated (see image below).
Examples of how to use tags
Service, process group, and host tags can be leveraged in a number of ways. Two examples are detailed below.
Narrow down your analysis
You can use tags to narrow the focus of your analysis to a specific set of services. Go to Transactions & services in the navigation menu. Filter the services based on the criteria listed on the left (State, Service type, and/or other). See example below.
Once you've selected a tagged group of related services, it's easy to focus your analysis on those services. For example, click the Chart button at the top of the Services page to generate tag-specific charts for the selected services (see below).
Newly deployed services that match your tagging rules are automatically tagged and added to your charts. Tag-specific charts can even be pinned to your home dashboard.
Ensure efficient routing of problem notifications
You can also use tags for efficient routing of problem notifications to responsible team members. Go to Settings > Integration > Problem notifications and click Set up notifications. Select the appropriate incident-management system or team-collaboration channel. Then enable the Filter on tags switch at the bottom of the page and assign relevant tags. See the Slack integration example below.
Once set up, the next time a problem notification is sent out, Dynatrace will check to see if any affected services carry properties that you've defined in your service tags. In this way, when critical parts of your environment are affected by a detected problem, the related notification will be delivered to the appropriate teams.
- OneAgent version 1.111 or higher is required to generate the correct metadata for Cloud Foundry, OpenShift, and Azure Web Sites processes.
- Usage of the
DT_CLUSTER_IDenvironment ID leads to loss of some metadata within specific processes. This issue has been addressed in OneAgent version 113.