summaryrefslogtreecommitdiffstats
path: root/collectors/python.d.plugin/web_log/web_log.conf
diff options
context:
space:
mode:
Diffstat (limited to 'collectors/python.d.plugin/web_log/web_log.conf')
-rw-r--r--collectors/python.d.plugin/web_log/web_log.conf15
1 files changed, 15 insertions, 0 deletions
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)