summaryrefslogtreecommitdiffstats
path: root/collectors/python.d.plugin/puppet
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/puppet
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/puppet')
-rw-r--r--collectors/python.d.plugin/puppet/puppet.chart.py25
1 files changed, 14 insertions, 11 deletions
diff --git a/collectors/python.d.plugin/puppet/puppet.chart.py b/collectors/python.d.plugin/puppet/puppet.chart.py
index 901f748222..30e219da46 100644
--- a/collectors/python.d.plugin/puppet/puppet.chart.py
+++ b/collectors/python.d.plugin/puppet/puppet.chart.py
@@ -11,28 +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
-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'],
@@ -40,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'],
@@ -72,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