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.
-
Pull the PMM Client docker image.
docker pull \ percona/pmm-client:2
-
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:2 /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:2
Tips
You can find a complete list of compatible environment variables here.
-
Check status.
docker exec 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:2 --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.
Get expert help¶
If you need assistance, you can find comprehensive and free database knowledge on our community forum or blog posts. For professional support and services, contact our Percona Database Experts.