Icinga / icinga-powershell-hyperv

A collection of Hyper-V plugins for the Icinga Powershell Framework
GNU General Public License v2.0
5 stars 0 forks source link

When a HyperV Host is running "empty" the Checks for Overcommitment, VM Health and Snapshots are returning a wrong unknown-message #29

Closed K0nne closed 3 years ago

K0nne commented 3 years ago

Hello,

when a HyperV host is running "empty", because all of its VMs, snapshots etc. have been moved on purpose, the checks for Overcommitment, VM Health and Snapshots are returning the following unknown message:

[UNKNOWN]: Icinga Permission Error was thrown: : Hyper-V access denied
The user you are running this command with does not have permissions to access Hyper-V data on this host. Please add the user to the "Hyper-V Administrator" user group and restart the Icinga/PowerShell service afterwards

Is it possible to detect this case and still return an OK?

K0nne commented 3 years ago

Thanks for the bugfix. Unfortunately it doen't work as expected. It solves the initial problem by returning:

[UNKNOWN]: Icinga Custom Error was thrown: Custom Exception: OK

Custom exception occured:
Everything is fine.

Unfortunately the checks stay in this state, even if the HyperV ressources are present. After I switched back to the current master, the checks went [OK] again.

yhabteab commented 3 years ago

Hi, thanks that you have tested it but the PR is not ready.