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

Postgresql grok pattern fails #112

Open
grahamrhay opened this issue Oct 22, 2015 · 3 comments
Open

Postgresql grok pattern fails #112

grahamrhay opened this issue Oct 22, 2015 · 3 comments
Assignees
Labels

Comments

@grahamrhay
Copy link

The postgres grok pattern (https://github.com/elastic/logstash/blob/v1.4.2/patterns/postgresql#L2) doesn't seem to be compatible with postgres 9.4. I'm not sure when the format changed.

Specifically, the pid at the end is no longer there. This is what I'm using:

%{DATESTAMP:timestamp} %{TZ} %{DATA:user_id} %{GREEDYDATA:connection_id} %{DATA:level}: %{GREEDYDATA:msg}

@grahamrhay
Copy link
Author

I can create a PR with that, but it's probably worth collating a few log messages from different versions of postgres first

@purbon
Copy link

purbon commented Oct 22, 2015

@grahamrhay thanks a lot for your contribution. Yeah! having a few log lines as examples would be awesome.

@purbon purbon added the bug label Oct 22, 2015
@grahamrhay
Copy link
Author

9.4:

2015-10-22 08:57:03 UTC [8850-3] foo@bar STATEMENT: INSERT INTO ...
2015-10-22 08:57:03 UTC [8850-2] foo@bar DETAIL: Key already exists.
2015-10-22 08:57:03 UTC [8850-1] foo@bar ERROR: duplicate key value...

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

No branches or pull requests

3 participants