# How to set node name

**URL:** https://forums.percona.com/t/how-to-set-node-name/37929
**Category:** PMM 2.x
**Created:** [May 13, 2025, 11:24pm UTC](https://forums.percona.com/t/how-to-set-node-name/37929 "2025-05-13T23:24:59Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![sh123](https://avatars.discourse-cdn.com/v4/letter/s/a9a28c/32.png) [@sh123](https://forums.percona.com/u/sh123)
#### Post date: [May 13, 2025, 11:24pm UTC](https://forums.percona.com/t/how-to-set-node-name/37929/1 "2025-05-13T23:24:59Z")

</div>

I created the pmm-client as a container as follow:

```auto
docker run -d --name pmm-client -e PMM_AGENT_SERVER_ADDRESS=XXX.XXX.XXX.XXX:443 -e PMM_AGENT_SERVER_USERNAME=test -e PMM_AGENT_SERVER_PASSWORD=test123 -e PMM_AGENT_CONFIG_FILE=/tmp/pmm-agent.yaml -e PMM_AGENT_SERVER_INSECURE_TLS=1 -e PMM_AGENT_SETUP=1 --volumes-from pmm-client-data percona/pmm-client:2.35.0

```

But when I check my Grafana dashboard, the name isn’t helpful. It’s using the container id value.

 ![Screenshot 2025-05-14 001216](https://us1.discourse-cdn.com/flex019/uploads/percona1/original/3X/9/7/978e6c8ff6f0347d791badf133e42374ff1d6a0b.png)

Upon installation of the pmm-client docker, what parameter can I use to set the node name, so I can have it use the value “france\_server” for instance.

Is there a way to also edit this node value too?

```auto
docker exec -it pmm-client /bin/bash
pmm-admin config --help

```

Just returns this:

> –node-model=STRING Node model  
> –region=STRING Node region  
> –az=STRING Node availability zone  
> –agent-password=STRING Custom password for /metrics endpoint  
> –force Remove Node with that name with all dependent Services and Agents if one exist  
> –metrics-mode=“auto” Metrics flow mode for agents node-exporter, can be push - agent will push metrics, pull - server scrape metrics from agent or auto - chosen by server  
> –disable-collectors=DISABLE-COLLECTORS,… Comma-separated list of collector names to exclude from exporter  
> –custom-labels=KEY=VALUE,KEY=VALUE,… Custom user-assigned labels  
> –paths-base=STRING Base path where all binaries, tools and collectors of PMM client are located  
> –log-level=“warn” Logging level  
> –log-lines-count=1024 Take and return N most recent log lines in logs.zip for each: server, every configured exporters and agents

I can’t seem to find what I’m looking for, or is this only possible upon installation?

---

<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: [May 14, 2025, 6:39am UTC](https://forums.percona.com/t/how-to-set-node-name/37929/2 "2025-05-14T06:39:38Z")

</div>

> [@sh123](#):
>
> or is this only possible upon installation?

At this time, yes.You can only set a custom node name when adding the node for now. In your case, you can pass the `PMM_AGENT_SETUP_NODE_NAME` environment variable in your docker command i.e., like  
`-e PMM_AGENT_SETUP_NODE_NAME=my-custom-node-name`.

While we don’t recommend it, you can also try to update the node name in the PMM database directly.

1. Log in to the PMM Server docker container `docker exec -it pmm-server /bin/bash`
2. Open psql `psql -U pmm-managed`
3. Find the existing node name using the SQL query `select node_name from nodes;`
4. Update node names that you would like to use using SQL query `update table nodes set node_name="new_name" where node_name="old_name";`
5. Restart pmm-agent on the node
6. Check that the node name is changed by running `pmm-admin status` on the node

---

<div class="post-metadata">

### Author: ![sh123](https://avatars.discourse-cdn.com/v4/letter/s/a9a28c/32.png) [@sh123](https://forums.percona.com/u/sh123)
#### Post date: [May 14, 2025, 11:33am UTC](https://forums.percona.com/t/how-to-set-node-name/37929/3 "2025-05-14T11:33:24Z")

</div>

How do I configure the name of the mysql monitoring service name?  
In Grafana, when I go to MySQL \> Summary

Again the “Service Name” appears to be the node id of the docker container.

 ![Screenshot 2025-05-14 100610](https://us1.discourse-cdn.com/flex019/uploads/percona1/original/3X/f/f/ff1254a212ec7c6c56f65f7bf4fd9b75ba5699d3.png)

---

<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: [May 14, 2025, 11:49am UTC](https://forums.percona.com/t/how-to-set-node-name/37929/4 "2025-05-14T11:49:50Z")

</div>

You can configure the service name by passing the `--service-name` flag in the pmm-admin command (see [pmm-admin - PMM Administration Tool - Percona Monitoring and Management](https://docs.percona.com/percona-monitoring-and-management/3/use/commands/pmm-admin.html#examples_1))

The error occurred because the `--node-id` flag expects the actual Node ID. You can find the node ID by going to $PMM\_ADDRESS/graph/inventory/nodes and expanding the specific node.

---

<div class="post-metadata">

### Author: ![sh123](https://avatars.discourse-cdn.com/v4/letter/s/a9a28c/32.png) [@sh123](https://forums.percona.com/u/sh123)
#### Post date: [May 14, 2025, 1:09pm UTC](https://forums.percona.com/t/how-to-set-node-name/37929/5 "2025-05-14T13:09:33Z")

</div>

Thanks the serviice-name flag was what I was looking for.

---

<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: [May 14, 2025, 10:20pm UTC](https://forums.percona.com/t/how-to-set-node-name/37929/6 "2025-05-14T22:20:45Z")

</div>

Awesome, for what it’s worth, you should also consider upgrading to PMM v3 soon as we are no longer working on V2.
