Skip to content
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

error while parsing $upstream_response_time: value '-' could not be parsed into float #224

Closed
lhanjian opened this issue Nov 21, 2021 · 3 comments · Fixed by #228
Closed

Comments

@lhanjian
Copy link

Describe the bug

error while parsing $upstream_response_time: value '-' could not be parsed into float

Root cause(?)

https://github.com/martin-helmich/prometheus-nginxlog-exporter/pull/221/files#diff-2873f79a86c0d8b3335cd7731b0ecf7dd4301eb19a82ef7a1cba7589b5252261R453

@lhanjian lhanjian added the bug label Nov 21, 2021
@lhanjian
Copy link
Author

$upstream_response_time either a number or unset. Nginx logs unset variables as dash (-)

https://stackoverflow.com/questions/36788856/nginx-log-filter-upstream-response-time-json-elk-parsefailure

@lhanjian
Copy link
Author

it may be "502, -, 502" or "-"

@martin-helmich
Copy link
Owner

Yes, this was introduced as a side effect of #221 -- this should not affect metrics generation, since the error is only logged (meaning the actual metrics should be provided just the same as before). However, I do get that the logs are annoying and should not increase the parse_error_count metric. Will fix shortly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants