Skip to content

Conversation

Copilot
Copy link

@Copilot Copilot AI commented Sep 19, 2025

Problem

The existing documentation for pmm-agent in documentation/docs/use/commands/pmm-agent.md was incomplete, missing many environment variables that users can use to configure PMM client. This made it difficult for users to understand all available configuration options, especially for Docker deployments and automated setups.

Solution

Updated the documentation to include all possible environment variables for pmm-agent by:

  1. Analyzed source code in agent/config/config.go and agent/cmd/pmm-agent-entrypoint/main.go to extract all environment variables
  2. Verified accuracy by testing against actual pmm-agent --help output
  3. Organized into logical sections for better usability

Changes Made

Added Missing Environment Variables (25+ new variables)

Performance & Advanced Configuration:

  • PMM_AGENT_RUNNER_CAPACITY - Agent internal actions/jobs runner capacity
  • PMM_AGENT_RUNNER_MAX_CONNECTIONS_PER_SERVICE - Connection limit per DB instance
  • PMM_AGENT_WINDOW_CONNECTED_TIME - Connection tracking window
  • PMM_AGENT_LOG_LINES_COUNT - Log lines count for logs.zip
  • PMM_AGENT_PERFSCHEMA_REFRESH_RATE - Performance Schema refresh rate

New Exporter Paths:

  • PMM_AGENT_PATHS_AZURE_EXPORTER - Path to azure_exporter
  • PMM_AGENT_PATHS_VALKEY_EXPORTER - Path to valkey_exporter
  • PMM_AGENT_PATHS_NOMAD - Path to nomad binary
  • PMM_AGENT_PATHS_NOMAD_DATA_DIR - Nomad data directory

Setup Command Variables:

  • PMM_AGENT_SETUP_NODE_ADDRESS - Node address for setup command
  • PMM_AGENT_SETUP_NODE_TYPE - Node type (generic/container)
  • PMM_AGENT_SETUP_NODE_NAME - Node name
  • PMM_AGENT_SETUP_DISABLE_COLLECTORS - Disabled collectors list
  • PMM_AGENT_SETUP_CUSTOM_LABELS - Custom node labels

Added New Documentation Sections

Docker Entrypoint Variables - For container deployments:

  • PMM_AGENT_SETUP - Run setup before agent starts
  • PMM_AGENT_SIDECAR - Auto-restart agent on failure
  • PMM_AGENT_SIDECAR_SLEEP - Restart delay configuration
  • PMM_AGENT_PRERUN_FILE - Execute file before agent
  • PMM_AGENT_PRERUN_SCRIPT - Execute script before agent

Cross-Component Variables - Affect all PMM components:

  • PMM_DEBUG - Debug logging (overrides PMM_AGENT_DEBUG)
  • PMM_TRACE - Trace logging (overrides PMM_AGENT_TRACE)

Setup Command Arguments - Environment variables for pmm-agent setup

Improvements

  • Fixed markdown table formatting - All tables now have proper closing pipes
  • Organized alphabetically - Variables sorted for easier navigation
  • Complete descriptions - All variables have accurate, detailed descriptions
  • Validated accuracy - All descriptions verified against source code and help output

Validation

✅ Documentation builds successfully with mkdocs build --strict
✅ All markdown tables render correctly
✅ All 56 PMM_AGENT_* variables now documented
✅ Descriptions verified against pmm-agent --help output
✅ Complete coverage of environment variables from source code

Impact

Users can now:

  • Configure PMM client entirely through environment variables for any deployment scenario
  • Understand all available configuration options without reading source code
  • Deploy PMM client in containers using documented Docker-specific variables
  • Automate PMM setup using setup command environment variables
  • Tune PMM performance using advanced configuration variables

This addresses the original issue by providing comprehensive documentation of all possible PMM agent environment variables, making PMM client much more accessible for various deployment and configuration scenarios.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

@it-percona-cla
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@Copilot Copilot AI changed the title [WIP] We want to describe all possible env variables for pmm-agent in our documentation. update doc in use/commands/pmm-agent.html. take available env variables from agent directory and entrypoint for pmm client. docs: Complete pmm-agent environment variables documentation Sep 19, 2025
@Copilot Copilot AI requested a review from BupycHuk September 19, 2025 15:01
Copilot finished work on behalf of BupycHuk September 19, 2025 15:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants