https://github.com/julbme/fluent-bit-extras
https://github.com/julbme/fluent-bit-extras
Last synced: 5 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/julbme/fluent-bit-extras
- Owner: julbme
- License: mit
- Created: 2022-03-25T12:39:05.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2022-12-03T20:11:27.000Z (over 3 years ago)
- Last Synced: 2025-03-15T20:16:11.424Z (about 1 year ago)
- Size: 365 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# fluent-bit-extras
This repository provides some extra parsers and lua scripts to be used in [fluent-bit](https://fluentbit.io/).
## Parsers
- `json_iso8601`: the JSON parser configured to parse time in ISO8601 format.
## LUA scripts
### logging.lua
| Function name | Description |
|-----------------|-------------------------------------------------------------------------------------------------------------------------------------------------------|
| `compute_level` | This method map log levels to the ones in [`error`, `warning`, `info`, `debug`, `trace`] or set it to `info` if `level` is not present in the record. |
### record.lua
| Function name | Description |
|---------------|-----------------------------------------------------------------|
| `print` | This method prints the record on stdout without any alteration. |
| `drop` | This method drops the record. |
### syslog.lua
| Function name | Description |
|--------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `compute_priority` | Gets the priority from the message (`pri`) and adds in the record the `syslogPriorityNumber`; `syslogFacilityNumber`, `syslogFacilityCode`, `syslogSeverityNumber` and `syslogSeverityCode`. |
Where:
- `syslogPriorityNumber`: is the priority value (as number)
- `syslogFacilityNumber`: is the facility number value
- `syslogFacilityCode`: is the facility name (`local0`, `local1`, `kern`, ...)
- `syslogSeverityNumber`: is the severity number
- `syslogSeverityCode`: is the severity name (`alert`, `emerg`, `crit`, ...)
### tag.lua
| Function name | Description |
|-----------------|------------------------------------|
| `add_to_record` | Add the current tag in the record. |