Skip to content

Commit 2782942

Browse files
committed
Fixes MSSQL backup check to not throw unknown if no backup exist
1 parent 4e3b72b commit 2782942

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

doc/31-Changelog.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@ documentation before upgrading to a new release.
77

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

10+
## 1.6.1 (2025-11-06)
11+
12+
[Issue and PRs](https://github.com/Icinga/icinga-powershell-mssql/milestone/11?closed=1)
13+
14+
* [#64](https://github.com/Icinga/icinga-powershell-mssql/pull/64) Fixes MSSQL backup check which threw `UNKNOWN` on MSSQL instances which have had no backups yet
15+
1016
## 1.6.0 (2025-09-23)
1117

1218
[Issue and PRs](https://github.com/Icinga/icinga-powershell-mssql/milestone/8?closed=1)

plugins/Invoke-IcingaCheckMSSQLBackupStatus.psm1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ function Invoke-IcingaCheckMSSQLBackupStatus
140140
$SqlConnection = Open-IcingaMSSQLConnection -Username $SqlUsername -Password $SqlPassword -Address $SqlHost -IntegratedSecurity:$IntegratedSecurity -Port $SqlPort;
141141
$BackupSet = Get-IcingaMSSQLBackupOverallStatus -SqlConnection $SqlConnection -IncludeDatabase $IncludeDatabase -IncludeDays $IncludeDays;
142142
$InstanceName = Get-IcingaMSSQLInstanceName -SqlConnection $SqlConnection;
143-
$CheckPackage = New-IcingaCheckPackage -Name ([string]::Format('MSSQL Backup ({0})', $InstanceName)) -OperatorAnd -Verbose $Verbosity;
143+
$CheckPackage = New-IcingaCheckPackage -Name ([string]::Format('MSSQL Backup ({0})', $InstanceName)) -OperatorAnd -Verbose $Verbosity -IgnoreEmptyPackage;
144144

145145
Close-IcingaMSSQLConnection -SqlConnection $SqlConnection;
146146

0 commit comments

Comments
 (0)