aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorM.Gergő2020-05-25 21:47:53 +0200
committerM.Gergő2020-05-25 21:47:53 +0200
commit35102d015abc46b0ccd63dc0b442280cb4f3faea (patch)
treea6728f39b6c30502cde71dbaf1cdfb2fec46e4fb
parent09bfce15a8d9e4737ed902b1e09e58d728843fde (diff)
downloadmunin-unifi-35102d015abc46b0ccd63dc0b442280cb4f3faea.tar.gz
munin-unifi-35102d015abc46b0ccd63dc0b442280cb4f3faea.zip
Litte repairv3.5.0
-rw-r--r--ubnt_unifi.php14
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);