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

parser.rb: Make ':' optional after pid #382

Merged
merged 1 commit into from
Jul 14, 2014

Conversation

Spredzy
Copy link
Contributor

@Spredzy Spredzy commented Jul 11, 2014

In some cases, there is no ':' after the pid, the following log would fail to parse

<77>Jul 11 15:14:01 my.example.com run-parts(/etc/cron.daily)[8231] finished logrotate

resulting in

"_source": {
    "data": "<77>Jul 11 15:14:01 my.example.com run-parts(/etc/cron.daily)[8231] finished logrotate",
    "message": "invalid syslog message data=\"<77>Jul 11 15:14:01 my.example.com run-parts(/etc/cron.daily)[8231] finished logrotate\"",
    "@timestamp": "2014-07-11T19:14:01+00:00"
  },

This PR aims to make those ':' after the pid optional

@repeatedly
Copy link
Member

Could you add tests to SyslogParser?

In some cases, there is no ':' after the pid, the following log would fail to parse

```
<77>Jul 11 15:14:01 my.example.com run-parts(/etc/cron.daily)[8231] finished logrotate
```

resulting in

```
"_source": {
    "data": "<77>Jul 11 15:14:01 my.example.com run-parts(/etc/cron.daily)[8231] finished logrotate",
    "message": "invalid syslog message data=\"<77>Jul 11 15:14:01 my.example.com run-parts(/etc/cron.daily)[8231] finished logrotate\"",
    "@timestamp": "2014-07-11T19:14:01+00:00"
  },
```

This PR aims to make those ':' after the pid optional
repeatedly added a commit that referenced this pull request Jul 14, 2014
parser.rb: Make ':' optional after pid
@repeatedly repeatedly merged commit de695ce into fluent:master Jul 14, 2014
@repeatedly
Copy link
Member

Thanks!

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

Successfully merging this pull request may close these issues.

2 participants