# Are HPA configurations captured with out of the box metrics

**URL:** <https://community.dynatrace.com/t/are-hpa-configurations-captured-with-out-of-the-box-metrics/45810>\
**Category:** Container platforms\
**Tags:** kubernetes\
**Created:** [May 29, 2024, 12:58pm UTC](https://community.dynatrace.com/t/are-hpa-configurations-captured-with-out-of-the-box-metrics/45810 "2024-05-29T12:58:20Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![ronmacdonald](https://avatars.discourse-cdn.com/v4/letter/r/a88e57/32.png) [@ronmacdonald](https://community.dynatrace.com/u/ronmacdonald)\
**Post date:** [May 29, 2024, 12:58pm UTC](https://community.dynatrace.com/t/are-hpa-configurations-captured-with-out-of-the-box-metrics/45810/1 "2024-05-29T12:58:20Z")

</div>

I’m looking to dashboard health and scalability of pods for app teams.&nbsp; I’m having trouble finding HPA configurations such as minReplicas and maxReplicas.&nbsp; If these are captured, what is the metric name?

---

<div class="post-metadata">

**Author:** ![Eric\_Yu](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/eric_yu/32/20360_2.png) [@Eric\_Yu](https://community.dynatrace.com/u/Eric_Yu)\
**Post date:** [May 30, 2024, 7:42pm UTC](https://community.dynatrace.com/t/are-hpa-configurations-captured-with-out-of-the-box-metrics/45810/2 "2024-05-30T19:42:12Z")

</div>

Unfortunately, there’s a limitation in that regard for HPA metrics in K8s.

Here’s some insight regarding this topic.

Dynatrace University (min 34:00): [Kubernetes Resiliency and Costs with Dynatrace | On Demand | Dynatrace University](https://university.dynatrace.com/ondemand/course/21409/video/41580?content=overview&section=21410)

YT Link:

[![](https://global.discourse-cdn.com/dynatrace/original/3X/6/8/68641c706ac4bdb741b8fd08cd0d4a378227bacb.jpeg "Mastering Kubernetes Resiliency and Costs with Dynatrace") ](https://www.youtube.com/watch?v=aR_UxXvIidM&t=2058)

---

<div class="post-metadata">

**Author:** ![ronmacdonald](https://avatars.discourse-cdn.com/v4/letter/r/a88e57/32.png) [@ronmacdonald](https://community.dynatrace.com/u/ronmacdonald)\
**Post date:** [May 31, 2024, 12:39pm UTC](https://community.dynatrace.com/t/are-hpa-configurations-captured-with-out-of-the-box-metrics/45810/3 "2024-05-31T12:39:11Z")

</div>

HPA metrics are available via the kubernetes object state api, see link below.&nbsp; Per this documentation the min/max replicas is stable.&nbsp; I’ll create an RFE as this would be invaluable for quick glance scale.

> <https://github.com/kubernetes/kube-state-metrics/blob/main/docs/metrics/workload/horizontalpodautoscaler-metrics.md>

---

<div class="post-metadata">

**Author:** ![sergiofbsilva](https://avatars.discourse-cdn.com/v4/letter/s/a183cd/32.png) [@sergiofbsilva](https://community.dynatrace.com/u/sergiofbsilva)\
**Post date:** [February 10, 2025, 3:04pm UTC](https://community.dynatrace.com/t/are-hpa-configurations-captured-with-out-of-the-box-metrics/45810/4 "2025-02-10T15:04:31Z")

</div>

Hi [@Eric\_Yu](https://community.dynatrace.com/user/54474)&nbsp;[@ronmacdonald](https://community.dynatrace.com/user/5224)

Will this be available in dynatrace anytime soon? We also need it, thanks

---

<div class="post-metadata">

**Author:** ![florian\_g](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/florian_g/32/12081_2.png) [@florian\_g](https://community.dynatrace.com/u/florian_g)\
**Post date:** [March 25, 2025, 4:08pm UTC](https://community.dynatrace.com/t/are-hpa-configurations-captured-with-out-of-the-box-metrics/45810/5 "2025-03-25T16:08:53Z")

</div>

Hi - I can share some updates here. We are planning to support many more K8s objects going forward in Dynatrace: ConfigMaps, Secrets, CRDs, Ingress, Network Policies, … and also HPA. With that, we also plan to allow you to directly view the yaml/json of these objects within Dynatrace or even analyse them using DQL (which unlocks some extremely powerful use-cases). We are currently **planing** to have this ready before the end of this year.

---

<div class="post-metadata">

**Author:** ![ronmacdonald](https://avatars.discourse-cdn.com/v4/letter/r/a88e57/32.png) [@ronmacdonald](https://community.dynatrace.com/u/ronmacdonald)\
**Post date:** [March 26, 2025, 4:33pm UTC](https://community.dynatrace.com/t/are-hpa-configurations-captured-with-out-of-the-box-metrics/45810/6 "2025-03-26T16:33:05Z")

</div>

If we can help preview, please reach out.&nbsp; Very interested in the features when they are released.

---

<div class="post-metadata">

**Author:** ![florian\_g](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/florian_g/32/12081_2.png) [@florian\_g](https://community.dynatrace.com/u/florian_g)\
**Post date:** [April 4, 2025, 11:54am UTC](https://community.dynatrace.com/t/are-hpa-configurations-captured-with-out-of-the-box-metrics/45810/7 "2025-04-04T11:54:20Z")

</div>

just played around with kube-state-metrics and our [prometheus ingest](https://docs.dynatrace.com/docs/observe/infrastructure-monitoring/container-platform-monitoring/kubernetes-monitoring/monitor-prometheus-metrics#monitor-prometheus-metrics)&nbsp;and thought I shared this here:

1. I installed kube-state-metrics using the [helm chart](https://artifacthub.io/packages/helm/prometheus-community/kube-state-metrics)

2. I annotated the kube-state-metrics service so the metrics are scraped by Dynatrace. (see annotations at the end/screenshot)

3. Metrics automatically show up on the corresponding namespace in the K8s app (see screenshot)

4. Created a minimal HPA dashboard (see screenshot / json for import attached)

Annotations I put on the kube-state-metrics service.

```markup
metrics.dynatrace.com/filter: |
      {
        "mode": "include",
        "names": [
            "kube_horizontalpodautoscaler_spec_*",
            "kube_horizontalpodautoscaler_status_*"
            ]
      }
    metrics.dynatrace.com/path: /metrics
    metrics.dynatrace.com/port: "8080"
    metrics.dynatrace.com/scrape: "true"

```

[HPA.json](https://community.dynatrace.com/uploads/short-url/pZNLNadAz00jn8oiCBi1yZnVf6F.json) (10.9 KB)
