Closed palansher closed 2 months ago
I got the reason:
The message "No globs for /var/log/nginx/ ..." is just warning about fact that I did not use a glob in log file pattern. Such a tight supervision :) After I added a glob like
source {
files = [
"/var/log/nginx/app.palansher.devops.rebrain.srwx.net.*access.log"
]
}
That warning disappeared. Also I see the metrics now If somebody interested here is working config:
listen {
port = 4040
metrics_endpoint = "/metrics"
address = "0.0.0.0"
}
consul {
enable = false
}
namespace "nginx" {
format = "$remote_addr - $remote_user [$time_local] \"$request\" $status $body_bytes_sent \"$http_referer\" \"$http_user_agent\" \"$http_x_forwarded_for\""
source {
files = [
"/var/log/nginx/app.palansher.devops.rebrain.srwx.net.*access.log"
]
}
labels {
service = "nginx-final"
hostname = "lb1"
}
# log can be printed to std out, e.g. for debugging purposes (disabled by default)
print_log = false
}
Thank you for the nice exporter and for time that you given me to think about this situation :) closing issue ..
In addition to https://github.com/martin-helmich/prometheus-nginxlog-exporter/issues/309
v1.11.0
Not at all.
I have same issue with exactly same log format as in nginx log format. Would you please give me a tip?
sudo service prometheus-nginxlog-exporter status
I have no extra space in format:
nginx -T
this is exporter config:
Log format is absolutely same. Please help find the reason of issue..