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

VM Snapshots: No checks added to this package #46

Closed Backtrack89 closed 2 years ago

Backtrack89 commented 2 years ago

I got the issue VM Snapshots: No checks added to this package

[2021-10-27 15:11:50 +0200] information/ExternalCommandListener: Executing external command: [1635340310] SCHEDULE_FORCED_SVC_CHECK;hostname;Invoke-IcingaCheckHyperVSnapshot;1635340310

zones.d/master/services.conf

object Service "Invoke-IcingaCheckHyperVSnapshot" {
    host_name = "DATHSTHV01"
    import "Invoke-IcingaCheckHyperVSnapshot"

    check_command = "Invoke-IcingaCheckHyperVSnapshot"
    vars.IcingaCheckHyperVSnapshot_Array_IncludeVms = [ "*vm*" ]
    vars.IcingaCheckHyperVSnapshot_Object_Verbosity = "2"
    vars.IcingaCheckHyperVSnapshot_Switchparameter_ActiveVms = true
}

and

StorageOverCommit: No checks added to this package

information/ExternalCommandListener: Executing external command: [1635340838] SCHEDULE_FORCED_SVC_CHECK;DATHSTHV01;Invoke-IcingaCheckHyperVOverCommitment;1635340838

zones.d/master/services.conf

object Service "Invoke-IcingaCheckHyperVOverCommitment" {
    host_name = "hostname"
    check_command = "Invoke-IcingaCheckHyperVOverCommitment"
    command_endpoint = host_name
    vars.IcingaCheckHyperVOverCommitment_Array_IncludeVms = [ "*vm*" ]
    vars.IcingaCheckHyperVOverCommitment_Object_Verbosity = "2"
    vars.IcingaCheckHyperVOverCommitment_Switchparameter_ActiveVms = true
}
LordHepipud commented 2 years ago

Can you please try the PR #47 and use -AvoidEmptyChecks? This would mitigate the problem and return Ok for empty packages.

If the check should return information but it doesn't, it is probably a permission problem, similar to #48.

You will either have to use Icinga for Windows JEA Profiles or grant the user the Icinga Agent is running with permissions to access Hyper-V information.

LordHepipud commented 2 years ago

Hello

have you been able to test the linked PR?