From 921d90793753877083023394de2e6bcf5199f5f0 Mon Sep 17 00:00:00 2001 From: mark Date: Wed, 5 May 2021 21:21:20 +0100 Subject: [PATCH] correct copy paste --- plugins/telegraf_pfifgw.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/plugins/telegraf_pfifgw.php b/plugins/telegraf_pfifgw.php index 2dd5a14..8924b7a 100755 --- a/plugins/telegraf_pfifgw.php +++ b/plugins/telegraf_pfifgw.php @@ -65,13 +65,14 @@ foreach ($iflist as $ifname => $friendly) { } $gw_array = return_gateways_array(); +//$gw_statuses is not guarranteed to contain the same number of gateways as $gw_array $gw_statuses = return_gateways_status(true); $debug = false; if($debug){ - print_r($a_gateways); - print_r($gateways_status); + print_r($gw_array); + print_r($gw_statuses); } foreach ($gw_array as $gw => $gateway) { @@ -79,8 +80,6 @@ foreach ($gw_array as $gw => $gateway) { //take the name from the $a_gateways list $name = $gateway["name"]; - //$gateways_status is not guarranteed to contain the same number of gateways as $a_gateways - $monitor = $gw_statuses[$gw]["monitorip"]; $source = $gw_statuses[$gw]["srcip"]; $delay = $gw_statuses[$gw]["delay"];