-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
out_prometheus_exporter: respond with 200 even with no metrics #8352
Conversation
Hi, thanks for this PR. To understand better, does it mean that if we return a 404 error, it can mess up the scrapper, and it won't retry ? I am looking to understand why 404 would cause an issue. |
it's not so much "mess up"; the scraping does continue to happen, but the target being scraped is considered down by prometheus (ie. the further: we are using Victoria Metrics, which exposes a metric |
I understand, thanks for the explanation. Please let me know when this PR is ready for review. |
FYI, we do provide a Vagrant definition if you want to develop in a VM: https://github.com/fluent/fluent-bit/blob/master/Vagrantfile Builds can also be all done via containers for any target using the |
@patrick-stephens thanks, it's mostly just a question of finding time... |
This PR is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 10 days. |
Signed-off-by: Lauri Tirkkonen <[email protected]>
example config file
debug log output (with valgrind)
before appending to /tmp/foo, :2021/metrics returns an empty 200 OK. after doing
|
@edsiper I think it's ready now. |
404 on empty metrics isn't ok :( |
This PR is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 10 days. |
not stale |
Prometheus scrapers consider non-200 responses errors. It's not necessarily an error that no filter has yet caused a metric to be exported (consider eg. a filter that exposes the number of error log messages as a prometheus metric, where there does not happen to have been error log messages in the inputs so far)
Enter
[N/A]
in the box, if an item is not applicable to your change.Testing
Before we can approve your change; please submit the following in a comment:
If this is a change to packaging of containers or native binaries then please confirm it works for all targets.
ok-package-test
label to test for all targets (requires maintainer to do).Documentation
Backporting
Fluent Bit is licensed under Apache 2.0, by submitting this pull request I understand that this code will be released under the terms of that license.