fluent / fluent-plugin-prometheus

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

Use correct metric type #163

Closed yteraoka closed 4 years ago

yteraoka commented 4 years ago

I have a problem with showing fluentd metrics chart on Sysdig monitor.

Grafana do not care TYPE fiels in response, but Sysdig monitor refers that and draw the chart.

This plugin uses all of metric as gauge, so Sysdig monitor show absolute value chart.

It should be Counter for ever-increasing values.

fluentd_output_status_emit_count (Gauge). Sysdig monitor shows absolute value chart.

gauge

fluentd_output_status_emit_count (Counter). Sysdig monitor shows rate chart.

counter

This PR changed some metrics to counter type. But I'm not sure that is all.

repeatedly commented 4 years ago

Does this change affect existing users? If so, how about adding parameters to use counter type?

yteraoka commented 4 years ago

Does this change affect existing users?

Hmm, Maybe… but I hope no one is using these wrong metrics.

If so, how about adding parameters to use counter type?

What kind of the name of the configuration parameter would you like to use? I have no candidate.

yteraoka commented 4 years ago

I made this configurable using gauge_all parameter. Default configuration does not change current behavior.

repeatedly commented 4 years ago

Thanks! fluent-plugin-prometheus v2 will use counter for these parameters by default.