<#C0CTQGHKJ|fluent-bit> I'm currently integrating ...
# fluent-bit
v
#fluent-bit I'm currently integrating "Fluent Bit with Wazuh to collect logs from a Keycloak pod running in Kubernetes. I'm encountering an issue where Fluent Bit detects file modifications but the logs are not being forwarded to Wazuh Server. Setup Overview: Log source: Files under
/var/log/pods/default_keycloak-0_*/keycloak/*.log
Output: Syslog over UDP to Wazuh manager at
10.0.0.26:5140
Fluent Bit successfully tails the target log file (
testadmin.log
) and detects
IN_MODIFY
events. Despite file changes being detected, no logs are appearing in Wazuh's
/var/ossec/logs/archives/archives.log
Tried sending logs manually, also i can see the keycloak logs also generated and tailed in the mentioned path.
Copy code
echo "WAZUH_FLUENTBIT_TEST: test from keycloak pod" >> /var/log/pods/default_keycloak-0_*/keycloak/testadmin.log
Keycloak Sample logs >>>
2025-06-13T01:13:19.760328194Z stdout F 2025-06-13 01:13:19,760 WARN  [org.keycloak.events] (executor-thread-3) type="LOGIN_ERROR", realmId="de5a6add-7364-4031-a3b1-656db078ad76", realmName="vignesh", clientId="account-console", userId="null", ipAddress="10.42.0.1", error="user_not_found", auth_method="openid-connect", auth_type="code", redirect_uri="http://3.110.163.102:31491/realms/vignesh/account", code_id="76a9ef75-ac2a-4bc7-85de-7c353ed6adf1", username="adminas"
Additional Test Performed: 1. Verified that logs sent via
nc -u 10.0.0.26 5140
do appear in Wazuh archeives.logs, so the manager is receiving syslog data. 2. Fluent Bit logs confirm file tailing but do not show any message being sent or flushed to syslog output. Fluent-bit conf for reference, which expected to send the logs to wazuh server.
p
Is it a long line as you've told it to skip those? Are you on the latest version? If not then update. Can you confirm using stdout output to see directly rather than relying on something else to receive the data? If you use that does it show the logs. Can you provide a reproducer?
You're using UDP which is not guaranteed delivery remember too, so yeah first step is ensure you're updated and use stdout to see if the line is picked up. Plus maybe it got rejected downstream so simplifying is best approach to confirm where the issue is.
v
Hi Pat, Thank for the quick response, I using fluent-bit V4.0, I changed the "Skip_Long_Lines" to Off, and I can see the fluentbit forwarding the logs to Wazuh server as expected, but I'm unable to see the full logs, its just forwarding the timestamp not detailed event. (attached screenshot for reference). Also, after enabled the Output from "syslog" to "stdout", i was getting the below error. Using "syslog" it was working but didn't get the full log. Could you please help me forward the full Keycloak logs to Wazuh using fluent-bit?
[2025/06/18 13:02:22] [ warn] [filter:kubernetes:kubernetes.0] could not get meta for POD fluent-bit-gxqq2
[2025/06/18 13:02:22] [debug] [stdout:stdout.0] created event channels: read=41 write=42
[2025/06/18 13:02:22] [error] [config] stdout: unknown configuration property 'mode'. The following properties are allowed: format, json_date_format, and json_date_key.
[2025/06/18 13:02:22] [ help] try the command: /fluent-bit/bin/fluent-bit -o stdout -h
[2025/06/18 13:02:22] [error] [engine] output initialization failed
[2025/06/18 13:02:23] [ info] [input] pausing tail.0
Expected Output. tail -f /var/log/pods/*keycloak*/keycloak/*.log
2025-06-18T13:13:38.536595835Z stdout F 2025-06-18 13:13:38,536 WARN  [org.keycloak.events] (executor-thread-44) type="LOGIN_ERROR", realmId="c6247ae3-f7a1-448d-9853-80e8dc4f2c2f", realmName="master", clientId="security-admin-console", userId="null", ipAddress="10.42.0.1", error="user_not_found", auth_method="openid-connect", redirect_uri="http://35.154.175.62:31491/admin/master/console/#/vignesh/clients", code_id="f0ba3bfc-bc83-404b-a014-5943d01418f5", username="test123"
p
If you enable stdout you just need a match config - the error is explaining this, there is no mode option for stdout: https://docs.fluentbit.io/manual/pipeline/outputs/standard-output
You need stdout to show you the actual format that Fluent Bit is maintaining internally, trying to debug via something else is a lot more effort
You can also create sample data with the
dummy
input plugin: https://docs.fluentbit.io/manual/pipeline/inputs/dummy
v
I was trying on the same but getting the same error. I tried using dummy but not getting the full log in wazuh logs. Also, tried using tcp port, same error.
p
Use stdout to see what the data looks like as I say
From that we can configure the syslog output, it probably needs the right keys or the full log line
If you're using the K8S filter then set merge_log off to prevent it splitting up the log message
Did you check the docs for the syslog output?
v
Hi @Pat Thank you so much for the input, Now i'm able to get the full logs in wazuh server, after enabled the "Syslog_Message_Key log".
p
Glad to hear it, where shall I send the invoice? 😂
v
Haha😅 Just send it to
/dev/null
, our budget loves that address! Thanks again, Pat!
p
No worries mate and thanks for replying with the solution for others. Feel free to send a docs PR to improve anything or add an example use case
👍 1