Skip to content

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.

  1. Pull the PMM Client Docker image:

    docker pull \
    percona/pmm-client:2
    
  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
    
  3. 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 the docker --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.

  1. 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, visit the community forum for comprehensive and free database knowledge, or contact our Percona Database Experts for professional support and services.