diff --git a/kube_apiserver_metrics/datadog_checks/kube_apiserver_metrics/kube_apiserver_metrics.py b/kube_apiserver_metrics/datadog_checks/kube_apiserver_metrics/kube_apiserver_metrics.py index 09ab5c3978b0c..b5e1fcfa7bb67 100644 --- a/kube_apiserver_metrics/datadog_checks/kube_apiserver_metrics/kube_apiserver_metrics.py +++ b/kube_apiserver_metrics/datadog_checks/kube_apiserver_metrics/kube_apiserver_metrics.py @@ -11,6 +11,7 @@ METRICS = { 'apiserver_current_inflight_requests': 'current_inflight_requests', + # Deprecated in 1.23 (replaced by apiserver_longrunning_requests) 'apiserver_longrunning_gauge': 'longrunning_gauge', 'go_threads': 'go_threads', 'go_goroutines': 'go_goroutines', @@ -62,6 +63,8 @@ # https://kubernetes.io/docs/reference/using-api/deprecation-policy/#rest-resources-aka-api-objects 'apiserver_requested_deprecated_apis': 'requested_deprecated_apis', # For Kubernetes >= 1.23 + # https://github.com/kubernetes/kubernetes/pull/103799 + 'apiserver_longrunning_requests': 'longrunning_gauge', # https://github.com/kubernetes/kubernetes/pull/104983 'apiserver_storage_list_total': 'storage_list_total', 'apiserver_storage_list_fetched_objects_total': 'storage_list_fetched_objects_total', diff --git a/kube_apiserver_metrics/metadata.csv b/kube_apiserver_metrics/metadata.csv index e00d8c3763a89..ddc556f680974 100644 --- a/kube_apiserver_metrics/metadata.csv +++ b/kube_apiserver_metrics/metadata.csv @@ -1,5 +1,5 @@ metric_name,metric_type,interval,unit_name,per_unit_name,description,orientation,integration,short_name,curated_metric -kube_apiserver.longrunning_gauge,gauge,,request,,The gauge of all active long-running apiserver requests broken out by verb API resource and scope. Not all requests are tracked this way.,-1,kubernetes_api_server_metrics,long running gauges, +kube_apiserver.longrunning_gauge,gauge,,request,,"The gauge of all active long-running apiserver requests broken out by verb, group, version, resource, scope, and component. Not all requests are tracked this way.",-1,kubernetes_api_server_metrics,long running gauges, kube_apiserver.current_inflight_requests,gauge,,,,The maximal number of currently used inflight request limit of this apiserver per request kind in last second.,0,kubernetes_api_server_metrics,current inflight requests, kube_apiserver.audit_event,gauge,,event,,The accumulated number audit events generated and sent to the audit backend,1,kubernetes_api_server_metrics,accumulated audit events, kube_apiserver.go_threads,gauge,,thread,,The number of OS threads created,0,kubernetes_api_server_metrics,go threads, diff --git a/kube_apiserver_metrics/tests/test_kube_apiserver_metrics_1_24.py b/kube_apiserver_metrics/tests/test_kube_apiserver_metrics_1_24.py index 8c95fd75b9182..45b1261158318 100644 --- a/kube_apiserver_metrics/tests/test_kube_apiserver_metrics_1_24.py +++ b/kube_apiserver_metrics/tests/test_kube_apiserver_metrics_1_24.py @@ -22,6 +22,7 @@ class TestKubeAPIServerMetrics: """Basic Test for kube_apiserver integration.""" METRICS = [ + 'longrunning_gauge', 'current_inflight_requests', 'audit_event', 'go_threads', diff --git a/kube_apiserver_metrics/tests/test_kube_apiserver_metrics_1_25.py b/kube_apiserver_metrics/tests/test_kube_apiserver_metrics_1_25.py index c243d42eaa8ea..70ba1a5851059 100644 --- a/kube_apiserver_metrics/tests/test_kube_apiserver_metrics_1_25.py +++ b/kube_apiserver_metrics/tests/test_kube_apiserver_metrics_1_25.py @@ -41,6 +41,7 @@ class TestKubeAPIServerMetrics: CHECK_NAME = 'kube_apiserver_metrics' NAMESPACE = 'kube_apiserver' METRICS = [ + NAMESPACE + '.longrunning_gauge', NAMESPACE + '.current_inflight_requests', NAMESPACE + '.audit_event', NAMESPACE + '.go_threads', diff --git a/kube_apiserver_metrics/tests/test_kube_apiserver_metrics_1_26.py b/kube_apiserver_metrics/tests/test_kube_apiserver_metrics_1_26.py index 98a26546817eb..0e4a9f3b78945 100644 --- a/kube_apiserver_metrics/tests/test_kube_apiserver_metrics_1_26.py +++ b/kube_apiserver_metrics/tests/test_kube_apiserver_metrics_1_26.py @@ -22,6 +22,7 @@ class TestKubeAPIServerMetrics: """Basic Test for kube_apiserver integration.""" METRICS = [ + 'longrunning_gauge', 'current_inflight_requests', 'audit_event', 'go_threads',