]> arthur.barton.de Git - netdata.git/commitdiff
fixing problems with data formatting in apache and nginx
authorpaulfantom <paulfantom@gmail.com>
Wed, 22 Jun 2016 15:55:46 +0000 (17:55 +0200)
committerpaulfantom <paulfantom@gmail.com>
Wed, 22 Jun 2016 15:55:46 +0000 (17:55 +0200)
charts.d/apache.chart.sh
python.d/apache.chart.py
python.d/nginx.chart.py
web/index.html

index a3e064094c36a357582ceb8c6a3004966fc89bfc..681651a0df303e5c46325b61409592379a78c633 100755 (executable)
@@ -238,7 +238,7 @@ SET connections = $((apache_connstotal))
 END
 BEGIN apache.conns_async $1
 SET keepalive = $((apache_connsasynckeepalive))
-SET closing = $((apache_connsasyncwriting))
+SET closing = $((apache_connsasyncclosing))
 SET writing = $((apache_connsasyncwriting))
 END
 VALUESEOF2
index 41d7808a7159760711b3efbc6afae9c3be918838..b69972f338dd2d43452050595b6529fca27c3a8b 100644 (file)
@@ -18,14 +18,14 @@ retries = 5
 #          }}
 
 # charts order (can be overridden if you want less charts, or different order)
-ORDER = ['bytesperreq', 'workers', 'reqpersec', 'bytespersec', 'requests', 'net', 'connections', 'conns_async']
+ORDER = ['requests', 'connections', 'conns_async', 'net', 'workers', 'reqpersec', 'bytespersec', 'bytesperreq']
 
 CHARTS = {
     'bytesperreq': {
         'options': "'' 'apache Lifetime Avg. Response Size' 'bytes/request' statistics apache.bytesperreq area",
         'lines': [
             {"name": "size_req",
-             "options": "'' absolute 1"}
+             "options": "'' absolute 1 1000000"}
         ]},
     'workers': {
         'options': "'' 'apache Workers' 'workers' workers apache.workers stacked",
@@ -42,7 +42,7 @@ CHARTS = {
              "options": "'' absolute 1 1000000"}
         ]},
     'bytespersec': {
-        'options': "'' 'apache Lifetime Avg. Response Size' 'bytes/request' statistics apache.bytesperreq area",
+        'options': "'' 'apache Lifetime Avg. Bandwidth/s' 'kilbits/s' statistics apache.bytesperreq area",
         'lines': [
             {"name": "size_sec",
              "options": "'' absolute 8 1000000000"}
@@ -108,7 +108,10 @@ class Service(UrlService):
             tmp = row.split(":")
             if str(tmp[0]) in self.assignment:
                 try:
-                    data[self.assignment[tmp[0]]] = int(float(tmp[1]))
+                    multiplier = 1
+                    if tmp[0] in ("BytesPerReq", "ReqPerSec", "BytesPerSec"):
+                        multiplier = 1000
+                    data[self.assignment[tmp[0]]] = int(float(tmp[1])*multiplier)
                 except (IndexError, ValueError) as a:
                     print(a)
                     pass
index 7fbaeb3783f97cae396182dba51258f8d2cbe0cd..17c151f70cbcb78bd4d38ad268121b65bfdb0745 100644 (file)
@@ -41,13 +41,13 @@ CHARTS = {
             {"name": "writing",
              "options": "'' absolute 1 1"},
             {"name": "waiting",
-             "options": "'' absolute 1 1"}
+             "options": "idle absolute 1 1"}
         ]},
     'connect_rate': {
         'options': "'' 'nginx Connections Rate' 'connections/s' nginx nginx.performance line",
         'lines': [
             {"name": "accepts",
-             "options": "'accepted' incremental 1 1"},
+             "options": "accepted incremental 1 1"},
             {"name": "handled",
              "options": "'' incremental 1 1"}
         ]}
@@ -71,10 +71,10 @@ class Service(UrlService):
         try:
             return {'active': int(raw[2]),
                     'requests': int(raw[7]),
-                    'reading': int(raw[8]),
-                    'writing': int(raw[9]),
-                    'waiting': int(raw[11]),
-                    'accepts': int(raw[13]),
-                    'handled': int(raw[15])}
+                    'reading': int(raw[11]),
+                    'writing': int(raw[13]),
+                    'waiting': int(raw[15]),
+                    'accepts': int(raw[8]),
+                    'handled': int(raw[9])}
         except ValueError:
             return None
index 3a84bba4bd6d6d121e7c822f014a6e94f3a0abc2..558127e4211037a2ecd01664c2401f5ecd3f4a61 100644 (file)
@@ -1366,7 +1366,7 @@ var menuData = {
                info: undefined,
        },
 
-       'nginx': {
+/*     'nginx': {
                title: 'nginx',
                info: undefined,
        },
@@ -1374,7 +1374,7 @@ var menuData = {
        'apache': {
                title: 'Apache',
                info: undefined,
-       },
+       },*/
 
        'named': {
                title: 'named',
@@ -1816,8 +1816,8 @@ function enrichChartData(chart) {
 
                case 'mysql':
                case 'phpfpm':
-               case 'nginx':
-               case 'apache':
+/*             case 'nginx':
+               case 'apache':*/
                case 'named':
                case 'cgroup':
                        chart.menu = chart.type;