# Configuring labels on host-related metrics

**URL:** <https://forums.percona.com/t/configuring-labels-on-host-related-metrics/38799>\
**Category:** PMM 3.x\
**Tags:** pmm\
**Created:** [July 23, 2025, 5:31pm UTC](https://forums.percona.com/t/configuring-labels-on-host-related-metrics/38799 "2025-07-23T17:31:11Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![guba-dlaunikitis](https://avatars.discourse-cdn.com/v4/letter/g/bbe5ce/32.png) [@guba-dlaunikitis](https://forums.percona.com/u/guba-dlaunikitis)\
**Post date:** [July 23, 2025, 5:31pm UTC](https://forums.percona.com/t/configuring-labels-on-host-related-metrics/38799/1 "2025-07-23T17:31:11Z")

</div>

**Package Versions**  
PMM Client: 3.3.0  
PMM Server: 3.2.0

**Subject**  
I have been setting up some alerting rules in Grafana, and I ran into an issue while trying to use custom labels. I ran the following command to add the PMM agent to my server with a custom label:

```auto
pmm-agent setup ... --custom-labels=env=test

```

I then checked the PMM UI to confirm it was added correctly:

 ![image](https://us1.discourse-cdn.com/flex019/uploads/percona1/original/3X/1/6/1643770bfa666217920df07f03b565e8a3f9203b.png)

The image shows it has the label applied to the machine, but when using the `pmm_managed_inventory_agents{agent_type="pmm-agent"}` PromQL query there is nothing about this label:

```auto
{ __name__ ="pmm_managed_inventory_agents", agent_id="...", agent_type="pmm-agent", disabled="0", instance="pmm-server", job="pmm-managed", node_id="...", node_name="...", version="3.3.0"}
1

```

On the contrary, I added my MySQL service and see the label when using the `mysql_up` query:

```auto
{ __name__ ="mysql_up", agent_id="...", agent_type="mysqld_exporter", env="test", ... , service_type="mysql"}
1

```

I wanted to come post this and see if:

1. Am I configuring something wrong, or can I be using a different query? (I pulled this query from the alerting templates)
2. Is the lack of custom labels outside of the node exporter data by design?

Thank you so much for any feedback and I can provide more information if it is needed

---

<div class="post-metadata">

**Author:** ![Michael\_Okoko](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/michael_okoko/32/5688_2.png) [@Michael\_Okoko](https://forums.percona.com/u/Michael_Okoko)\
**Post date:** [July 23, 2025, 5:59pm UTC](https://forums.percona.com/t/configuring-labels-on-host-related-metrics/38799/2 "2025-07-23T17:59:29Z")

</div>

This appears to be an issue with how we propagate custom labels to the pmm agent for the node. You can file an improvement on [https://perconadev.atlassian.net/](https://perconadev.atlassian.net/).

---

<div class="post-metadata">

**Author:** ![guba-dlaunikitis](https://avatars.discourse-cdn.com/v4/letter/g/bbe5ce/32.png) [@guba-dlaunikitis](https://forums.percona.com/u/guba-dlaunikitis)\
**Post date:** [July 24, 2025, 7:22pm UTC](https://forums.percona.com/t/configuring-labels-on-host-related-metrics/38799/3 "2025-07-24T19:22:57Z")

</div>

Hey Michael,

It doesn’t appear I can do so. Would you be willing to handle creating one? Thanks!
