You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
I get this error : "error prometheus-nginxlog-exporter/main.go:356 error while parsing $upstream_response_time: value 'rt=0' could not be parsed into float"
To Reproduce
use the configuration files below
Expected behavior
Don't have errors into logs
Configuration file (remove section, if not applicable): nginx.conf
log file : /home/runner/work/prometheus-nginxlog-exporter/prometheus-nginxlog-exporter/main.go:268 2024-01-16T14:30:19.486Z error prometheus-nginxlog-exporter/main.go:356 error while parsing $upstream_response_time: value 'rt=0' could not be parsed into float main.observeMetrics /home/runner/work/prometheus-nginxlog-exporter/prometheus-nginxlog-exporter/main.go:356 main.processSource /home/runner/work/prometheus-nginxlog-exporter/prometheus-nginxlog-exporter/main.go:333 main.processNamespace.func4 /home/runner/work/prometheus-nginxlog-exporter/prometheus-nginxlog-exporter/main.go:268 2024-01-16T14:30:19.486Z error prometheus-nginxlog-exporter/main.go:356 error while parsing $upstream_response_time: value 'rt=0' could not be parsed into float
Environment:
Exporter version: latest
OS (e.g. from /etc/os-release): amd64
Deployment method (e.g. Docker image, deb/rpm package, self-compiled, ...): Docker with last version
The text was updated successfully, but these errors were encountered:
I guess that's because your log format in nginx is urt="$upstream_response_time" but the format in exporter config is $upstream_response_time
Then the exporter took urt=0 as $upstream_response_time, and urt=0 is obviously not a float
Describe the bug
I get this error : "error prometheus-nginxlog-exporter/main.go:356 error while parsing $upstream_response_time: value 'rt=0' could not be parsed into float"
To Reproduce
use the configuration files below
Expected behavior
Don't have errors into logs
Configuration file (remove section, if not applicable):
nginx.conf
log_format custom '$remote_addr - $remote_user [$time_local] ' '"$request" $status $body_bytes_sent ' '"$http_referer" "$http_user_agent" ' 'rt=$request_time uct="$upstream_connect_time" uht="$upstream_header_time" urt="$upstream_response_time"';
config.hcl
format = "$remote_addr - $remote_user [$time_local] \"$request\" $status $body_bytes_sent \"$http_referer\" \"$http_user_agent\" $upstream_response_time"
log file :
/home/runner/work/prometheus-nginxlog-exporter/prometheus-nginxlog-exporter/main.go:268 2024-01-16T14:30:19.486Z error prometheus-nginxlog-exporter/main.go:356 error while parsing $upstream_response_time: value 'rt=0' could not be parsed into float main.observeMetrics /home/runner/work/prometheus-nginxlog-exporter/prometheus-nginxlog-exporter/main.go:356 main.processSource /home/runner/work/prometheus-nginxlog-exporter/prometheus-nginxlog-exporter/main.go:333 main.processNamespace.func4 /home/runner/work/prometheus-nginxlog-exporter/prometheus-nginxlog-exporter/main.go:268 2024-01-16T14:30:19.486Z error prometheus-nginxlog-exporter/main.go:356 error while parsing $upstream_response_time: value 'rt=0' could not be parsed into float
Environment:
The text was updated successfully, but these errors were encountered: