Dynatrace Operator version 1.11+
This page lists every PrometheusMonitoring field and its default, the status Dynatrace Operator reports back, and the Kubernetes objects it manages.
For a full guide on setting up the Prometheus scraping pipeline, see Scrape Prometheus metrics with Dynatrace Operator.
.spec The dynaKubeName parameter is Required. All other parameters are Optional.
| Parameter | Description | Default value | Data type |
|---|---|---|---|
| Name of the DynaKube in the same namespace that provides the connection settings ( | No default (required) | string |
| Overrides the registry host used when an image is resolved automatically from your Dynatrace environment. Reconciliation fails if the returned image doesn't come from the requested registry. Has no effect when you set every component | No default (optional) | string |
| Configuration of the target allocator Deployment. See |
| object |
| Configuration of the scraper Deployment. See |
| object |
| Configuration of the gateway StatefulSet. See |
| object |
The following parameters are available on .spec.targetAllocator, .spec.scraper, and .spec.gateway alike.
| Parameter | Description | Default value | Data type |
|---|---|---|---|
| Number of replicas of the component. When unset, the operator doesn't manage the replica count, so an existing count—for example, one set by a Horizontal Pod Autoscaler—is preserved. On initial creation the Kubernetes default of | No default (optional) | integer |
| Full image reference, including tag or digest. When empty, Dynatrace Operator resolves the image only when automatic image resolution is supported for the component and environment; otherwise, set | No default (optional) | string |
| Image pull policy of the component container. One of | No default (optional) | string |
| Additional command-line arguments for the component container. Line breaks, tabs, carriage returns, and null bytes are stripped. See Container arguments for the arguments to avoid. | No default (optional) | array of strings |
| Resource requests and limits of the component container. When | No default (optional) | ResourceRequirements |
| Node selector applied to the pod template. | No default (optional) | map[string]string |
| Full | No default (optional) | Affinity |
| Tolerations applied to the pod template. | No default (optional) | array of Tolerations |
| Topology spread constraints applied to the pod template. | No default (optional) | array of TopologySpreadConstraints |
| Name of an existing PriorityClass, to protect the component from eviction under node pressure. | No default (optional) | string |
| Additional annotations merged into the pod template. Dynatrace Operator adds its own configuration-hash annotation on top. | No default (optional) | map[string]string |
| Additional labels merged into the pod template. Operator-owned labels take precedence on key collisions. Not used for the workload selector. | No default (optional) | map[string]string |
The pod specification isn't fully exposed. Environment variables, volumes, security contexts, ServiceAccounts, and the container command are managed by Dynatrace Operator and can't be overridden.
.spec.targetAllocator | Parameter | Description | Default value | Data type |
|---|---|---|---|
| Default interval between consecutive scrapes. An |
| duration |
| Label selector for the Prometheus custom resources to discover. An empty selector ( |
| LabelSelector |
| Label selector for the namespaces to watch for Prometheus custom resources. An empty selector ( | No default (all namespaces) | LabelSelector |
| Deployment update strategy of the target allocator. Not yet applied—see Known limitations. | No default (optional) | DeploymentStrategy |
Plus all common component parameters.
.spec.scraper | Parameter | Description | Default value | Data type |
|---|---|---|---|
| Interval at which each scraper polls the target allocator for its assigned targets. |
| duration |
| Deployment update strategy of the scraper pool. Applied only when | No default (optional) | DeploymentStrategy |
Plus all common component parameters.
.spec.gateway | Parameter | Description | Default value | Data type |
|---|---|---|---|
| StatefulSet update strategy of the gateway pool. With |
| StatefulSetUpdateStrategy |
Plus all common component parameters.
.status | Parameter | Description | Data type |
|---|---|---|
| Overall state of the resource. One of | string |
| One condition per component: | array of Conditions |
| Image reference of the currently deployed target allocator. | string |
| Image reference of the currently deployed scraper. | string |
| Image reference of the currently deployed gateway. | string |
For a PrometheusMonitoring named app-metrics, Dynatrace Operator creates the following objects in the same namespace. All of them are owned by the PrometheusMonitoring, so deleting the custom resource removes them.
| Kind | Name | Purpose |
|---|---|---|
Deployment |
| Target allocator |
Service |
| Target allocator API (port |
ConfigMap |
| Generated target allocator configuration |
Deployment |
| Scraper pool |
ConfigMap |
| Generated scraper collector configuration |
StatefulSet |
| Gateway pool |
Service |
| OTLP/gRPC endpoint of the gateway pool (port |
ConfigMap |
| Generated gateway collector configuration |
The ServiceAccounts and RBAC aren't created by the custom resource. The Helm chart creates them when you enable the feature. See Security.
Changing a component's configuration updates a hash annotation on its pod template, which rolls the affected pods.
The gateway enriches every scraped metric with Kubernetes context before it exports the data.
k8s.pod.name, k8s.pod.uid, k8s.namespace.name, k8s.node.name, k8s.container.name, and k8s.cluster.uid.k8s.workload.name, k8s.workload.kind, and k8s.workload.uid, regardless of whether the pod belongs to a Deployment, StatefulSet, DaemonSet, ReplicaSet, Job, or CronJob.k8s.cluster.name and dt.entity.kubernetes_cluster, taken from the DynaKube.http_request_method becomes http.request.method.Two more sources are merged in, in increasing order of precedence:
spec.resourceAttributes on the DynaKube, applied only to attributes that aren't set yet. See DynaKube parameters.metadata.dynatrace.com/<key>: <value> annotations on the scraped pod or its namespace. These always win.args is passed through to the component container. Because Dynatrace Operator owns the generated configuration, some arguments silently break the deployment.
For the target allocator, Dynatrace Operator mounts the configuration at /conf/targetallocator.yaml, and command-line flags take precedence over it. Only logging flags such as --zap-log-level are safe. Don't set --config-file, --listen-addr, --listen-addr-https, --enable-https-server, --https-*, --enable-prometheus-cr-watcher, or --kubeconfig-path. The address flags additionally break the probes and the Service.
For the scraper and the gateway, which both run the Dynatrace OpenTelemetry Collector, only --config, --set, and --feature-gates are accepted. Dynatrace Operator already passes its own --config; additional configuration URIs are deep-merged, with later values winning, and --set always wins over --config. Don't override receivers.*, exporters.*, service.pipelines.*, or extensions.*. Doing so breaks the health probes, the Service target port, the token authentication of the gateway, or the export to Dynatrace. Note that --set rewrites every . in a key to ::, so keys that legitimately contain dots can't be set this way.
Increasing the log verbosity is the common, safe case, and works the same way on spec.gateway.
spec:scraper:args:- --set=service.telemetry.logs.level=debug- --set=service.telemetry.metrics.level=detailed