-
-
Notifications
You must be signed in to change notification settings - Fork 162
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
could not be parsed into float #375
Labels
Comments
I guess that's because your log format in nginx is |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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: