diff --git a/docs/metrics.md b/docs/metrics.md index 938a83303268c95e104a18ea2a4812c4dce46cf9..38c55c0854c1d18830fb6448de814ca31f1d4596 100644 --- a/docs/metrics.md +++ b/docs/metrics.md @@ -121,8 +121,30 @@ metrics: regex: ".*_unwanted_metric" ``` +## 4. Pushing Metrics to Central Monitoring Infrastructure +By default the Helm chart uses a dedicated Fluent Bit to upload the metrics to the Central Monitoring Infrastructure via OpenTelemetry protocol. -## 4 . Further Customizations +This Fluent Bit already has a default configuration for the inputs, filters and outputs. Please, check the `values.yaml` to see the default configuration. + +Besides these basic configuration options, others are also offered. + +### 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: | + ... +``` + + +## 5. Further Customizations You can further customize metrics collection with the following settings: