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

wrong metrics types for fluentd_output_status_num_errors, et al.? #88

Open
nhosoi opened this issue Mar 25, 2019 · 2 comments
Open

wrong metrics types for fluentd_output_status_num_errors, et al.? #88

nhosoi opened this issue Mar 25, 2019 · 2 comments
Labels

Comments

@nhosoi
Copy link

nhosoi commented Mar 25, 2019

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 added a commit to nhosoi/fluentd-mixin that referenced this issue Mar 25, 2019
… type

is "gauge" in the scraped result [1], the value is incremental and behaves
like a "counter" type.  Thus, to get the current value, use the "rate"
function.

[1] - TYPE fluentd_output_status_num_errors gauge

Submitted an issue: fluent/fluent-plugin-prometheus#88
@kazegusuri
Copy link
Collaborator

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.

@chrisbra
Copy link

so any way to configure those metrics as counter instead?

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

No branches or pull requests

3 participants