Skip to content

update postgresql #88

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions patterns/postgresql
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
# Default postgresql pg_log format pattern
POSTGRESQL %{DATESTAMP:timestamp} %{TZ} %{DATA:user_id} %{GREEDYDATA:connection_id} %{POSINT:pid}

# Date format as in postgresql log file
PG_TIMESTAMP %{YEAR}-%{MONTHNUM}-%{MONTHDAY} %{HOUR}:%{MINUTE}:%{SECOND} [A-Z]{3,4}

# List of error prefixes
PG_ERROR_PATTERN (ERROR|WARNING|FATAL|PANIC)

# log_line_prefix uniquely identifies the PostgreSQL log file
PG_PREFIX %{PG_TIMESTAMP} datname:(%{DATA:datname})?,client:(%{DATA:client_host})?,app:(%{DATA:app_name})?,usename:(%{USER:usename})?,session:(%{DATA:session})?

# Add the ability to use log_level as a label in metrics
PG_ERROR_LEVEL %{PG_ERROR_PATTERN:log_level}:

# We identify the event of successful authorization
PG_EVENT_AUTH LOG: connection authorized:

# We identify the event of receiving the SIGHUP signal, for re-reading the configuration
PG_EVENT_RELOAD LOG: received SIGHUP, reloading configuration files