diff options
Diffstat (limited to 'collectors/python.d.plugin/web_log')
-rw-r--r-- | collectors/python.d.plugin/web_log/web_log.chart.py | 2 | ||||
-rw-r--r-- | collectors/python.d.plugin/web_log/web_log.conf | 15 |
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) |