diff --git a/datadog_cluster_agent/changelog.d/20557.changed b/datadog_cluster_agent/changelog.d/20557.changed new file mode 100644 index 0000000000000..2e210a6b54fef --- /dev/null +++ b/datadog_cluster_agent/changelog.d/20557.changed @@ -0,0 +1 @@ +Update CWS mutating webhook metrics to better track its performance diff --git a/datadog_cluster_agent/datadog_checks/datadog_cluster_agent/check.py b/datadog_cluster_agent/datadog_checks/datadog_cluster_agent/check.py index cabd8ba405b8d..050673e93ba92 100644 --- a/datadog_cluster_agent/datadog_checks/datadog_cluster_agent/check.py +++ b/datadog_cluster_agent/datadog_checks/datadog_cluster_agent/check.py @@ -6,8 +6,9 @@ DEFAULT_METRICS = { 'admission_webhooks_certificate_expiry': 'admission_webhooks.certificate_expiry', - 'admission_webhooks_cws_exec_instrumentation_attempts': 'admission_webhooks.cws_exec_instrumentation_attempts', - 'admission_webhooks_cws_pod_instrumentation_attempts': 'admission_webhooks.cws_pod_instrumentation_attempts', + 'admission_webhooks_cws_exec_mutation_attempts': 'admission_webhooks.cws_exec_mutation_attempts', + 'admission_webhooks_cws_pod_mutation_attempts': 'admission_webhooks.cws_pod_mutation_attempts', + 'admission_webhooks_cws_response_duration': 'admission_webhooks.cws_response_duration', 'admission_webhooks_library_injection_attempts': 'admission_webhooks.library_injection_attempts', 'admission_webhooks_library_injection_errors': 'admission_webhooks.library_injection_errors', 'admission_webhooks_mutation_attempts': 'admission_webhooks.mutation_attempts', diff --git a/datadog_cluster_agent/metadata.csv b/datadog_cluster_agent/metadata.csv index 63a83ff7d704f..e0720c53979a5 100644 --- a/datadog_cluster_agent/metadata.csv +++ b/datadog_cluster_agent/metadata.csv @@ -1,67 +1,67 @@ -metric_name,metric_type,interval,unit_name,per_unit_name,description,orientation,integration,short_name,curated_metric -datadog.cluster_agent.admission_webhooks.certificate_expiry,gauge,,hour,,Time left before the certificate expires,0,datadog_cluster_agent,admission webhooks certificate expiry, -datadog.cluster_agent.admission_webhooks.cws_exec_instrumentation_attempts.count,count,,,,CWS exec Instrumentation attempts count,0,datadog_cluster_agent,cws exec instrumentation attempts, -datadog.cluster_agent.admission_webhooks.cws_exec_instrumentation_attempts.sum,count,,,,CWS exec Instrumentation attempts sum,0,datadog_cluster_agent,cws exec instrumentation attempts, -datadog.cluster_agent.admission_webhooks.cws_pod_instrumentation_attempts.count,count,,,,CWS pod Instrumentation attempts count,0,datadog_cluster_agent,cws pod instrumentation attempts, -datadog.cluster_agent.admission_webhooks.cws_pod_instrumentation_attempts.sum,count,,,,CWS pod Instrumentation attempts sum,0,datadog_cluster_agent,cws pod instrumentation attempts, -datadog.cluster_agent.admission_webhooks.library_injection_attempts,count,,,,Number of library injection attempts by language,0,datadog_cluster_agent,library injection attempts, -datadog.cluster_agent.admission_webhooks.library_injection_errors,count,,,,Number of library injection failures by language,0,datadog_cluster_agent,library injection errors, -datadog.cluster_agent.admission_webhooks.mutation_attempts,gauge,,,,Number of pod mutation attempts by mutation type,0,datadog_cluster_agent,admission webhooks mutation attempts, -datadog.cluster_agent.admission_webhooks.mutation_errors,gauge,,,,Number of mutation failures by mutation type,-1,datadog_cluster_agent,admission webhooks mutation errors, -datadog.cluster_agent.admission_webhooks.patcher.attempts,count,,,,Number of patch attempts,0,datadog_cluster_agent,patch attempts, -datadog.cluster_agent.admission_webhooks.patcher.completed,count,,,,Number of completed patch attempts,0,datadog_cluster_agent,completed patch attempts, -datadog.cluster_agent.admission_webhooks.patcher.errors,count,,,,Number of patch errors,0,datadog_cluster_agent,patch errors, -datadog.cluster_agent.admission_webhooks.rc_provider.configs,gauge,,,,Number of valid remote configuration,0,datadog_cluster_agent,valid remote configurations, -datadog.cluster_agent.admission_webhooks.rc_provider.invalid_configs,gauge,,,,Number of invalid remote configurations,0,datadog_cluster_agent,invalid remote configurations, -datadog.cluster_agent.admission_webhooks.reconcile_errors,gauge,,,,Number of reconcile errors per controller,-1,datadog_cluster_agent,admission webhooks reconcile errors, -datadog.cluster_agent.admission_webhooks.reconcile_success,gauge,,success,,Number of reconcile successes per controller,0,datadog_cluster_agent,admission webhooks reconcile success, -datadog.cluster_agent.admission_webhooks.response_duration.count,count,,,,Webhook response duration count,0,datadog_cluster_agent,webhook response duration count, -datadog.cluster_agent.admission_webhooks.response_duration.sum,count,,second,,Webhook response duration sum,0,datadog_cluster_agent,webhook response duration sum, -datadog.cluster_agent.admission_webhooks.validation_attempts,gauge,,,,Number of pod validation attempts by validation type,0,datadog_cluster_agent,admission webhooks validation attempts, -datadog.cluster_agent.admission_webhooks.webhooks_received,gauge,,,,Number of webhook requests received,0,datadog_cluster_agent,admission webhooks received, -datadog.cluster_agent.aggregator.flush,count,,,,"Number of metrics/service checks/events flushed by (data_type, state)",0,datadog_cluster_agent,aggregator flush, -datadog.cluster_agent.aggregator.processed,count,,,,Amount of metrics/services_checks/events processed by the aggregator by data_type,0,datadog_cluster_agent,aggregator processed, -datadog.cluster_agent.api_requests,count,,request,,"Requests made to the cluster agent API by (handler, status)",0,datadog_cluster_agent,api requests, -datadog.cluster_agent.autodiscovery.errors,gauge,,,,Number of Autodiscovery errors,0,datadog_cluster_agent,AD errors, -datadog.cluster_agent.autodiscovery.poll_duration.count,count,,,,Autodiscovery poll duration count,0,datadog_cluster_agent,AD poll duration count, -datadog.cluster_agent.autodiscovery.poll_duration.sum,count,,second,,Autodiscovery poll duration sum,0,datadog_cluster_agent,AD poll duration sum, -datadog.cluster_agent.autodiscovery.watched_resources,gauge,,,,Number of watched resources (Services and Endpoints),0,datadog_cluster_agent,AD watched resources, -datadog.cluster_agent.cluster_checks.busyness,gauge,,,,Busyness of a node per the number of metrics submitted and average duration of all checks run,0,datadog_cluster_agent,cluster check node busyness, -datadog.cluster_agent.cluster_checks.configs_dangling,gauge,,,,Number of check configurations not dispatched,-1,datadog_cluster_agent,cluster check configs dangling, -datadog.cluster_agent.cluster_checks.configs_dispatched,gauge,,,,Number of check configurations dispatched by node,0,datadog_cluster_agent,cluster check configs dispatched, -datadog.cluster_agent.cluster_checks.configs_info,gauge,,,,Information about check configurations dispatched (node and check ID),0,datadog_cluster_agent,cluster check configs info, -datadog.cluster_agent.cluster_checks.failed_stats_collection,count,,,,Total number of unsuccessful stats collection attempts,0,datadog_cluster_agent,cluster check failed stats collection, -datadog.cluster_agent.cluster_checks.nodes_reporting,gauge,,,,Number of node agents reporting,0,datadog_cluster_agent,cluster check nodes reporting, -datadog.cluster_agent.cluster_checks.rebalancing_decisions,count,,,,Total number of check rebalancing decisions,0,datadog_cluster_agent,cluster check rebalancing decisions, -datadog.cluster_agent.cluster_checks.rebalancing_duration_seconds,gauge,,second,,Duration of the check rebalancing algorithm last execution,0,datadog_cluster_agent,cluster check rebalancing duration, -datadog.cluster_agent.cluster_checks.successful_rebalancing_moves,count,,check,,Total number of successful check rebalancing decisions,1,datadog_cluster_agent,cluster check rebalancing moves, -datadog.cluster_agent.cluster_checks.unscheduled_check,gauge,,,,Number of check configurations not scheduled,-1,datadog_cluster_agent,cluster check unscheduled check, -datadog.cluster_agent.cluster_checks.updating_stats_duration_seconds,gauge,,second,,Duration of collecting stats from check runners and updating cache,0,datadog_cluster_agent,cluster check updating stats duration, -datadog.cluster_agent.datadog.rate_limit_queries.limit,gauge,,query,,Maximum number of queries to the Datadog API allowed in the period by endpoint,0,datadog_cluster_agent,rate limit queries limit, -datadog.cluster_agent.datadog.rate_limit_queries.period,gauge,,second,,Period of rate limiting for the Datadog API by endpoint,0,datadog_cluster_agent,rate limit queries period, -datadog.cluster_agent.datadog.rate_limit_queries.remaining,gauge,,query,,Number of queries to the Datadog API remaining before next reset by endpoint,0,datadog_cluster_agent,rate limit queries remaining, -datadog.cluster_agent.datadog.rate_limit_queries.remaining_min,gauge,,query,,Minimum number of queries remaining before next reset observed during an expiration interval of 2*refresh period,0,datadog_cluster_agent,rate limit queries remaining minimum, -datadog.cluster_agent.datadog.rate_limit_queries.reset,gauge,,second,,Number of seconds before next reset applied to the Datadog API by endpoint,0,datadog_cluster_agent,rate limit queries reset, -datadog.cluster_agent.datadog.requests,count,,request,,Requests made to Datadog by status,0,datadog_cluster_agent,datadog requests, -datadog.cluster_agent.endpoint_checks.configs_dispatched,gauge,,,,Number of endpoint-check configurations dispatched by node,0,datadog_cluster_agent,endpoint check configs dispatched, -datadog.cluster_agent.external_metrics,gauge,,,,Number of external metrics tagged,0,datadog_cluster_agent,external metrics, -datadog.cluster_agent.external_metrics.api_elapsed.count,count,,,,Count of API Requests received,0,datadog_cluster_agent,external metrics api elapsed count, -datadog.cluster_agent.external_metrics.api_elapsed.sum,count,,,,Count of API Requests received,0,datadog_cluster_agent,external metrics api elapsed sum, -datadog.cluster_agent.external_metrics.api_requests,gauge,,,,Count of API Requests received,0,datadog_cluster_agent,external metrics api requests, -datadog.cluster_agent.external_metrics.datadog_metrics,gauge,,,,"The label valid is true if the DatadogMetric CR is valid, false otherwise",0,datadog_cluster_agent,external metrics datadog metrics, -datadog.cluster_agent.external_metrics.delay_seconds,gauge,,second,,Freshness of the metric evaluated from querying Datadog,0,datadog_cluster_agent,external metrics delay, -datadog.cluster_agent.external_metrics.processed_value,gauge,,,,Value processed from querying Datadog by metric,0,datadog_cluster_agent,external metrics processed, -datadog.cluster_agent.go.goroutines,gauge,,,,Number of goroutines that currently exist,0,datadog_cluster_agent,go goroutines, -datadog.cluster_agent.go.memstats.alloc_bytes,gauge,,byte,,Number of bytes allocated and still in use,0,datadog_cluster_agent,go memstats alloc bytes, -datadog.cluster_agent.go.threads,gauge,,thread,,Number of OS threads created,0,datadog_cluster_agent,go threads, -datadog.cluster_agent.kubernetes_apiserver.emitted_events,count,,,,Datadog events emitted by the kubernetes_apiserver check,0,datadog_cluster_agent,datadog events events, -datadog.cluster_agent.kubernetes_apiserver.kube_events,count,,,,Kubernetes events processed by the kubernetes_apiserver check,0,datadog_cluster_agent,apiserver events, -datadog.cluster_agent.language_detection_dca_handler.processed_requests,count,,,,The number of process language detection requests processed by the handler,0,datadog_cluster_agent,language detection processed requests, -datadog.cluster_agent.language_detection_patcher.patches,count,,,,The number of patch requests sent by the patcher to the kube api server,0,datadog_cluster_agent,language detection patches, -datadog.cluster_agent.secret_backend.elapsed,gauge,,millisecond,,The elapsed time of secret backend invocation,0,datadog_cluster_agent,secret backend elapsed time duration, -datadog.cluster_agent.tagger.stored_entities,gauge,,,,Number of entities stored in the tagger,0,datadog_cluster_agent,tagger stored entities, -datadog.cluster_agent.tagger.updated_entities,count,,,,Number of updates made to entities in the tagger,0,datadog_cluster_agent,tagger updated entities, -datadog.cluster_agent.workloadmeta.events_received,count,,,,Number of events received by workloadmeta,0,datadog_cluster_agent,workloadmeta events received, -datadog.cluster_agent.workloadmeta.notifications_sent,count,,,,Number of notifications sent by workloadmeta to its subscribers,0,datadog_cluster_agent,workloadmeta notifications sent, -datadog.cluster_agent.workloadmeta.stored_entities,gauge,,,,Number of entities stored in workloadmeta,0,datadog_cluster_agent,workloadmeta stored entities, -datadog.cluster_agent.workloadmeta.subscribers,gauge,,,,Number of workloadmeta subscribers,0,datadog_cluster_agent,workloadmeta subscribers, +metric_name,metric_type,interval,unit_name,per_unit_name,description,orientation,integration,short_name,curated_metric,sample_tags +datadog.cluster_agent.admission_webhooks.certificate_expiry,gauge,,hour,,Time left before the certificate expires,0,datadog_cluster_agent,admission webhooks certificate expiry,, +datadog.cluster_agent.admission_webhooks.cws_exec_mutation_attempts,count,,,,Number of CWS exec mutation attempts by reason and status,0,datadog_cluster_agent,cws exec mutation attempts,, +datadog.cluster_agent.admission_webhooks.cws_pod_mutation_attempts,count,,,,Number of CWS pod mutation attempts by reason and status,0,datadog_cluster_agent,cws pod mutation attempts,, +datadog.cluster_agent.admission_webhooks.cws_response_duration.count,count,,,,CWS mutating webhook response duration count,0,datadog_cluster_agent,cws response duration count,, +datadog.cluster_agent.admission_webhooks.cws_response_duration.sum,count,,,,CWS mutating webhook response duration sum,0,datadog_cluster_agent,cws response duration sum,, +datadog.cluster_agent.admission_webhooks.library_injection_attempts,count,,,,Number of library injection attempts by language,0,datadog_cluster_agent,library injection attempts,, +datadog.cluster_agent.admission_webhooks.library_injection_errors,count,,,,Number of library injection failures by language,0,datadog_cluster_agent,library injection errors,, +datadog.cluster_agent.admission_webhooks.mutation_attempts,gauge,,,,Number of pod mutation attempts by mutation type,0,datadog_cluster_agent,admission webhooks mutation attempts,, +datadog.cluster_agent.admission_webhooks.mutation_errors,gauge,,,,Number of mutation failures by mutation type,-1,datadog_cluster_agent,admission webhooks mutation errors,, +datadog.cluster_agent.admission_webhooks.patcher.attempts,count,,,,Number of patch attempts,0,datadog_cluster_agent,patch attempts,, +datadog.cluster_agent.admission_webhooks.patcher.completed,count,,,,Number of completed patch attempts,0,datadog_cluster_agent,completed patch attempts,, +datadog.cluster_agent.admission_webhooks.patcher.errors,count,,,,Number of patch errors,0,datadog_cluster_agent,patch errors,, +datadog.cluster_agent.admission_webhooks.rc_provider.configs,gauge,,,,Number of valid remote configuration,0,datadog_cluster_agent,valid remote configurations,, +datadog.cluster_agent.admission_webhooks.rc_provider.invalid_configs,gauge,,,,Number of invalid remote configurations,0,datadog_cluster_agent,invalid remote configurations,, +datadog.cluster_agent.admission_webhooks.reconcile_errors,gauge,,,,Number of reconcile errors per controller,-1,datadog_cluster_agent,admission webhooks reconcile errors,, +datadog.cluster_agent.admission_webhooks.reconcile_success,gauge,,success,,Number of reconcile successes per controller,0,datadog_cluster_agent,admission webhooks reconcile success,, +datadog.cluster_agent.admission_webhooks.response_duration.count,count,,,,Webhook response duration count,0,datadog_cluster_agent,webhook response duration count,, +datadog.cluster_agent.admission_webhooks.response_duration.sum,count,,second,,Webhook response duration sum,0,datadog_cluster_agent,webhook response duration sum,, +datadog.cluster_agent.admission_webhooks.validation_attempts,gauge,,,,Number of pod validation attempts by validation type,0,datadog_cluster_agent,admission webhooks validation attempts,, +datadog.cluster_agent.admission_webhooks.webhooks_received,gauge,,,,Number of webhook requests received,0,datadog_cluster_agent,admission webhooks received,, +datadog.cluster_agent.aggregator.flush,count,,,,"Number of metrics/service checks/events flushed by (data_type, state)",0,datadog_cluster_agent,aggregator flush,, +datadog.cluster_agent.aggregator.processed,count,,,,Amount of metrics/services_checks/events processed by the aggregator by data_type,0,datadog_cluster_agent,aggregator processed,, +datadog.cluster_agent.api_requests,count,,request,,"Requests made to the cluster agent API by (handler, status)",0,datadog_cluster_agent,api requests,, +datadog.cluster_agent.autodiscovery.errors,gauge,,,,Number of Autodiscovery errors,0,datadog_cluster_agent,AD errors,, +datadog.cluster_agent.autodiscovery.poll_duration.count,count,,,,Autodiscovery poll duration count,0,datadog_cluster_agent,AD poll duration count,, +datadog.cluster_agent.autodiscovery.poll_duration.sum,count,,second,,Autodiscovery poll duration sum,0,datadog_cluster_agent,AD poll duration sum,, +datadog.cluster_agent.autodiscovery.watched_resources,gauge,,,,Number of watched resources (Services and Endpoints),0,datadog_cluster_agent,AD watched resources,, +datadog.cluster_agent.cluster_checks.busyness,gauge,,,,Busyness of a node per the number of metrics submitted and average duration of all checks run,0,datadog_cluster_agent,cluster check node busyness,, +datadog.cluster_agent.cluster_checks.configs_dangling,gauge,,,,Number of check configurations not dispatched,-1,datadog_cluster_agent,cluster check configs dangling,, +datadog.cluster_agent.cluster_checks.configs_dispatched,gauge,,,,Number of check configurations dispatched by node,0,datadog_cluster_agent,cluster check configs dispatched,, +datadog.cluster_agent.cluster_checks.configs_info,gauge,,,,Information about check configurations dispatched (node and check ID),0,datadog_cluster_agent,cluster check configs info,, +datadog.cluster_agent.cluster_checks.failed_stats_collection,count,,,,Total number of unsuccessful stats collection attempts,0,datadog_cluster_agent,cluster check failed stats collection,, +datadog.cluster_agent.cluster_checks.nodes_reporting,gauge,,,,Number of node agents reporting,0,datadog_cluster_agent,cluster check nodes reporting,, +datadog.cluster_agent.cluster_checks.rebalancing_decisions,count,,,,Total number of check rebalancing decisions,0,datadog_cluster_agent,cluster check rebalancing decisions,, +datadog.cluster_agent.cluster_checks.rebalancing_duration_seconds,gauge,,second,,Duration of the check rebalancing algorithm last execution,0,datadog_cluster_agent,cluster check rebalancing duration,, +datadog.cluster_agent.cluster_checks.successful_rebalancing_moves,count,,check,,Total number of successful check rebalancing decisions,1,datadog_cluster_agent,cluster check rebalancing moves,, +datadog.cluster_agent.cluster_checks.unscheduled_check,gauge,,,,Number of check configurations not scheduled,-1,datadog_cluster_agent,cluster check unscheduled check,, +datadog.cluster_agent.cluster_checks.updating_stats_duration_seconds,gauge,,second,,Duration of collecting stats from check runners and updating cache,0,datadog_cluster_agent,cluster check updating stats duration,, +datadog.cluster_agent.datadog.rate_limit_queries.limit,gauge,,query,,Maximum number of queries to the Datadog API allowed in the period by endpoint,0,datadog_cluster_agent,rate limit queries limit,, +datadog.cluster_agent.datadog.rate_limit_queries.period,gauge,,second,,Period of rate limiting for the Datadog API by endpoint,0,datadog_cluster_agent,rate limit queries period,, +datadog.cluster_agent.datadog.rate_limit_queries.remaining,gauge,,query,,Number of queries to the Datadog API remaining before next reset by endpoint,0,datadog_cluster_agent,rate limit queries remaining,, +datadog.cluster_agent.datadog.rate_limit_queries.remaining_min,gauge,,query,,Minimum number of queries remaining before next reset observed during an expiration interval of 2*refresh period,0,datadog_cluster_agent,rate limit queries remaining minimum,, +datadog.cluster_agent.datadog.rate_limit_queries.reset,gauge,,second,,Number of seconds before next reset applied to the Datadog API by endpoint,0,datadog_cluster_agent,rate limit queries reset,, +datadog.cluster_agent.datadog.requests,count,,request,,Requests made to Datadog by status,0,datadog_cluster_agent,datadog requests,, +datadog.cluster_agent.endpoint_checks.configs_dispatched,gauge,,,,Number of endpoint-check configurations dispatched by node,0,datadog_cluster_agent,endpoint check configs dispatched,, +datadog.cluster_agent.external_metrics,gauge,,,,Number of external metrics tagged,0,datadog_cluster_agent,external metrics,, +datadog.cluster_agent.external_metrics.api_elapsed.count,count,,,,Count of API Requests received,0,datadog_cluster_agent,external metrics api elapsed count,, +datadog.cluster_agent.external_metrics.api_elapsed.sum,count,,,,Count of API Requests received,0,datadog_cluster_agent,external metrics api elapsed sum,, +datadog.cluster_agent.external_metrics.api_requests,gauge,,,,Count of API Requests received,0,datadog_cluster_agent,external metrics api requests,, +datadog.cluster_agent.external_metrics.datadog_metrics,gauge,,,,"The label valid is true if the DatadogMetric CR is valid, false otherwise",0,datadog_cluster_agent,external metrics datadog metrics,, +datadog.cluster_agent.external_metrics.delay_seconds,gauge,,second,,Freshness of the metric evaluated from querying Datadog,0,datadog_cluster_agent,external metrics delay,, +datadog.cluster_agent.external_metrics.processed_value,gauge,,,,Value processed from querying Datadog by metric,0,datadog_cluster_agent,external metrics processed,, +datadog.cluster_agent.go.goroutines,gauge,,,,Number of goroutines that currently exist,0,datadog_cluster_agent,go goroutines,, +datadog.cluster_agent.go.memstats.alloc_bytes,gauge,,byte,,Number of bytes allocated and still in use,0,datadog_cluster_agent,go memstats alloc bytes,, +datadog.cluster_agent.go.threads,gauge,,thread,,Number of OS threads created,0,datadog_cluster_agent,go threads,, +datadog.cluster_agent.kubernetes_apiserver.emitted_events,count,,,,Datadog events emitted by the kubernetes_apiserver check,0,datadog_cluster_agent,datadog events events,, +datadog.cluster_agent.kubernetes_apiserver.kube_events,count,,,,Kubernetes events processed by the kubernetes_apiserver check,0,datadog_cluster_agent,apiserver events,, +datadog.cluster_agent.language_detection_dca_handler.processed_requests,count,,,,The number of process language detection requests processed by the handler,0,datadog_cluster_agent,language detection processed requests,, +datadog.cluster_agent.language_detection_patcher.patches,count,,,,The number of patch requests sent by the patcher to the kube api server,0,datadog_cluster_agent,language detection patches,, +datadog.cluster_agent.secret_backend.elapsed,gauge,,millisecond,,The elapsed time of secret backend invocation,0,datadog_cluster_agent,secret backend elapsed time duration,, +datadog.cluster_agent.tagger.stored_entities,gauge,,,,Number of entities stored in the tagger,0,datadog_cluster_agent,tagger stored entities,, +datadog.cluster_agent.tagger.updated_entities,count,,,,Number of updates made to entities in the tagger,0,datadog_cluster_agent,tagger updated entities,, +datadog.cluster_agent.workloadmeta.events_received,count,,,,Number of events received by workloadmeta,0,datadog_cluster_agent,workloadmeta events received,, +datadog.cluster_agent.workloadmeta.notifications_sent,count,,,,Number of notifications sent by workloadmeta to its subscribers,0,datadog_cluster_agent,workloadmeta notifications sent,, +datadog.cluster_agent.workloadmeta.stored_entities,gauge,,,,Number of entities stored in workloadmeta,0,datadog_cluster_agent,workloadmeta stored entities,, +datadog.cluster_agent.workloadmeta.subscribers,gauge,,,,Number of workloadmeta subscribers,0,datadog_cluster_agent,workloadmeta subscribers,, diff --git a/datadog_cluster_agent/tests/fixtures/metrics.txt b/datadog_cluster_agent/tests/fixtures/metrics.txt index 0423811bfa144..77c1f3a756c2d 100644 --- a/datadog_cluster_agent/tests/fixtures/metrics.txt +++ b/datadog_cluster_agent/tests/fixtures/metrics.txt @@ -430,30 +430,30 @@ admission_webhooks_library_injection_attempts{injected="true",language="java"} 4 # HELP admission_webhooks_library_injection_errors Number of library injection failures by language # TYPE admission_webhooks_library_injection_errors counter admission_webhooks_library_injection_errors{language="java"} 1 -# HELP admission_webhooks_cws_exec_instrumentation_attempts Distribution of exec requests instrumentation attempts by CWS Instrumentation mode -# TYPE admission_webhooks_cws_exec_instrumentation_attempts histogram -admission_webhooks_cws_exec_instrumentation_attempts_bucket{injected="false",mode="init_container",reason="already_instrumented",le="0"} 0 -admission_webhooks_cws_exec_instrumentation_attempts_bucket{injected="false",mode="init_container",reason="already_instrumented",le="+Inf"} 1 -admission_webhooks_cws_exec_instrumentation_attempts_sum{injected="false",mode="init_container",reason="already_instrumented"} 1 -admission_webhooks_cws_exec_instrumentation_attempts_count{injected="false",mode="init_container",reason="already_instrumented"} 1 -admission_webhooks_cws_exec_instrumentation_attempts_bucket{injected="false",mode="init_container",reason="pod_not_instrumented",le="0"} 0 -admission_webhooks_cws_exec_instrumentation_attempts_bucket{injected="false",mode="init_container",reason="pod_not_instrumented",le="+Inf"} 2 -admission_webhooks_cws_exec_instrumentation_attempts_sum{injected="false",mode="init_container",reason="pod_not_instrumented"} 2 -admission_webhooks_cws_exec_instrumentation_attempts_count{injected="false",mode="init_container",reason="pod_not_instrumented"} 2 -admission_webhooks_cws_exec_instrumentation_attempts_bucket{injected="true",mode="init_container",reason="",le="0"} 0 -admission_webhooks_cws_exec_instrumentation_attempts_bucket{injected="true",mode="init_container",reason="",le="+Inf"} 1 -admission_webhooks_cws_exec_instrumentation_attempts_sum{injected="true",mode="init_container",reason=""} 1 -admission_webhooks_cws_exec_instrumentation_attempts_count{injected="true",mode="init_container",reason=""} 1 -# HELP admission_webhooks_cws_pod_instrumentation_attempts Distribution of pod requests instrumentation attempts by CWS Instrumentation mode -# TYPE admission_webhooks_cws_pod_instrumentation_attempts histogram -admission_webhooks_cws_pod_instrumentation_attempts_bucket{injected="false",mode="init_container",reason="already_instrumented",le="0"} 0 -admission_webhooks_cws_pod_instrumentation_attempts_bucket{injected="false",mode="init_container",reason="already_instrumented",le="+Inf"} 1 -admission_webhooks_cws_pod_instrumentation_attempts_sum{injected="false",mode="init_container",reason="already_instrumented"} 1 -admission_webhooks_cws_pod_instrumentation_attempts_count{injected="false",mode="init_container",reason="already_instrumented"} 1 -admission_webhooks_cws_pod_instrumentation_attempts_bucket{injected="true",mode="init_container",reason="",le="0"} 0 -admission_webhooks_cws_pod_instrumentation_attempts_bucket{injected="true",mode="init_container",reason="",le="+Inf"} 1 -admission_webhooks_cws_pod_instrumentation_attempts_sum{injected="true",mode="init_container",reason=""} 1 -admission_webhooks_cws_pod_instrumentation_attempts_count{injected="true",mode="init_container",reason=""} 1 +# HELP admission_webhooks_cws_response_duration Distribution of CWS mutating webhook response durations per type operation. +# TYPE admission_webhooks_cws_response_duration histogram +admission_webhooks_cws_response_duration_bucket{le="0.005"} 65 +admission_webhooks_cws_response_duration_bucket{le="0.01"} 102 +admission_webhooks_cws_response_duration_bucket{le="0.025"} 108 +admission_webhooks_cws_response_duration_bucket{le="0.05"} 108 +admission_webhooks_cws_response_duration_bucket{le="0.1"} 108 +admission_webhooks_cws_response_duration_bucket{le="0.25"} 108 +admission_webhooks_cws_response_duration_bucket{le="0.5"} 108 +admission_webhooks_cws_response_duration_bucket{le="1"} 108 +admission_webhooks_cws_response_duration_bucket{le="2.5"} 108 +admission_webhooks_cws_response_duration_bucket{le="5"} 108 +admission_webhooks_cws_response_duration_bucket{le="10"} 108 +admission_webhooks_cws_response_duration_bucket{le="+Inf"} 108 +admission_webhooks_cws_response_duration_sum 0.4897835529999999 +admission_webhooks_cws_response_duration_count 108 +# HELP admission_webhooks_cws_exec_mutation_attempts Number of CWS exec mutation attempts by reason and status. +# TYPE admission_webhooks_cws_exec_mutation_attempts counter +admission_webhooks_cws_exec_mutation_attempts{injected="false",reason="remote_copy_failed"} 1 +admission_webhooks_cws_exec_mutation_attempts{injected="true",reason="remote_copy_failed"} 4 +# HELP admission_webhooks_cws_pod_mutation_attempts Number of CWS pod mutation attempts by reason and status. +# TYPE admission_webhooks_cws_pod_mutation_attempts counter +admission_webhooks_cws_pod_mutation_attempts{injected="false",reason="no_instrumentation_needed"} 1 +admission_webhooks_cws_pod_mutation_attempts{injected="true",reason="no_instrumentation_needed"} 4 # HELP kubernetes_apiserver_emitted_events Number of events emitted by the check. # TYPE kubernetes_apiserver_emitted_events counter kubernetes_apiserver_emitted_events{kind="ConfigMap",type="Normal"} 7 diff --git a/datadog_cluster_agent/tests/test_datadog_cluster_agent.py b/datadog_cluster_agent/tests/test_datadog_cluster_agent.py index c0689b86860b5..6d0aed9ed1354 100644 --- a/datadog_cluster_agent/tests/test_datadog_cluster_agent.py +++ b/datadog_cluster_agent/tests/test_datadog_cluster_agent.py @@ -14,10 +14,10 @@ METRICS = [ 'admission_webhooks.certificate_expiry', - 'admission_webhooks.cws_exec_instrumentation_attempts.count', - 'admission_webhooks.cws_exec_instrumentation_attempts.sum', - 'admission_webhooks.cws_pod_instrumentation_attempts.count', - 'admission_webhooks.cws_pod_instrumentation_attempts.sum', + 'admission_webhooks.cws_exec_mutation_attempts', + 'admission_webhooks.cws_pod_mutation_attempts', + 'admission_webhooks.cws_response_duration.count', + 'admission_webhooks.cws_response_duration.sum', 'admission_webhooks.library_injection_attempts', 'admission_webhooks.library_injection_errors', 'admission_webhooks.mutation_attempts',