when I restart my database server the client is not restarting because of this error:
Failed to register pmm-agent on PMM Server: Node with name “blablablabla” already exists. If you want override node, use --force option.
sure, I could use --force which would remove all monitored services but that’s not what I want.
I don’t want to add all services again if the server is rebooting - is there any way to solve my problem?
I use the client with docker compose on Ubuntu 22.4 LTS
Can you clarify your issue from the beginning? You have mysql and PMM inside a docker container, and when mysql restarts, you are also re-configuring the pmm client which is giving you this error? You should not have to reconfigure the pmm client when you restart mysql. The PMM client will automatically reconnect to mysql after it restarts.
If I did not understand you, please clarify in more details your setup and the commands you are running.
Currently, my PMM client operates within a Docker container, while MySQL runs outside of a container. Whenever I perform a server restart, Docker initiates an attempt to launch the pmm-client container. Unfortunately, this action leads to the following error message:
“Failed to register the pmm-agent on the PMM Server: A node with the name ‘blablablabla’ already exists. To override the existing node, utilize the --force option.”
Instead of restarting the existing pmm-agent Percona tries to register a new pmm-agent.
That seems odd to me. Why not just run PMM client outside docker, alongside MySQL? That way you can get CPU/Memory/Disk metrics as well.
Can you docker inspect the container and see if there are any environment variables set? Looking at the code for the container, https://github.com/percona/pmm/blob/main/agent/cmd/pmm-agent-entrypoint/main.go, if PMM_AGENT_SETUP is true, then the container will try to register each time it starts.
Okay this solved my error, wasn’t aware of it. Thank you!