Fluent-bit: [Feature] Expose metrics in Prometheus format

Created on 12 Apr 2017  路  18Comments  路  Source: fluent/fluent-bit

Hi there,

As a hosted project of the CNCF, it would be nice to expose native Prometheus metrics like it has been done with a plugin for Fluentd.

enhancement fixed

Most helpful comment

looks like we are done
prom

All 18 comments

thanks. Definitely something to do.

where is it located in the todo-list ?

@prune998 this issue, it's labeled as enhancement.

I'm waiting for this feature to migrate from Fluentd

waiting is the new dying :)

Work in process, current status

  • [x] create internal generic metrics interface
  • [x] input plugins use metrics interface
  • [x] metrics exporter
  • [ ] http server interface (work in process, this week)
  • [ ] metrics exporter, register HTTP endpoints and share metrics

Some progress, HTTP Server functional

fluentbit_rest

That's great news ! thanks for the effort !

We are getting closer:

  • [x] create internal generic metrics interface
  • [x] input plugins use metrics interface
  • [x] metrics exporter
  • [x] http server interface (work in process, this week)
  • [ ] metrics exporter, register HTTP endpoints and share metrics

the last part is to add Prometheus format, we have plain JSON for now:

flb_input_metrics

looks like we are done
prom

that's great ! thanks

Any plans to incorporate fields into this? E.g. in Kubernetes it'd be nice to see the various values per pod or namespace.

This is awesome. Are we ready to merge?

Looks like this is already available. Thanks all! Should this be resolved?

Hi there,

How can we get the queue length, in other words, how can we estimate how far behind fluent-bit gets reading/processing/sending the logs to the output(s)?

I would intuitively do input / output but something tells me that input only increases if output progresses too, as the pipeline must be moving forward for fluent-bit to read more.

@edsiper Guess this can be closed then?
Probably makes sense to track further improvements in #516

Metrics already implemented:

https://docs.fluentbit.io/manual/configuration/monitoring

Fixed.

Wonder why metrics show up with strange numbers

cat /etc/td-agent-bit/td-agent-bit.conf

[SERVICE]
    Flush               10
    Daemon              off
    Log_Level           debug
    HTTP_Server         On
    HTTP_PORT           2020

[INPUT]
    Name                systemd
    Max_Entries         5000
    DB                  /var/log/systemd.db
    Mem_Buf_Limit       5MB
    Tag                 journal.0

[OUTPUT]
    Name                forward
    Match               *
    Host                forward.com
    Port                24888

[FILTER]
    Name                record_modifier
    Match               *
    Record              host me.com


curl -s http://127.0.0.1:2020/api/v1/metrics | jq

{
  "input": {
    "systemd.0": {
      "records": 11,
      "bytes": 6540
    }
  },
  "filter": {
    "record_modifier.0": {
      "drop_records": 0,
      "add_records": 0
    }
  },
  "output": {
    "forward.0": {
      "proc_records": **0**,
      "proc_bytes": **101869**,
      "errors": 0,
      "retries": 0,
      "retries_failed": 0
    }
  }
}

So the same is curl -s http://127.0.0.1:2020/api/v1/metrics/prometheus, why fluentbit_output_proc_records_total is zero while fluentbit_output_proc_bytes_total is 101869 or whatever?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

brycefisher picture brycefisher  路  3Comments

JavaCS3 picture JavaCS3  路  3Comments

edsiper picture edsiper  路  4Comments

jcdauchy-moodys picture jcdauchy-moodys  路  3Comments

arienchen picture arienchen  路  3Comments