Deploy your first configuration

To get you started with managing configurations, this section will guide you through a simple example: creating a tagging rule with Dynatrace Configuration as Code via Monaco. You will learn how to create, deploy, and delete a configuration.

Prerequisites

  • The latest version of Dynatrace Configuration as Code via Monaco (the Dynatrace Monaco CLI) installed (see Install Dynatrace Configuration as Code via Monaco) and available on your PATH.

  • A Dynatrace environment and access to create environment tokens.

  • A Dynatrace token with at least the following permissions:

    • Access problem and event feed, metrics, and topology (DataExport)
      • Required for querying general information about your environment.
    • Read configuration (ReadConfig)
      • Required for reading existing auto-tags.
    • Write configuration (WriteConfig)
      • Required for creating your auto-tag.
    • Read settings (settings.read) (API v2)
      • Required for reading settings configuration.
    • Write settings (settings.write) (API v2)
      • Required for modifying settings configuration.

To learn how to create tokens, see Create an API token.

Reference project

If you're stuck at any point while following this guide, you can find a finished version of the project on GitHub.

Create configuration

You can create a tagging rule in an environment that will apply tags to hosts and services where a Dynatrace server is detected.

Deploy configuration

Now that you have created the configuration you need to deploy it to your Dynatrace environment. To do this, you use the monaco deploy command.

To verify that your tag has been created

  1. Go to Settings and select Tags > Automatically applied tags.
  2. Search for DTServer.

Delete configuration

Now that your configuration is deployed, you can delete it. To do this, you will use the monaco delete command.

What's next

Now that you know the basics of creating, deploying, and deleting a configuration, you're ready to learn more.