Sensors (windows.plugin)#21266
Merged
thiagoftsm merged 26 commits intonetdata:masterfrom Nov 13, 2025
Merged
Conversation
Contributor
There was a problem hiding this comment.
2 issues found across 3 files
Prompt for AI agents (all 2 issues)
Understand the root cause of the following 2 issues and fix them.
<file name="src/collectors/windows.plugin/GetSensors.c">
<violation number="1" location="src/collectors/windows.plugin/GetSensors.c:537">
When re-polling an enabled custom sensor we only refresh current_data_value[0]; the extra custom values in sd->values never get new readings, so their charts stay frozen. Add a loop here to call netdata_collect_sensor_data() for each stored sensor_data_type.</violation>
<violation number="2" location="src/collectors/windows.plugin/GetSensors.c:732">
The loop over sd->values stops at move->next, so it never adds or updates the last custom value (and skips all values when only one exists); this prevents the new custom metrics from appearing in charts.</violation>
</file>
Since this is your first cubic review, here's how it works:
- cubic automatically reviews your code and comments on bugs and improvements
- Teach cubic by replying to its comments. cubic learns from your replies and gets better over time
- Ask questions if you need clarification on any suggestion
React with 👍 or 👎 to teach cubic. Mention @cubic-dev-ai to give feedback, ask questions, or re-run the review.
stelfrag
approved these changes
Nov 13, 2025
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.
Summary
This PR introduces improvements and adds support for plugins that do not use default Microsoft properties.
Test Plan
Now, go to
system.hw.sensor.statechart and choose a Sensor. Go to yournetdata.confand add the following information:Additional Information
This was tested on Windows 11 laptop where 80% of sensors are not using MS standard definitions.
For users: How does this change affect me?