Header background

Automated rule-based tagging for services

Using tags to organize and label all the monitored components in your environment is a great way to filter server-side services for purposes of developing component-specific dashboard charts and assigning responsibility to specific team members or groups. However, managing and applying tagging within large, dynamic environments can be a real challenge. To address this, Dynatrace now provides a rule-based approach to tagging that gives you the flexibility you need to take maximum advantage of Dynatrace Smartscape topology modeling, auto-detection of processes and services, and built-in domain expertise.

To define a rule-based tag

  1. Go to Settings TaggingAutomatic tagging.
  2. Type a name for the new tag in the Add custom tag field.
  3. Click the Add button to add your new tag.
  4. Select the newly created tag from the list below to edit rules for the tag. screencapture-ruxitdev-dev-dynatracelabs-1481098115896
  5. You can define multiple rules for each tag. Rules are executed in order. As soon as one rule meets all conditions, the tag is applied and no further rules are executed.
  6. The first thing to consider is whether or not you want to restrict the rule to a specific process group, technology, or service type. While this step is optional, it provides a quick means of reducing the number of services that a rule applies to.
    screencapture-ruxitdev-dev-dynatracelabs-1481098307181
  7. You can then add one or more conditions to the rule that a service must meet before the tag applied.
    Conditions can check for specific values within any service property that Dynatrace displays (for example, Web application ID). To find the Web application ID or other properties of your services, go to the service’s page and expand the Properties and tags section (as shown below). The list of conditions also contains properties of processes and hosts. If you select one of these, then the rule will be applied only to those services that run on that specific process or host.2016-12-07-10_37_08-service-ruxitdevruxit-com_-easytravel-dev-dynatrace
  8. Once you’ve created a rule, click the Preview button to verify the services that are returned by the rule. Note that to be successfully tagged, a service must meet all of the specified conditions of the rule.
    screencapture-ruxitdev-dev-dynatracelabs-1481098489811
  9. Click Done at the top of the page to save your tag. Rule-based tags are applied automatically to all existing and newly detected services.
    Note: It may take up to a minute before your new tag is applied. Once a tag is applied to a service, the tag is listed on that service’s page within the Properties and tags section.

There are numerous ways by which you can combine tags, rules, and conditions when organizing your services. For example, you can define multiple conditions within a single rule or you can define multiple rules for a single tag. For a rule to be met, all conditions of the rule must be met. In other words, conditions are combined using an implied AND operator. The rules themselves are executed independently from one another other, and so are combined using an implied OR operator.

In this way, you can build tagging rules for all kinds of scenarios.

Define more complex & granular rules

Dynatrace automatically discovers all of your hosts, processes, process groups, and services—in addition to the dependencies between these components. Dynatrace also discovers metadata across each layer in your environment’s topology. This is the same metadata that Dynatrace uses to develop Smartscape topology maps. This same metadata and topology modeling can now be leveraged to define complex and powerful service-tagging rules. The example below shows a rule that filters services that are of type WebService, run in a Tomcat, and have detected process group names that include the string BB.

screencapture-ruxitdev-dev-dynatracelabs-1481098988053

Another powerful service-tagging rule example (shown below) matches all Java services that run in specific process groups within a Cloud Foundry space called Development within a Cloud Foundry PaaS setup within a detected process group name that includes the string spring.

screencapture-pap94091-dev-dynatracelabs-1481100920988screencapture-pap94091-dev-dynatracelabs-1481102896123

The example below shows a rule that applies a tag to all non-admin Azure Web Sites services.

screencapture-mtt00072-dev-dynatracelabs-1481100784973

Service properties available for tagging

The specific service properties available to you for tagging varies based on technology type.

To find out which properties a service provides

  1. Select Transactions & services from the navigation menu.
  2. Select the service that you want to tag.
  3. Expand Properties and tags to display the available properties.

To find out which properties a process group provides

  1. Select Hosts from the navigation menu.
  2. Select the host that includes the process group you want to tag.
  3. Expand Properties and tags to display the available properties.

Here is the current list of service properties supported by Dynatrace for automated service tagging. This group will be expanded over the coming weeks.

Service properties

  • Custom service class name
  • Database name
  • Database vendor
  • Detected service name
  • Service port
  • Service tags
  • Web application ID
  • Web context root
  • Web server name
  • Web service name
  • Web service namespace

Process properties

  • Apache config path
  • Apache spark master ip address
  • Azure web app host name
  • Azure web app site name
  • Catalina base
  • Catalina home
  • Cloud Foundry application name
  • Cloud Foundry instance index
  • Cloud Foundry space ID
  • Cloud Foundry space name
  • Coldfusion jvm config 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
  • Elastic search cluster name
  • Elastic search node name
  • Exe name
  • Exe path
  • GlassFish domain name
  • GlassFish instance name
  • IIS app pool
  • IIS role name
  • Java jar file
  • Java jar path
  • Java main class
  • Jboss home
  • Jboss mode
  • Jboss server name
  • Kubernetes base pod name
  • Kubernetes container name
  • Kubernetes full pod name
  • Kubernetes namespace
  • Kubernetes pod uid
  • Listen port
  • Nodejs app name
  • Nodejs script name
  • Ruby app root path
  • Ruby script path
  • Varnish instance name
  • Weblogic home
  • Weblogic name
  • Webshpere cell name
  • Webshpere cluster name
  • Websphere node name
  • Websphere server name

Host properties

  • AWS availability zone
  • Azure SKU
  • Azure compute mode
  • Azure web app host name(s)
  • Azure web app site name(s)
  • Cloud type
  • Detected name of host
  • Host ip addresse
  • Host tags
  • Instance id of ec2
  • Local host name of ec2
  • Paas type
  • Public host name of ec2

Take full advantage of service tags

Service tags can be leveraged in a number of ways. For example, within the Services list (Transactions & services > Services) to filter services based on technology type or other criteria (see example below).

screencapture-ruxitdev-dev-dynatracelabs-1481099018043

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 list page to generate tag-specific charts for the selected services (see example below).

2016-12-07-11_12_08-clipboard

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. This provides a great option for providing responsible teams and staff with performance insights into their specific areas of responsibility.

Tagging for efficient problem-notification routing

You can also use tags for efficient routing of problem notifications to responsible team members. When setting up notification integration (Settings > Integration > Problem notifications), enable the Filter on tags switch (see Slack example below) and assign relevant tags. 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.

notify

Pre-requisites

  • 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_ID environment ID leads to loss of some metadata within specific process. This issue will be addressed in OneAgent version 1.113.