-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
FluentD syslog parser problem #2856
Comments
The problem is your log doesn't follow RFC3164 timestamp. If you want to parse non-standard format, you need to use regexp parser or write parser for you non-standard format. |
Shouldn't the time_format parameter work in this case (https://docs.fluentd.org/parser/syslog#time_format) ? I have it set to time_format "%Y-%m-%dT%H:%M:%SZ" but it doesnt seem to recognise the end of the date in each log message |
It's a bug of fluentd. it doesn't work
Fluentd uses the regex first to match and time_format is applied to matched texts. fluentd/lib/fluent/plugin/parser_syslog.rb Line 122 in da256cd
|
I have updated my config to use the regexp parser but now I get "failed to parse message data" error messages. I have tried the regexp in fluentuar and it worked as expected. The full error log is:
The updated config file is:
|
ok it turns out the problem was caused by having the priority capture group in the regexp, according to the documentation the syslog input plugin strips the priority from the message before sending it to the parser. Changing the regexp to the following solved the problem:
|
Describe the bug
The syslog parser is including the hostname and ident as part of the time field
To Reproduce
We are sending syslog messages in rfc3164 format but with timestamps in "%Y-%m-%dT%H:%M:%SZ" format eg:
The logs as they appear in stdout include the hostname and ident as part of the date field. The syslog parser does not appear to be parsing the date correctly. eg:
logs we are seeing:
--
Expected behavior
The delimiter for the end of the timestamp field should be recognised and the timestamp/host and ident fields should be parsed seperately.
Your Environment
Runing in kubernetes pods
fluentd-1.3.3 from gcr.io/google-containers/fluentd-elasticsearch:v2.4.0 image which is the latest version available
Your Configuration
Your Error Log
Additional context
The text was updated successfully, but these errors were encountered: