@cryptotaxi247 / netdata-1 / commits / 52bbaf333

"tomcat" module update

lgz committed Oct 14, 2017 at 22:03 UTC 52bbaf33398cd815c8e648cf229cc0ede391b1d1
1 file changed +4 -3
python.d/tomcat.chart.py
+4 -3
@@ -2,9 +2,10 @@
2 # Description: tomcat netdata python.d module
3 # Author: Pawel Krupa (paulfantom)
4
5 -from base import UrlService
5 import xml.etree.ElementTree as ET
6
7 +from bases.FrameworkServices.UrlService import UrlService
8 +
9 # default module values (can be overridden per job in `config`)
10 # update_every = 2
11 priority = 60000
@@ -71,6 +72,7 @@ CHARTS = {
72 ]},
73 }
74
75 +
76 class Service(UrlService):
77 def __init__(self, configuration=None, name=None):
78 UrlService.__init__(self, configuration=configuration, name=name)
@@ -87,7 +89,6 @@ class Service(UrlService):
89 data = None
90 raw_data = self._get_raw_data()
91 if raw_data:
90 - xml = None
92 try:
93 xml = ET.fromstring(raw_data)
94 except ET.ParseError:
@@ -107,7 +108,7 @@ class Service(UrlService):
108 connector = xml.find('connector')
109
110 memory = jvm.find('memory')
110 - data['free'] = memory.get('free')
111 + data['free'] = memory.get('free')
112 data['total'] = memory.get('total')
113
114 for pool in jvm.findall('memorypool'):