Skip to content
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

The special parser in imuxsock does not parse RFC5424 header #4749

Open
dgouarin opened this issue Dec 8, 2021 · 4 comments
Open

The special parser in imuxsock does not parse RFC5424 header #4749

dgouarin opened this issue Dec 8, 2021 · 4 comments

Comments

@dgouarin
Copy link

dgouarin commented Dec 8, 2021

when logging via imuxsock a RFC5424 formatted message

logger --rfc5424 "hello"

One would expect the message to be parsed. Instead, the header is handled as message data, for example :
Dec 8 11:01:04 t0008746-C9Z490-PG 1 2021-12-09T11:01:04.443899+01:00 kont-2037002 t0008746 - - [timeQuality tzKnown="1" isSynced="0"] hello

rsyslog debug output signals this error :
imuxsock.c : datetime.c ParseTIMESTAMP3339: invalid year: 1, pszTS: '2'

To workaround this issue, one must disable the useSpecialParser param :

input(type="imuxsock" socket="/dev/log" useSpecialParser="off")

as documented here https://rsyslog-doc.readthedocs.io/en/latest/configuration/modules/imuxsock.html

Could the special parser be fixed to handle and parse RFC5424 headers ?

rsyslog version: 8.2010.0
Ubuntu 18.04.4 LTS

@davidelang
Copy link
Contributor

davidelang commented Dec 8, 2021 via email

@dgouarin
Copy link
Author

Hi, issue reproduced this day on 8.2110.0

@rgerhards
Copy link
Member

This is not an issue. It's how it works. If you need RFC5424, you need to disable the special parser.

@rgerhards
Copy link
Member

Some more background: The core idea of the special parser is that it parses a very specific format and also is able to override some fields. I don't think it makes sense to try to do this for all potential formats. Especially as RFC5424 provides great expressiveness in itself to provide e.g. high precision timestamps. So I do not see any value at all in trying to get the other items.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants