diff options
author | M.Gergő | 2020-05-25 21:47:53 +0200 |
---|---|---|
committer | M.Gergő | 2020-05-25 21:47:53 +0200 |
commit | 35102d015abc46b0ccd63dc0b442280cb4f3faea (patch) | |
tree | a6728f39b6c30502cde71dbaf1cdfb2fec46e4fb | |
parent | 09bfce15a8d9e4737ed902b1e09e58d728843fde (diff) | |
download | munin-unifi-f5e9dd28ce0c90ec3c87baa6b124b87ce9c0729a.tar.gz munin-unifi-f5e9dd28ce0c90ec3c87baa6b124b87ce9c0729a.zip |
Litte repairv3.5.0
-rw-r--r-- | ubnt_unifi.php | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/ubnt_unifi.php b/ubnt_unifi.php index 2b5726b..880c7df 100644 --- a/ubnt_unifi.php +++ b/ubnt_unifi.php @@ -424,12 +424,14 @@ function collect_response_time($inp, $host){ //Calculates the Roundtrip time a $sum_time += $ret['data'][$i]['value']; $i++; } - $ret['head'][$i+1]['name'] = "ping_average"; - $ret['head'][$i+1]['label'] = "Average"; - $ret['head'][$i+1]['draw'] = "LINE1.2"; - $ret['head'][$i+1]['info'] = "Response Time"; - $ret['head'][$i+1]['type'] = "GAUGE"; - $ret['head'][$i+1]['min'] = "0"; + if($host == null){ //count average + $ret['head'][$i+1]['name'] = "ping_average"; + $ret['head'][$i+1]['label'] = "Average"; + $ret['head'][$i+1]['draw'] = "LINE1.2"; + $ret['head'][$i+1]['info'] = "Response Time"; + $ret['head'][$i+1]['type'] = "GAUGE"; + $ret['head'][$i+1]['min'] = "0"; + } if(count($inp) != 0 && $host == null){ //count average $ret['data'][$i+1]['value'] = $sum_time/count($inp); |