> For the complete documentation index, see [llms.txt](https://docs.fluentbit.io/manual/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.fluentbit.io/manual/data-pipeline/outputs/flowcounter.md).

# Flow counter

The *Flow counter* output plugin lets you count up records and their size.

## Configuration parameters

| Key           | Description                                                                                                            | Default  |
| ------------- | ---------------------------------------------------------------------------------------------------------------------- | -------- |
| `event_based` | When enabled, use the timestamp from the log event for time bucketing instead of the current wall-clock time.          | `false`  |
| `unit`        | The unit of duration. Allowed values: `second`, `minute`, `hour`, `day`.                                               | `minute` |
| `workers`     | The number of [workers](/manual/administration/multithreading.md#outputs) to perform flush operations for this output. | `0`      |

## Get 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 data with the following options:

```shell
fluent-bit -i cpu -o flowcounter
```

### Configuration file

In your main configuration file append the following:

{% tabs %}
{% tab title="fluent-bit.yaml" %}

```yaml
pipeline:
  inputs:
    - name: cpu
      tag: cpu

  outputs:
    - name: flowcounter
      match: '*'
      unit: second
```

{% endtab %}

{% tab title="fluent-bit.conf" %}

```
[INPUT]
  Name cpu
  Tag  cpu

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

{% endtab %}
{% endtabs %}

## Testing

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

```
...
[out_flowcounter] cpu.0:[1482458540, {"counts":60, "bytes":7560, "counts/minute":1, "bytes/minute":126 }]
...
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.fluentbit.io/manual/data-pipeline/outputs/flowcounter.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
