Overview
- HAProxy logs are sent directly to Fluent Bit over UDP (syslog)
- Fluent Bit extracts fields (like source IP and HTTP status)
- Lua script transforms log into a JSON payload
- Fluent Bit posts the data to OneFirewall’s API
1. Folder Structure
2. HAProxy Configuration
haproxy.cfg
3. Fluent Bit Parser
parsers.conf
4. Lua Script for Transformation
send_to_onefirewall.lua
5. Fluent Bit Configuration
fluent-bit.conf
6. Docker Compose Example
Ensure both containers are on the same network (Docker Compose does this by default).
7. OneFirewall Traffic Validation
When Fluent Bit sends structured traffic data to OneFirewall:- OneFirewall validates
src_ipanddst_ipfields - Invalid or private IPs are rejected with:
- Ensure you’re using valid public IPv4 addresses for testing.
Result
With this setup in place, HAProxy logs flow to Fluent Bit over UDP, get parsed and transformed into JSON by the Lua script, and are posted directly to OneFirewall’s traffic validation API.Notes
- Replace
YOUR_TOKEN_HEREwith your actual OneFirewall token - Consider adding retry/failure handling or S3 backup for production
- Ensure
dst_ipis not a private/local IP unless OneFirewall allows it

