# Prometheus Plugin increases CPU usage to 100%

**URL:** <https://community.jenkins.io/t/prometheus-plugin-increases-cpu-usage-to-100/2709>\
**Category:** Ask a question\
**Created:** [June 12, 2022, 8:09pm UTC](https://community.jenkins.io/t/prometheus-plugin-increases-cpu-usage-to-100/2709 "2022-06-12T20:09:46Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![joaoamaro](https://dub1.discourse-cdn.com/flex013/user_avatar/community.jenkins.io/joaoamaro/32/1659_2.png) [@joaoamaro](https://community.jenkins.io/u/joaoamaro)\
**Post date:** [June 12, 2022, 8:09pm UTC](https://community.jenkins.io/t/prometheus-plugin-increases-cpu-usage-to-100/2709/1 "2022-06-12T20:09:46Z")

</div>

I have the Prometheus plugin installed in my Jenkins instance and recently, after re-deploying Jenkins with the most recent plugin versions (other plugins) the Prometheus plugin started to spike the CPU usage to 100%, even when no builds are running. This causes Jenkins to be unresponsive a lot of times:

 ![image](https://europe1.discourse-cdn.com/flex013/uploads/jenkins/original/2X/6/6c285bfa551c12827eb936115f29b1a861511db7.jpeg)

Did anyone face a similar issue?

---

<div class="post-metadata">

**Author:** ![halkeye](https://dub1.discourse-cdn.com/flex013/user_avatar/community.jenkins.io/halkeye/32/8_2.png) [@halkeye](https://community.jenkins.io/u/halkeye)\
**Post date:** [June 12, 2022, 8:51pm UTC](https://community.jenkins.io/t/prometheus-plugin-increases-cpu-usage-to-100/2709/2 "2022-06-12T20:51:50Z")

</div>

have you checked the issue tracker (sidebar of the [plugins.jenkins.io](http://plugins.jenkins.io) page)

---

<div class="post-metadata">

**Author:** ![joaoamaro](https://dub1.discourse-cdn.com/flex013/user_avatar/community.jenkins.io/joaoamaro/32/1659_2.png) [@joaoamaro](https://community.jenkins.io/u/joaoamaro)\
**Post date:** [June 12, 2022, 9:12pm UTC](https://community.jenkins.io/t/prometheus-plugin-increases-cpu-usage-to-100/2709/3 "2022-06-12T21:12:40Z")

</div>

yes, there is nothing there on this regard

---

<div class="post-metadata">

**Author:** ![poddingue](https://dub1.discourse-cdn.com/flex013/user_avatar/community.jenkins.io/poddingue/32/985_2.png) [@poddingue](https://community.jenkins.io/u/poddingue)\
**Post date:** [June 13, 2022, 6:58am UTC](https://community.jenkins.io/t/prometheus-plugin-increases-cpu-usage-to-100/2709/4 "2022-06-13T06:58:41Z")

</div>

Hello @joaoamaro and welcome to this community 👋  
How did you spot that it’s the Prometheus plugin that uses the CPU the most?  
Did you install a metric plugin like [Monitoring](https://plugins.jenkins.io/monitoring/), or are you monitoring with `htop` or any other tool?

---

<div class="post-metadata">

**Author:** ![joaoamaro](https://dub1.discourse-cdn.com/flex013/user_avatar/community.jenkins.io/joaoamaro/32/1659_2.png) [@joaoamaro](https://community.jenkins.io/u/joaoamaro)\
**Post date:** [June 13, 2022, 7:37pm UTC](https://community.jenkins.io/t/prometheus-plugin-increases-cpu-usage-to-100/2709/5 "2022-06-13T19:37:34Z")

</div>

hi @poddingue. Thank you!  
Yes, I have the Monitoring plugin installed. The image in my question is from that plugin, and this one as well where you can see the CPU usage when the Prometheus plugin is installed:

 ![image](https://europe1.discourse-cdn.com/flex013/uploads/jenkins/original/2X/0/05130d24c4f237a19ff72b8ddb4d943330632689.png)

When I remove the Prometheus plugin, Jenkins runs fine and the CPU usage decreases to 1 or 2% when iddle.

---

<div class="post-metadata">

**Author:** ![poddingue](https://dub1.discourse-cdn.com/flex013/user_avatar/community.jenkins.io/poddingue/32/985_2.png) [@poddingue](https://community.jenkins.io/u/poddingue)\
**Post date:** [June 14, 2022, 8:52am UTC](https://community.jenkins.io/t/prometheus-plugin-increases-cpu-usage-to-100/2709/6 "2022-06-14T08:52:37Z")

</div>

Thanks for the feedback.  
You could maybe use a tool such as [jps](https://backstage.forgerock.com/knowledge/kb/article/a39551500) to find which thread is using all the CPU, and then maybe post a [new issue](https://github.com/jenkinsci/prometheus-plugin/issues/new/choose) on Prometheus’s GitHub repo.

---

<div class="post-metadata">

**Author:** ![joaoamaro](https://dub1.discourse-cdn.com/flex013/user_avatar/community.jenkins.io/joaoamaro/32/1659_2.png) [@joaoamaro](https://community.jenkins.io/u/joaoamaro)\
**Post date:** [June 14, 2022, 11:04am UTC](https://community.jenkins.io/t/prometheus-plugin-increases-cpu-usage-to-100/2709/7 "2022-06-14T11:04:34Z")

</div>

Thanks for your help. I’ll do as you suggest.
