fix: prevent panic when using diskstats device-include only (#3590)#3603
Merged
SuperQ merged 1 commit intoprometheus:masterfrom Apr 3, 2026
Conversation
…us#3590) Signed-off-by: Jeon Insoo <mumberrymountain@gmail.com>
15bceac to
110272f
Compare
SuperQ
added a commit
that referenced
this pull request
Apr 4, 2026
* [CHANGE] Adds distroless container image. #3592 * [FEATURE] infiniband: Add `hw_counters` metrics #2827 * [FEATURE] kernel_hung: Add collector for kernel hung tasks #3470 * [FEATURE] mixin: Add "All" option to cluster variable in dashboards #3509 * [FEATURE] netlink: Add node_network_altnames_info metric #3541 * [FEATURE] thermal: Add support for CPU temperature metrics on Apple Silicon #3547 * [FEATURE] bcachefs: Add new collector for bcachefs #3523 * [ENHANCEMENT] mixin: Make devices in network graphs configurable #3525 * [ENHANCEMENT] nvme: Add namespace parameters #3360 * [BUGFIX] netdev: Respect deviceFilter for `node_network_address_info` metric #3340 * [BUGFIX] mountstats: Fix multiple transports statistics labeling #3358 * [BUGFIX] diskstats: Fix panic when using device-include flag only #3603 Signed-off-by: Ben Kochie <superq@gmail.com>
Merged
SuperQ
added a commit
that referenced
this pull request
Apr 4, 2026
* [CHANGE] Adds distroless container image. #3592 * [FEATURE] infiniband: Add `hw_counters` metrics #2827 * [FEATURE] kernel_hung: Add collector for kernel hung tasks #3470 * [FEATURE] mixin: Add "All" option to cluster variable in dashboards #3509 * [FEATURE] netlink: Add node_network_altnames_info metric #3541 * [FEATURE] thermal: Add support for CPU temperature metrics on Apple Silicon #3547 * [FEATURE] bcachefs: Add new collector for bcachefs #3523 * [ENHANCEMENT] mixin: Make devices in network graphs configurable #3525 * [ENHANCEMENT] nvme: Add namespace parameters #3360 * [BUGFIX] netdev: Respect deviceFilter for `node_network_address_info` metric #3340 * [BUGFIX] mountstats: Fix multiple transports statistics labeling #3358 * [BUGFIX] diskstats: Fix panic when using device-include flag only #3603 Signed-off-by: Ben Kochie <superq@gmail.com>
SuperQ
added a commit
that referenced
this pull request
Apr 4, 2026
* [CHANGE] Adds distroless container image. #3592 * [FEATURE] infiniband: Add `hw_counters` metrics #2827 * [FEATURE] kernel_hung: Add collector for kernel hung tasks #3470 * [FEATURE] mixin: Add "All" option to cluster variable in dashboards #3509 * [FEATURE] netlink: Add node_network_altnames_info metric #3541 * [FEATURE] thermal: Add support for CPU temperature metrics on Apple Silicon #3547 * [FEATURE] bcachefs: Add new collector for bcachefs #3523 * [ENHANCEMENT] mixin: Make devices in network graphs configurable #3525 * [ENHANCEMENT] nvme: Add namespace parameters #3360 * [BUGFIX] netdev: Respect deviceFilter for `node_network_address_info` metric #3340 * [BUGFIX] mountstats: Fix multiple transports statistics labeling #3358 * [BUGFIX] diskstats: Fix panic when using device-include flag only #3603 Signed-off-by: Ben Kochie <superq@gmail.com>
renovate bot
added a commit
to sdwilsh/sOS
that referenced
this pull request
Apr 7, 2026
….11.1 ##### [\`v1.11.1\`](https://github.com/prometheus/node_exporter/releases/tag/v1.11.1) - \[BUGFIX] Fix kernel\_hung for no data [#3613](prometheus/node_exporter#3613) --- ##### [\`v1.11.0\`](https://github.com/prometheus/node_exporter/releases/tag/v1.11.0) - \[CHANGE] Adds distroless container image. [#3592](prometheus/node_exporter#3592) - \[FEATURE] infiniband: Add `hw_counters` metrics [#2827](prometheus/node_exporter#2827) - \[FEATURE] kernel\_hung: Add collector for kernel hung tasks [#3470](prometheus/node_exporter#3470) - \[FEATURE] mixin: Add "All" option to cluster variable in dashboards [#3509](prometheus/node_exporter#3509) - \[FEATURE] netlink: Add node\_network\_altnames\_info metric [#3541](prometheus/node_exporter#3541) - \[FEATURE] thermal: Add support for CPU temperature metrics on Apple Silicon [#3547](prometheus/node_exporter#3547) - \[FEATURE] bcachefs: Add new collector for bcachefs [#3523](prometheus/node_exporter#3523) - \[ENHANCEMENT] mixin: Make devices in network graphs configurable [#3525](prometheus/node_exporter#3525) - \[ENHANCEMENT] nvme: Add namespace parameters [#3360](prometheus/node_exporter#3360) - \[BUGFIX] netdev: Respect deviceFilter for `node_network_address_info` metric [#3340](prometheus/node_exporter#3340) - \[BUGFIX] mountstats: Fix multiple transports statistics labeling [#3358](prometheus/node_exporter#3358) - \[BUGFIX] diskstats: Fix panic when using device-include flag only [#3603](prometheus/node_exporter#3603)
renovate bot
added a commit
to sdwilsh/ansible-playbooks
that referenced
this pull request
Apr 8, 2026
….11.1 ##### [\`v1.11.1\`](https://github.com/prometheus/node_exporter/releases/tag/v1.11.1) - \[BUGFIX] Fix kernel\_hung for no data [#3613](prometheus/node_exporter#3613) --- ##### [\`v1.11.0\`](https://github.com/prometheus/node_exporter/releases/tag/v1.11.0) - \[CHANGE] Adds distroless container image. [#3592](prometheus/node_exporter#3592) - \[FEATURE] infiniband: Add `hw_counters` metrics [#2827](prometheus/node_exporter#2827) - \[FEATURE] kernel\_hung: Add collector for kernel hung tasks [#3470](prometheus/node_exporter#3470) - \[FEATURE] mixin: Add "All" option to cluster variable in dashboards [#3509](prometheus/node_exporter#3509) - \[FEATURE] netlink: Add node\_network\_altnames\_info metric [#3541](prometheus/node_exporter#3541) - \[FEATURE] thermal: Add support for CPU temperature metrics on Apple Silicon [#3547](prometheus/node_exporter#3547) - \[FEATURE] bcachefs: Add new collector for bcachefs [#3523](prometheus/node_exporter#3523) - \[ENHANCEMENT] mixin: Make devices in network graphs configurable [#3525](prometheus/node_exporter#3525) - \[ENHANCEMENT] nvme: Add namespace parameters [#3360](prometheus/node_exporter#3360) - \[BUGFIX] netdev: Respect deviceFilter for `node_network_address_info` metric [#3340](prometheus/node_exporter#3340) - \[BUGFIX] mountstats: Fix multiple transports statistics labeling [#3358](prometheus/node_exporter#3358) - \[BUGFIX] diskstats: Fix panic when using device-include flag only [#3603](prometheus/node_exporter#3603)
sdwilsh
pushed a commit
to sdwilsh/ansible-playbooks
that referenced
this pull request
Apr 8, 2026
….11.1 ##### [\`v1.11.1\`](https://github.com/prometheus/node_exporter/releases/tag/v1.11.1) - \[BUGFIX] Fix kernel\_hung for no data [#3613](prometheus/node_exporter#3613) --- ##### [\`v1.11.0\`](https://github.com/prometheus/node_exporter/releases/tag/v1.11.0) - \[CHANGE] Adds distroless container image. [#3592](prometheus/node_exporter#3592) - \[FEATURE] infiniband: Add `hw_counters` metrics [#2827](prometheus/node_exporter#2827) - \[FEATURE] kernel\_hung: Add collector for kernel hung tasks [#3470](prometheus/node_exporter#3470) - \[FEATURE] mixin: Add "All" option to cluster variable in dashboards [#3509](prometheus/node_exporter#3509) - \[FEATURE] netlink: Add node\_network\_altnames\_info metric [#3541](prometheus/node_exporter#3541) - \[FEATURE] thermal: Add support for CPU temperature metrics on Apple Silicon [#3547](prometheus/node_exporter#3547) - \[FEATURE] bcachefs: Add new collector for bcachefs [#3523](prometheus/node_exporter#3523) - \[ENHANCEMENT] mixin: Make devices in network graphs configurable [#3525](prometheus/node_exporter#3525) - \[ENHANCEMENT] nvme: Add namespace parameters [#3360](prometheus/node_exporter#3360) - \[BUGFIX] netdev: Respect deviceFilter for `node_network_address_info` metric [#3340](prometheus/node_exporter#3340) - \[BUGFIX] mountstats: Fix multiple transports statistics labeling [#3358](prometheus/node_exporter#3358) - \[BUGFIX] diskstats: Fix panic when using device-include flag only [#3603](prometheus/node_exporter#3603)
R167
added a commit
to R167/node_exporter
that referenced
this pull request
Apr 8, 2026
prometheus#3603 introduced a subtle regression for existing configs where device-exclude was intentionally set to `=''` to clear the Linux default. This breaks configs that are valid (exclude is intentionally cleared). Update the mutual exclusivity check to only fail when the value is non-empty. Signed-off-by: winston <me@winstondurand.com>
SuperQ
pushed a commit
that referenced
this pull request
Apr 8, 2026
#3603 introduced a subtle regression for existing configs where device-exclude was intentionally set to `=''` to clear the Linux default. This breaks configs that are valid (exclude is intentionally cleared). Update the mutual exclusivity check to only fail when the value is non-empty. Signed-off-by: winston <me@winstondurand.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
this PR fix issue #3590.
Problem:
setting
--collector.diskstats.device-includealone trigger the “device-exclude & device-include are mutually exclusive” error and ultimately cause panic during handler creation.Cause:
collector.diskstats.device-excludehas a non-empty default on Linux,as a result, providing
device-includeonly still leaves device-exclude as default, so the code treats it as include+exclude all being set and throws error.Fix
When device-include is set: