Skip to content

Commit

Permalink
web_log: treat 401 Unauthorized requests as successful (netdata#7256)
Browse files Browse the repository at this point in the history
* web_log: treat 401 Unauthorized requests as successful

* dashboard_info.js: fix web_log.response_statuses info
  • Loading branch information
amichelic authored and ilyam8 committed Nov 11, 2019
1 parent 675383b commit 5aa60c6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion collectors/python.d.plugin/web_log/web_log.chart.py
Original file line number Diff line number Diff line change
Expand Up @@ -867,7 +867,7 @@ def get_data_per_statuses(self, code):
: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
Expand Down
2 changes: 1 addition & 1 deletion web/gui/dashboard_info.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 5aa60c6

Please sign in to comment.