Closed K0nne closed 2 years ago
Sorry for this huge wall of text ^^
Its a rights problem. If I run the checks in an unelevated powershell console, I get the results as shown in icingaweb2:
icinga> Invoke-IcingaCheckHyperVVirtualSwitches -verbosity 2 -avoidemptycheck
[OK] Virtual Switches
|
0
icinga> Invoke-IcingaCheckHyperVSnapshot -avoidemptycheck -verbosity 2
[OK] VM Snapshots
|
0
icinga> Invoke-IcingaCheckHyperVVMHealth -verbosity 2
[OK] Virtual Computers: 1 Ok
\_ [OK] Active VMs: 0
|
0
Hi, @K0nne! Did you manage this issue? I have the same problem
It was a rights problem. We've settled with check execution in an elevated context.
Hello,
the following HyperV checks are returning just "[OK] check name" to icinga. On the console the checks show a different output.
Also the perfdata is missing in icinga.
Its somwhow similar to https://github.com/Icinga/icinga-powershell-plugins/issues/239.
I am using:
Framework 1.6.1 HyperV PR #47
The problem affects the following checks:
Invoke-IcingaCheckHyperVSnapshot
console input: Invoke-IcingaCheckHyperVSnapshot -avoidemptycheck -verbosity 2
console output:
Check Config:
IcingaWeb2:![04-11-_2021_09-30-36](https://user-images.githubusercontent.com/34264690/140282426-b5c22be0-eba5-4717-a0ef-e8743c8b780c.png)
Invoke-IcingaCheckHyperVVirtualSwitches
console input: Invoke-IcingaCheckHyperVVirtualSwitches -verbosity 2 -avoidemptycheck
console output:
Check Config:
IcingaWeb2:![04-11-_2021_09-42-59](https://user-images.githubusercontent.com/34264690/140283664-1843bc83-ce06-4507-abc3-035135cc5589.png)
Invoke-IcingaCheckHyperVVMHealth
console input: Invoke-IcingaCheckHyperVVMHealth -verbosity 2
console output: This check is in warning-state on the console, but OK in icinga.
Check Config:
IcingaWeb2: The check should be in warning state.![04-11-_2021_09-56-39](https://user-images.githubusercontent.com/34264690/140285848-55f3a67c-df41-430b-8226-68f637a2da49.png)