Skip to content

Mutating Policy Execution Latency

  • kyverno_mutating_policy_execution_duration_seconds_count
  • kyverno_mutating_policy_execution_duration_seconds_sum
  • kyverno_mutating_policy_execution_duration_seconds_bucket

Histogram - A float value representing the latency of the mutating policy’s execution in seconds.

See Prometheus docs for a detailed explanation of how histograms work.

LabelAllowed ValuesDescription
policy_background_mode”true”, “false”Policy’s set background mode
policy_nameName of the policy
resource_kind”Pod”, “Deployment”, “StatefulSet”, “ReplicaSet”, etc.Kind of this resource
resource_namespaceNamespace in which this resource lives
resource_request_operation”create”, “update”, “delete”If the requested resource is being created, updated, or deleted.
execution_cause”admission_request”, “background_scan”Identifies whether the policy is executing in response to an admission request or a periodic background scan.
result”PASS”, “FAIL”Result of the policy’s execution
  • The cluster admin wants to know how efficiently the policies are getting executed by tracking the average latencies associated with the Kyverno policies’ execution since the last 24 hrs.
  • The cluster admin wants to track the policy causing highest latency in a certain cluster policy.
  • Tracking the average latency associated with the execution of mutating policies:
    avg(kyverno_mutateting_policy_execution_duration_seconds{})