Skip to content

Commit 041b147

Browse files
authored
Merge pull request fluent#11 from nokute78/out_flowcounter
output: new FlowCounter output documentation
2 parents 79b9171 + 97998cd commit 041b147

File tree

3 files changed

+53
-0
lines changed

3 files changed

+53
-0
lines changed

SUMMARY.md

+1
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
* [XBee Radio](input/xbee.md)
3636
* [Output Plugins](output/README.md)
3737
* [Elasticsearch](output/elasticsearch.md)
38+
* [FlowCounter](output/flowcounter.md)
3839
* [Forward](output/forward.md)
3940
* [HTTP](output/http.md)
4041
* [InfluxDB](output/influxdb.md)

output/README.md

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ The _output plugins_ defines where [Fluent Bit](http://fluentbit.io) should flus
44

55
| name | title | description |
66
|---------------------------|--------------------|-----------------|
7+
| [flowcounter](flowcounter.md)| FlowCounter | Count records |
78
| [forward](forward.md) | Forward | Fluentd forward protocol. |
89
| [http](http.md) | HTTP | Flush records to an HTTP end point. |
910
| [influxdb](influxdb.md) | InfluxDB | Flush records to InfluxDB time series database. |

output/flowcounter.md

+51
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# FlowCounter
2+
3+
_FlowCounter_ is the protocol to count records. The __flowcounter__ output plugin allows to count up records and its size.
4+
5+
## Configuration Parameters
6+
7+
The plugin supports the following configuration parameters:
8+
9+
| Key | Description | Default |
10+
|------|-------------|---------|
11+
| Unit | The unit of duration. (second/minute/hour/day)| minute |
12+
13+
## Getting Started
14+
15+
You can run the plugin from the command line or through the configuration file:
16+
17+
### Command Line
18+
19+
From the command line you can let Fluent Bit count up a data with the following options:
20+
21+
```bash
22+
$ fluent-bit -i cpu -o flowcounter
23+
```
24+
25+
### Configuration File
26+
27+
In your main configuration file append the following Input & Output sections:
28+
29+
```python
30+
[INPUT]
31+
Name cpu
32+
Tag cpu
33+
34+
[OUTPUT]
35+
Name flowcounter
36+
Match *
37+
Unit second
38+
```
39+
40+
## Testing
41+
42+
Once Fluent Bit is running, you will see the reports in the output interface similar to this:
43+
44+
```bash
45+
$ fluent-bit -i cpu -o flowcounter
46+
Fluent-Bit v0.10.0
47+
Copyright (C) Treasure Data
48+
49+
[2016/12/23 11:01:20] [ info] [engine] started
50+
[out_flowcounter] cpu.0:[1482458540, {"counts":60, "bytes":7560, "counts/minute":1, "bytes/minute":126 }]
51+
```

0 commit comments

Comments
 (0)