-
Notifications
You must be signed in to change notification settings - Fork 223
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error parsing syslog stream UDP #305
Comments
Do you have any sample logs for reproduction? |
These are some sample messages from the 3 devices:
I have tried to reproduce with this line that almost gave the same error:
You have attached a pcap file captured with tcpdump of this message. |
I can confirm this is also happening on my side with v0.38.0: ts=2023-11-22T07:32:20.372128155Z level=warn msg="error parsing syslog stream" component=loki.source.syslog.syslogudp err="expecting a version value in the range 1-999 [col 4]" |
hi folks, I asked some of the well-known LLMs and got informed that the given sample syslog might not strictly adhere to the RFC 5424 format. There should be a version number of syslog protocol right after the "greater-than" sign. I think we
|
Thank you for clarifying it. The messages were sent by out by the box devices of well known brands. Could we handle these cases too? Thank you, |
My Messages also look like this, causing the same problems. And it also does not conform strictly to RFC-3164
In my case it is a Sophos XG Firewall |
It's common enough that I think it makes sense, but it might be a pain for us to implement since the syslog library we use is pretty bare bones. |
I tested now remote syslog messages from a Debian12 server. Unless you specify the I was using this config:
|
As I see this parser is also used in other projects. In order not to complicate things maybe a solution could be:
What do you think? |
That's reasonable, let me do some cooking :D |
Great! Thank you! I tried to play with something like this at:
I'm sure that there should be a more clean solution than this. |
This is gonna be non-trivial since it requires crafting a new Ragel state machine for RFC3164-compliant syslogs, similar to this one. I allocated some of my time understanding this high magic but alas, it's gonna a slog for now :D |
Thank you, I see the work done one processing the messages. |
Any update on this? |
This issue has not had any activity in the past 30 days, so the |
Hi there 👋 On April 9, 2024, Grafana Labs announced Grafana Alloy, the spirital successor to Grafana Agent and the final form of Grafana Agent flow mode. As a result, Grafana Agent has been deprecated and will only be receiving bug and security fixes until its end-of-life around November 1, 2025. To make things easier for maintainers, we're in the process of migrating all issues tagged variant/flow to the Grafana Alloy repository to have a single home for tracking issues. This issue is likely something we'll want to address in both Grafana Alloy and Grafana Agent, so just because it's being moved doesn't mean we won't address the issue in Grafana Agent :) |
Any update on this? I need to ingest a large amount of RFC3164 logs and Alloy just isn't capable of this. |
@rarrr I've made a PR for Loki to support such things, see: grafana/loki#12810 |
Great to see the progress here! @catap are you planning to propagate your change to alloy? It seems like it would boil down to upgrading https://github.com/grafana/alloy/blob/main/go.mod#L89? |
@sushain97 I can put it into my todo list but I have no promises when. Frankly speaking changes inside alloy should be quite trivial. Just integration of new version and some options to enable. |
I see this change doesn't squeeze into v1.4.3 . Will it be included in the next release ? |
Hello, yes it will be part of v1.5 which is planned for the end of next week |
What's wrong?
I have updated to grafana-agent-flow-0.38.0-rc.0-1.amd64.deb in order to have syslog via UDP working. This was fixed in grafana/agent#5197
For the moment we are sending syslog messages from PFSense, Mikrotik and Unifi devices.
From Mikrotik and Unify devices we get the message in journald:
msg="error parsing syslog stream" component=loki.source.syslog.syslog err="expecting a version value in the range 1-999 [col 4]"
From PFSense we get the message:
msg="error parsing syslog stream" component=loki.source.syslog.syslog err="expecting a version value in the range 1-999 [col 5]
Steps to reproduce
Install grafana-agent-flow-0.38.0-rc.0-1.amd64.deb on a Debian12 VM with the config below and send remote syslog messages to the agent via UDP.
System information
Debian 12.2 x86_64 Linux
Software version
Grafana Agent 0.38.0-rc.0
Configuration
Logs
The text was updated successfully, but these errors were encountered: