Skip to content

feat: add fluent-bit support for Loki log ingestion#37

Merged
noexecstack merged 1 commit into
mainfrom
feat/fluentbit-loki-support
Apr 10, 2026
Merged

feat: add fluent-bit support for Loki log ingestion#37
noexecstack merged 1 commit into
mainfrom
feat/fluentbit-loki-support

Conversation

@noexecstack

Copy link
Copy Markdown
Owner

Summary

  • Loki log lines wrapped in a fluent-bit JSON envelope ({"log": "..."}) are now automatically detected and unwrapped, so flows ingested via fluent-bit work alongside promtail.
  • Server-side line filters changed from literal JSON patterns ("verdict":"AUDIT") to format-agnostic regex (verdict.{0,5}:.{0,5}AUDIT) that match both promtail (plain quotes) and fluent-bit (escaped quotes).
  • Default --loki-query changed from {container="cilium-agent"} (promtail) to {app_kubernetes_io_name="cilium-agent"} (fluent-bit). Promtail users can override with --loki-query '{container="cilium-agent"}'.
  • Version bumped to 0.17.0.

Test plan

  • All 154 existing tests pass
  • New unit tests for _extract_flow_from_loki_line covering promtail, fluent-bit, and edge cases
  • New end-to-end test: fluent-bit Loki response -> parse_flows -> policies
  • New tests verifying regex patterns match both promtail and fluent-bit log text
  • ruff check and format clean

Loki log lines wrapped in a fluent-bit JSON envelope ({"log": "..."})
are now automatically detected and unwrapped. Server-side line filters
use format-agnostic regex patterns so they match both promtail and
fluent-bit escaped formats. Default --loki-query changed to
{app_kubernetes_io_name="cilium-agent"} (fluent-bit); promtail users
can override with --loki-query '{container="cilium-agent"}'.
@noexecstack
noexecstack merged commit a4a7292 into main Apr 10, 2026
5 checks passed
@noexecstack
noexecstack deleted the feat/fluentbit-loki-support branch April 10, 2026 09:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant