@cryptotaxi247 / netdata-1 / commits / a960d6401

fix data presentation in `apache.chart.py`

paulfantom committed Jun 22, 2016 at 21:46 UTC a960d64016b8780bd93366f0874c6013f4bdf331
1 file changed +7 -10
python.d/apache.chart.py
+7 -10
@@ -25,7 +25,7 @@ CHARTS = {
25 'options': "'' 'apache Lifetime Avg. Response Size' 'bytes/request' statistics apache.bytesperreq area",
26 'lines': [
27 {"name": "size_req",
28 - "options": "'' absolute 1 1000000"}
28 + "options": "'' absolute 1 1"}
29 ]},
30 'workers': {
31 'options': "'' 'apache Workers' 'workers' workers apache.workers stacked",
@@ -39,13 +39,13 @@ CHARTS = {
39 'options': "'' 'apache Lifetime Avg. Requests/s' 'requests/s' statistics apache.reqpersec area",
40 'lines': [
41 {"name": "requests_sec",
42 - "options": "'' absolute 1 1000000"}
42 + "options": "'' absolute 1 1"}
43 ]},
44 'bytespersec': {
45 - 'options': "'' 'apache Lifetime Avg. Bandwidth/s' 'kilobits/s' statistics apache.bytesperreq area",
45 + 'options': "'' 'apache Lifetime Avg. Bandwidth/s' 'kilobytes/s' statistics apache.bytesperreq area",
46 'lines': [
47 {"name": "size_sec",
48 - "options": "'' absolute 8 1000000000"}
48 + "options": "'' absolute 1 1000"}
49 ]},
50 'requests': {
51 'options': "'' 'apache Requests' 'requests/s' requests apache.requests line",
@@ -54,10 +54,10 @@ CHARTS = {
54 "options": "'' incremental 1 1"}
55 ]},
56 'net': {
57 - 'options': "'' 'apache Bandwidth' 'kilobits/s' bandwidth apache.net area",
57 + 'options': "'' 'apache Bandwidth' 'kilobytes/s' bandwidth apache.net area",
58 'lines': [
59 {"name": "sent",
60 - "options": "'' incremental 8 1"}
60 + "options": "'' incremental 1 1"}
61 ]},
62 'connections': {
63 'options': "'' 'apache Connections' 'connections' connections apache.connections line",
@@ -111,10 +111,7 @@ class Service(UrlService):
111 tmp = row.split(":")
112 if str(tmp[0]) in self.assignment:
113 try:
114 - multiplier = 1
115 - if tmp[0] in ("BytesPerReq", "ReqPerSec", "BytesPerSec"):
116 - multiplier = 1000
117 - data[self.assignment[tmp[0]]] = int(float(tmp[1])*multiplier)
114 + data[self.assignment[tmp[0]]] = int(float(tmp[1]))
115 except (IndexError, ValueError) as a:
116 print(a)
117 pass