]> arthur.barton.de Git - netdata.git/commitdiff
fix postfix (no mails error)
authorpaulfantom <paulfantom@gmail.com>
Wed, 13 Jul 2016 22:42:00 +0000 (00:42 +0200)
committerpaulfantom <paulfantom@gmail.com>
Wed, 13 Jul 2016 22:42:00 +0000 (00:42 +0200)
plugins.d/python.d.plugin
python.d/postfix.chart.py

index bddcd6e5dc3e0df793681a5f3df4f963349324e4..f5738e6e3257e09b694f2ea1205d3c5b6a0e1ea9 100755 (executable)
@@ -484,7 +484,6 @@ def run():
     # parse passed command line arguments
     modules = parse_cmdline(MODULES_DIR, *sys.argv)
     msg.DEBUG_FLAG = DEBUG_FLAG
-    modules = ['postfix']
     msg.info("MODULES_DIR='" + MODULES_DIR +
              "', CONFIG_DIR='" + CONFIG_DIR +
              "', UPDATE_EVERY=" + str(BASE_CONFIG['update_every']) +
index 3f82715dfb769ededab767bebe881217c531a564..471d4f3fabcc277cecd936015223721e555947fa 100644 (file)
@@ -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):