From c4ea08e214c934c13aebb2aecce6d2147a134736 Mon Sep 17 00:00:00 2001 From: keisku Date: Wed, 25 Dec 2024 09:09:54 +0000 Subject: [PATCH 1/3] add datadog.cluster_agent.leader_election.is_leader --- .../datadog_checks/datadog_cluster_agent/check.py | 1 + datadog_cluster_agent/metadata.csv | 1 + datadog_cluster_agent/tests/test_datadog_cluster_agent.py | 1 + 3 files changed, 3 insertions(+) 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 e13153eb6a611..4cd4750950002 100644 --- a/datadog_cluster_agent/datadog_checks/datadog_cluster_agent/check.py +++ b/datadog_cluster_agent/datadog_checks/datadog_cluster_agent/check.py @@ -68,6 +68,7 @@ 'kubernetes_apiserver_kube_events': 'kubernetes_apiserver.kube_events', 'language_detection_dca_handler_processed_requests': 'language_detection_dca_handler.processed_requests', 'language_detection_patcher_patches': 'language_detection_patcher.patches', + 'leader_election_is_leader': 'leader_election.is_leader', 'rate_limit_queries_limit': 'datadog.rate_limit_queries.limit', 'rate_limit_queries_period': 'datadog.rate_limit_queries.period', 'rate_limit_queries_remaining': 'datadog.rate_limit_queries.remaining', diff --git a/datadog_cluster_agent/metadata.csv b/datadog_cluster_agent/metadata.csv index 00b14ceb90bf7..c5cc051dbefe7 100644 --- a/datadog_cluster_agent/metadata.csv +++ b/datadog_cluster_agent/metadata.csv @@ -57,6 +57,7 @@ datadog.cluster_agent.kubernetes_apiserver.emitted_events,count,,,,"Datadog even 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.leader_election.is_leader,count,,,,"he label is_leader is true if the reporting pod is leader, equals false otherwise",0,datadog_cluster_agent,leader election is leader, 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, diff --git a/datadog_cluster_agent/tests/test_datadog_cluster_agent.py b/datadog_cluster_agent/tests/test_datadog_cluster_agent.py index d8c915e4ab465..7b42a4a05ed3d 100644 --- a/datadog_cluster_agent/tests/test_datadog_cluster_agent.py +++ b/datadog_cluster_agent/tests/test_datadog_cluster_agent.py @@ -70,6 +70,7 @@ 'kubernetes_apiserver.kube_events', 'language_detection_dca_handler.processed_requests', 'language_detection_patcher.patches', + 'leader_election.is_leader', 'secret_backend.elapsed', 'tagger.stored_entities', 'tagger.updated_entities', From fc74e600bf72cc7b104f5a5b8067511dcfcbbf4d Mon Sep 17 00:00:00 2001 From: keisku Date: Wed, 25 Dec 2024 09:19:33 +0000 Subject: [PATCH 2/3] changelog --- datadog_cluster_agent/changelog.d/19308.added | 1 + 1 file changed, 1 insertion(+) create mode 100644 datadog_cluster_agent/changelog.d/19308.added diff --git a/datadog_cluster_agent/changelog.d/19308.added b/datadog_cluster_agent/changelog.d/19308.added new file mode 100644 index 0000000000000..193751a80b106 --- /dev/null +++ b/datadog_cluster_agent/changelog.d/19308.added @@ -0,0 +1 @@ +Add `datadog.cluster_agent.leader_election.is_leader`. From c2c5bcd5db8e7f5db93109411338a6c8c811bbdd Mon Sep 17 00:00:00 2001 From: keisku Date: Wed, 25 Dec 2024 09:30:18 +0000 Subject: [PATCH 3/3] fix metadata --- datadog_cluster_agent/metadata.csv | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/datadog_cluster_agent/metadata.csv b/datadog_cluster_agent/metadata.csv index c5cc051dbefe7..6ae7bbd2500da 100644 --- a/datadog_cluster_agent/metadata.csv +++ b/datadog_cluster_agent/metadata.csv @@ -57,7 +57,7 @@ datadog.cluster_agent.kubernetes_apiserver.emitted_events,count,,,,"Datadog even 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.leader_election.is_leader,count,,,,"he label is_leader is true if the reporting pod is leader, equals false otherwise",0,datadog_cluster_agent,leader election is leader, +datadog.cluster_agent.leader_election.is_leader,gauge,,,,"The label is_leader is true if the reporting pod is leader, equals false otherwise",0,datadog_cluster_agent,leader election is leader, 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,