'apache' workers chart fix: do not add 'lighttpd' dimensions if it's not lighttpd
lgz committed
Oct 26, 2017 at 07:19 UTC
c060c7945b805feb49536fc41e261bce1a44116e
1 file changed
+4
-2
python.d/apache.chart.py
+4
-2
@@ -31,9 +31,7 @@ CHARTS = {
31
'options': [None, 'apache Workers', 'workers', 'workers', 'apache.workers', 'stacked'],
32
'lines': [
33
["idle"],
34
- ["idle_servers", 'idle'],
34
["busy"],
36
- ["busy_servers", 'busy']
35
]},
36
'reqpersec': {
37
'options': [None, 'apache Lifetime Avg. Requests/s', 'requests/s', 'statistics',
@@ -102,6 +100,10 @@ class Service(UrlService):
100
if 'idle_servers' in data:
101
self.module_name = 'lighttpd'
102
for chart in self.definitions:
103
+ if chart == 'workers':
104
+ lines = self.definitions[chart]['lines']
105
+ lines[0] = ["idle_servers", 'idle']
106
+ lines[1] = ["busy_servers", 'busy']
107
opts = self.definitions[chart]['options']
108
opts[1] = opts[1].replace('apache', 'lighttpd')
109
opts[4] = opts[4].replace('apache', 'lighttpd')