-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Promtail: "error parsing syslog stream" when rsyslog omfwd set to "octet-counted" #2232
Comments
@g574 The error from |
We should support @cyriltovena WDYT? |
@adityacs, is promtail supposed to work with the omhttp module? Or is there a way to use it with traditional framing? |
@g574 Also, whichever the framing, labelling should just work fine. Could you please need more details on what labels you are expecting and what is missing? |
Hi @adityacs , thanks for clarifying that.
Regarding EOF, I have some long log lines so I had to increase the |
|
OK, I'm getting more and more confused. If I run
Does it refer to the config file being wrong, e.g. missing } character or is it the incoming log? |
I started to truncate the config files to find the line that causes this.
And this rsyslog.conf:
And I still get these errors:
There's not much I can remove from the config. What can be the issue? |
If I stop rsyslog (i.e. no logs fed into promtail) and restart promtail the error still stays there. |
Not sure why this error is occurring. I tried both For the other error you mentioned, you can test sending your log lines to Promtail using Example
One thing I tried was below log lines This works correctly without any errors
This throws error
I guess this is what is happening in your case. Not sure though |
Hi @adityacs , thank you for the hints. I think I have solved some of the problems by cleaning up the rsyslog config - the weird '///////' error messages are gone now.
What can be wrong here? |
The config is fine. If you try to send empty message to promtail you will get printf ""| nc 127.0.0.1 5514 Not sure why you are getting |
🤦 OhMy Sorry for mixing so many things in one case but I didn't know if they are related or not.
|
@g574 Glad that your issue got fixed.
Kindly verify that the log messages you are receiving from |
FWIW, if you see |
Describe the bug
I have set up promtail with rsyslog.
If I set rsyslog "omfwd" to "octet-counted" I see a lot of weird errors using
journalctl -f
. E.g.:(The slashes are really there, not just a censorship.)
Also, some logs are not collected this way but the ones that arrive to promtail are in turn properly labeled.
Now if I set "omfwd" to "traditional" then the error messages are gone but so are some of the labels (most of the labels set in pipeline_stages, the ones added by rsyslog are just fine). But log collection works more reliably in "traditional" mode.
E.g.: A part of the pipeline_stages is in the config below. It works with "octet-counted" but some logs are missing. When I switch to traditional, labeling stops working but all logs are there.
To Reproduce
Steps to reproduce the behavior:
promtail version:
rsyslog version:
Expected behavior
Proper labeling and log collection should work at the same time, preferable using "octet-counted" setting.
Environment:
Screenshots, Promtail config, or terminal output
If applicable, add any output to help explain your problem.
Promtail config:
Rsyslog config:
The text was updated successfully, but these errors were encountered: