From bdf0b7146e7fe1d38e7a5fd7a08de66d6fe9e22c Mon Sep 17 00:00:00 2001 From: Crited <45196568+Crited@users.noreply.github.com> Date: Mon, 4 Nov 2019 11:36:41 +0100 Subject: [PATCH] Fixes config generating with datalists --- lib/core/tools/Get-IcingaCheckCommandConfig.psm1 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/core/tools/Get-IcingaCheckCommandConfig.psm1 b/lib/core/tools/Get-IcingaCheckCommandConfig.psm1 index 5aa347c..53c33aa 100644 --- a/lib/core/tools/Get-IcingaCheckCommandConfig.psm1 +++ b/lib/core/tools/Get-IcingaCheckCommandConfig.psm1 @@ -145,7 +145,6 @@ function Get-IcingaCheckCommandConfig() $Data = (Get-Help $check); $ParameterList = (Get-Command -Name $check).Parameters; $PluginNameSpace = $Data.Name.Replace('Invoke-', ''); - $IsDataList = $FALSE; # Add command Structure $Basket.Command.Add( @@ -168,6 +167,8 @@ function Get-IcingaCheckCommandConfig() # Loop through parameters of a given command foreach ($parameter in $Data.parameters.parameter) { + $IsDataList = $FALSE; + # IsNumeric-Check on position to determine the order-value If (Test-Numeric($parameter.position) -eq $TRUE) { [string]$Order = [int]$parameter.position + 1; @@ -270,6 +271,7 @@ function Get-IcingaCheckCommandConfig() $IcingaDataType = [string]::Format('Icinga\Module\Director\DataType\DataType{0}', $IcingaDataType) + #Write-Host $Basket.Datafield.Values.varname if ($Basket.Datafield.Values.varname -ne $IcingaCustomVariable) { $Basket.Datafield.Add( [string]$FieldID, @{