-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpgbadger
More file actions
28 lines (23 loc) · 679 Bytes
/
pgbadger
File metadata and controls
28 lines (23 loc) · 679 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
Installation:
as root:
yum -y install perl-CPAN git httpd
as postgres:
git clone https://github.com/darold/pgbadger.git
cd pgbadger
perl Makefile.PL
make && sudo make install
postgresql.conf
log_line_prefix = '%t [%p]: [%l-1] '
log_statement = 'none'
log_min_duration_statement = 0
log_checkpoints = on
log_connections = on
log_disconnections = on
log_lock_waits = on
log_temp_files = 0
log_autovacuum_min_duration = 0
logging_collector = on
log_directory = '/var/log/postgresquerylog/'
log_filename = 'postgresql.log'
log_destination = 'csvlog,stderr'
*/30 * * * * /usr/local/bin/pgbadger -j 4 /var/log/postgresquerylog/postgresql.log -O /usr/share/httpd/noindex/index.html