Skip to content
Snippets Groups Projects

[MONIT-4106] Add Support for User-Provided Lua Scripts in Fluent Bit Helm Chart

Merged Guillermo Facundo Colunga requested to merge monit4106 into master
Files
6
+ 15
0
@@ -101,6 +101,21 @@ outputs: |
http_passwd {{ .Values.tenant.password }}
```
### Fluentbit Custom Lua Scripts
In Fluent Bit we can use Lua scripts to create processors that transform the records. These scripts are available in the Fluent Bit container under the path `/fluent-bit/etc/scripts`. In order to create new Lua scripts just add them in the values `logs.fluentbit.luaScripts` key.
For example, the following configuration will create two files in `/fluent-bit/etc/scripts`. One named `my_lua_script.lua` and another one named `my_lua_script2.lua`.
```yaml
luaScripts:
my_lua_script.lua: |
function my_function(tag, timestamp, record)
// Do something...
return 2, timestamp, record
end
my_other_lua_script.lua: |
...
```
## 3. Customizing Fluentbit for Additional Log Sources
You can extend the logging configuration by extending previous configurations with custom Fluentbit **inputs**, **filters**, or **outputs**. This is especially useful if you want to gather logs from additional sources or apply different processing to specific logs.
Loading