fluent / fluent-plugin-prometheus

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

Export the oldest and newest timekeys in each buffer #97

Closed stevenjm closed 5 years ago

stevenjm commented 5 years ago

A metric listing all timekeys in each buffer was added to fluentd in https://github.com/fluent/fluentd/pull/2343. This exports the oldest and newest values in that list as Prometheus metrics. See discussion in https://github.com/fluent/fluent-plugin-prometheus/issues/89 for context and rationale.

kazegusuri commented 5 years ago

I want to confirm it works. Do you have an example of configuration to use timekeys?

stevenjm commented 5 years ago

I want to confirm it works. Do you have an example of configuration to use timekeys?

Sorry for the delayed response. Here's a minimal config to test this change:

<source>
  @type dummy
  @id test
  tag test
</source>

<source>
  @type prometheus
  @id prometheus
  bind 127.0.0.1
  port 24231
</source>

<source>
  @type prometheus_monitor
  @id prometheus_monitor
</source>

<source>
  @type prometheus_output_monitor
  @id prometheus_output_monitor
</source>

<match test>
  @type stdout
  @id out
  <buffer time>
    timekey 5s
    timekey_wait 2s
  </buffer>
</match>
kazegusuri commented 5 years ago

thanks. I confirmed it worked.