Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions doc/31-Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,14 @@ documentation before upgrading to a new release.

Released closed milestones can be found on [GitHub](https://github.com/Icinga/icinga-powershell-plugins/milestones?state=closed).

## 1.14.1 (tbd)

[Issue and PRs](https://github.com/Icinga/icinga-powershell-plugins/milestone/23)

### Bugfixes

* [#471](https://github.com/Icinga/icinga-powershell-plugins/pull/471) Fixes `Invoke-IcingaCheckPartitionSpace` to report `UNKNOWN` if no usage data was used, which was previously handled by "No disk size available". As we now properly receive disk size data but still no usage data in these cases, we receive false positives

## 1.14.0 (2026-02-11)

[Issue and PRs](https://github.com/Icinga/icinga-powershell-plugins/milestone/22)
Expand Down
6 changes: 6 additions & 0 deletions plugins/Invoke-IcingaCheckUsedPartitionSpace.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,12 @@ function Invoke-IcingaCheckPartitionSpace()
} else {
$IcingaCheck.SetOk('No disk size available', $TRUE) | Out-Null;
}
} elseif ([string]::IsNullOrEmpty($partition.FreeSpace) -or [string]::IsNullOrEmpty($partition.UsedSpace)) {
if ($SkipUnknown -eq $FALSE) {
$IcingaCheck.SetUnknown('No disk usage size available', $TRUE) | Out-Null;
} else {
$IcingaCheck.SetOk('No disk usage available', $TRUE) | Out-Null;
}
} else {
$IcingaCheck.WarnOutOfRange($Warning).CritOutOfRange($Critical) | Out-Null;
}
Expand Down
8 changes: 7 additions & 1 deletion provider/disks/Get-IcingaPartitionSpace.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,18 @@ function Get-IcingaPartitionSpace()
break;
}

$UsedSpace = $null;

if ($null -ne $disk.FreeSpace) {
$UsedSpace = $DiskSize - [decimal]$disk.FreeSpace;
}

$DiskData.Add(
$disk.Name,
@{
'Size' = $DiskSize;
'FreeSpace' = $disk.FreeSpace;
'UsedSpace' = ($DiskSize - $disk.FreeSpace);
'UsedSpace' = $UsedSpace;
'DriveLetter' = $disk.DriveLetter;
'DriveName' = $disk.Name;
'HasLetter' = -not [string]::IsNullOrEmpty($disk.DriveLetter);
Expand Down