diff options
Diffstat (limited to 'collectors/python.d.plugin/dovecot/dovecot.chart.py')
-rw-r--r-- | collectors/python.d.plugin/dovecot/dovecot.chart.py | 25 |
1 files changed, 11 insertions, 14 deletions
diff --git a/collectors/python.d.plugin/dovecot/dovecot.chart.py b/collectors/python.d.plugin/dovecot/dovecot.chart.py index 7fee3bfac..be1fa53d5 100644 --- a/collectors/python.d.plugin/dovecot/dovecot.chart.py +++ b/collectors/python.d.plugin/dovecot/dovecot.chart.py @@ -5,12 +5,10 @@ from bases.FrameworkServices.SocketService import SocketService -# default module values (can be overridden per job in `config`) -# update_every = 2 -priority = 60000 -retries = 60 -# charts order (can be overridden if you want less charts, or different order) +UNIX_SOCKET = '/var/run/dovecot/stats' + + ORDER = [ 'sessions', 'logins', @@ -53,14 +51,14 @@ CHARTS = { ] }, 'context_switches': { - 'options': [None, 'Dovecot Context Switches', '', 'context switches', 'dovecot.context_switches', 'line'], + 'options': [None, 'Dovecot Context Switches', 'switches', 'context switches', 'dovecot.context_switches', 'line'], 'lines': [ ['vol_cs', 'voluntary', 'absolute'], ['invol_cs', 'involuntary', 'absolute'] ] }, 'io': { - 'options': [None, 'Dovecot Disk I/O', 'kilobytes/s', 'disk', 'dovecot.io', 'area'], + 'options': [None, 'Dovecot Disk I/O', 'KiB/s', 'disk', 'dovecot.io', 'area'], 'lines': [ ['disk_input', 'read', 'incremental', 1, 1024], ['disk_output', 'write', 'incremental', -1, 1024] @@ -69,8 +67,8 @@ CHARTS = { 'net': { 'options': [None, 'Dovecot Network Bandwidth', 'kilobits/s', 'network', 'dovecot.net', 'area'], 'lines': [ - ['read_bytes', 'read', 'incremental', 8, 1024], - ['write_bytes', 'write', 'incremental', -8, 1024] + ['read_bytes', 'read', 'incremental', 8, 1000], + ['write_bytes', 'write', 'incremental', -8, 1000] ] }, 'syscalls': { @@ -113,13 +111,12 @@ CHARTS = { class Service(SocketService): def __init__(self, configuration=None, name=None): SocketService.__init__(self, configuration=configuration, name=name) - self.request = 'EXPORT\tglobal\r\n' - self.host = None # localhost - self.port = None # 24242 - # self._keep_alive = True - self.unix_socket = '/var/run/dovecot/stats' self.order = ORDER self.definitions = CHARTS + self.host = None # localhost + self.port = None # 24242 + self.unix_socket = UNIX_SOCKET + self.request = 'EXPORT\tglobal\r\n' def _get_data(self): """ |