diff options
Diffstat (limited to 'collectors/python.d.plugin/tomcat')
-rw-r--r-- | collectors/python.d.plugin/tomcat/README.md | 2 | ||||
-rw-r--r-- | collectors/python.d.plugin/tomcat/tomcat.chart.py | 63 | ||||
-rw-r--r-- | collectors/python.d.plugin/tomcat/tomcat.conf | 10 |
3 files changed, 40 insertions, 35 deletions
diff --git a/collectors/python.d.plugin/tomcat/README.md b/collectors/python.d.plugin/tomcat/README.md index e548bd33..21e3896a 100644 --- a/collectors/python.d.plugin/tomcat/README.md +++ b/collectors/python.d.plugin/tomcat/README.md @@ -31,3 +31,5 @@ Without configuration, module attempts to connect to `http://localhost:8080/mana So it will probably fail. --- + +[![analytics](https://www.google-analytics.com/collect?v=1&aip=1&t=pageview&_s=1&ds=github&dr=https%3A%2F%2Fgithub.com%2Fnetdata%2Fnetdata&dl=https%3A%2F%2Fmy-netdata.io%2Fgithub%2Fcollectors%2Fpython.d.plugin%2Ftomcat%2FREADME&_u=MAC~&cid=5792dfd7-8dc4-476b-af31-da2fdb9f93d2&tid=UA-64295674-3)]() diff --git a/collectors/python.d.plugin/tomcat/tomcat.chart.py b/collectors/python.d.plugin/tomcat/tomcat.chart.py index 3c2d0ed4..01578c56 100644 --- a/collectors/python.d.plugin/tomcat/tomcat.chart.py +++ b/collectors/python.d.plugin/tomcat/tomcat.chart.py @@ -8,13 +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 -retries = 60 +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': { @@ -25,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], @@ -45,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] ] } } @@ -86,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): """ diff --git a/collectors/python.d.plugin/tomcat/tomcat.conf b/collectors/python.d.plugin/tomcat/tomcat.conf index c63f06cf..009591bd 100644 --- a/collectors/python.d.plugin/tomcat/tomcat.conf +++ b/collectors/python.d.plugin/tomcat/tomcat.conf @@ -27,11 +27,9 @@ # If unset, the default for python.d.plugin is used. # priority: 60000 -# retries sets the number of retries to be made in case of failures. -# If unset, the default for python.d.plugin is used. -# Attempts to restore the service are made once every update_every -# and only if the module has collected values in the past. -# retries: 60 +# penalty indicates whether to apply penalty to update_every in case of failures. +# Penalty will increase every 5 failed updates in a row. Maximum penalty is 10 minutes. +# penalty: yes # autodetection_retry sets the job re-check interval in seconds. # The job is not deleted if check fails. @@ -58,7 +56,7 @@ # # JOBs sharing a name are mutually exclusive # update_every: 1 # the JOB's data collection frequency # priority: 60000 # the JOB's order on the dashboard -# retries: 60 # the JOB's number of restoration attempts +# penalty: yes # the JOB's penalty # autodetection_retry: 0 # the JOB's re-check interval in seconds # # Additionally to the above, tomcat also supports the following: |