From 50485bedfd9818165aa1d039d0abe95a559134b7 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 8 Feb 2019 08:31:03 +0100 Subject: Merging upstream version 1.12.0. Signed-off-by: Daniel Baumann --- collectors/python.d.plugin/puppet/README.md | 7 +++--- collectors/python.d.plugin/puppet/puppet.chart.py | 28 ++++++++++++----------- collectors/python.d.plugin/puppet/puppet.conf | 12 ++++------ 3 files changed, 22 insertions(+), 25 deletions(-) (limited to 'collectors/python.d.plugin/puppet') diff --git a/collectors/python.d.plugin/puppet/README.md b/collectors/python.d.plugin/puppet/README.md index 8304c831e..b97eb70c5 100644 --- a/collectors/python.d.plugin/puppet/README.md +++ b/collectors/python.d.plugin/puppet/README.md @@ -26,16 +26,13 @@ puppetdb: tls_cert_file: /path/to/client.crt tls_key_file: /path/to/client.key autodetection_retry: 1 - retries: 3600 puppetserver: url: 'https://fqdn.example.com:8140' autodetection_retry: 1 - retries: 3600 ``` -When no configuration is given then `https://fqdn.example.com:8140` is -tried without any retries. +When no configuration is given, module uses `https://fqdn.example.com:8140`. ### notes @@ -46,3 +43,5 @@ tried without any retries. to default PuppetDB configuration though. --- + +[![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%2Fpuppet%2FREADME&_u=MAC~&cid=5792dfd7-8dc4-476b-af31-da2fdb9f93d2&tid=UA-64295674-3)]() diff --git a/collectors/python.d.plugin/puppet/puppet.chart.py b/collectors/python.d.plugin/puppet/puppet.chart.py index 5c8e48bd9..30e219da4 100644 --- a/collectors/python.d.plugin/puppet/puppet.chart.py +++ b/collectors/python.d.plugin/puppet/puppet.chart.py @@ -11,29 +11,31 @@ # and tls_cert_file options then. # -from bases.FrameworkServices.UrlService import UrlService -from json import loads import socket +from json import loads + +from bases.FrameworkServices.UrlService import UrlService + update_every = 5 -priority = 60000 -# very long clojure-based service startup time -retries = 180 -MB = 1048576 + +MiB = 1 << 20 CPU_SCALE = 1000 + ORDER = [ 'jvm_heap', 'jvm_nonheap', 'cpu', 'fd_open', ] + CHARTS = { 'jvm_heap': { - 'options': [None, 'JVM Heap', 'MB', 'resources', 'puppet.jvm', 'area'], + 'options': [None, 'JVM Heap', 'MiB', 'resources', 'puppet.jvm', 'area'], 'lines': [ - ['jvm_heap_committed', 'committed', 'absolute', 1, MB], - ['jvm_heap_used', 'used', 'absolute', 1, MB], + ['jvm_heap_committed', 'committed', 'absolute', 1, MiB], + ['jvm_heap_used', 'used', 'absolute', 1, MiB], ], 'variables': [ ['jvm_heap_max'], @@ -41,10 +43,10 @@ CHARTS = { ], }, 'jvm_nonheap': { - 'options': [None, 'JVM Non-Heap', 'MB', 'resources', 'puppet.jvm', 'area'], + 'options': [None, 'JVM Non-Heap', 'MiB', 'resources', 'puppet.jvm', 'area'], 'lines': [ - ['jvm_nonheap_committed', 'committed', 'absolute', 1, MB], - ['jvm_nonheap_used', 'used', 'absolute', 1, MB], + ['jvm_nonheap_committed', 'committed', 'absolute', 1, MiB], + ['jvm_nonheap_used', 'used', 'absolute', 1, MiB], ], 'variables': [ ['jvm_nonheap_max'], @@ -73,9 +75,9 @@ CHARTS = { class Service(UrlService): def __init__(self, configuration=None, name=None): UrlService.__init__(self, configuration=configuration, name=name) - self.url = 'https://{0}:8140'.format(socket.getfqdn()) self.order = ORDER self.definitions = CHARTS + self.url = 'https://{0}:8140'.format(socket.getfqdn()) def _get_data(self): # NOTE: there are several ways to retrieve data diff --git a/collectors/python.d.plugin/puppet/puppet.conf b/collectors/python.d.plugin/puppet/puppet.conf index 991bfabed..ff5c3d020 100644 --- a/collectors/python.d.plugin/puppet/puppet.conf +++ b/collectors/python.d.plugin/puppet/puppet.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 # # These configuration comes from UrlService base: @@ -89,10 +87,8 @@ # tls_cert_file: /path/to/client.crt # tls_key_file: /path/to/client.key # autodetection_retry: 1 -# retries: 3600 # # puppetserver: # url: 'https://fqdn.example.com:8140' # autodetection_retry: 1 -# retries: 3600 # -- cgit v1.2.3