# Kube State Metrics stop reporting / Potential Leader Election issue

**URL:** <https://discuss.elastic.co/t/kube-state-metrics-stop-reporting-potential-leader-election-issue/329794>\
**Category:** Elastic Agent\
**Created:** [April 12, 2023, 4:00am UTC](https://discuss.elastic.co/t/kube-state-metrics-stop-reporting-potential-leader-election-issue/329794 "2023-04-12T04:00:19Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![RichardMatthews](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/richardmatthews/32/94966_2.png) [@RichardMatthews](https://discuss.elastic.co/u/RichardMatthews)\
**Post date:** [April 12, 2023, 4:00am UTC](https://discuss.elastic.co/t/kube-state-metrics-stop-reporting-potential-leader-election-issue/329794/1 "2023-04-12T04:00:19Z")

</div>

Hey,

I am having an issue with collecting data from kube state metrics where it will randomly stop coming through into Kibana and all that seems to help is restarting the elastic-agents until it starts to come back.

I am using the Elastic Operator for Kubernetes with the Fleet Managed Elastic Agents and I am using the default kubernetes integration.

I am assuming that this is something to do with the leader election as I have recently discovered that only the leader can collect data from the kube state metrics endpoint. Is there a way to verify which elastic-agent is the leader?

Has anyone had an issue like this before? Any help is much appreciated :).

Thanks,  
Richard

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [May 10, 2023, 4:00am UTC](https://discuss.elastic.co/t/kube-state-metrics-stop-reporting-potential-leader-election-issue/329794/2 "2023-05-10T04:00:30Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
