summaryrefslogtreecommitdiffstats
path: root/collectors/python.d.plugin/dovecot
diff options
context:
space:
mode:
authorIlya Mashchenko <ilyamaschenko@gmail.com>2018-12-17 18:50:20 +0300
committerGitHub <noreply@github.com>2018-12-17 18:50:20 +0300
commit97b32703c63569812ef6652d8a8ab3a75f21990d (patch)
tree46bc67e074e839a9c1ecda640487d7102d16715d /collectors/python.d.plugin/dovecot
parent7ad91b8f9a840f7d8364a78dd396524c642ec786 (diff)
[python] make units compliant with IEC standard (#4995)
* apache units fix * beanstalk * bind_rndc * boinc * ceph * chrony * couchdb * dns_query * dnsdist * dockerd * dovecot * elasticsearch by @vlvkobal <3 * example * exim * fail2ban * freeradius minor fixes * freeradius minor fixes * freeradius minor fixes * go_expvar * haproxy * hddtemp * httpcheck * icecast * ipfs * isc_dhcpd * litespeed * logind * megacli * memcached * mongodb * monit * mysql * nginx * nginx_plus * nsd * ntpd * nvidia_smi * openldap * ovpn_status * phpfm * portcheck * postfix * postgres * powerdns * proxysql * puppet * rabbitmq * redis * restroshare * samba * sensors * smartdlog * spigotmc * springboot * squid * retroshare * tomcat * retroshare * tor * traefik * traefik * unbound * uwsgi * varnish * w1sensor * web_log * ok codacy * retroshare * ipfs
Diffstat (limited to 'collectors/python.d.plugin/dovecot')
-rw-r--r--collectors/python.d.plugin/dovecot/dovecot.chart.py24
1 files changed, 11 insertions, 13 deletions
diff --git a/collectors/python.d.plugin/dovecot/dovecot.chart.py b/collectors/python.d.plugin/dovecot/dovecot.chart.py
index 71fa324459..be1fa53d5f 100644
--- a/collectors/python.d.plugin/dovecot/dovecot.chart.py
+++ b/collectors/python.d.plugin/dovecot/dovecot.chart.py
@@ -5,11 +5,10 @@
from bases.FrameworkServices.SocketService import SocketService
-# default module values (can be overridden per job in `config`)
-# update_every = 2
-priority = 60000
-# charts order (can be overridden if you want less charts, or different order)
+UNIX_SOCKET = '/var/run/dovecot/stats'
+
+
ORDER = [
'sessions',
'logins',
@@ -52,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]
@@ -68,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': {
@@ -112,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):
"""