I have installed that versions:
Icinga2-v2.13.0-x86_64.msi
icinga-powershell-framework-1.5.2.zip
icinga-powershell-plugins-1.5.1.zip
icinga-service-v1.1.0.zip
This is the check:
Function i-pathexist()
{
param(
$path = $null,
$exist = $null,
$warncrit = $null);switch ($exist) {
“1” {$wert=test-path $path}
“0” {$wert=(!(test-path $path))}default{$wert=test-path $path} }#Checkwert setzen
$Check = New-IcingaCheck -Name $path -Value $wert;check ausführen
switch ($warncrit) {
“warn” {$Check.WarnifLike(‘false’) |Out-Null}
“crit” {$Check.CritifLike(‘false’) |Out-Null}
default {$Check.CritifLike(‘false’) |Out-Null}
}return (New-IcingaCheckresult -Check $Check -noPerfdata $True -Compile );
}
If I call the script on the client:
use-icinga
i-pathexist c:\temp
If I replace the New-IcingaCheckBaseObject from the framework 1.5.0 I don’t get the error.
I don’t think the Master is relevant. The error is on the Windows Agent.
