Skip to content

Pipeline: filters: sysinfo: Style #1699

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
Show file tree
Hide file tree
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
42 changes: 23 additions & 19 deletions pipeline/filters/sysinfo.md
Original file line number Diff line number Diff line change
@@ -1,30 +1,31 @@
# Sysinfo

The _Sysinfo Filter_ plugin allows to append system information like fluent-bit version or hostname.
The _Sysinfo_ filter lets you append system information like the Fluent Bit version or hostname.

## Configuration Prameters
## Configuration parameters

The plugin supports the following configuration parameters:

|Key|Description|Supported platform|
|---|---|---|
|fluentbit_version_key|Specify the key name for fluent-bit version.| All |
|os_name_key|Specify the key name for os name. e.g. linux, win64 or macos.| All |
|hostname_key|Specify the key name for hostname.| All|
|os_version_key|Specify the key name for os version. It is not supported on some platforms. | Linux |
|kernel_version_key|Specify the key name for kernel version. It is not supported on some platforms.| Linux |
| Key | Description | Supported platform |
| --- | --- | --- |
| `fluentbit_version_key` | Specify the key name for the Fluent Bit version.| All |
| `os_name_key` | Specify the key name for operating system name. For example, `Linux`, `win64` or `macos`.| All |
| `hostname_key`| Specify the key name for hostname. | All |
| `os_version_key` | Specify the key name for the operating system version. Not supported on some platforms. | Linux |
| `kernel_version_key` | Specify the key name for kernel version. Not supported on some platforms.| Linux |

Some properties are supported by specific platform.
Some properties are supported by specific platforms.

## Getting Started
## Get started

In order to start filtering records, you can run the filter from the command line or through the configuration file.
To start filtering records, you can run the filter from the command line or through the configuration file.

The following configuration file is to append fluent-bit version and OS name.
The following configuration file is to append the Fluent Bit version and operating system name.

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

```python
[INPUT]
Name dummy
Tag test
Expand All @@ -39,9 +40,11 @@ The following configuration file is to append fluent-bit version and OS name.
name stdout
match *
```

{% endtab %}

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

```yaml
pipeline:
inputs:
Expand All @@ -56,17 +59,18 @@ pipeline:
- name: stdout
match: '*'
```

{% endtab %}
{% endtabs %}


You can also run the filter from command line.

```
```shell
fluent-bit -i dummy -o stdout -F sysinfo -m '*' -p fluentbit_version_key=flb_ver -p os_name_key=os_name
```

The output will be
```
The output will be something like the following:

```text
[0] dummy.0: [[1699172858.989654355, {}], {"message"=>"dummy", "flb_ver"=>"2.2.0", "os_name"=>"linux"}]
```
```
1 change: 1 addition & 0 deletions vale-styles/FluentBit/Spelling-exceptions.txt
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,7 @@ subcommands
subquery
subrecord
substring
sysinfo
syslog
systemctl
systemd
Expand Down