I am evaluating percona pmm as a possible replacement for our Oracle Enterprise MySQL monitor since it has gone to end-of-life status. we have 92 MySQL systems which I manage. I am setting up pmm using containers on my home network to evaluate before presenting it as a possible solution for the company I work for.
I have more detailed initialed entered, but when I try to post it, I get the message new users can only have 2 links. I don’t even know what it means by a link
basically I have the pmm-server setup on my Mac mini and I am able to connect to it but am not able to register the client.
Hi @cpritt, you’re not the first MEM/OEM convert Can you please provide commands you’ve used, and the output? There’s an option to format “code” in the text editor or use triple-backtick like most Markdown editors.
I have tried everyone of the ip’s listed above for the PMM_SERVER ip address and everyone gives an error of no route to host. I have tried the container address which is 172.17.0.2 and get the same thing. I have tried 127.0.0.1 and gotten connection refused and I assume that is because that is trying to connect to the port 443 of the Mac and not port 443 of the pmm container.
right now I am stuck. I have a meeting on Wednesday with the team that manages SolarWinds about using that product but I would rather use pmm and was hoping to go through the setup process and try it out before Wednesday. today is Monday. any help would be appreciated.
(I formatted your post above. Only use 3 backticks around code/output, not words/paragraphs.)
Please copy directly from your terminal and paste here. Also, please add this: -e PMM_AGENT_DEBUG=1
to get a better sense of what is happening.
Again, please provide all output, copied directly from terminal.
You can use https://pmmdemo.percona.com/ also to demonstrate. Also, remind them that SolarWinds is close-source, and costs $$$, while PMM is 100% open-source, and 100% free to use, no costs, no restrictions, and no licensing.
Also, running the pmm-client via docker is not typical. Most installs, and our recommendation, of PMM use docker for pmm-server, and install the pmm-client RPM/APT for their OS directly to the machine running MySQL. If you run pmm-client inside a container, you miss out on some OS-level metrics, and can’t see “the entire picture.”
It looks like the new pmm-client container, from within this container, cannot reach the other container running pmm-server. How did you launch the pmm-server container? Please provide all commands. Did you create a separate network, or bridge to the host? As a fellow mac user, MacOS has very funky permissions regarding listening for incoming connections. Do you recall denying any of these?
You can do some debugging by grabbing a simple busybox container, exec into it, then try to ping the pmm-server IP. If that also fails, then you know 100% it’s a docker IP/network issue.
Here is the process I followed to install pmm-server:
On my Mac mini I installed docker desktop.
I have docker desktop open .
I started a terminal session.
In the terminal session I executed: curl -fsSL https://raw.githubusercontent.com/percona/pmm/refs/heads/v3/get-pmm.sh > get-pmm.sh
I then executed get-pmm.sh
It executed, and created the pmm-net and containers
cpritt@myMiniPlus ~ % docker network ls
NETWORK ID NAME DRIVER SCOPE
3cb5ccf3dbe9 bridge bridge local
a00cec84461d host host local
d6ef033aaf20 none null local
1e8fe53f710b pmm-net bridge local
cpritt@myMiniPlus ~ %
cpritt@myMiniPlus ~ % docker container ls
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
e222d0847a49 percona/watchtower "/watchtower --clean…" 22 hours ago Up 22 hours (healthy) 8080/tcp watchtower
40ad46390be7 percona/pmm-server:3 "/opt/entrypoint.sh" 22 hours ago Up 22 hours (healthy) 8080/tcp, 0.0.0.0:443->8443/tcp pmm-server
cpritt@myMiniPlus ~ %
I then connected to the pmm-server with safari and logged in to verify.
I got on the locally hosted MySQL and created the pmm account using following command:
CREATE USER 'pmm'@'127.0.0.1' IDENTIFIED BY '<your_password>' WITH MAX_USER_CONNECTIONS 10;
GRANT SELECT, PROCESS, REPLICATION CLIENT, RELOAD, BACKUP_ADMIN ON *.* TO 'pmm'@'127.0.0.1';
Of course using a unique password.
I skipped the installing of the Percona Release Tool because it appears the instructions are for a Debian based linux system instead of a Mac.
I went to page 83 of the pmm manual to “Run PMM Client as a docker container”
I executed step1: docker pull percona/pmm-client:3
I executed step2: docker volume create pmm-client-data
Then I attempted to get a docker run from the image and have been unsuccessful.
Maybe, I need to try this without using a container for the client.
If your MySQL is not running in a container, then I would not use the pmm-client inside a container either. As I said earlier, it is very a-typical to use the pmm-client container.
okay I am trying to install and setup the client from a binary following the instructions on page 86 of the manual for a arm64 architecture.
I followed all the steps successfully until I get to step 8. I replaced the ip in the command with the ip of my pmm-server: here is what I get:
cpritt@myMiniPlus pmm-client-3.1.0 % pmm-agent setup --config-file=/usr/local/percona/pmm/config/pmm-agent.yaml --server-address=192.168.64.1 --server-insecure-tls --server-username=admin --
server-password=admin
zsh: exec format error: pmm-agent
zsh: command not found: server-password=admin
cpritt@myMiniPlus pmm-client-3.1.0 %
Hey @cpritt,
The three backticks are only for console output.
Like this. Some output/input.
Then go back to normal typing by closing the three backticks.
Try switching to bash instead of zsh on your mac. I’m unfamiliar with zsh. I also notice you did not put ./pmm-agent which is typically required when running local commands in terminals.
I figure I would go over what I had to do to make it work in case another fool comes along and is trying to do the same thing…
1.) one issue with trying to get the binary to config and setup is that I was copying the command out of the pdf manual which when I pasted it in the terminal it went to two lines causing the error.
2.) figured that out and then the binary would not execute because it was a Debian linux binary which I found out by executing files pmm-agent
3.) so… back to the agent container. I got it to register and run by adding the --network pmm-net to the run command
4.) I then pulled the latest mysql container image and set it’s network to be pmm-net and was able to add the instance to the pmm-server
will now play around a bit..
it will be easier setting up the company’s systems since all 92 servers are on red hat el8 and el9 virtual boxes. (I would just need approval from the security department and the linux admin teams)
You’re the first person I’ve ever known to use the PDF. All the documentation pages have the same info, including one-click copy examples. You’d have much better luck just using the docs.
Debian linux binary
Ah yes, you can’t run that on macos
adding the --network pmm-net to the run command
Yes, docker networks make things like this more painful than necessary. You’re in a unique situation where you are trying to do everything on 1 machine, some with docker and some without. That’s very a-typical.
it will be easier setting up the company’s systems since all 92 servers are on red hat el8 and el9
Most certainly! A few lines of ansible should add our repo, install the pmm-client, register it with pmm-server, and then add mysql. I did 18 servers for a customer 2 weeks ago this way. Took all of 11 minutes to accomplish.
Be sure to run pmm-client --help and pmm-client add mysql --help to see all the extra things you can add such as --environment, and --az, and --replicaset, in addition to custom tags.
Also, when you add mysql, make sure you pick the correct query source: slowlog (default) or perfschema. If slowlog, make sure it is enabled and long_query_time is set to 0. If you use perfschema, make sure performance_schema_max_query_digest=8192 in my.cnf.