Run PMM Client as a Docker container¶
The PMM Client Docker image is a convenient way to run PMM Client as a preconfigured Docker container.
The PMM Client Docker image is available for both x86_64 and ARM64 architectures. Docker will automatically pull the correct image for your system architecture.
-
Pull the PMM Client Docker image:
docker pull percona/pmm-client:3
-
Use the image as a template to create a persistent data store that preserves local data when the image is updated:
docker create \ --volume /srv \ --name pmm-client-data \ percona/pmm-client:3 /bin/true
-
Run the container to start pmm-agent in setup mode. Set
X.X.X.X
to the IP address of your PMM Server. (Do not use thedocker --detach
option as PMM agent only logs to the console.)PMM_SERVER=X.X.X.X:443 docker run \ --rm \ --name pmm-client \ -e PMM_AGENT_SERVER_ADDRESS=${PMM_SERVER} \ -e PMM_AGENT_SERVER_USERNAME=admin \ -e PMM_AGENT_SERVER_PASSWORD=admin \ -e PMM_AGENT_SERVER_INSECURE_TLS=1 \ -e PMM_AGENT_SETUP=1 \ -e PMM_AGENT_CONFIG_FILE=config/pmm-agent.yaml \ --volumes-from pmm-client-data \ percona/pmm-client:3
Tips
You can find a complete list of compatible environment variables here.
-
Check status.
docker exec -t pmm-client pmm-admin status
In the PMM user interface you will also see an increase in the number of monitored nodes.
You can now add services with pmm-admin
by prefixing commands with docker exec pmm-client
.
Tips
- Adjust host firewall and routing rules to allow Docker communications. (Read more
- For help:
docker run --rm percona/pmm-client:3 --help
In the GUI:
- Select PMM Dashboards → System (Node) → Node Overview.
- In the Node Names menu, select the new node.
- Change the time range to see data.
Danger
pmm-agent.yaml
contains sensitive credentials and should not be shared.