Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 27, 2025

PMM-0

Link to the Feature Build: SUBMODULES-0

Description

Users need to customize node_exporter collectors (enable mdadm, configure netdev.address-info) but documentation is missing. Investigation revealed PMM only supports disabling collectors via --disable-collectors flag, not enabling disabled ones.

Changes

Investigation artifacts (this repo):

  • NODE_EXPORTER_CUSTOMIZATION_FINDINGS.md - Technical analysis of node_exporter config in managed/services/agents/node.go, API (api/inventory/v1/agents.proto), and CLI (admin/commands/config.go)
  • NODE_EXPORTER_DOCUMENTATION_README.md - User-facing summary with quick answers
  • create-documentation-pr.sh - Helper script for pmm-doc PR creation
  • 0001-Document-node_exporter-collector-customization-v2.patch - Documentation changes for pmm-doc repo

Documentation created (pmm-doc repo at /tmp/pmm-doc):

  • Enhanced docs/how-to/extend-metrics.md (+178 lines):
    • Lists 30+ enabled collectors (cpu, diskstats, meminfo, netdev, etc.)
    • Lists 26+ disabled collectors (mdadm, systemd, ntp, etc.)
    • Documents --disable-collectors flag usage
    • Provides textfile collector workaround for disabled collectors
    • Includes validated bash script for mdadm metrics collection
  • Updated docs/details/commands/pmm-admin.md (+3 lines):
    • Added --disable-collectors flag to pmm-admin config reference

Key findings:

  • --no-collector.mdadm is hardcoded in managed/services/agents/node.go:91
  • No enable_collectors API parameter exists
  • No mechanism for collector-specific flags like --collector.netdev.address-info
  • Configuration immutable after initial setup

Example usage:

# Supported: disable collectors during setup
pmm-admin config \
    --disable-collectors=netdev,netstat,vmstat \
    192.168.1.10 generic node1

# Not supported: enabling disabled collectors
# Workaround: use textfile collector (see documentation)

Branch document-node-exporter-customization in /tmp/pmm-doc ready for PR to percona/pmm-doc.

If this PR adds, removes or alters one or more API endpoints, please review and add or update the relevant API documentation as well:

  • API Docs updated (N/A - documentation only)

If this PR is related to some other PRs in this or repositories, please provide links to those PRs:

  • Documentation PR to be created in percona/pmm-doc from artifacts in this PR
Original prompt

Investigate PMM node_exporter Configuration and Create Documentation PR

Context

A user needs to customize node_exporter startup arguments in PMM (Percona Monitoring and Management), specifically to:

  • Remove the --no-collector.mdadm flag (currently disabled by default)
  • Enable the netdev.address-info collector

The current PMM 3 documentation at https://docs.percona.com/percona-monitoring-and-management/3/ does not explain how to customize node_exporter arguments.

Task

Please perform the following:

  1. Code Investigation

    • Examine the PMM codebase (https://github.com/percona/pmm) to determine:
      • Where and how pmm-agent starts node_exporter
      • Which node_exporter collectors are enabled/disabled by default
      • Whether there's a supported mechanism to customize node_exporter startup arguments
      • If configuration files or environment variables can control collector behavior
    • Check both pmm-agent and pmm-admin code for relevant configuration options
  2. Documentation Analysis

    • Review the existing documentation structure at https://github.com/percona/pmm-doc
    • Identify the appropriate location for node_exporter customization documentation
    • Determine if this should be:
      • A new topic under "Extend metrics"
      • An addition to the pmm-agent command reference
      • A troubleshooting/FAQ entry
  3. Create Pull Request
    If customization is possible, create a PR to the pmm-doc repository that:

    • Explains how to customize node_exporter startup arguments
    • Provides specific examples for enabling/disabling collectors
    • Documents any configuration file changes needed
    • Includes warnings about manual modifications if applicable
    • Shows how to verify the changes took effect

    If customization is NOT currently possible, create a PR that:

    • Documents this limitation clearly
    • Explains the textfile collector workaround as an alternative
    • References the relevant feature request or issue
    • Suggests users open a feature request in PMM JIRA
  4. Deliverables

    • Summary of findings from code investigation
    • Link to the documentation PR
    • Example commands/configuration for the specific use case (mdadm and netdev.address-info collectors)

Target Documentation Format

Follow PMM documentation standards:

  • Use MkDocs markdown format
  • Include code examples with proper syntax highlighting
  • Add appropriate admonitions (Note, Warning, etc.)
  • Link to related documentation pages
  • Follow the existing documentation style and structure

Priority

This is a common use case for system administrators who need to monitor specific hardware or network metrics that are disabled by default in node_exporter.


Would you like me to refine this prompt further or add any specific requirements?


💡 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
Contributor

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 AI and others added 4 commits November 27, 2025 10:05
Final summary document covering:
- All deliverables created
- Documentation status
- Quick start guide
- Validation checklist
- Next steps for PR creation
- Improve error handling in create-documentation-pr.sh (set -euo pipefail)
- Add directory validation to mdadm script examples
- Use relative paths instead of absolute CI paths
- Add note about shortened commit hash
- Improve script robustness and portability
Copilot AI changed the title [WIP] Investigate PMM node_exporter configuration and create documentation Document node_exporter collector customization and limitations Nov 27, 2025
Copilot finished work on behalf of catalinaadam November 27, 2025 10:13
Copilot AI requested a review from catalinaadam November 27, 2025 10:13
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.

3 participants