Invoke-IcingaCheckMSSQLBackupStatus - wrong threshold for backup Status

I have configured the plugin for MSSQL (using Icinga for windows) - Invoke-IcingaCheckMSSQLBackupStatus
I created a service check to check the backup Status.
I leave all the Threshold empty in Command end service definition.
But the check report these error regarding the “Status”.
Seems that some threshold are defined (even in wrong way!)
How can correct this ?


THX

can you post the inspect output?

maybe your template has some defaults?

Here the detail of the “Inspect”:

‘C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe’ ‘-NoProfile’ ‘-NoLogo’ ‘-ExecutionPolicy’ ‘ByPass’ ‘-C’ ‘try { Use-Icinga -Minimal; } catch { Write-Output ‘'‘The Icinga PowerShell Framework is either not installed on the system or not configured properly. Please check Introduction - Icinga for Windows for further details’'’; Write-Output ‘'‘Error:’'’ $($_.Exception.Message)Components:rn$( Get-Module -ListAvailable ‘'‘icinga-powershell-*’'’ )rn’'‘Module-Path:’'‘rn$($Env:PSModulePath); exit 3; }; Exit-IcingaExecutePlugin -Command ‘'‘Invoke-IcingaCheckMSSQLBackupStatus’'’ ’ ‘-IncludeDatabase’ ‘@(’'‘MYDB’'’,‘'‘master’'’,‘'‘model’'’,‘'‘msdb’'’)’ ‘-SqlUsername’ ‘’'‘.\ICINGA’'‘’ ‘-SqlPassword’ ‘(ConvertTo-IcingaSecureString ‘'‘MYPSWD’'’)’ ‘-Verbosity’ ‘1’ ‘-IntegratedSecurity’

Can be possible that these thresholds, are the default one - embedded into the plugin itself ?

Good Catch:

[ValidateSet(‘Online’, ‘Restoring’, ‘Recovering’, ‘Recovering_Pending’, ‘Suspect’, ‘Emergency’, ‘Offline’, ‘Copying’, ‘Offline_Secondary’)]
$DatabaseStatusWarning = ‘Offline’,

[ValidateSet(‘Online’, ‘Restoring’, ‘Recovering’, ‘Recovering_Pending’, ‘Suspect’, ‘Emergency’, ‘Offline’, ‘Copying’, ‘Offline_Secondary’)]
$DatabaseStatusCritical = ‘Emergency’,

WarnIfMatch($MSSQLProviderEnums.MSSQLDatabaseStateName[$DatabaseStatusWarning])

CritIfMatch($MSSQLProviderEnums.MSSQLDatabaseStateName[$DatabaseStatusCritical])

The default for the last check is warnung for offline and critical for emergency

So I assume all you databases are offline.

Best Regards
Nicolas

NO! My DB are not OFFLINE. I think that the “5” and "6 " thresholds are wrong reported as the default value.
These are the same value that are presetn in ALL example into the plugin documenation…


But I do not find where this value are passed to the command.

My DB are not OFFLINE, of course!

Anyway my status FINAL is not WARNING nor CRITICAL. It is “Status = UNknown” because:
image

Status: Warning threshold range “6” is greater than Critical threshold range “5”

There is a ISSUE opened here: