Skip to content

Commit 89c7114

Browse files
committed
Fixes network include filter being broken and never being applied properly
1 parent 310f5be commit 89c7114

1 file changed

Lines changed: 2 additions & 10 deletions

File tree

provider/network/Join-icingaNetworkDeviceDataPerfCounter.psm1

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -28,19 +28,11 @@ function Join-IcingaNetworkDeviceDataPerfCounter()
2828
continue;
2929
}
3030

31-
if ((Test-IcingaArrayFilter -InputObject $GetNetworkDevice[$DeviceName].DeviceId -Include $IncludeNetworkDevice -Exclude $ExcludeNetworkDevice) -eq $FALSE) {
32-
continue;
33-
}
34-
35-
if ((Test-IcingaArrayFilter -InputObject $DeviceName -Include $IncludeNetworkDevice -Exclude $ExcludeNetworkDevice) -eq $FALSE) {
36-
continue;
37-
}
38-
3931
if ((Test-IcingaArrayFilter -InputObject $GetNetworkDevice[$DeviceName].Name -Include $IncludeNetworkDevice -Exclude $ExcludeNetworkDevice) -eq $FALSE) {
4032
continue;
4133
}
4234

43-
if (($GetNetworkDevice.Containskey($DeviceName)) -eq $fALSE) {
35+
if (($GetNetworkDevice.ContainsKey($DeviceName)) -eq $fALSE) {
4436
continue;
4537
}
4638

@@ -51,7 +43,7 @@ function Join-IcingaNetworkDeviceDataPerfCounter()
5143
foreach ($key in $NetworkDeviceObject.Keys) {
5244
$CounterObject = $NetworkDeviceObject[$key];
5345
if (($CounterHashObject.ContainsKey($key)) -eq $TRUE) {
54-
$CounterHashObject[$key].value += $CounterObject.value;
46+
$CounterHashObject[$key].value += $CounterObject.value;
5547
} else {
5648
$CounterHashObject.Add($key, $CounterObject);
5749
}

0 commit comments

Comments
 (0)