Dynatrace integrates Gauge and Counter metrics from Prometheus exporters in Kubernetes environments.
Step-by-step instructions
- Dynatrace collects metrics from any pods that are annotated with a
metrics.dynatrace.com/scrape
property set to true in the pod definition. Depending on the actual exporter in a pod, you might need to set additional annotations to the pod definition to allow Dynatrace to properly ingest those metrics.
- Enable metrics scraping: Set
metrics.dynatrace.com/scrape
to true
to enable Dynatrace to collect Prometheus metrics exposed for this pod.
- Define the metrics port: By default, Prometheus metrics are available at the first exposed TCP port of the pod. Set
metrics.dynatrace.com/port
to the respective port.
Once you’ve annotated the Kubernetes pods, the respective metrics will automatically show up in your environment for charting, alerting, and analysis.