Configuring labels on host-related metrics

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:

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

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

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:

{__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:

{__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

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/.

Hey Michael,

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