Hello,
I configured a nginx-exporter Docker image, but it doesn`t export any metrics
I'm also using nginx image that shares a log volume with the exporter
...
log_format main '$request';
access_log /var/log/nginx/access.log main;
...
nginx-exporter container logs
info prometheus-nginxlog-exporter/main.go:162 loading configuration file /etc/prometheus-nginxlog-exporter.hcl
warn config/struct_namespace.go:98 No globs for /mnt/nginxlogs/access.log
info prometheus-nginxlog-exporter/main.go:139 starting listener for namespace app
info prometheus-nginxlog-exporter/main.go:148 running HTTP server on address 0.0.0.0:4040, serving metrics at /metrics
GET /home_page/ HTTP/1.1
GET /home_page/ HTTP/1.1
GET /home_page/ HTTP/1.1
GET /home_page/ HTTP/1.1
Because print_log is set to true the exporter duplicates the nginx logs
http also doesn't work
$ curl localhost:8040
404 page not found
I assume that there has to be another message after the HTTP server starts. At least "Waiting for /mnt/nginxlogs/access.log to appear..." but nothing happens
I've also tried image with :latest tag and got the following logs:
loading configuration file /etc/prometheus-nginxlog-exporter.hcl
No globs for /mnt/nginxlogs/access.log
using configuration {Listen:{Port:4040 Address:0.0.0.0 MetricsEndpoint:/metrics} Consul:{Enable:false Address: Datacenter: Scheme: Token: Service:{ID: Name: Address: Tags:[]}} Namespaces:[{Name:app NamespaceLabelName: NamespaceLabels:map[] MetricsOverride:<nil> NamespacePrefix: SourceFiles:[/mnt/nginxlogs/access.log] SourceData:{Files:[/mnt/nginxlogs/access.log] Syslog:<nil>} Parser: Format:$request Labels:map[] RelabelConfigs:[] HistogramBuckets:[] PrintLog:true OrderedLabelNames:[] OrderedLabelValues:[]}] EnableExperimentalFeatures:false EnableExperimentalFeaturesOld:false}
starting listener for namespace app
running HTTP server on address 0.0.0.0:4040, serving metrics at /metrics
Seeked /mnt/nginxlogs/access.log - &{Offset:0 Whence:2}
And curl localhost:8040 still returns 404
The same issue when trying RPM package instead of Docker.
What should I do?
Hello, I configured a nginx-exporter Docker image, but it doesn`t export any metrics I'm also using nginx image that shares a log volume with the exporter
Docker command
The simpliest config.hcl
nginx.conf
nginx-exporter container logs
Because print_log is set to true the exporter duplicates the nginx logs
http also doesn't work
I assume that there has to be another message after the HTTP server starts. At least "Waiting for /mnt/nginxlogs/access.log to appear..." but nothing happens
I've also tried image with :latest tag and got the following logs:
And curl localhost:8040 still returns 404
The same issue when trying RPM package instead of Docker. What should I do?
Environment: