Add per-collector metric documentation#3517
Add per-collector metric documentation#3517willianpaixao wants to merge 2 commits intoprometheus:masterfrom
Conversation
There was a problem hiding this comment.
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>
3755709 to
76e2b04
Compare
|
I don't think anyone here has the resources to maintain this.. @SuperQ wdyt? |
|
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. |
|
Totally understand your position, @discordianfish. Let me make my case.
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>
Summary
docs/collectors/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
Test plan