Icinga / icinga-powershell-mssql

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Invoke-IcingaCheckMSSQLBackupStatus = Parameter IncludeDatabase is not evaluated

408573 opened this issue · comments

Expected Behavior

When using the plugin "Invoke-IcingaCheckMSSQLBackupStatus" with the parameter "IncludeDatabase" only values from listed databases should be checked / returned.

Current Behavior

When using the parameter "IncludeDatabase" all databases are checked and the respective values are visible in the output.
There is no difference in the result whether using the "IncludeDatabase" parameter or not.

Possible Solution

N/A

Steps to Reproduce (for bugs)

Running "Invoke-IcingaCheckMSSQLBackupStatus" with or without "IncludeDatabase" doesn't make any difference.
Even submitting a nonexisting database name (here: "asdf") returns values for all databases.

Invoke-IcingaCheckMSSQLBackupStatus -SqlUsername 'sqlmon' -SqlPassword $Secure -SqlHost localhost -IncludeDatabase 'asdf' -Verbosity 2

[OK] MSSQL Backup (MSSQLSERVER)
\_ [OK] test
   \_ [OK] Age: 1.08d
   \_ [OK] Average Size: 2.96MiB
   \_ [OK] Execution Time: 0us
   \_ [OK] Log age: 1.08d
   \_ [OK] Size: 2.96MiB
   \_ [OK] Status: Online
\_ [OK] test2
   \_ [OK] Age: 0us
   \_ [OK] Average Size: 3.15MiB
   \_ [OK] Execution Time: 0us
   \_ [OK] Log age: 0us
   \_ [OK] Size: 3.15MiB
   \_ [OK] Status: Online
| 'average_size'=3107840B;; 'log_age'=93600s;; 'size'=3107840B;; 'status'=0;6;5 'execution_time'=0s;; 'age'=93600s;; 'average_size'=3304448B;; 'log_age'=0s;; 'size'=3304448B;; 'status'=0;6;5 'execution_time'=0s;; 'age'=0s;;
0

Context

There is currently no way to skip unwanted databases in the output.

Your Environment

  • PowerShell Version used ($PSVersionTable.PSVersion): 5.1.19041.1023
  • MS SQL Server: 2019
  • Operating System and version (Get-IcingaWindowsInformation Win32_OperatingSystem | Select-Object Version, BuildNumber, Caption): 10.0.19042 / 19042 / Microsoft Windows 10 Pro

Thanks! Thats fixed with #42 and v1.4.0 releasing on Augusth 30th