docs: Complete pmm-agent environment variables documentation #4543
+83
−38
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem
The existing documentation for
pmm-agent
indocumentation/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:
agent/config/config.go
andagent/cmd/pmm-agent-entrypoint/main.go
to extract all environment variablespmm-agent --help
outputChanges Made
Added Missing Environment Variables (25+ new variables)
Performance & Advanced Configuration:
PMM_AGENT_RUNNER_CAPACITY
- Agent internal actions/jobs runner capacityPMM_AGENT_RUNNER_MAX_CONNECTIONS_PER_SERVICE
- Connection limit per DB instancePMM_AGENT_WINDOW_CONNECTED_TIME
- Connection tracking windowPMM_AGENT_LOG_LINES_COUNT
- Log lines count for logs.zipPMM_AGENT_PERFSCHEMA_REFRESH_RATE
- Performance Schema refresh rateNew Exporter Paths:
PMM_AGENT_PATHS_AZURE_EXPORTER
- Path to azure_exporterPMM_AGENT_PATHS_VALKEY_EXPORTER
- Path to valkey_exporterPMM_AGENT_PATHS_NOMAD
- Path to nomad binaryPMM_AGENT_PATHS_NOMAD_DATA_DIR
- Nomad data directorySetup Command Variables:
PMM_AGENT_SETUP_NODE_ADDRESS
- Node address for setup commandPMM_AGENT_SETUP_NODE_TYPE
- Node type (generic/container)PMM_AGENT_SETUP_NODE_NAME
- Node namePMM_AGENT_SETUP_DISABLE_COLLECTORS
- Disabled collectors listPMM_AGENT_SETUP_CUSTOM_LABELS
- Custom node labelsAdded New Documentation Sections
Docker Entrypoint Variables - For container deployments:
PMM_AGENT_SETUP
- Run setup before agent startsPMM_AGENT_SIDECAR
- Auto-restart agent on failurePMM_AGENT_SIDECAR_SLEEP
- Restart delay configurationPMM_AGENT_PRERUN_FILE
- Execute file before agentPMM_AGENT_PRERUN_SCRIPT
- Execute script before agentCross-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
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:
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.