Skip to content

pipeline: input: kernel: style #1731

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
33 changes: 21 additions & 12 deletions pipeline/inputs/kernel-logs.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,27 @@
# Kernel Logs
# Kernel logs

The **kmsg** input plugin reads the Linux Kernel log buffer since the beginning, it gets every record and parse it field as priority, sequence, seconds, useconds, and message.
The _kmsg_ input plugin reads the Linux Kernel log buffer from the beginning. It gets every record and parses fields as `priority`, `sequence`, `seconds`, `useconds`, and `message`.

## Configuration Parameters
## Configuration parameters

| Key | Description | Default |
| :--- | :--- | :--- |
| Prio_Level | The log level to filter. The kernel log is dropped if its priority is more than prio_level. Allowed values are 0-8. Default is 8. 8 means all logs are saved. | 8 |
| Threaded | Indicates whether to run this input in its own [thread](../../administration/multithreading.md#inputs). | `false` |
| `Prio_Level` | The log level to filter. The kernel log is dropped if its priority is more than `prio_level`. Allowed values are `0`-`8`. `8` means all logs are saved. | `8` |
| `Threaded` | Indicates whether to run this input in its own [thread](../../administration/multithreading.md#inputs). | `false` |

## Getting Started
## Get started

In order to start getting the Linux Kernel messages, you can run the plugin from the command line or through the configuration file:
To start getting the Linux Kernel messages, you can run the plugin from the command line or through the configuration file:

### Command Line
### Command line

```bash
$ bin/fluent-bit -i kmsg -t kernel -o stdout -m '*'
bin/fluent-bit -i kmsg -t kernel -o stdout -m '*'
```

Which returns output similar to:

```text
Fluent Bit v1.x.x
* Copyright (C) 2019-2020 The Fluent Bit Authors
* Copyright (C) 2015-2018 Treasure Data
Expand All @@ -30,14 +35,15 @@ Fluent Bit v1.x.x
...
```

As described above, the plugin processed all messages that the Linux Kernel reported, the output has been truncated for clarification.
As described previously, the plugin processed all messages that the Linux Kernel reported. The output has been truncated for clarification.

### 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" %}

```python
[INPUT]
Name kmsg
Expand All @@ -47,9 +53,11 @@ In your main configuration file append the following _Input_ & _Output_ sections
Name stdout
Match *
```

{% endtab %}

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

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

{% endtab %}
{% endtabs %}