diff options
author | Ilya Mashchenko <ilyamaschenko@gmail.com> | 2018-12-17 18:50:20 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-12-17 18:50:20 +0300 |
commit | 97b32703c63569812ef6652d8a8ab3a75f21990d (patch) | |
tree | 46bc67e074e839a9c1ecda640487d7102d16715d /collectors/python.d.plugin/tomcat/tomcat.chart.py | |
parent | 7ad91b8f9a840f7d8364a78dd396524c642ec786 (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/tomcat/tomcat.chart.py')
-rw-r--r-- | collectors/python.d.plugin/tomcat/tomcat.chart.py | 62 |
1 files changed, 34 insertions, 28 deletions
diff --git a/collectors/python.d.plugin/tomcat/tomcat.chart.py b/collectors/python.d.plugin/tomcat/tomcat.chart.py index c5afc23471..01578c56e2 100644 --- a/collectors/python.d.plugin/tomcat/tomcat.chart.py +++ b/collectors/python.d.plugin/tomcat/tomcat.chart.py @@ -8,12 +8,18 @@ import xml.etree.ElementTree as ET from bases.FrameworkServices.UrlService import UrlService -# default module values (can be overridden per job in `config`) -# update_every = 2 -priority = 60000 +MiB = 1 << 20 -# charts order (can be overridden if you want less charts, or different order) -ORDER = ['accesses', 'bandwidth', 'processing_time', 'threads', 'jvm', 'jvm_eden', 'jvm_survivor', 'jvm_tenured'] +ORDER = [ + 'accesses', + 'bandwidth', + 'processing_time', + 'threads', + 'jvm', + 'jvm_eden', + 'jvm_survivor', + 'jvm_tenured', +] CHARTS = { 'accesses': { @@ -24,7 +30,7 @@ CHARTS = { ] }, 'bandwidth': { - 'options': [None, 'Bandwidth', 'KB/s', 'statistics', 'tomcat.bandwidth', 'area'], + 'options': [None, 'Bandwidth', 'KiB/s', 'statistics', 'tomcat.bandwidth', 'area'], 'lines': [ ['bytesSent', 'sent', 'incremental', 1, 1024], ['bytesReceived', 'received', 'incremental', 1, 1024], @@ -44,39 +50,39 @@ CHARTS = { ] }, 'jvm': { - 'options': [None, 'JVM Memory Pool Usage', 'MB', 'memory', 'tomcat.jvm', 'stacked'], + 'options': [None, 'JVM Memory Pool Usage', 'MiB', 'memory', 'tomcat.jvm', 'stacked'], 'lines': [ - ['free', 'free', 'absolute', 1, 1048576], - ['eden_used', 'eden', 'absolute', 1, 1048576], - ['survivor_used', 'survivor', 'absolute', 1, 1048576], - ['tenured_used', 'tenured', 'absolute', 1, 1048576], - ['code_cache_used', 'code cache', 'absolute', 1, 1048576], - ['compressed_used', 'compressed', 'absolute', 1, 1048576], - ['metaspace_used', 'metaspace', 'absolute', 1, 1048576], + ['free', 'free', 'absolute', 1, MiB], + ['eden_used', 'eden', 'absolute', 1, MiB], + ['survivor_used', 'survivor', 'absolute', 1, MiB], + ['tenured_used', 'tenured', 'absolute', 1, MiB], + ['code_cache_used', 'code cache', 'absolute', 1, MiB], + ['compressed_used', 'compressed', 'absolute', 1, MiB], + ['metaspace_used', 'metaspace', 'absolute', 1, MiB], ] }, 'jvm_eden': { - 'options': [None, 'Eden Memory Usage', 'MB', 'memory', 'tomcat.jvm_eden', 'area'], + 'options': [None, 'Eden Memory Usage', 'MiB', 'memory', 'tomcat.jvm_eden', 'area'], 'lines': [ - ['eden_used', 'used', 'absolute', 1, 1048576], - ['eden_committed', 'committed', 'absolute', 1, 1048576], - ['eden_max', 'max', 'absolute', 1, 1048576] + ['eden_used', 'used', 'absolute', 1, MiB], + ['eden_committed', 'committed', 'absolute', 1, MiB], + ['eden_max', 'max', 'absolute', 1, MiB] ] }, 'jvm_survivor': { - 'options': [None, 'Survivor Memory Usage', 'MB', 'memory', 'tomcat.jvm_survivor', 'area'], + 'options': [None, 'Survivor Memory Usage', 'MiB', 'memory', 'tomcat.jvm_survivor', 'area'], 'lines': [ - ['survivor_used', 'used', 'absolute', 1, 1048576], - ['survivor_committed', 'committed', 'absolute', 1, 1048576], - ['survivor_max', 'max', 'absolute', 1, 1048576] + ['survivor_used', 'used', 'absolute', 1, MiB], + ['survivor_committed', 'committed', 'absolute', 1, MiB], + ['survivor_max', 'max', 'absolute', 1, MiB], ] }, 'jvm_tenured': { - 'options': [None, 'Tenured Memory Usage', 'MB', 'memory', 'tomcat.jvm_tenured', 'area'], + 'options': [None, 'Tenured Memory Usage', 'MiB', 'memory', 'tomcat.jvm_tenured', 'area'], 'lines': [ - ['tenured_used', 'used', 'absolute', 1, 1048576], - ['tenured_committed', 'committed', 'absolute', 1, 1048576], - ['tenured_max', 'max', 'absolute', 1, 1048576] + ['tenured_used', 'used', 'absolute', 1, MiB], + ['tenured_committed', 'committed', 'absolute', 1, MiB], + ['tenured_max', 'max', 'absolute', 1, MiB] ] } } @@ -85,10 +91,10 @@ CHARTS = { class Service(UrlService): def __init__(self, configuration=None, name=None): UrlService.__init__(self, configuration=configuration, name=name) - self.url = self.configuration.get('url', 'http://127.0.0.1:8080/manager/status?XML=true') - self.connector_name = self.configuration.get('connector_name', None) self.order = ORDER self.definitions = CHARTS + self.url = self.configuration.get('url', 'http://127.0.0.1:8080/manager/status?XML=true') + self.connector_name = self.configuration.get('connector_name', None) def _get_data(self): """ |