-
Notifications
You must be signed in to change notification settings - Fork 266
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
improvement: Expose hwmon collector config options in prometheus.exporter.unix component. #1369
Conversation
docs/sources/reference/components/prometheus/prometheus.exporter.unix.md
Outdated
Show resolved
Hide resolved
docs/sources/reference/components/prometheus/prometheus.exporter.unix.md
Outdated
Show resolved
Hide resolved
| `chip_include` | `string` | Regexp of hwmon chip to (include mutually exclusive to chip-exclude). | | no | | ||
| `chip_exclude` | `string` | Regexp of hwmon chip to (include mutually exclusive to chip-include). | | no | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These descriptions are.... hard to understand.
- We try to avoid using brackets in the text descriptions.
- If you do use brackets like this, it's for additional information and the text should make sense without the bracketed additional info. If I take out the bracketed info I'm left with
Regexp of hwmon chip to
which is incomplete.
Sometimes people use brackets for info that would fit just fine within the sentence. Even taking out the just brackets and leaving the text, I'm unable to really understand the description.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The doc here is not correct, the correct version should be:
- Regexp of hwmon chip to include (mutually exclusive to chip-exclude).
- Regexp of hwmon chip to exclude (mutually exclusive to chip-include).
If we want to avoid the brackets, I would suggest the following:
- Regexp of hwmon chip to include
- Regexp of hwmon chip to exclude
And below we can add a text saying "chip_include
and chip_exclude
are mutually exclusive".
@clayton-cornell feel free to change the wording
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now it makes a LOT more sense. Thanks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I poorly copied the upstream help docs. Updated to use the proposed new wording.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good now.
docs/sources/reference/components/prometheus/prometheus.exporter.unix.md
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks for adding this!
PR Description
Exposes hwmon collector config options in the
prometheus.exporter.unix
component. The hwmon collector currently in the last v1.8.2 release of node_exporter supports hwmon configuration for which hwmon chips to filter to. This is useful for those users that just want a subset of hwmon metrics, and don't want to list a collection of relabel_rules to drop irrelevant hwmon metrics.https://github.com/prometheus/node_exporter/blob/f1e0e8360aa60b6cb5e5cc1560bed348fc2c1895/collector/hwmon_linux.go#L35-L36
Which issue(s) this PR fixes
n/a
Notes to the Reviewer
A recent PR to node_exporter also added support for filtering on sensors. However these is not a release of node_exporter that has this change yet therefore I didn't include it in this PR
prometheus/node_exporter@e11a4f0
PR Checklist