summaryrefslogtreecommitdiffstats
path: root/collectors/python.d.plugin/web_log
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2019-04-17 17:57:47 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2019-04-17 17:57:47 +0000
commit1d63948d79ca6f32889656692d6736c9127f2ee1 (patch)
treebb26a34d7c7b62ac30b0d4da15584efe3e2a754a /collectors/python.d.plugin/web_log
parentReleasing debian version 1.13.0-1. (diff)
downloadnetdata-1d63948d79ca6f32889656692d6736c9127f2ee1.tar.xz
netdata-1d63948d79ca6f32889656692d6736c9127f2ee1.zip
Merging upstream version 1.14.0~rc0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'collectors/python.d.plugin/web_log')
-rw-r--r--collectors/python.d.plugin/web_log/web_log.chart.py2
-rw-r--r--collectors/python.d.plugin/web_log/web_log.conf15
2 files changed, 16 insertions, 1 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 992790462..6d6a261c4 100644
--- a/collectors/python.d.plugin/web_log/web_log.chart.py
+++ b/collectors/python.d.plugin/web_log/web_log.chart.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
# Description: web log netdata python.d module
-# Author: l2isbad
+# Author: ilyam8
# SPDX-License-Identifier: GPL-3.0-or-later
import bisect
diff --git a/collectors/python.d.plugin/web_log/web_log.conf b/collectors/python.d.plugin/web_log/web_log.conf
index 0ac17f665..220b7c283 100644
--- a/collectors/python.d.plugin/web_log/web_log.conf
+++ b/collectors/python.d.plugin/web_log/web_log.conf
@@ -117,6 +117,21 @@
# custom_log_format:
# pattern: '(?P<vhost>[a-zA-Z\d.-_]+) (?P<port>\d+) (?P<address>[\da-f.:]+) \[.*\] "(?P<method>[A-Z]+)[^"]*" (?P<code>[1-9]\d{2}) (?P<bytes_sent>\d+) (?P<resp_length>\d+) (?P<resp_time>\d+)'
+# in nginx: ($host or $http_host give the hostname, $server_port the port number)
+# log_format netdatavhost '$host $server_port $remote_addr - $remote_user [$time_local] '
+# '"$request" $status $body_bytes_sent '
+# '$request_length $request_time $upstream_response_time '
+# '"$http_referer" "$http_user_agent"';
+#
+# access_log /var/log/nginx/access.log netdatavhost;
+#
+# be aware that the access_log directive in a server{} block overwrites the one in http{}, if your vhosts have individual log
+# files, you have to specify the general netdata log in each vhost as a second access_log statement.
+#
+# and in this file in nginx_log section, add :
+# custom_log_format:
+# pattern: '(?P<vhost>[a-zA-Z\d.-_\[\]]+) (?P<port>\d+) (?P<address>[\da-f.:]+) .* "(?P<method>[A-Z]+)[^"]*" (?P<code>[1-9]\d{2}) (?P<bytes_sent>\d+) (?P<resp_length>\d+) (?P<resp_time>\d+)'
+
# ----------------------------------------------------------------------
# AUTO-DETECTION JOBS
# only one of them per web server will run (when they have the same name)