]> arthur.barton.de Git - netdata.git/commitdiff
add other counter
authorpaulfantom <paulfantom@gmail.com>
Sat, 2 Jul 2016 16:58:09 +0000 (18:58 +0200)
committerpaulfantom <paulfantom@gmail.com>
Sat, 2 Jul 2016 16:58:09 +0000 (18:58 +0200)
python.d/apache_cache.chart.py

index be102129fb953ecbe6a1260e1436327147f00bf4..bf04b339fa72eb092f7c55a7d14a6b2a9abffeb7 100644 (file)
@@ -14,7 +14,8 @@ CHARTS = {
         'options': [None, 'apache cached responses', 'percent cached', 'cached', 'apache_cache.cache', 'stacked'],
         'lines': [
             ["hit", 'cache', "percentage-of-absolute-row"],
-            ["miss", None, "percentage-of-absolute-row"]
+            ["miss", None, "percentage-of-absolute-row"],
+            ["other", None, "percentage-of-absolute-row"]
         ]}
 }
 
@@ -41,11 +42,15 @@ class Service(LogService):
 
         hit = 0
         miss = 0
+        other = 0
         for line in raw:
             if "cache hit" in line:
                 hit += 1
             elif "cache miss" in line:
                 miss += 1
+            else:
+                other += 1
 
         return {'hit': hit,
-                'miss': miss}
+                'miss': miss,
+                'other': other}