-
Notifications
You must be signed in to change notification settings - Fork 190
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
postgres format not working (or Document correct postgres logging config) #125
Comments
We built the parser based on a log snippet that was provided to us. |
@nmbooker could you provide us with a logsnipet / failing test? Is only the teaser causing the problem? Are you running the default date logging config or a custom setup ? |
I'm not sure what the default is. It's close to the default for Debian/Ubuntu, but with:
in the postgresql.conf. Here are two example 'test' lines from /var/log/postgresql-8.4-main.log :
Note the newline before the semicolon on the second one - that reflects the fact I put a newline in the statement at the psql prompt. Cheers, Nick |
PostgreSQL logs are really tricky to parse right now because of the newline problem. |
Apparently we already support by specifying a LINE_DIVIDER constant on the file format class. But we are not using it yet. It also won't work with our file format autodetection script. |
As autodetect is broken for postgres anyway, we can just use newlines with the autodetect and have this work nicely with the LINE_DIVIDER thing. That way someone later on can refactor the autodetect tingy to add postgres (or non newline characters) support to it. |
I'm using Postgres 9.1 is this not supported? |
It should be, could you provide us with a log snippet of what isn't working? |
Below is the output from the r-l-a command and a snippet of my log file. crankin@web04:/var/log/postgresql$ request-log-analyzer -f postgresql postgresql-9.1-main.log postgresql-9.1-main.log: 100% [=====================================================================================================================================] Time: 00:00:00 Request summary There were no requests analyzed. Parse warnings Need an expert to analyze your application? 2013-03-17 14:42:11 CDT LOG: checkpoint starting: time From: "Bart ten Brinke" [email protected] It should be, could you provide us with a log snippet of what isn't working? |
I just changed my postgres config slightly so the output is a little different. Mainly adding user & data base to the line as well as logging transactions taking longer that 50 ms. Here's a sample 2013-03-20 11:50:16 CDT FATAL: terminating connection due to administrator command From: "Bart ten Brinke" [email protected] It should be, could you provide us with a log snippet of what isn't working? |
Could you repost it in a GIST? |
Sorry this was abandoned but still having the issue. Here is a link to the gist. |
Is this issue still alive? I see a few users have submitted log snippets; conversely, could any developer provide a snippet of the logs that the parser was based on? It should be much easier to experiment with logging configurations if the desired output is known. |
After two years 😀? No, but pull requests are always welcome! Sent from my iPhone
|
Could someone please provide an example of their postgresql.conf, such that it produces a log file that's parseable by request-log-analyzer?
I've set log_min_duration_statement = 0 but the lines it produces (in/var/log/postgresql/postgresql-8.4-main.log) look like this:
2012-09-27 14:39:03 BST LOG: duration: 0.679 ms statement: select * from people;
whereas looking at the code the postgresql reader's regex in lib/request_log_analyzer/file_formats/postgresql.rb it wants something different:
I use the
--format postgresql
option, and get the following warnings:There's no info in the configure-logging wiki page.
I'm using postgres 8.4 on Ubuntu 12.04.
Any thoughts?
Nick
The text was updated successfully, but these errors were encountered: