From 438d1d9604e60f702ee7db995a8e80ae97a4fc94 Mon Sep 17 00:00:00 2001 From: Zachary Seguin Date: Sat, 17 Jun 2017 23:46:43 -0400 Subject: [PATCH] Add nginx.access-log parameter to specific path to access log --- mirror_exporter.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mirror_exporter.go b/mirror_exporter.go index 8a94538..d5a9d62 100644 --- a/mirror_exporter.go +++ b/mirror_exporter.go @@ -15,11 +15,13 @@ func main() { var ( listenAddress = flag.String("net.listen-address", ":2400", "Address to listen on for web and metrics interface") metricsPath = flag.String("net.telemetry-path", "/metrics", "Path to expose metrics on") + + nginxAccessLogPath = flag.String("nginx.access-log", "/var/log/nginx/access.log", "Path to nginx access log") ) flag.Parse() - nginxExporter, err := NewNginxExporter("/var/log/nginx/access.log") + nginxExporter, err := NewNginxExporter(*nginxAccessLogPath) if err != nil { log.Fatal(err) }