Documentation
¶
Index ¶
Constants ¶
const ( TrueValue = 1.0 FalseValue = 0.0 )
const ( // UntaintTimeoutReasonReadiness signals that a pod existed on the node but // never became Ready within --untaintControllerTimeout. UntaintTimeoutReasonReadiness = "readiness" // UntaintTimeoutReasonScheduling signals that no agent pod was scheduled on // the node within --untaintControllerSchedulingTimeout. UntaintTimeoutReasonScheduling = "scheduling" // UntaintTimeoutPolicyRemove untaints the node despite the agent not being ready. UntaintTimeoutPolicyRemove = "remove" // UntaintTimeoutPolicyKeep leaves the taint in place but emits observability signals. UntaintTimeoutPolicyKeep = "keep" // UntaintRemovalReasonAgentReady signals the taint was removed because the // readiness criteria were met (agent — and optionally CSI — pods Ready). UntaintRemovalReasonAgentReady = "agent_ready" // UntaintRemovalReasonTimeout signals the taint was removed because a // readiness or scheduling timeout fired under policy=remove. UntaintRemovalReasonTimeout = "timeout" )
Label values for TaintTimeoutsTotal.
Variables ¶
var ( // ComponentHealthIssuesDetected counts component-level health issues as they // first appear on the managed cluster-level components (cluster-agent, // cluster-checks-runner), labeled by component and issue type. It increments // once per component-level issue instance (an issue type going from absent to // present on a component) so it measures the rate at which new problems surface. // A flap (the issue re-activating while its resolve is still within the grace // window) is not re-counted, so a crash-looping component does not inflate it. ComponentHealthIssuesDetected = prometheus.NewCounterVec( prometheus.CounterOpts{ Subsystem: componentHealthSubsystem, Name: "issues_detected_total", Help: "Number of component-level health issues detected for managed cluster-level components, by component and issue type.", }, []string{"component", "issue_type"}, ) // ComponentHealthIssuesActive is the number of pods currently exhibiting each // issue type per component. It is a gauge: it rises as pods hit an issue and // falls as they recover, reaching 0 when a component-level issue clears. Query // it as > 0 to know whether a component currently has an open issue of a given // type. Labels are kept to component and issue type (no pod/namespace) to bound // cardinality — the affected pods live in the emitted issue, not in tags. ComponentHealthIssuesActive = prometheus.NewGaugeVec( prometheus.GaugeOpts{ Subsystem: componentHealthSubsystem, Name: "issues_active", Help: "Number of pods currently exhibiting each health issue type per managed cluster-level component.", }, []string{"component", "issue_type"}, ) )
var ( // datadogagentprofile enabled DAPEnabled = prometheus.NewGauge( prometheus.GaugeOpts{ Subsystem: datadogAgentProfileSubsystem, Name: "enabled", Help: "1 if DatadogAgentProfiles are enabled. 0 if DatadogAgentProfiles are disabled", }, ) // datadogagentprofile valid DAPValid = prometheus.NewGaugeVec( prometheus.GaugeOpts{ Subsystem: datadogAgentProfileSubsystem, Name: "valid", Help: "1 if the DatadogAgentProfile is valid. 0 if the DatadogAgentProfile is invalid", }, []string{ datadogAgentProfileLabelKey, }, ) )
var ( // TaintRemovalsTotal is the total number of taints removed from nodes, // broken down by node and removal reason (agent_ready or timeout). TaintRemovalsTotal = prometheus.NewCounterVec( prometheus.CounterOpts{ Subsystem: untaintSubsystem, Name: "taint_removals_total", Help: "Total number of taints removed from nodes, by node and reason", }, []string{untaintNodeLabel, "reason"}, ) // TaintRemovalLatency is the time between agent pod becoming Ready and taint // removal, broken down by node. TaintRemovalLatency = prometheus.NewHistogramVec( prometheus.HistogramOpts{ Subsystem: untaintSubsystem, Name: "taint_removal_latency_seconds", Help: "Time between agent pod becoming Ready and taint removal from the node, by node", Buckets: prometheus.DefBuckets, }, []string{untaintNodeLabel}, ) // TaintTimeoutsTotal counts timeout decisions broken down by reason and policy. TaintTimeoutsTotal = prometheus.NewCounterVec( prometheus.CounterOpts{ Subsystem: untaintSubsystem, Name: "taint_timeouts_total", Help: "Total number of untaint-controller timeout decisions, by reason and policy", }, []string{"reason", "policy"}, ) // TaintRemovalErrorsTotal counts hard errors encountered while attempting to // remove the taint (apiserver Patch failures, JSON marshal failures, …). // Benign optimistic-concurrency races (IsConflict/IsInvalid) are NOT counted // here — they're handled by requeueing. Inspect the operator's ERROR-level // logs for the specific failure cause. TaintRemovalErrorsTotal = prometheus.NewCounter( prometheus.CounterOpts{ Subsystem: untaintSubsystem, Name: "taint_removal_errors_total", Help: "Total number of errors encountered while attempting to remove the agent-not-ready taint from a node", }, ) )
var ( // introspection enabled IntrospectionEnabled = prometheus.NewGauge( prometheus.GaugeOpts{ Subsystem: datadogAgentSubsystem, Name: "introspection_enabled", Help: "1 if introspection is enabled. 0 if introspection is disabled", }, ) )
var ( // maximum goroutines MaxGoroutines = prometheus.NewGauge( prometheus.GaugeOpts{ Name: "max_goroutines", Help: "reports the maximum number of goroutines set in the datadog operator", }, ) )
Functions ¶
func CleanupMetricsByProfile ¶
CleanupMetricsByProfile deletes profile-specific prometheus metrics given a profile
func DeleteNodeSeries ¶ added in v1.29.0
func DeleteNodeSeries(node string)
DeleteNodeSeries removes every child series labeled with the given node from the node-scoped untaint metrics: TaintRemovalsTotal (across all reason values) and TaintRemovalLatency (across all histogram buckets). It is a no-op when the node has no series. Call it when a node is deleted to prevent unbounded growth of per-node series for the operator's lifetime as clusters autoscale or replace nodes.
Types ¶
This section is empty.