summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdalbert Michelic <am@timeanddate.com>2019-11-11 10:05:01 +0000
committerIlya Mashchenko <ilya@netdata.cloud>2019-11-11 13:05:01 +0300
commit5aa60c67a8dbfaced66d04f9e36798b8a7a7782b (patch)
tree95bb5e26bd5e88d8d381c6c41ca4815e764f319b
parent675383b26af3a339dc966c685d3e380cc39538f0 (diff)
web_log: treat 401 Unauthorized requests as successful (#7256)
* web_log: treat 401 Unauthorized requests as successful * dashboard_info.js: fix web_log.response_statuses info
-rw-r--r--collectors/python.d.plugin/web_log/web_log.chart.py2
-rw-r--r--web/gui/dashboard_info.js2
2 files changed, 2 insertions, 2 deletions
diff --git a/collectors/python.d.plugin/web_log/web_log.chart.py b/collectors/python.d.plugin/web_log/web_log.chart.py
index fa5a8bc3e0..c1e1dcfbb0 100644
--- a/collectors/python.d.plugin/web_log/web_log.chart.py
+++ b/collectors/python.d.plugin/web_log/web_log.chart.py
@@ -867,7 +867,7 @@ class Web:
:return:
"""
code_class = code[0]
- if code_class == '2' or code == '304' or code_class == '1':
+ if code_class == '2' or code == '304' or code_class == '1' or code == '401':
self.data['successful_requests'] += 1
elif code_class == '3':
self.data['redirects'] += 1
diff --git a/web/gui/dashboard_info.js b/web/gui/dashboard_info.js
index efa0a81ffc..fbd1a667ce 100644
--- a/web/gui/dashboard_info.js
+++ b/web/gui/dashboard_info.js
@@ -1822,7 +1822,7 @@ netdataDashboard.context = {
// web_log
'web_log.response_statuses': {
- info: 'Web server responses by type. <code>success</code> includes <b>1xx</b>, <b>2xx</b> and <b>304</b>, <code>error</code> includes <b>5xx</b>, <code>redirect</code> includes <b>3xx</b> except <b>304</b>, <code>bad</code> includes <b>4xx</b>, <code>other</code> are all the other responses.',
+ info: 'Web server responses by type. <code>success</code> includes <b>1xx</b>, <b>2xx</b>, <b>304</b> and <b>401</b>, <code>error</code> includes <b>5xx</b>, <code>redirect</code> includes <b>3xx</b> except <b>304</b>, <code>bad</code> includes <b>4xx</b> except <b>401</b>, <code>other</code> are all the other responses.',
mainheads: [
function (os, id) {
void(os);