icinga-powershell-plugins
icinga-powershell-plugins copied to clipboard
AddSummaryHeader in nested IcingaCheckPackages
The IcingaCheckPackage argument AddSummaryHeader is not working correctly for nested IcingaCheckPackages. In nested IcingaCheckPackages only the number of checks which are ok is shown. For testing I manually added the AddSummaryHeader to Invoke-IcingaCheckCPU and the output is as follows:
PS C:\Program Files\WindowsPowerShell\Modules\icinga-powershell-framework> icinga -developermode { Invoke-IcingaCheckCPU -Warning 38 -NoPerfData -Verbosity 2} [WARNING] CPU Load: 1 Warning 1 Ok [WARNING] Socket #0 _ [OK] Overall Load: 16.425046% _ [WARNING] Socket #0: 4 Ok _ [OK] Core 0: 10.336600% _ [OK] Core 1: 7.720328% _ [WARNING] Core 2: 40.083440% is greater than threshold 38% _ [OK] Core 3: 7.559818% _ [OK] Core Total: 16.425046% 1
I expected
PS C:\Program Files\WindowsPowerShell\Modules\icinga-powershell-framework> icinga -developermode { Invoke-IcingaCheckCPU -Warning 38 -NoPerfData -Verbosity 2} [WARNING] CPU Load: 1 Warning 1 Ok [WARNING] Socket #0 _ [OK] Overall Load: 16.425046% _ [WARNING] Socket #0: 1 Warning 4 Ok [WARNING] Core 2: 40.083440% is greater than threshold 38% _ [OK] Core 0: 10.336600% _ [OK] Core 1: 7.720328% _ [WARNING] Core 2: 40.083440% is greater than threshold 38% _ [OK] Core 3: 7.559818% _ [OK] Core Total: 16.425046% 1