Icinga / icinga-powershell-hyperv

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

Feature request: Invoke-IcingaCheckHyperVVMHealth - Add a threshold for the number of VMs in a cluster, which are not active (running) #34

Closed K0nne closed 3 years ago

K0nne commented 3 years ago

Hello,

it whould be very helpful to have a threshold for the number of VMs in a cluster, which are not in an active state. Something like Invoke-IcingaCheckHyperVVMHealth -ActiveVMs -CriticalActiveVMs 10 This is an indication for hidden problems.

Thank you very much. The HyperV checks are already very helpful.

LordHepipud commented 3 years ago

Hello,

can you please test the linked PR for this? The -ActiveVMs argument is not required, just -WarningActiveVms and -CriticalActiveVms

K0nne commented 3 years ago

The PR is working great 💯

icinga { invoke-icingacheckhypervvmhealth -warningactivevms 28: -noperfdata}

[WARNING] Virtual Computers: 1 Warning 27 Ok [WARNING] Active VMs (25)
\_ [WARNING] Active VMs: 25 is lower than threshold 28
1

icinga { invoke-icingacheckhypervvmhealth -warningactivevms 28: -criticalactivevms 27: -noperfdata}

[CRITICAL] Virtual Computers: 1 Critical 27 Ok [CRITICAL] Active VMs (25)
\_ [CRITICAL] Active VMs: 25 is lower than threshold 27
2