diff options
Diffstat (limited to 'python.d')
-rw-r--r-- | python.d/web_log.chart.py | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/python.d/web_log.chart.py b/python.d/web_log.chart.py index 18670a73de..1f47eb3bd4 100644 --- a/python.d/web_log.chart.py +++ b/python.d/web_log.chart.py @@ -853,6 +853,8 @@ class Squid(Mixin): 'chart': 'squid_mime_type', 'func_dim_id': lambda v: v.split('/')[0], 'func_dim': None}} + if not self.conf.get('all_time', True): + self.order.remove('squid_clients_all') return True def get_data(self, raw_data=None): @@ -883,10 +885,11 @@ class Squid(Mixin): proto = 'ipv4' if '.' in match['client_address'] else 'ipv6' # unique clients ips - if address_not_in_pool(pool=self.storage['unique_all_time'], - address=match['client_address'], - pool_size=self.data['unique_tot_ipv4'] + self.data['unique_tot_ipv6']): - self.data['unique_tot_' + proto] += 1 + if self.conf.get('all_time', True): + if address_not_in_pool(pool=self.storage['unique_all_time'], + address=match['client_address'], + pool_size=self.data['unique_tot_ipv4'] + self.data['unique_tot_ipv6']): + self.data['unique_tot_' + proto] += 1 if match['client_address'] not in unique_ip: self.data['unique_' + proto] += 1 |