Skip to content

Conversation

@willianpaixao
Copy link
Contributor

Summary

  • Add per-collector documentation under docs/collectors/
  • Document metrics, labels, configuration flags, and data sources for first 5 collectors
  • Update README.md to reference new documentation

Fixes #1170

Motivation

Users have requested detailed explanations of node_exporter metrics beyond the HELP strings. This PR establishes a documentation structure and provides initial documentation for commonly used collectors.

Structure

docs/collectors/
├── README.md        # Index and contributing guidelines
├── _TEMPLATE.md     # Template for new collector docs
├── cpu.md
├── cpufreq.md
├── diskstats.md
├── meminfo.md
└── netstat.md

Test plan

  • Verify markdown renders correctly on GitHub
  • Verify all internal links work
  • Cross-reference metrics against actual collector output

Copilot AI review requested due to automatic review settings January 17, 2026 20:21
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR establishes a documentation framework for node_exporter collectors and provides detailed metric documentation for five commonly-used collectors (cpu, cpufreq, diskstats, meminfo, netstat). The documentation includes metric names, types, labels, configuration flags, and data sources.

Changes:

  • Created standardized documentation structure under docs/collectors/ with a template and index
  • Added comprehensive documentation for cpu, cpufreq, diskstats, meminfo, and netstat collectors
  • Updated main README.md to reference the new collector documentation

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
docs/collectors/README.md Index page listing available collector documentation and contributing guidelines
docs/collectors/_TEMPLATE.md Standard template for documenting collectors to ensure consistency
docs/collectors/cpu.md Documents CPU time statistics, metadata, and thermal throttling metrics
docs/collectors/cpufreq.md Documents CPU frequency scaling metrics from sysfs
docs/collectors/diskstats.md Documents disk I/O statistics, device info, and ATA attributes
docs/collectors/meminfo.md Documents memory statistics from /proc/meminfo across multiple platforms
docs/collectors/netstat.md Documents network statistics from /proc/net files
README.md Adds reference to new collector documentation with links to documented collectors

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

New documentation structure under docs/collectors/:
- Template for documenting additional collectors
- cpu: metrics, labels, configuration flags, data sources
- cpufreq: frequency scaling metrics with kernel docs links
- diskstats: I/O statistics with device filtering options
- meminfo: memory statistics with field mappings
- netstat: network statistics with protocol breakdowns

Each collector doc includes:
- Supported platforms
- Configuration flags (where applicable)
- Data sources with kernel documentation links
- Metrics table with types, labels, descriptions

Signed-off-by: Willian Paixao <willian@ufpa.br>
@discordianfish
Copy link
Member

I don't think anyone here has the resources to maintain this.. @SuperQ wdyt?

@SuperQ
Copy link
Member

SuperQ commented Jan 19, 2026

If we had a way to generate this, similar to how Go doc comments work, it would be feasible to maintain. We would have all the docs in the collector code that generates markdown.

@willianpaixao
Copy link
Contributor Author

Totally understand your position, @discordianfish. Let me make my case.

  1. We do not need to document all collectors, specially the less used, niche one. I can personally document about ten of the most used/important and I think it's enough.
  2. Of those most used/important collectors, their code base is stable, rarely changed. Once the documentation is written, not much would need update, maybe not ever. If a new metric is added, old removed, that's a one liner in the Markdown. The bulk of the work is not in the maintenance of ~10 doc files.

My argument is on the line of "a bird in the hand is worth two in the bush".

  - Add detailed docs for filesystem, hwmon, netdev, stat collectors
  - Add usage examples to netstat and netdev configuration sections

Signed-off-by: Willian Paixao <willian@ufpa.br>
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.

Where can I see a detailed explanation of all the metrics ?

3 participants