<p>As we can see from <a href="https://github.com/kubernetes/kube-state-metrics/blob/1dfe6681e9/docs/horizontalpodautoscaler-metrics.md" rel="nofollow noreferrer">kube-state-metrics/docs/horizontalpodautoscaler-metrics.md</a></p>

<p>We just need to have kube-state-metrics along with HPA to start getting metrics in prometheus.</p>

CC BY-SA 4.0
2019-02-26T06:34:31.787Z
2019-02-26T06:34:31.787Z
Hashfyre
<p>In the Kubernetes dashboard, I can see for a HPA the following information:</p>

<pre><code>Min Replicas:
3
Max Replicas:
11
Target CPU Utilization:
80%
Status
Current Replicas:
3
Desired Replicas:
3
Current CPU Utilization:
10%
Last Scaled:
5 days
</code></pre>

<p>However, I can't figure out how the 10% CPU utilization is calculated? </p>

<p>And if this value exposed via Prometheus?</p>

CC BY-SA 4.0
2019-02-24T13:06:50.487Z
10% is calculated as 10% of the requested resources in the deployment.
So if you request 100mi, 10% is 10 milicores of CPU used.
As for prometheus, I have no idea.
avi
CC BY-SA 4.0
2019-02-24T13:37:25.677Z
And in the case of 3 replicas, do you know if this 10% is simply the average across the replicas?
Darragh
CC BY-SA 4.0
2019-02-24T18:54:47.793Z
Yes, average of all replicas
avi
CC BY-SA 4.0
2020-04-21T16:16:58.553Z
Did you ever find a way to get this in prometheus?  I have the prom operator, kube-state-metrics, but the actual percent doesn't seem to be exposed anywhere.  I would like to know the percent, not the desired/min/max/etc. replicas.
Lin Meyer
<kubernetes><prometheus>
Does Prometheus expose the Horizontal Pod Autoscaler's "Current CPU Utilization" as shown in the Kubernetes dashboard?
Darragh
# Does Prometheus expose the Horizontal Pod Autoscaler's "Current CPU Utilization" as shown in the Kubernetes dashboard?

(Asked by: username_0 on 2019-02-05)

In the Kubernetes dashboard, I can see for a HPA the following information:
Min Replicas:
3
Max Replicas:
11
Target CPU Utilization:
80%
Status
Current Replicas:
3
Desired Replicas:
3
Current CPU Utilization:
10%
Last Scaled:
5 days

However, I can't figure out how the 10% CPU utilization is calculated? 
And if this value exposed via Prometheus?

**Tags:** kubernetes, prometheus

> **Comments:**
> **username_1**: 10% is calculated as 10% of the requested resources in the deployment. So if you request 100mi, 10% is 10 milicores of CPU used. As for prometheus, I have no idea.  
> **username_0**: And in the case of 3 replicas, do you know if this 10% is simply the average across the replicas?  
> **username_1**: Yes, average of all replicas  
> **username_2**: Did you ever find a way to get this in prometheus?  I have the prom operator, kube-state-metrics, but the actual percent doesn't seem to be exposed anywhere.  I would like to know the percent, not the desired/min/max/etc. replicas.  

---

## 1 answers

### Answer by username_3 on 2019-02-26. Score: 1

As we can see from [kube-state-metrics/docs/horizontalpodautoscaler-metrics.md](https://github.com/kubernetes/kube-state-metrics/blob/1dfe6681e9/docs/horizontalpodautoscaler-metrics.md)

We just need to have kube-state-metrics along with HPA to start getting metrics in prometheus.


---

