@cryptotaxi247 / netdata-1 / commits / 27d9930e8

web_log fixes

Costa Tsaousis (ktsaou) committed Feb 11, 2017 at 15:13 UTC 27d9930e82cf41b8e9b387c339dc90bc66b909c4
2 files changed +13 -3
conf.d/health.d/web_log.conf
+11 -1
@@ -3,6 +3,7 @@
3
4 template: last_collected_secs
5 on: web_log.response_codes
6 +families: *
7 calc: $now - $last_collected_t
8 units: seconds ago
9 every: 10s
@@ -17,6 +18,7 @@ template: last_collected_secs
18
19 template: 1m_2xx
20 on: web_log.response_codes
21 +families: *
22 lookup: sum -1m unaligned of 2xx
23 calc: ($this == 0)?(1):($this)
24 units: requests
@@ -25,6 +27,7 @@ template: 1m_2xx
27
28 template: 1m_redirects
29 on: web_log.response_codes
30 +families: *
31 lookup: sum -1m unaligned of 3xx
32 calc: $this * 100 / ( $1m_2xx + $this )
33 units: %
@@ -38,6 +41,7 @@ template: 1m_redirects
41
42 template: 1m_bad_requests
43 on: web_log.response_codes
44 +families: *
45 lookup: sum -1m unaligned of 4xx
46 calc: $this * 100 / ( $1m_2xx + $this )
47 units: %
@@ -51,6 +55,7 @@ template: 1m_bad_requests
55
56 template: 1m_internal_errors
57 on: web_log.response_codes
58 +families: *
59 lookup: sum -1m unaligned of 5xx
60 calc: $this * 100 / ( $1m_2xx + $this )
61 units: %
@@ -67,6 +72,7 @@ template: 1m_internal_errors
72
73 template: 10m_response_time
74 on: web_log.response_time
75 +families: *
76 lookup: average -10m unaligned of avg
77 units: ms
78 every: 30s
@@ -75,7 +81,8 @@ template: 10m_response_time
81
82 template: web_slow
83 on: web_log.response_time
78 - lookup: sum -1m unaligned of avg
84 +families: *
85 + lookup: average -1m unaligned of avg
86 units: ms
87 every: 10s
88 green: 500
@@ -91,6 +98,7 @@ template: web_slow
98
99 template: 5m_2xx_last
100 on: web_log.response_codes
101 +families: *
102 lookup: average -5m at -5m unaligned of 2xx
103 units: requests
104 every: 30s
@@ -98,6 +106,7 @@ template: 5m_2xx_last
106
107 template: 5m_2xx_now
108 on: web_log.response_codes
109 +families: *
110 lookup: average -5m unaligned of 2xx
111 units: requests
112 every: 30s
@@ -105,6 +114,7 @@ template: 5m_2xx_now
114
115 template: 5m_requests_ratio
116 on: web_log.response_codes
117 +families: *
118 calc: ($5m_2xx_last > 0)?($5m_2xx_now * 100 / $5m_2xx_last):(100)
119 units: %
120 every: 30s
python.d/web_log.chart.py
+2 -2
@@ -209,9 +209,9 @@ class Service(LogService):
209 job_name = find_job_name(self.override_name, self.name)
210 self.detailed_chart = 'CHART %s.detailed_response_codes ""' \
211 ' "Response Codes" requests/s responses' \
212 - ' web_log.detailed_resp stacked 1 %s\n' % (job_name, self.update_every)
212 + ' web_log.detailed_response_codes stacked 1 %s\n' % (job_name, self.update_every)
213 self.http_method_chart = 'CHART %s.http_method' \
214 - ' "" "HTTP Methods" requests/s requests' \
214 + ' "" "Requests Per HTTP Method" requests/s requests' \
215 ' web_log.http_method stacked 2 %s\n' % (job_name, self.update_every)
216
217 if regex_name == 'access_apache_ext':