Skip to content

For help, click the link below to get free database assistance or contact our experts for personalized support.

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:3
    
  2. Create a Docker volume to store persistent data:

     docker volume create pmm-client-data
    

  3. Execute the following command to start the pmm-agent in Setup mode. Replace X.X.X.X with the IP address of your PMM Server:

      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 \
      -v pmm-client-data:/srv \
      percona/pmm-client:3
    

    Important

    • Do not use the docker --detach option with Docker, as the pmm-agent logs output directly to the console, and detaching the container will prevent you from seeing these logs:
    • You can find a complete list of compatible environment variables here.
  4. Run the following command to verify the PMM client status. You should also see an increase in the number of monitored nodes in the PMM user interface:

      docker exec -t pmm-client pmm-admin status
    

You can now add services with pmm-admin by prefixing commands with docker exec pmm-client.

Tips for Docker configuration

  • Firewall and routing rules: Ensure your host’s firewall and routing rules are configured to allow Docker communications. This is crucial for Docker containers to communicate properly. For more details, see to the troubleshooting checklist.

  • Help command: If you need assistance with PMM Client, you can run the following command to display help information: docker run --rm percona/pmm-client:3 --help.

View your monitored node:

1. Go to the main menu and select **Operating System (OS) > Overview**.

2. In the **Node Names** drop-down menu, select the node you recently registered.

3. Modify the time range to view the relevant data for your selected node.

Danger

pmm-agent.yaml contains sensitive credentials and should not be shared.