fluent / fluent-plugin-prometheus

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

Default value (null) for gauge types #211

Open robinwkurtz opened 1 year ago

robinwkurtz commented 1 year ago

Hello, thanks for your plugin!

I'm currently using the gauge type for sensors such as temperature, humidity, and CO2. Unfortunately, if my process is not running to get these values my fluentd /metrics endpoint shows zero values for theme, since this endpoint is being scrapped by Prometheus, I now have zero values in my graphs. I wanted to remove these, but of course, in dealing with these types of sensors, a zero value valid so I cannot simply filter out "0" on Prometheus' side.

Is there a way to have the metrics endpoint show null values?