fluent / fluent-plugin-prometheus

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

fluentd_output_status_buffer_oldest_timekey and fluentd_output_status_buffer_newest_timekey when queue is empty #178

Open flaker opened 3 years ago

flaker commented 3 years ago

Hi,

I am not sure if I should discuss here or in the fluentd project.

I have a fluentd instance receiving (via forward) from fluent-bit instances and I've noticed that once the fluent-bit instance has been killed (no influx of new records), the fluentd_output_status_buffer_oldest_timekey keeps some value and the same seems to happen with fluentd_output_status_buffer_newest_timekey the end result is that subtracting one from the other will always give a difference.

fluentd_output_status_buffer_queue_length == 0

but

(fluentd_output_status_buffer_newest_timekey - fluentd_output_status_buffer_oldest_timekey) > 0

maybe the stored values are the ones pre the last flush? I am not sure how this should work.