From a8220ab2d293bb7f4b014b79d16b2fb05090fa93 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Feb 2021 12:45:55 +0100 Subject: Adding upstream version 1.29.0. Signed-off-by: Daniel Baumann --- collectors/python.d.plugin/puppet/README.md | 18 ++++++++++++++++-- collectors/python.d.plugin/puppet/puppet.chart.py | 8 +++----- 2 files changed, 19 insertions(+), 7 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 295db0140..9b7c0a2c3 100644 --- a/collectors/python.d.plugin/puppet/README.md +++ b/collectors/python.d.plugin/puppet/README.md @@ -1,4 +1,10 @@ -# puppet + + +# Puppet monitoring with Netdata Monitor status of Puppet Server and Puppet DB. @@ -24,7 +30,15 @@ Following charts are drawn: - max - used -## configuration +## Configuration + +Edit the `python.d/puppet.conf` configuration file using `edit-config` from the Netdata [config +directory](/docs/configure/nodes.md), which is typically at `/etc/netdata`. + +```bash +cd /etc/netdata # Replace this path with your Netdata config directory, if different +sudo ./edit-config python.d/puppet.conf +``` ```yaml puppetdb: diff --git a/collectors/python.d.plugin/puppet/puppet.chart.py b/collectors/python.d.plugin/puppet/puppet.chart.py index 30e219da4..f8adf6006 100644 --- a/collectors/python.d.plugin/puppet/puppet.chart.py +++ b/collectors/python.d.plugin/puppet/puppet.chart.py @@ -12,14 +12,12 @@ # import socket - from json import loads from bases.FrameworkServices.UrlService import UrlService update_every = 5 - MiB = 1 << 20 CPU_SCALE = 1000 @@ -83,7 +81,7 @@ class Service(UrlService): # NOTE: there are several ways to retrieve data # 1. Only PE versions: # https://puppet.com/docs/pe/2018.1/api_status/status_api_metrics_endpoints.html - # 2. Inidividual Metrics API (JMX): + # 2. Individual Metrics API (JMX): # https://puppet.com/docs/pe/2018.1/api_status/metrics_api.html # 3. Extended status at debug level: # https://puppet.com/docs/pe/2018.1/api_status/status_api_json_endpoints.html @@ -108,8 +106,8 @@ class Service(UrlService): non_heap_mem = jvm_metrics['non-heap-memory'] for k in ['max', 'committed', 'used', 'init']: - data['jvm_heap_'+k] = heap_mem[k] - data['jvm_nonheap_'+k] = non_heap_mem[k] + data['jvm_heap_' + k] = heap_mem[k] + data['jvm_nonheap_' + k] = non_heap_mem[k] fd_open = jvm_metrics['file-descriptors'] data['fd_max'] = fd_open['max'] -- cgit v1.2.3