Skip to content

Pipeline: input: docker-events: style #1714

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 20 additions & 14 deletions pipeline/inputs/docker-events.md
Original file line number Diff line number Diff line change
@@ -1,33 +1,36 @@
# Docker Events
# Docker events

The **docker events** input plugin uses the docker API to capture server events. A complete list of possible events returned by this plugin can be found [here](https://docs.docker.com/engine/reference/commandline/events/)
The _Docker events_ input plugin uses the Docker API to capture server events. A complete list of possible events returned by this plugin can be found [in the Docker documentation](https://docs.docker.com/engine/reference/commandline/events/).

## Configuration Parameters
## Configuration parameters

This plugin supports the following configuration parameters:

| Key | Description | Default |
| :--- | :--- | :--- |
| Unix\_Path | The docker socket unix path | /var/run/docker.sock |
| Buffer\_Size | The size of the buffer used to read docker events \(in bytes\) | 8192 |
| Parser | Specify the name of a parser to interpret the entry as a structured message. | None |
| Key | When a message is unstructured \(no parser applied\), it's appended as a string under the key name _message_. | message |
| Reconnect.Retry_limits| The maximum number of retries allowed. The plugin tries to reconnect with docker socket when EOF is detected. | 5 |
| Reconnect.Retry_interval| The retrying interval. Unit is second. | 1 |
| Threaded | Indicates whether to run this input in its own [thread](../../administration/multithreading.md#inputs). | `false` |
| `Unix_Path` | The docker socket Unix path. | `/var/run/docker.sock` |
| `Buffer_Size` | The size of the buffer used to read docker events in bytes. | `8192` |
| `Parser` | Specify the name of a parser to interpret the entry as a structured message. | _none_ |
| `Key` | When a message is unstructured (no parser applied), it's appended as a string under the key name `message`. | `message` |
| `Reconnect.Retry_limits`| The maximum number of retries allowed. The plugin tries to reconnect with docker socket when `EOF` is detected. | `5` |
| `Reconnect.Retry_interval`| The retry interval in seconds. | `1` |
| `Threaded` | Indicates whether to run this input in its own [thread](../../administration/multithreading.md#inputs). | `false` |

### Command Line
### Command line

You can run this plugin from the command line:

```bash
$ fluent-bit -i docker_events -o stdout
fluent-bit -i docker_events -o stdout
```

### Configuration File
### Configuration file

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

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

```yaml
[INPUT]
Name docker_events
Expand All @@ -36,9 +39,11 @@ In your main configuration file append the following **Input** & **Output** sect
Name stdout
Match *
```

{% endtab %}

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

```yaml
pipeline:
inputs:
Expand All @@ -48,5 +53,6 @@ pipeline:
- name: stdout
match: '*'
```

{% endtab %}
{% endtabs %}