X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=python.d%2Fapache_cache.chart.py;h=3681a85112ec51762e245fe8b9a40ff05b87b933;hb=0d6e3714113d50a5f197c9035cf1bd22d2259714;hp=69da50c1f514124449130f973c03e1bc2230f4a3;hpb=a8319219b7299144f43053376be8a199a25cbd0c;p=netdata.git diff --git a/python.d/apache_cache.chart.py b/python.d/apache_cache.chart.py index 69da50c1..3681a851 100644 --- a/python.d/apache_cache.chart.py +++ b/python.d/apache_cache.chart.py @@ -1,12 +1,12 @@ # -*- coding: utf-8 -*- -# Description: apache cache netdata python.d plugin +# Description: apache cache netdata python.d module # Author: Pawel Krupa (paulfantom) from base import LogService priority = 60000 -retries = 5 -update_every = 3 +retries = 60 +# update_every = 3 ORDER = ['cache'] CHARTS = { @@ -28,15 +28,19 @@ class Service(LogService): self.order = ORDER self.definitions = CHARTS - def _format_data(self): + def _get_data(self): """ Parse new log lines :return: dict """ try: - raw = self._get_data() + raw = self._get_raw_data() if raw is None: return None + elif not raw: + return {'hit': 0, + 'miss': 0, + 'other': 0} except (ValueError, AttributeError): return None