Try it free

PrometheusMonitoring parameters for Dynatrace Operator

  • Latest Dynatrace
  • Reference
  • 5-min read
  • Published Sep 15, 2026
  • Preview

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.

ParameterDescriptionDefault valueData type

dynaKubeName

Name of the DynaKube in the same namespace that provides the connection settings (apiUrl, tokens, proxy, networkZone, trustedCAs). Must not be empty.

No default (required)

string

publicRegistryOverride

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 image explicitly.

No default (optional)

string

targetAllocator

Configuration of the target allocator Deployment. See .spec.targetAllocator.

{}

object

scraper

Configuration of the scraper Deployment. See .spec.scraper.

{}

object

gateway

Configuration of the gateway StatefulSet. See .spec.gateway.

{}

object

Common component parameters

The following parameters are available on .spec.targetAllocator, .spec.scraper, and .spec.gateway alike.

ParameterDescriptionDefault valueData type

replicas

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 1 applies.

No default (optional)

integer

image

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 image explicitly. See Component images.

No default (optional)

string

imagePullPolicy

Image pull policy of the component container. One of IfNotPresent, Always, Never. When empty, the currently deployed value is preserved.

No default (optional)

string

args

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

resources

Resource requests and limits of the component container. When limits.memory is set, Dynatrace Operator additionally sets GOMEMLIMIT to 90% of that limit.

No default (optional)

ResourceRequirements

nodeSelector

Node selector applied to the pod template.

No default (optional)

map[string]string

affinity

Full nodeAffinity, podAffinity, and podAntiAffinity rules applied to the pod template.

No default (optional)

Affinity

tolerations

Tolerations applied to the pod template.

No default (optional)

array of Tolerations

topologySpreadConstraints

Topology spread constraints applied to the pod template.

No default (optional)

array of TopologySpreadConstraints

priorityClassName

Name of an existing PriorityClass, to protect the component from eviction under node pressure.

No default (optional)

string

annotations

Additional annotations merged into the pod template. Dynatrace Operator adds its own configuration-hash annotation on top.

No default (optional)

map[string]string

labels

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

ParameterDescriptionDefault valueData type

scrapeInterval

Default interval between consecutive scrapes. An interval set in the ServiceMonitor, PodMonitor, ScrapeConfig, or Probe overrides it.

60s

duration

customResourceSelector

Label selector for the Prometheus custom resources to discover. An empty selector ({}) matches all of them. See Control which resources are discovered.

matchLabels: {prometheus.dynatrace.com: "true"}

LabelSelector

customResourceNamespaceSelector

Label selector for the namespaces to watch for Prometheus custom resources. An empty selector ({}) matches all namespaces.

No default (all namespaces)

LabelSelector

updateStrategy

Deployment update strategy of the target allocator. Not yet applied—see Known limitations.

No default (optional)

DeploymentStrategy

Plus all common component parameters.

.spec.scraper

ParameterDescriptionDefault valueData type

targetsPollInterval

Interval at which each scraper polls the target allocator for its assigned targets.

60s

duration

updateStrategy

Deployment update strategy of the scraper pool. Applied only when type is set.

No default (optional)

DeploymentStrategy

Plus all common component parameters.

.spec.gateway

ParameterDescriptionDefault valueData type

updateStrategy

StatefulSet update strategy of the gateway pool. With rollingUpdate.partition: N, only pods with an ordinal of N or higher are updated, which allows canary rollouts. Not yet applied—see Known limitations.

type: RollingUpdate

StatefulSetUpdateStrategy

Plus all common component parameters.

.status

ParameterDescriptionData type

phase

Overall state of the resource. One of Deploying, Running, Error.

string

conditions

One condition per component: TargetAllocatorAvailable, ScraperAvailable, GatewayAvailable. A condition is True once the workload rollout is complete, False with reason Reconciling while it's pending, and False with reason Error when reconciliation failed. The message then carries the underlying error.

array of Conditions

targetAllocator.image

Image reference of the currently deployed target allocator.

string

scraper.image

Image reference of the currently deployed scraper.

string

gateway.image

Image reference of the currently deployed gateway.

string

Managed Kubernetes objects

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.

KindNamePurpose

Deployment

app-metrics-allocator

Target allocator

Service

app-metrics-allocator

Target allocator API (port 80 HTTP, port 443 reserved for HTTPS)

ConfigMap

app-metrics-allocator

Generated target allocator configuration

Deployment

app-metrics-scraper

Scraper pool

ConfigMap

app-metrics-scraper

Generated scraper collector configuration

StatefulSet

app-metrics-gateway

Gateway pool

Service

app-metrics-gateway

OTLP/gRPC endpoint of the gateway pool (port 4317)

ConfigMap

app-metrics-gateway

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.

Resource attributes

The gateway enriches every scraped metric with Kubernetes context before it exports the data.

  • Pod, namespace, node, container, and cluster attributes, including k8s.pod.name, k8s.pod.uid, k8s.namespace.name, k8s.node.name, k8s.container.name, and k8s.cluster.uid.
  • The owning workload, collapsed into 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.
  • Prometheus-style metric attributes renamed to OpenTelemetry semantic conventions. For example, http_request_method becomes http.request.method.

Two more sources are merged in, in increasing order of precedence:

  1. spec.resourceAttributes on the DynaKube, applied only to attributes that aren't set yet. See DynaKube parameters.
  2. metadata.dynatrace.com/<key>: <value> annotations on the scraped pod or its namespace. These always win.

Container arguments

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