Regulate
Read events from a Fluentd forwarder to transform them into typed TenXObjects to filter using local/centralized regulator policy. This module is a component of the Edge Regulator app.
Architecture
graph LR
A["<div style='font-size: 14px;'>π Fluentd</div><div style='font-size: 10px;'>sources</div>"] --> B["<div style='font-size: 14px;'>π§ exec_filter</div><div style='font-size: 10px;'>plugin</div>"]
B --> C["<div style='font-size: 14px;'>β‘ 10x Regulator</div><div style='font-size: 10px;'>filter policy</div>"]
C --> B
B --> D["<div style='font-size: 14px;'>π€ Fluentd</div><div style='font-size: 10px;'>outputs</div>"]
classDef input fill:#2563eb,stroke:#1d4ed8,color:#ffffff,stroke-width:2px,rx:8,ry:8
classDef filter fill:#ea580c,stroke:#c2410c,color:#ffffff,stroke-width:2px,rx:8,ry:8
classDef engine fill:#7c3aed,stroke:#6d28d9,color:#ffffff,stroke-width:2px,rx:8,ry:8
classDef output fill:#16a34a,stroke:#15803d,color:#ffffff,stroke-width:2px,rx:8,ry:8
class A input
class B filter
class C engine
class D output
Data Flow
- π Fluentd Sources - Collect logs from files, TCP, HTTP, or other sources
- π§ exec_filter Plugin - Pipes ALL events to 10x sidecar via stdin
- β‘ 10x Regulator - Applies rate/policy-based filtering, drops noisy events
- π Bidirectional Pipe - FILTERED events return via stdout to exec_filter
- π€ Fluentd Outputs - Only filtered events ship to final destinations
Key Characteristics
| Feature | Description |
|---|---|
| π¦ Rate Limiting | Filter events based on per-template rate limits |
| π Policy-Based | Apply local or centralized filtering policies |
| π° Cost Control | Reduce log volume and costs by dropping noisy events |
| π§ exec_filter | Uses Fluentd's native exec_filter for stdin/stdout piping |
Sidecar Relay
This module configures a Fluentd exec-filter that launches a 10x sidecar process and passes it collected events to regulate using a local/centralized policy. The sidecar relays regulated events back to the Fluentd filter to ship to outputs (e.g., Splunk, S3).
Install
See the Log10x Edge Regulator Fluentd run instructions
Deploy to k8s via Helm
See the Log10x Edge Regulator Fluentd deployment instructions
Config Files
To configure the Fluentd regulator module, Edit these files.
Below is the default configuration from: regulate/config.yaml.
ewogICJ0eXBlIiA6ICJvYmplY3QiLAogICJwcm9wZXJ0aWVzIiA6IHsKICAgICJpbmNsdWRlIiA6IHsKICAgICAgInR5cGUiIDogImFycmF5IiwKICAgICAgIml0ZW1zIiA6IHsKICAgICAgICAidHlwZSIgOiAic3RyaW5nIgogICAgICB9CiAgICB9LAogICAgInRlbngiIDogewogICAgICAidHlwZSIgOiAic3RyaW5nIgogICAgfSwKICAgICJmbHVlbnRkIiA6IHsKICAgICAgInR5cGUiIDogIm9iamVjdCIsCiAgICAgICJhZGRpdGlvbmFsUHJvcGVydGllcyIgOiBmYWxzZSwKICAgICAgInByb3BlcnRpZXMiIDogewogICAgICAgICJlbmNvZGVPYmplY3RzIiA6IHsKICAgICAgICAgICJ0eXBlIiA6IFsKICAgICAgICAgICAgImJvb2xlYW4iLAogICAgICAgICAgICAic3RyaW5nIgogICAgICAgICAgXSwKICAgICAgICAgICJtYXJrZG93bkRlc2NyaXB0aW9uIiA6ICJDb250cm9scyB3aGV0aGVyIGV2ZW50cyB3cml0dGVuIHRvIGEgRmx1ZW50ZCBmb3J3YXJkZXIgYXJlIGVuY29kZWQgb3Igd3JpdHRlbiBpbiByYXcgZm9ybVxuXG5TZXRzIHRoZSBmb3JtYXQgaW4gd2hpY2ggdG8gc2VyaWFsaXplIFRlblhPYmplY3RzIGJhY2sgdG8gdGhlIEZsdWVudGQgZm9yd2FyZGVyLiBJZiB0cnVlLCB3cml0ZSBldmVudHMgdXNpbmcgdGhlIFtlbmNvZGVdKGh0dHBzOi8vZG9jLmxvZzEweC5jb20vYXBpL2pzLyNUZW5YT2JqZWN0K2VuY29kZSkgZnVuY3Rpb24uIElmIGZhbHNlLCB3cml0ZSBldmVudHMgaW4gdGhlaXIgb3JpZ2luYWwgZm9ybSBhcyByZWFkIGZyb20gdGhlIEZsdWVudGQgZm9yd2FyZGVyIHVzaW5nIHRoZSBbZnVsbFRleHRdKGh0dHBzOi8vZG9jLmxvZzEweC5jb20vYXBpL2pzLyNUZW5YQmFzZU9iamVjdCtmdWxsVGV4dCkgZmllbGQuIChBY2NlcHRzIGJvb2xlYW4gb3Igc3RyaW5nIHdpdGggJD0gcHJlZml4IGZvciBydW50aW1lIGV2YWx1YXRpb24pIChEZWZhdWx0OiBmYWxzZSkiLAogICAgICAgICAgImRlZmF1bHQiIDogZmFsc2UKICAgICAgICB9LAogICAgICAgICJvdXRwdXRGaWVsZHMiIDogewogICAgICAgICAgInR5cGUiIDogWwogICAgICAgICAgICAiYXJyYXkiLAogICAgICAgICAgICAibnVsbCIKICAgICAgICAgIF0sCiAgICAgICAgICAibWFya2Rvd25EZXNjcmlwdGlvbiIgOiAiTGlzdCBvZiBUZW5YT2JqZWN0IGZpZWxkIG5hbWVzIHRvIGluY2x1ZGUgYWxvbmdzaWRlIHRoZSBtYWluIGV2ZW50IGluIG91dHB1dFxuXG5TcGVjaWZpZXMgVGVuWE9iamVjdCBmaWVsZCBuYW1lcyB0byBlbWl0IGFsb25nc2lkZSB0aGUgbWFpbiBldmVudCB0ZXh0IHdoZW4gd3JpdGluZyBiYWNrIHRvIHRoZSBGbHVlbnRkIGZvcndhcmRlci4gV2hlbiBlbXB0eSAoZGVmYXVsdCksIG9ubHkgdGhlIG1haW4gZXZlbnQgZmllbGQgaXMgd3JpdHRlbi4gRXhhbXBsZSBmaWVsZHM6IGxldmVsLCBncm91cCwgc3ltYm9sTWVzc2FnZS4gKERlZmF1bHQ6IFtdKSIsCiAgICAgICAgICAiaXRlbXMiIDogewogICAgICAgICAgICAidHlwZSIgOiAic3RyaW5nIgogICAgICAgICAgfSwKICAgICAgICAgICJkZWZhdWx0IiA6IFsgXQogICAgICAgIH0sCiAgICAgICAgIm91dHB1dEVuY29kZVR5cGUiIDogewogICAgICAgICAgInR5cGUiIDogWwogICAgICAgICAgICAic3RyaW5nIiwKICAgICAgICAgICAgIm51bGwiCiAgICAgICAgICBdLAogICAgICAgICAgIm1hcmtkb3duRGVzY3JpcHRpb24iIDogIk91dHB1dCBmb3JtYXQgd2hlbiBvdXRwdXRGaWVsZHMgYXJlIHNldC4gUG9zc2libGUgdmFsdWVzOiBbanNvbiwgZGVsaW1pdGVkXVxuXG5TcGVjaWZpZXMgaG93IHRoZSBjb21iaW5lZCBvdXRwdXQgKG1haW4gZXZlbnQgZmllbGQgcGx1cyBvdXRwdXRGaWVsZHMpIGlzIGVuY29kZWQgd2hlbiB3cml0aW5nIGJhY2sgdG8gdGhlIEZsdWVudGQgZm9yd2FyZGVyLiBQb3NzaWJsZSB2YWx1ZXM6IC0gKipqc29uKio6IGZvcm1hdHMgYWxsIGZpZWxkcyBhcyBhIEpTT04gb2JqZWN0IC0gKipkZWxpbWl0ZWQqKjogZm9ybWF0cyBmaWVsZCB2YWx1ZXMgc2VwYXJhdGVkIGJ5IHRoZSBvdXRwdXQgZGVsaW1pdGVyIE9ubHkgdGFrZXMgZWZmZWN0IHdoZW4gZmx1ZW50ZE91dHB1dEZpZWxkcyBpcyBzZXQuIChEZWZhdWx0OiBkZWxpbWl0ZWQpIiwKICAgICAgICAgICJkZWZhdWx0IiA6ICJkZWxpbWl0ZWQiCiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfSwKICAiYWRkaXRpb25hbFByb3BlcnRpZXMiIDogZmFsc2UKfQ==
# πβ 'run' Fluentd regulator configuration
# Configure an input that reads events from a Fluentd forwarder and
# an output that writes filtered TenXObjects back to Fluentd.
# This config runs in conjunction with the instructions provided in:
# https://doc.log10x.com/run/input/forwarder/fluentd/regulate/#install
# Set the 10x pipeline to 'run'
tenx: run
# =============================== Dependencies ================================
include:
# Include regulator output options (encodeObjects, outputFields, outputEncodeType)
- run/modules/input/forwarder/fluentd/regulate/module.yaml
# Include the stdin input from which to read events from the forwarder
- run/modules/input/forwarder/fluentd/input
# Include Unix domain socket/stdout to write events into the forwarder
- '$="run/modules/input/forwarder/fluentd/output/" + (TenXString.includes(TenXEnv.get("os.name"), "Windows") ? "stdio" : "unix")'
# ============================== Fluentd Options ==============================
fluentd:
# 'encodeObjects' specifies the target output (Unix/stdout) will write filtered
# TenXObjects in their original form via the intrinsic 'fullText' field.
encodeObjects: false
# 'outputFields' specifies TenXObject field names to emit alongside the main event.
# When set, enrichment fields are included in the sidecar output for forwarder post-processing.
# Example: outputFields: [level, group, symbolMessage]
outputFields: []
# 'outputEncodeType' controls the output format when outputFields is set.
# Possible values: 'json' or 'delimited'
outputEncodeType: delimited
Options
Specify the options below to configure the Fluentd regulator:
| Name | Description |
|---|---|
| fluentdEncodeObjects | Controls whether events written to a Fluentd forwarder are encoded or written in raw form |
| fluentdOutputFields | List of TenXObject field names to include alongside the main event in output |
| fluentdOutputEncodeType | Output format when outputFields are set. Possible values: [json, delimited] |
fluentdEncodeObjects
Controls whether events written to a Fluentd forwarder are encoded or written in raw form.
| Type | Default |
|---|---|
| Boolean | false |
Sets the format in which to serialize TenXObjects back to the Fluentd forwarder. If true, write events using the encode function. If false, write events in their original form as read from the Fluentd forwarder using the fullText field.
fluentdOutputFields
List of TenXObject field names to include alongside the main event in output.
| Type | Default |
|---|---|
| List | [] |
Specifies TenXObject field names to emit alongside the main event text when writing back to the Fluentd forwarder. When empty (default), only the main event field is written. Example fields: level, group, symbolMessage.
fluentdOutputEncodeType
Output format when outputFields are set. Possible values: [json, delimited].
| Type | Default |
|---|---|
| String | delimited |
Specifies how the combined output (main event field plus outputFields) is encoded when writing back to the Fluentd forwarder. Possible values:
- json: formats all fields as a JSON object
- delimited: formats field values separated by the output delimiter Only takes effect when fluentdOutputFields is set.
This module is defined in regulate/module.yaml.