Counter
Counter is a very simple plugin that counts how many records it's getting upon flush time. Plugin output is as follows:
1
[TIMESTAMP, NUMBER_OF_RECORDS_NOW] (total = RECORDS_SINCE_IT_STARTED)
Copied!

Getting Started

You can run the plugin from the command line or through the configuration file:

Command Line

From the command line you can let Fluent Bit count up a data with the following options:
1
$ fluent-bit -i cpu -o counter
Copied!

Configuration File

In your main configuration file append the following Input & Output sections:
1
[INPUT]
2
Name cpu
3
Tag cpu
4
5
[OUTPUT]
6
Name counter
7
Match *
Copied!

Testing

Once Fluent Bit is running, you will see the reports in the output interface similar to this:
1
$ bin/fluent-bit -i cpu -o counter -f 1
2
Fluent-Bit v0.12.0
3
Copyright (C) Treasure Data
4
5
[2017/07/19 11:19:02] [ info] [engine] started
6
1500484743,1 (total = 1)
7
1500484744,1 (total = 2)
8
1500484745,1 (total = 3)
9
1500484746,1 (total = 4)
10
1500484747,1 (total = 5)
Copied!
Last modified 2yr ago