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

Fix a bug where output_status_num_errors metric is missing with Fluentd 1.14 #197

Merged
merged 1 commit into from
Mar 18, 2022
Merged

Fix a bug where output_status_num_errors metric is missing with Fluentd 1.14 #197

merged 1 commit into from
Mar 18, 2022

Conversation

swen128
Copy link
Contributor

@swen128 swen128 commented Mar 18, 2022

Fixes #195

After the metrics mechanism change (#191), the in_prometheus_output_monitor plugin tries to get num_errors metric via the statistics method in the output plugin. This method, however, returns a hash containing the num_errors metric as a key retry_count, which causes the problem.

This PR fixes in_prometheus_output_monitor so that it finds the retry_count key and set the value to the output_status_num_errors metric.

@ashie ashie requested a review from cosmo0920 March 18, 2022 07:06
Signed-off-by: PND <fujjisaaan@gmail.com>
Copy link
Collaborator

@cosmo0920 cosmo0920 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems reasonable. Good catch!

@ashie ashie merged commit 0e359a1 into fluent:master Mar 18, 2022
@ashie
Copy link
Member

ashie commented Mar 18, 2022

Thanks!

@swen128
Copy link
Contributor Author

swen128 commented Mar 18, 2022

Thanks for fast responses!

@swen128 swen128 deleted the fix-metric-num-errors branch March 18, 2022 08:04
@thomas315
Copy link

Are there any plans on releasing a new version soon with this fix included?

@ashie
Copy link
Member

ashie commented May 6, 2022

Sorry, I forgot to release it.
I've released it just now: https://rubygems.org/gems/fluent-plugin-prometheus/versions/2.0.3

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

Successfully merging this pull request may close these issues.

num_errors metric missing with fluentd 1.14
4 participants