1 # -*- coding: utf-8 -*-
2 # Description: apache cache netdata python.d module
3 # Author: Pawel Krupa (paulfantom)
5 from base import LogService
14 'options': [None, 'apache cached responses', 'percent cached', 'cached', 'apache_cache.cache', 'stacked'],
16 ["hit", 'cache', "percentage-of-absolute-row"],
17 ["miss", None, "percentage-of-absolute-row"],
18 ["other", None, "percentage-of-absolute-row"]
23 class Service(LogService):
24 def __init__(self, configuration=None, name=None):
25 LogService.__init__(self, configuration=configuration, name=name)
26 if len(self.log_path) == 0:
27 self.log_path = "/var/log/apache2/cache.log"
29 self.definitions = CHARTS
37 raw = self._get_raw_data()
44 except (ValueError, AttributeError):
51 if "cache hit" in line:
53 elif "cache miss" in line: