icinga-powershell-plugins
icinga-powershell-plugins copied to clipboard
Invoke-IcingaCheckUsedPartitionSpace -CheckUsedSpace: negative value
If WMI-data is wrong for a volume/device/drive the plugin probably reports negative value for used space:
Invoke-IcingaCheckUsedPartitionSpace -CheckUsedSpace -SkipUnknown -Exclude 'C' [OK] Used Partition Space: 5 Ok | 'k::ifw_partitionspace::used'=-50476310000B;;;0;2147346000000 0
Reason for this are wrong values of the WMI-object: Get-WmiObject Win32_LogicalDisk DeviceID : K: DriveType : 3 ProviderName : FreeSpace : 2197822521344 Size : 2147346206720 VolumeName : data
=> value for "FreeSpace" higher than value for "Size"!
In order to avoid false alarms it would be an idea to compare "Size" and "FreeSpace" and/or check if the output is negative and send an UNKNOWN-event.
OS: Windows 2016 Server Standard IfW-framework: 1.12.3 IfW-plugins: 1.12.0