diff --git a/plugins/webservercodes/webserver_codes.go b/plugins/webservercodes/webserver_codes.go index 8be21b24c..a8078ea07 100644 --- a/plugins/webservercodes/webserver_codes.go +++ b/plugins/webservercodes/webserver_codes.go @@ -1,37 +1,37 @@ package webservercodes import ( - "net/http" - "strconv" - "sync" - "time" - "os" - "io" - "regexp" - "errors" - - "github.com/rogpeppe/rog-go/reverse" - "github.com/influxdb/telegraf/plugins" + "net/http" + "strconv" + "sync" + "time" + "os" + "io" + "regexp" + "errors" + + "github.com/rogpeppe/rog-go/reverse" + "github.com/influxdb/telegraf/plugins" ) type Vhost struct { - Host string - AccessLog string - RegexParsestring string - ParseInterval string + Host string + AccessLog string + RegexParsestring string + ParseInterval string } type Webservercodes struct { - Vhosts []*Vhost + Vhosts []*Vhost } type HttpStats struct { - codes map[int]int + codes map[int]int } type CombinedEntry struct { - time time.Time - code int + time time.Time + code int } var sampleConfig = ` @@ -48,7 +48,7 @@ access_log = "/var/log/apache2/access.log" # 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