Change checked Disk from LogicalDisk to Volume#453
Merged
LordHepipud merged 4 commits intoIcinga:masterfrom Nov 13, 2025
Merged
Change checked Disk from LogicalDisk to Volume#453LordHepipud merged 4 commits intoIcinga:masterfrom
LordHepipud merged 4 commits intoIcinga:masterfrom
Conversation
The reason behind the change is that it seems that `LogicalVolume` will partly consider disk quotas and partly ignore them. We had an issue where a customer reported negative values for the calculated free space in case they had quotas for the checking user in place. Looks like `Size` of a `LogicalDisk` gives the size of the quota and `FreeSpace` ignores quota. So I changed the queried classes to hope for total values without queries. @LordHepipud : Please feel free to correct me if I went the wrong path. And: I can think of reasons why you used `LogicalDisk` instead of `Volume`, so if there's anything I missed, please feel free to just make "User running the plugin must not have a quota applied" a requirement and throw away my PR. Some things to note about this PR: * @RincewindsHat had the initial idea about what to look for * I did something that I would *never* advise someone to do but I checked *first* with the maintainer if it's ok as an exception (details follow) * I don't know how to code PowerShell * I used an LLM to help me with identifying the new code snippets I needed to use * I don't have a way to check the code because I don't use Windows
Member
Author
|
ref/NC/872792 |
Fixes partition total size collection by properly ignoring possible user quotas
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.
The reason behind the change is that it seems that
LogicalVolumewill partly consider disk quotas and partly ignore them. We had an issue where a customer reported negative values for the calculated free space in case they had quotas for the checking user in place. Looks likeSizeof aLogicalDiskgives the size of the quota andFreeSpaceignores quota. So I changed the queried classes to hope for total values without queries.@LordHepipud : Please feel free to correct me if I went the wrong path. And: I can think of reasons why you used
LogicalDiskinstead ofVolume, so if there's anything I missed, please feel free to just make "User running the plugin must not have a quota applied" a requirement and throw away my PR.Some things to note about this PR: