-
Notifications
You must be signed in to change notification settings - Fork 131
Failed to parse data for Syslog 5424 format #248
Comments
|
I've confirmed. And it's not related to #245 because fluentd 1.9.2 doesn't contain the root cause of #245. it seems to be a bug fluentd has had. |
Ah, I got it. your message doesn't follow the RFC5424 Your message is |
My logs are coming straight from Docker with the Syslog driver, so I don't understand how the issue could be an invalid format. I'm able to reproduce the issue by logging blank lines from Docker as well: Commands docker run --rm --name test --log-driver syslog --log-opt syslog-address=udp://127.0.0.1:5140 --log-opt tag="{{.ImageName}}/{{.Name}}/{{.ID}}" --log-opt syslog-format=rfc5424 alpine echo "hello"
docker run --rm --name test --log-driver syslog --log-opt syslog-address=udp://127.0.0.1:5140 --log-opt tag="{{.ImageName}}/{{.Name}}/{{.ID}}" --log-opt syslog-format=rfc5424 alpine echo "" /var/log/td-agent/td-agent.log
|
It's not fluentd's issue because fluentd tries to parse data as RFC5424. |
From RFC5424, if MSG doesn't exist, SP should not be added. |
Thanks for the clarification. Would it be possible to filter out the log if it's empty, or simply trim the trailing whitespace first? |
I've also noticed it looks like logging to the host's syslog looks like the trailing whitespace is trimmed:
It seems like the td-agent syslog should have the same behavior? I'm open to other suggestions as well. Thanks! |
Hey folks, anyone have thoughts on this? I'm not sure what options I have on my end since I'm just sending docker logs to td-agent's syslog input. |
+1 running into this issue as well. Do we have any leads on workarounds? |
RFC5424 allows empty MSG:
*OCTET is 0 to infinite repetitions. So optional SP MSG can reduce to SP. |
Fixed by string parser for rfc5424 |
Hi again,
I'm seeing some more issues processing syslog records, not sure if related to #245.
Input:
Logs:
Thanks!
The text was updated successfully, but these errors were encountered: