fluent / fluent-plugin-prometheus

A fluent plugin that collects metrics and exposes for Prometheus.
Apache License 2.0
257 stars 80 forks source link

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

Closed swen128 closed 2 years ago

swen128 commented 2 years ago

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 commented 2 years ago

Thanks!

swen128 commented 2 years ago

Thanks for fast responses!

thomas315 commented 2 years ago

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

ashie commented 2 years ago

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