Extract a metric to track system events

Dynatrace produces system events for system activity in your environment, for example, when an app is installed, updated, and uninstalled. You can extract a metric via OpenPipeline and track how many app updates occurred in your environment.

Who this is for

This article is intended for administrators and app users.

What you will learn

In this article, you'll learn how to set up OpenPipeline to extract a metric to monitor system events frequency.

Before you begin

Steps

  1. Go to Notebooks Notebooks and open an existing or new notebook.

  2. Select > DQL.

  3. Enter a DQL query to fetch the relevant records.

    App lifecycle events are audit events produced by Dynatrace AppEngine Registry. The following example query fetches app lifecycle events and summarizes the results by event type.

    fetch dt.system.events
    | filter event.kind == "AUDIT_EVENT" AND event.provider == "APP_REGISTRY"
    | summarize by:{event.type}, count()
  4. To filter only by app updates, select app.updated > Filter.

You found the condition that identifies app updates (event.kind == "AUDIT_EVENT" AND event.provider == "APP_REGISTRY" AND event.type == "app.updated").

  1. Go to OpenPipeline app (new) OpenPipeline > System events > Pipelines.

  2. To create a new pipeline, select Pipeline and enter a name—for example, App LifeCycle-Updates.

  3. To configure metric extraction, go to Metric extraction > Processor > Counter metric and define the processor by entering:

    • A descriptive name—for example, Frequency
    • The matching condition event.type == app.updated
    • The new metric key—for example, apps.updates
    • The metric dimensions
      1. Select Pre-defined and choose resource from the pre-defined dimensions. This dimension identifies the ID of the app from which the update originates.
      2. Select Custom and enter a custom dimension that further defines your metric—for example, details.app.type.
      3. Select Add.
  4. Select Save.

You successfully created a new pipeline to extract a metric containing information about the event's source and further app details. The new pipeline is visible in the pipelines list.

  1. Go to OpenPipeline app (new) OpenPipeline > System events > Dynamic routing.

  2. To create a new route, select Dynamic route and specify:

    • A descriptive name—for example, App LifeCycle
    • The matching condition
      event.kind == "AUDIT_EVENT" AND event.provider == "APP_REGISTRY"
    • The pipeline containing the processing instructions (App LifeCycle-Updates)
  3. Select Add.

You successfully created a new route. All app lifecycle events are routed to the pipeline where a metric is extracted only for app updates. The new route is visible in the routes list.

  1. Go to Notebooks Notebooks and open an existing or new notebook.
  2. Select > Metrics > Select a metric.
  3. Enter and select the new metric key (dt.system.events.apps.updates).
  4. Select Run.

Conclusion

You successfully extracted a metric to track app update frequency. All new app lifecycle events are routed to a new pipeline. When a record is an app update, the new pipeline extracts a metric containing the ID of the application from which the update originates and further app details. You can query the metric in Dashboards and Notebooks.