prometheus / prometheus/node_exporter
Allow diskstat plugin to accept disk names and ignore rest.
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 13.8k
- Forks
- 2.7k
- Avg merge
- 1d 23h
- Merged PRs (30d)
- 8
Description
Problem:
As an admin, I want to enable disk stats metrics for certain disk name. node_exporter's diskstats provides this functionality. This collector also provides a way to ignore disks with a regular expression using --collector.diskstats.ignored-devices flag. But some time it is hard to get form such regular expression as allowed disk name is only known run time. For example, in an AWS ec2 instance with ebs volumes will mount disk with name nvm[d+]n1. It is very hard for admin to know about disk name before runtime and for regex if (s)he wants to enable metrics only for certain disk.
Proposed Solution:
diskstat collector should also provide a flag for accepted devices. This new flag will take precedence over ignored-devices flag.
I have implemented this solution and it works fine.
I can contribute it back to community. Let me know if you are ok with this proposed solution
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by inspecting the diskstats collector and the existing --collector.diskstats.ignored-devices flag. Trace how device names are selected, then add the accepted-device configuration so it takes precedence over ignored devices and verify the collector behavior with its available tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- cli, observability-sre
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100