Skip to content

Commit

Permalink
pipeline: filters: sysinfo: add document for sysinfo plugin (#1249)
Browse files Browse the repository at this point in the history
* pipeline: filters: sysinfo: add document for sysinfo plugin

Signed-off-by: Takahiro Yamashita <[email protected]>

* pipeline: filters: sysinfo: response to review

Signed-off-by: Takahiro Yamashita <[email protected]>

---------

Signed-off-by: Takahiro Yamashita <[email protected]>
  • Loading branch information
nokute78 authored Nov 13, 2023
1 parent dc78ec4 commit 10c6b7f
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 0 deletions.
1 change: 1 addition & 0 deletions SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@
* [Nightfall](pipeline/filters/nightfall.md)
* [Rewrite Tag](pipeline/filters/rewrite-tag.md)
* [Standard Output](pipeline/filters/standard-output.md)
* [Sysinfo](pipeline/filters/sysinfo.md)
* [Throttle](pipeline/filters/throttle.md)
* [Type Converter](pipeline/filters/type-converter.md)
* [Tensorflow](pipeline/filters/tensorflow.md)
Expand Down
1 change: 1 addition & 0 deletions installation/sources/build-and-install.md
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,7 @@ The _filter plugins_ allows to modify, enrich or drop records. The following tab
| [FLB\_FILTER\_RECORD\_MODIFIER](../../pipeline/filters/record-modifier.md) | Enable Record Modifier filter | On |
| [FLB\_FILTER\_REWRITE\_TAG](../../pipeline/filters/rewrite-tag.md) | Enable Rewrite Tag filter | On |
| [FLB\_FILTER\_STDOUT](../../pipeline/filters/standard-output.md) | Enable Stdout filter | On |
| [FLB\_FILTER\_SYSINFO](../../pipeline/filters/sysinfo.md) | Enable Sysinfo filter | On |
| [FLB\_FILTER\_THROTTLE](../../pipeline/filters/throttle.md) | Enable Throttle filter | On |
| [FLB\_FILTER\_TYPE\_CONVERTER](../../pipeline/filters/type-converter.md) | Enable Type Converter filter | On |
| [FLB\_FILTER\_WASM](../../pipeline/filters/wasm.md) | Enable WASM filter | On |
Expand Down
50 changes: 50 additions & 0 deletions pipeline/filters/sysinfo.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# Sysinfo

The _Sysinfo Filter_ plugin allows to append system information like fluent-bit version or hostname.

## Configuration Prameters

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 |

Some properties are supported by specific platform.

## Getting Started

In order 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.

```
[INPUT]
Name dummy
Tag test
[FILTER]
Name sysinfo
Match *
Fluentbit_version_key flb_ver
Os_name_key os_name
[OUTPUT]
name stdout
match *
```

You can also run the filter from command line.

```
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
```
[0] dummy.0: [[1699172858.989654355, {}], {"message"=>"dummy", "flb_ver"=>"2.2.0", "os_name"=>"linux"}]
```

0 comments on commit 10c6b7f

Please sign in to comment.