Header background

Automatically apply tags to monitored Cloud Foundry processes

Dynatrace recently introduced a powerful feature that allows you to apply tags to processes and hosts based on environment variable injection. We’re happy to announce that we’ve further enhanced this functionality. Dynatrace now allows you to automatically derive tags from your Cloud Foundry environment. This enables you to automatically organize and filter all monitored Cloud Foundry application components.

Leverage Cloud Foundry tags in your Dynatrace environment

Cloud Foundry tags are searchable via Dynatrace search. This allows you to easily find and inspect the monitoring results of related processes that are running in your Cloud Foundry environment.

Cloud Foundry tags integrate seamlessly with Dynatrace filters. For instance, you can easily filter technologies or problems using Cloud Foundry tags. You can also leverage Cloud Foundry tags when setting up fine-grained alerting profiles.

Define tags with Cloud Foundry services for multiple applications

Within Cloud Foundry environments, Dynatrace automatically detects tags that are supplied via any user-provided Dynatrace Cloud Foundry service that’s bound to your application.

You’re prompted automatically to provide values for certain tags (for example, tag:deployment-type>saas). Dynatrace supports both labels and key-value tags. For instance, the tag pivotal in the example below is used to label all applications running within a Pivotal Cloud Foundry environment—so this tag doesn’t include a value. The key-value tag deployment-type below can be set to either saas or managed—depending on the deployment model of your Dynatrace environment.

cf cups dynatrace-tags -p "tag:pivotal, tag:deployment-type"

You can easily update your user-provided services with new values, for example, tag:deployment-type>managed, or additional tags:

cf uups dynatrace-tags -p "tag:pivotal, tag:deployment-type, tag:newtag"

Note: To exploit the created service instance dynatrace-tags you need to bind it to your application, for example, spring-music:

cf bs spring-music dynatrace-tags

Define tags for specific Cloud Foundry applications

Additionally, Dynatrace automatically detects tags that are provided via Cloud Foundry environment variables for applications:

cf set-env spring-music DT_TAGS "oneagent=127"

The example, the cf command above attaches the tag oneagent with value 127 to all monitored processes that are related to the application spring-music.

Note: This works both within full-stack monitoring mode, where you install Dynatrace OneAgent on Cloud Foundry VMs, as well as when you leverage the Dynatrace buildpack integrations.

We’re currently working on broadening our support for tags so that you can, for example, additionally tag your monitored Cloud Foundry hosts. So please stay tuned for updates.

Note: This feature requires OneAgent version 127 or above.