Skip to content

Commit 67be2b5

Browse files
authored
[CONTP-382] Add Validation Webhook telemetry metrics (#18867)
* Add Validation Webhook telemetry * Updating webhooks_receieved description
1 parent 34afd9d commit 67be2b5

File tree

5 files changed

+9
-2
lines changed

5 files changed

+9
-2
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Add telemetry scraping for Validation AdmissionController

datadog_cluster_agent/datadog_checks/datadog_cluster_agent/check.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
'admission_webhooks_library_injection_attempts': 'admission_webhooks.library_injection_attempts',
1212
'admission_webhooks_library_injection_errors': 'admission_webhooks.library_injection_errors',
1313
'admission_webhooks_mutation_attempts': 'admission_webhooks.mutation_attempts',
14+
'admission_webhooks_validation_attempts': 'admission_webhooks.validation_attempts',
1415
'admission_webhooks_patcher_attempts': 'admission_webhooks.patcher.attempts',
1516
'admission_webhooks_patcher_completed': 'admission_webhooks.patcher.completed',
1617
'admission_webhooks_patcher_errors': 'admission_webhooks.patcher.errors',

datadog_cluster_agent/metadata.csv

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ datadog.cluster_agent.admission_webhooks.reconcile_errors,gauge,,,,Number of rec
1717
datadog.cluster_agent.admission_webhooks.reconcile_success,gauge,,success,,Number of reconcile successes per controller,0,datadog_cluster_agent,admission webhooks reconcile success,
1818
datadog.cluster_agent.admission_webhooks.response_duration.count,count,,,,Webhook response duration count,0,datadog_cluster_agent,webhook response duration count,
1919
datadog.cluster_agent.admission_webhooks.response_duration.sum,count,,second,,Webhook response duration sum,0,datadog_cluster_agent,webhook response duration sum,
20-
datadog.cluster_agent.admission_webhooks.webhooks_received,gauge,,,,Number of mutation webhook requests received,0,datadog_cluster_agent,admission webhooks received,
20+
datadog.cluster_agent.admission_webhooks.validation_attempts,gauge,,,,Number of pod validation attempts by validation type,0,datadog_cluster_agent,admission webhooks validation attempts,
21+
datadog.cluster_agent.admission_webhooks.webhooks_received,gauge,,,,Number of webhook requests received,0,datadog_cluster_agent,admission webhooks received,
2122
datadog.cluster_agent.aggregator.flush,count,,,,"Number of metrics/service checks/events flushed by (data_type, state)",0,datadog_cluster_agent,aggregator flush,
2223
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,
2324
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/tests/fixtures/metrics.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ admission_webhooks_mutation_attempts{error="",injected="true",mutation_type="age
1111
admission_webhooks_mutation_attempts{error="",injected="true",mutation_type="agent_sidecar",status="success"} 1
1212
admission_webhooks_mutation_attempts{error="",injected="true",mutation_type="cws_pod_instrumentation",status="success"} 2
1313
admission_webhooks_mutation_attempts{error="",injected="true",mutation_type="lib_injection",status="success"} 1
14+
# HELP admission_webhooks_validation_attempts Number of pod validation attempts by validation type
15+
# TYPE admission_webhooks_validation_attempts gauge
16+
admission_webhooks_validation_attempts{error="",validated="true",webhook_name="kubernetes_audit",status="success"} 1
1417
# HELP admission_webhooks_reconcile_errors Number of reconcile errors per controller.
1518
# TYPE admission_webhooks_reconcile_errors gauge
1619
admission_webhooks_reconcile_errors{controller="secrets"} 5
@@ -34,7 +37,7 @@ admission_webhooks_response_duration_bucket{le="10"} 108
3437
admission_webhooks_response_duration_bucket{le="+Inf"} 108
3538
admission_webhooks_response_duration_sum 0.4897835529999999
3639
admission_webhooks_response_duration_count 108
37-
# HELP admission_webhooks_webhooks_received Number of mutation webhook requests received.
40+
# HELP admission_webhooks_webhooks_received Number of webhook requests received.
3841
# TYPE admission_webhooks_webhooks_received gauge
3942
admission_webhooks_webhooks_received 300
4043
# HELP aggregator__dogstatsd_contexts Count the number of dogstatsd contexts in the aggregator

datadog_cluster_agent/tests/test_datadog_cluster_agent.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
'admission_webhooks.library_injection_attempts',
2222
'admission_webhooks.library_injection_errors',
2323
'admission_webhooks.mutation_attempts',
24+
'admission_webhooks.validation_attempts',
2425
'admission_webhooks.patcher.attempts',
2526
'admission_webhooks.patcher.completed',
2627
'admission_webhooks.patcher.errors',

0 commit comments

Comments
 (0)