-
Notifications
You must be signed in to change notification settings - Fork 6.3k
Adjust Disk Space collection (windows.plugin) #21059
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
Conversation
…ted. Also Adjust metric allowing show data for small volumes
| // Assume it's a Volume GUID path or a device path | ||
| snprintf(pathBuffer, sizeof(pathBuffer), "\\\\.\\%s\\", diskName); // Format as "\\.\HarddiskVolume1\" | ||
| snprintf(pathBuffer, sizeof(pathBuffer), "%s", diskName); |
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.
- Why this change? Was
\\\\.\\%s\\wrong? What was wrong? - You posted 2 screenshots. We can see on the 2nd (this branch) screenshort that the
mount_pointlabel value is changed fromHarddiskVolumeXto[unset]. Is that expected? Your PR description doesn't have any info about it.
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.
Why this change? Was \\.\%s\ wrong? What was wrong?
Now that we are using FindFirstVolumeA, we receive the volume's full path. The Microsoft path format for a volume is:
\\?\Volume{GUID} You posted 2 screenshots. We can see on the 2nd (this branch) screenshort that the mount_point label value is changed from HarddiskVolumeX to [unset]. Is that expected? Your PR description doesn't have any info about it.
There is no mount point with this name (HarddiskVolumeX) on Windows. Microsoft mount points are named as drive letters (e.g., C:\). The original code was displaying a name that does not correspond to any visible location.
If you wish, I can modify the code to use the same names displayed in Disk Management. This would provide users with a recognizable name instead of an invisible one.
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.
It is not mounted, but we need the label value. Can you check node_exporter? What label values does it have?
|
Part of the issues this PR was meant to address have already been fixed in another PR. Therefore, I am closing this one and will handle the labels in a separate, independent PR. |
Summary
The current
windows.plugincannot accurately detect space usage on small devices because it collects data inGiBinstead of theMiBunit typically expected for partitions likeEFI.In addition to this initial issue, data collected from
PerfLibupdates slowly and does not accurately reflect the current used and free space on devices.Finally, Netdata is labeling mount points that do not exist.
Master Branch:

This Branch:

Test Plan
disk.usagedisk.usageAdditional Information
For users: How does this change affect me?