Skip to content

Regulate

Read events from a Fluent Bit forwarder to transform into typed TenXObjects and filter using local/centralized regulator policies. This module is a component of the Edge Regulator app.

Architecture

graph LR
    A["<div style='font-size: 14px;'>πŸ“‚ Fluent Bit</div><div style='font-size: 10px;'>inputs</div>"] --> B["<div style='font-size: 14px;'>πŸ”§ Lua Filter</div><div style='font-size: 10px;'>tenx.lua</div>"]
    B --> C["<div style='font-size: 14px;'>⚑ 10x Regulator</div><div style='font-size: 10px;'>filter policy</div>"]
    C --> D["<div style='font-size: 14px;'>πŸ”Œ Unix/TCP</div><div style='font-size: 10px;'>input</div>"]
    D --> E["<div style='font-size: 14px;'>πŸ“€ Fluent Bit</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 socket fill:#0891b2,stroke:#0e7490,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 socket
    class E output

Data Flow

  • πŸ“‚ Fluent Bit Inputs - Collect logs from files, containers, or other sources
  • πŸ”§ Lua Filter - Intercepts ALL events and pipes them to 10x sidecar
  • ⚑ 10x Regulator - Applies rate/policy-based filtering, drops noisy events
  • πŸ”Œ Unix/TCP Input - Receives FILTERED events back from the sidecar
  • πŸ“€ Fluent Bit 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
πŸ”§ Lua Filter Uses Fluent Bit's native Lua scripting for sidecar launch

Sidecar Relay

This module configures a Fluent Bit Lua filter and Unix/TCP input. The Lua filter launches a 10x sidecar process and passes it collected events to regulate. The sidecar relays regulated events back to Fluent Bit via the configured Unix/TCP input to ship to output(s) (e.g., Splunk, S3).

Install

See the Log10x Edge Regulator Fluent Bit run instructions

Deploy to k8s via Helm

See the Log10x Edge Regulator Fluent Bit deployment instructions

Config Files

To configure the Fluent Bit regulator module, Edit these files.

Below is the default configuration from: regulate/config.yaml.

Edit Online

Edit config.yaml Locally

# πŸ”ŸβŽ 'run' Fluent Bit regulator configuration

# Configure an input that reads events from a Fluent Bit forwarder and
# an output that writes filtered TenXObjects back to Fluent Bit.

# This config file operates in conjunction with the instructions provided in:
# https://doc.log10x.com/run/input/forwarder/fluentbit/regulate/#install

# Set the 10x pipeline to 'run'
tenx: run

# =============================== Dependencies ================================

include:

  # Include regulator output options (encodeObjects, outputFields, outputEncodeType)
  - run/modules/input/forwarder/fluentbit/regulate/module.yaml

  # Include the stdin input to read events from the forwarder
  - run/modules/input/forwarder/fluentbit/input

  # Include Unix domain/TCP socket output to write events into the forwarder
  - '$="run/modules/input/forwarder/fluentbit/output/" + (TenXString.includes(TenXEnv.get("os.name"), "Windows") ? "tcp" : "unix")'

# ============================= Fluent Bit Options ============================

fluentbit:
  # 'encodeObjects' specifies the target output (Unix domain/TCP) will write
  #  TenXObjects in a plain-text format using 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: [severity_level]

  # 'outputEncodeType' controls the output format when outputFields is set.
  #  Possible values: 'json' or 'delimited'
  outputEncodeType: json

Options

Specify the options below to configure the Fluent Bit regulator:

Name Description
fluentbitEncodeObjects Controls whether events written to a Fluent Bit forwarder are encoded or written in raw form
fluentbitOutputFields List of TenXObject field names to include alongside the main event in output
fluentbitOutputEncodeType Output format when outputFields are set. Possible values: [json, delimited]

fluentbitEncodeObjects

Controls whether events written to a Fluent Bit forwarder are encoded or written in raw form.

Type Default
Boolean false

Sets the format in which to serialize TenXObjects back to the Fluent Bit forwarder. If true, write events using the encode function. If false, write events in their original form as read from the Fluent Bit forwarder using the fullText field.

fluentbitOutputFields

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 Fluent Bit forwarder. When empty (default), only the main event field is written. Example fields: level, group, symbolMessage.

fluentbitOutputEncodeType

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 Fluent Bit forwarder. Possible values:

  • json: formats all fields as a JSON object
  • delimited: formats field values separated by the output delimiter Only takes effect when fluentbitOutputFields is set.


This module is defined in regulate/module.yaml.