-
Notifications
You must be signed in to change notification settings - Fork 28
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
Invoke-IcingaCheckUsedPartitionSpace fails when not using percentages #228
Comments
This is weird - it works on my environments: Invoke-IcingaCheckUsedPartitionSpace -Critical 10GB -Warning 20GB;
[UNKNOWN] Used Partition Space: 4 Unknown [UNKNOWN] Partition C: (724.81GiB), Partition D: (0B), Partition G: (1.49TiB), Partition R: (2.94TiB)
\_ [UNKNOWN] Partition C: Warning threshold range "21474836480" is greater than Critical threshold range "10737418240"
\_ [UNKNOWN] Partition D: No disk size and/or free space available
\_ [UNKNOWN] Partition G: Warning threshold range "21474836480" is greater than Critical threshold range "10737418240"
\_ [UNKNOWN] Partition R: Warning threshold range "21474836480" is greater than Critical threshold range "10737418240"| 'used_space_partition_r'=3236077000000B;21474836480;10737418240;0;4000768000000 'used_space_partition_g'=1641211000000B;21474836480;10737418240;0;2000381000000 'used_space_partition_c'=778254400000B;21474836480;10737418240;0;999527800000
3 What happens if you switch the values for the arguments? In your case, warning cannot be bigger than critical. Invoke-IcingaCheckUsedPartitionSpace -Critical 20GB -Warning 10GB;
[UNKNOWN] Used Partition Space: 1 Unknown 3 Critical [UNKNOWN] Partition D: (0B) [CRITICAL] Partition C: (724.80GiB), Partition G: (1.49TiB), Partition R: (2.94TiB)
\_ [CRITICAL] Partition C: 724.80GiB is greater than threshold 20GiB
\_ [UNKNOWN] Partition D: No disk size and/or free space available
\_ [CRITICAL] Partition G: 1.49TiB is greater than threshold 20GiB
\_ [CRITICAL] Partition R: 2.94TiB is greater than threshold 20GiB
| 'used_space_partition_r'=3236093000000B;10737418240;21474836480;0;4000768000000 'used_space_partition_g'=1641211000000B;10737418240;21474836480;0;2000381000000 'used_space_partition_c'=778246600000B;10737418240;21474836480;0;999527800000 Could you please also try to wrap the values in single quotes? Invoke-IcingaCheckUsedPartitionSpace -Critical '10GB' -Warning '20GB';
[UNKNOWN] Used Partition Space: 4 Unknown [UNKNOWN] Partition C: (724.80GiB), Partition D: (0B), Partition G: (1.49TiB), Partition R: (2.94TiB)
\_ [UNKNOWN] Partition C: Warning threshold range "20GB" is greater than Critical threshold range "10GB"
\_ [UNKNOWN] Partition D: No disk size and/or free space available
\_ [UNKNOWN] Partition G: Warning threshold range "20GB" is greater than Critical threshold range "10GB"
\_ [UNKNOWN] Partition R: Warning threshold range "20GB" is greater than Critical threshold range "10GB"
| 'used_space_partition_r'=3236122000000B;20000000000;10000000000;0;4000768000000 'used_space_partition_g'=1641211000000B;20000000000;10000000000;0;2000381000000 'used_space_partition_c'=778244400000B;20000000000;10000000000;0;999527800000 |
It appears to be a local problem, I tried it on another server where it worked as expected. I had missed the fact that it's not "space free" but "space used" so I'll stick with nscp for now, but thanks for looking into it anyway. |
Could you please test the linked PR? This provides a new improved version with less overhead, while allowing to check for free and used space depending on the plugin configuration. |
Framework versions installed:
Powershell version:
OS: Windows Server 2019 DC
When using
Invoke-IcingaCheckUsedPartitionSpace
with percantages it works as expected but when using other units it does not and fails withConversionUnitMissing
Example:
The text was updated successfully, but these errors were encountered: