icinga-powershell-framework
icinga-powershell-framework copied to clipboard
Invoke-IcingaCheckPartitionSpace Warning threshold range greater than Critical results in UNKNOWN
Hi, just a small thing - the warning level as percentage currently can't be higher then the critical level.
PS C:\Windows\system32> Invoke-IcingaCheckPartitionSpace -Warning 10%: -Critical 5GB:
[UNKNOWN] Free Partition Space: 2 Unknown [UNKNOWN] Partition C: (72.98% (99.40GiB)), Partition D: (37.18% (311.68GiB))
\_ [UNKNOWN] Partition C: Warning threshold range "10% (13.62GiB)" is greater than Critical threshold range "5GB:"
\_ [UNKNOWN] Partition D: Warning threshold range "10% (83.83GiB)" is greater than Critical threshold range "5GB:"
| 'free_space_partition_d'=334660800000B;90014900000:;5000000000:;0;900149000000 'free_space_partition_c'=106731700000B;14625220000:;5000000000:;0;146252200000
3
PS C:\Windows\system32> Invoke-IcingaCheckPartitionSpace -Warning 13GB: -Critical 5GB:
[OK] Free Partition Space: 2 Ok
| 'free_space_partition_d'=334660800000B;13000000000:;5000000000:;0;900149000000 'free_space_partition_c'=106731600000B;13000000000:;5000000000:;0;146252200000
0
Best regards
Hi
Thanks for the report. That is something we will have to check in a later version. Right now we only compare the actual values and not the "real" data behind them to validate if the warning and critical ranges actually make sense.
As the checker part is going to be redesigned anyway, I will add that to the list.