From b5c95cd9314b638143873075758a4dc543ef0dda Mon Sep 17 00:00:00 2001 From: Alexander Oleinik Date: Thu, 10 Sep 2015 20:29:42 +0000 Subject: [PATCH] 80-char length where possible interval renamed to parse_interval added more comments about regex --- plugins/webservercodes/webserver_codes.go | 25 +++++++++++++++-------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/plugins/webservercodes/webserver_codes.go b/plugins/webservercodes/webserver_codes.go index 754902d43..dff6872fe 100644 --- a/plugins/webservercodes/webserver_codes.go +++ b/plugins/webservercodes/webserver_codes.go @@ -18,7 +18,7 @@ type Vhost struct { Host string AccessLog string RegexParsestring string - Interval string + ParseInterval string } type Webservercodes struct { @@ -30,21 +30,27 @@ type HttpStats struct { } var sampleConfig = ` -# List of virtualhosts for http codes collecting (each section for one virtualhost, none for disable collecting codes) +# List of virtualhosts for http codes collecting +# (each section for one virtualhost, none for disable collecting codes) [[webservercodes.vhosts]] # 'host' field should match hostname in appropriate status url host = "defaulthost" -# telegraf user must have read permissions to this log file (shell command 'sudo adduser telegraf adm' for apache on Ubuntu) +# Telegraf user must have read permissions to this log file +# (shell command 'sudo adduser telegraf adm' for apache on Ubuntu) access_log = "/var/log/apache2/access.log" -# Regular expression for fetching codes from log file strings. You can adjust regex for your custom log format -# example for apache "common" and "combined" log formats, nginx default log format ("combined"): +# Regular expression for fetching codes from log file strings. +# You can adjust this pattern for your custom log format +# Example for apache "common" and "combined" log formats, nginx default log format ("combined"): # '\[(?P