Framework 1.10.1

Hello All,

Im a bit confused,

I update the Powershell-Framework from 1.8 to 1.10.1 and got the follwing issue on some checks

grafik

I used the versions

  • icinga-powershell-1.10.1
  • icinga-powershell-hyperv-1.2.0
  • icinga-powershell-plugins-1.10.1
  • icinga-service-v1.2.0

This configuration with the update is installed on 3 Nodes and one of them is running fine

run it on Powershell:

PS C:\Program Files\WindowsPowerShell\Modules> Invoke-IcingaCheckDiskHealth
Exception calling "Add" with "2" argument(s): "Item has already been added. Key in dictionary: '26'  Key being added:
'26'"
At C:\Program
Files\WindowsPowerShell\Modules\icinga-powershell-plugins\compiled\icinga-powershell-plugins.ifw_compilation.psm1:6458
char:9
+         $PhysicalDiskData.Add($MSFTDiskId, $DiskInfo);
+         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : ArgumentException

Solution for me

i edit this file befor installing the plugins

provider/disks/Get-IcingaPhysicalDiskInfo.psm1

on line
287

change

$PhysicalDiskData.Add($MSFTDiskId, $DiskInfo);

to

        if(!$PhysicalDiskData.ContainsKey($MSFTDiskId)) {
            $PhysicalDiskData.Add($MSFTDiskId, $DiskInfo);
        }