]> arthur.barton.de Git - netdata.git/blobdiff - python.d/postfix.chart.py
freeradius_plugin: python 2.6 compatibility fix2
[netdata.git] / python.d / postfix.chart.py
index 3f82715dfb769ededab767bebe881217c531a564..ee4142aaf68752b71fb782e36937fedc5b348407 100644 (file)
@@ -7,19 +7,19 @@ from base import ExecutableService
 # default module values (can be overridden per job in `config`)
 # update_every = 2
 priority = 60000
-retries = 5
+retries = 60
 
 # charts order (can be overridden if you want less charts, or different order)
 ORDER = ['qemails', 'qsize']
 
 CHARTS = {
     'qemails': {
-        'options': [None, "Postfix Queue Emails", "emails", 'queue', 'postfix.queued.emails', 'line'],
+        'options': [None, "Postfix Queue Emails", "emails", 'queue', 'postfix.qemails', 'line'],
         'lines': [
             ['emails', None, 'absolute']
         ]},
     'qsize': {
-        'options': [None, "Postfix Queue Emails Size", "emails size in KB", 'queue', 'postfix.queued.size', 'area'],
+        'options': [None, "Postfix Queue Emails Size", "emails size in KB", 'queue', 'postfix.qsize', 'area'],
         'lines': [
             ["size", None, 'absolute']
         ]}
@@ -40,6 +40,10 @@ class Service(ExecutableService):
         """
         try:
             raw = self._get_raw_data()[-1].split(' ')
+            if raw[0] == 'Mail' and raw[1] == 'queue':
+                return {'emails': 0,
+                        'size': 0}
+
             return {'emails': raw[4],
                     'size': raw[1]}
         except (ValueError, AttributeError):