Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invoke-IcingaCheckMSSQLBackupStatus : Incorrect handling of argument -NoPerfData #57

Open
Aleksey-Maksimov opened this issue Dec 16, 2024 · 0 comments

Comments

@Aleksey-Maksimov
Copy link

Hello.

We are trying to use the -NoPerfData argument for the Invoke-IcingaCheckMSSQLBackupStatus cmdlet, but we are getting an incorrect result:

Invoke-IcingaCheckMSSQLBackupStatus -IntegratedSecurity -SqlHost DBCL22 
-Verbosity 2 -IncludeDays 1 -IncludeDatabase "VirtualManagerDB" -NoPerfData 1

[WARNING] MSSQL Backup (SCVMM) [WARNING] VirtualManagerDB
\_ [WARNING] VirtualManagerDB
   \_ [OK] Age: 13.17h
   \_ [OK] Average Size: 784.88MiB
   \_ [OK] Execution Time: 0us
   \_ [OK] Log age: 0us
   \_ [WARNING] Size: 784.88MiB is greater than threshold 1B
   \_ [OK] Status: Online
| 
'virtualmanagerdb::ifw_mssqlbackupstatus::size'=823001100B;1; 
'virtualmanagerdb::ifw_mssqlbackupstatus::state'=0;6;5 
'virtualmanagerdb::ifw_mssqlbackupstatus::averagesize'=823001100B;; 
'virtualmanagerdb::ifw_mssqlbackupstatus::age'=47400s;; 
'virtualmanagerdb::ifw_mssqlbackupstatus::logage'=0s;; 
'virtualmanagerdb::ifw_mssqlbackupstatus::executiontime'=0s;;
1

I've tried different variations of the -NoPerfData argument value, but the result is always problematic.

Invoke-IcingaCheckMSSQLBackupStatus -IntegratedSecurity -SqlHost DBCL22 
-Verbosity 2 -IncludeDays 1 -IncludeDatabase "VirtualManagerDB" -NoPerfData True

[UNKNOWN] MSSQL Backup (SCVMM) [UNKNOWN] VirtualManagerDB
\_ [UNKNOWN] VirtualManagerDB
   \_ [OK] Age: 13.13h
   \_ [OK] Average Size: 784.88MiB
   \_ [OK] Execution Time: 0us
   \_ [OK] Log age: 0us
   \_ [UNKNOWN] Size: Invalid range specified for threshold: InputValue "823001100" and Threshold True
   \_ [OK] Status: Online
| 
'virtualmanagerdb::ifw_mssqlbackupstatus::size'=823001100B;1; 
'virtualmanagerdb::ifw_mssqlbackupstatus::state'=0;6;5 
'virtualmanagerdb::ifw_mssqlbackupstatus::averagesize'=823001100B;; 
'virtualmanagerdb::ifw_mssqlbackupstatus::age'=47280s;; 
'virtualmanagerdb::ifw_mssqlbackupstatus::logage'=0s;; 
'virtualmanagerdb::ifw_mssqlbackupstatus::executiontime'=0s;;
3

As we can see from the output, the output of perfdata metrics is not disabled.
In this case, the value from the -NoPerfData argument is erroneously included in the mssqlbackupstatus metric.
This distorts the plugin output and makes it unusable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant