X-Git-Url: https://arthur.barton.de/gitweb/?a=blobdiff_plain;f=python.d%2Fpostfix.chart.py;h=ee4142aaf68752b71fb782e36937fedc5b348407;hb=bb199074c60921349ce5a9fe0ae7bf70b6061b59;hp=3f82715dfb769ededab767bebe881217c531a564;hpb=509c50df3bce82fc6bae3974347619fa97591bad;p=netdata.git diff --git a/python.d/postfix.chart.py b/python.d/postfix.chart.py index 3f82715d..ee4142aa 100644 --- a/python.d/postfix.chart.py +++ b/python.d/postfix.chart.py @@ -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):