Skip to content

Commit

Permalink
Merge pull request fluent#11 from nokute78/out_flowcounter
Browse files Browse the repository at this point in the history
output: new FlowCounter output documentation
  • Loading branch information
edsiper authored Jan 6, 2017
2 parents 79b9171 + 97998cd commit 041b147
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 0 deletions.
1 change: 1 addition & 0 deletions SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
* [XBee Radio](input/xbee.md)
* [Output Plugins](output/README.md)
* [Elasticsearch](output/elasticsearch.md)
* [FlowCounter](output/flowcounter.md)
* [Forward](output/forward.md)
* [HTTP](output/http.md)
* [InfluxDB](output/influxdb.md)
Expand Down
1 change: 1 addition & 0 deletions output/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ The _output plugins_ defines where [Fluent Bit](http://fluentbit.io) should flus

| name | title | description |
|---------------------------|--------------------|-----------------|
| [flowcounter](flowcounter.md)| FlowCounter | Count records |
| [forward](forward.md) | Forward | Fluentd forward protocol. |
| [http](http.md) | HTTP | Flush records to an HTTP end point. |
| [influxdb](influxdb.md) | InfluxDB | Flush records to InfluxDB time series database. |
Expand Down
51 changes: 51 additions & 0 deletions output/flowcounter.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# FlowCounter

_FlowCounter_ is the protocol to count records. The __flowcounter__ output plugin allows to count up records and its size.

## Configuration Parameters

The plugin supports the following configuration parameters:

| Key | Description | Default |
|------|-------------|---------|
| Unit | The unit of duration. (second/minute/hour/day)| minute |

## 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:

```bash
$ fluent-bit -i cpu -o flowcounter
```

### Configuration File

In your main configuration file append the following Input & Output sections:

```python
[INPUT]
Name cpu
Tag cpu

[OUTPUT]
Name flowcounter
Match *
Unit second
```

## Testing

Once Fluent Bit is running, you will see the reports in the output interface similar to this:

```bash
$ fluent-bit -i cpu -o flowcounter
Fluent-Bit v0.10.0
Copyright (C) Treasure Data

[2016/12/23 11:01:20] [ info] [engine] started
[out_flowcounter] cpu.0:[1482458540, {"counts":60, "bytes":7560, "counts/minute":1, "bytes/minute":126 }]
```

0 comments on commit 041b147

Please sign in to comment.