Skip to content

Commit

Permalink
Add Validation Webhook telemetry
Browse files Browse the repository at this point in the history
  • Loading branch information
gabedos committed Oct 17, 2024
1 parent c8ba87f commit bd89f75
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions datadog_cluster_agent/changelog.d/18867.added
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add telemetry scraping for Validation AdmissionController
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
'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',
'admission_webhooks_validation_attempts': 'admission_webhooks.validation_attempts',
'admission_webhooks_patcher_attempts': 'admission_webhooks.patcher.attempts',
'admission_webhooks_patcher_completed': 'admission_webhooks.patcher.completed',
'admission_webhooks_patcher_errors': 'admission_webhooks.patcher.errors',
Expand Down
1 change: 1 addition & 0 deletions datadog_cluster_agent/metadata.csv
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ datadog.cluster_agent.admission_webhooks.mutation_errors,gauge,,,,Number of muta
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.validation_attempts,gauge,,,,Number of pod validation attempts by validation type,0,datadog_cluster_agent,admission webhooks validation attempts
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,
Expand Down
3 changes: 3 additions & 0 deletions datadog_cluster_agent/tests/fixtures/metrics.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ admission_webhooks_mutation_attempts{error="",injected="true",mutation_type="age
admission_webhooks_mutation_attempts{error="",injected="true",mutation_type="agent_sidecar",status="success"} 1
admission_webhooks_mutation_attempts{error="",injected="true",mutation_type="cws_pod_instrumentation",status="success"} 2
admission_webhooks_mutation_attempts{error="",injected="true",mutation_type="lib_injection",status="success"} 1
# HELP admission_webhooks_validation_attempts Number of pod validation attempts by validation type
# TYPE admission_webhooks_validation_attempts gauge
admission_webhooks_validation_attempts{error="",validated="true",webhook_name="kubernetes_audit",status="success"} 1
# HELP admission_webhooks_reconcile_errors Number of reconcile errors per controller.
# TYPE admission_webhooks_reconcile_errors gauge
admission_webhooks_reconcile_errors{controller="secrets"} 5
Expand Down
1 change: 1 addition & 0 deletions datadog_cluster_agent/tests/test_datadog_cluster_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
'admission_webhooks.library_injection_attempts',
'admission_webhooks.library_injection_errors',
'admission_webhooks.mutation_attempts',
'admission_webhooks.validation_attempts',
'admission_webhooks.patcher.attempts',
'admission_webhooks.patcher.completed',
'admission_webhooks.patcher.errors',
Expand Down

0 comments on commit bd89f75

Please sign in to comment.