Add nginx.access-log parameter to specific path to access log
This commit is contained in:
parent
6dde4a2a96
commit
438d1d9604
|
@ -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)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue