fluent-plugin-prometheus icon indicating copy to clipboard operation
fluent-plugin-prometheus copied to clipboard

wrong metrics types for fluentd_output_status_num_errors, et al.?

Open nhosoi opened this issue 6 years ago • 2 comments

Reading the code as well as in my testing, the values of the following keys could go up and down.

fluentd_status_buffer_queue_length
fluentd_status_buffer_total_bytes
fluentd_output_status_buffer_queue_length
fluentd_output_status_buffer_total_bytes
fluentd_output_status_retry_wait

but for the rest, their values do not get reset but constantly incremented.

fluentd_status_retry_count
fluentd_output_status_emit_count
fluentd_output_status_emit_records
fluentd_output_status_num_errors
fluentd_output_status_retry_count
fluentd_output_status_rollback_count
fluentd_output_status_write_count

Considering this definition [1], isn't the type of the latter set "counter", instead of "gauge"? [1] - https://prometheus.io/docs/concepts/metric_types/

Please note that if you scrape, the result comes with these comments.

# TYPE fluentd_status_buffer_queue_length gauge
# TYPE fluentd_status_buffer_total_bytes gauge
# TYPE fluentd_status_retry_count gauge
# TYPE fluentd_output_status_buffer_queue_length gauge
# TYPE fluentd_output_status_buffer_total_bytes gauge
# TYPE fluentd_output_status_retry_count gauge
# TYPE fluentd_output_status_num_errors gauge
# TYPE fluentd_output_status_emit_count gauge
# TYPE fluentd_output_status_emit_records gauge
# TYPE fluentd_output_status_write_count gauge
# TYPE fluentd_output_status_rollback_count gauge
# TYPE fluentd_output_status_retry_wait gauge

Another note: I'm using fluent-plugin-prometheus (1.3.0). Thanks.

nhosoi avatar Mar 25 '19 22:03 nhosoi

The plugin is scraping the results of fluentd's internal metrics and reporting them as prometheus metrics. We cannot observe changes so the metrics use gauge type.

kazegusuri avatar Apr 29 '19 06:04 kazegusuri

so any way to configure those metrics as counter instead?

chrisbra avatar Jul 25 '23 10:07 chrisbra