Skip to content

Sensors (windows.plugin)#21266

Merged
thiagoftsm merged 26 commits intonetdata:masterfrom
thiagoftsm:conf_sensors
Nov 13, 2025
Merged

Sensors (windows.plugin)#21266
thiagoftsm merged 26 commits intonetdata:masterfrom
thiagoftsm:conf_sensors

Conversation

@thiagoftsm
Copy link
Contributor

@thiagoftsm thiagoftsm commented Nov 5, 2025

Summary

This PR introduces improvements and adds support for plugins that do not use default Microsoft properties.

screen
Test Plan
  1. Compile this branch
  2. Install on your host and verify if some sensor is not using standard definitions.

Now, go to system.hw.sensor.state chart and choose a Sensor. Go to your netdata.conf and add the following information:

[perflib:windows:GetSensors:Your Sensor Name]
	title  = Choose a title
	units = Choose a unit
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?

@github-actions github-actions bot added area/collectors Everything related to data collection area/metadata Integrations metadata collectors/windows labels Nov 5, 2025
@thiagoftsm thiagoftsm requested a review from stelfrag November 11, 2025 23:08
@thiagoftsm thiagoftsm marked this pull request as ready for review November 11, 2025 23:08
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-&gt;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-&gt;values stops at move-&gt;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.

@thiagoftsm thiagoftsm merged commit 87b992b into netdata:master Nov 13, 2025
118 checks passed
@thiagoftsm thiagoftsm deleted the conf_sensors branch November 13, 2025 22:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/collectors Everything related to data collection area/metadata Integrations metadata collectors/windows

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants