From: Gilles Darold Date: Mon, 16 Sep 2019 13:22:39 +0000 (+0200) Subject: Improve documentation about rebuilding and monthmy report. X-Git-Tag: v11.1~1 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=41d3eb9d1f937571ce8eb786e562286b3f0bbff9;p=pgbadger Improve documentation about rebuilding and monthmy report. --- diff --git a/Makefile.PL b/Makefile.PL index 38c1e34..51d5bbf 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -45,7 +45,7 @@ ifneq ("$(USE_MARKDOWN)", "") cat doc/pgBadger.pod | grep "=head1 " | sed 's/^=head1 \(.*\)/- [\1](#\1)/' | sed 's/ /-/g' | sed 's/--/- /' > $@.md sed -i '1s/^/### TABLE OF CONTENTS\n\n/' $@.md echo >> $@.md - pod2markdown $^ | sed 's/^# /### /' >> $@.md + pod2markdown $^ | sed 's/^## /#### /' | sed 's/^# /### /' >> $@.md endif .INTERMEDIATE: doc/synopsis.pod diff --git a/README b/README index 50c5b77..e5b553c 100644 --- a/README +++ b/README @@ -269,7 +269,8 @@ SYNOPSIS rm /path/to/reports/*.css pgbadger -X -I -O /path/to/reports/ --rebuild - it will also update all resource files (JS and CSS). + it will also update all resource files (JS and CSS). Use -E or --explode + if the reports were built using this option. pgBadger also support Heroku PostgreSQL logs using logplex format: @@ -287,7 +288,8 @@ SYNOPSIS pgbadger --month-report 2919-05 /path/to/incremantal/reports/ this will add a link to the month name into the calendar view in - incremental reports to look at report for month 2019 May. + incremental reports to look at report for month 2019 May. Use -E or + --explode if the reports were built using this option. DESCRIPTION pgBadger is a PostgreSQL log analyzer built for speed with fully reports @@ -642,6 +644,19 @@ INCREMENTAL REPORTS files in the output directory. The resources will then be loaded using script and link tags. + Rebuilding reports + Incremental reports can be rebuilt after a pgbadger report fix or a new + feature to update all HTML reports. To rebuild all reports where a + binary file is still present proceed as follow: + + rm /path/to/reports/*.js + rm /path/to/reports/*.css + pgbadger -X -I -O /path/to/reports/ --rebuild + + it will also update all resource files (JS and CSS). Use -E or --explode + if the reports were built using this option. + + Monthly reports By default pgBadger in incremental mode only compute daily and weekly reports. If you want monthly cumulative reports you will have to use a separate command to specify the report to build. For example to build a @@ -655,6 +670,13 @@ INCREMENTAL REPORTS report is not built by default because it could take lot of time following the amount of data. + If reports were built with the per database option ( -E | --explode ) it + must be used too when calling pgbadger to build monthly report: + + pgbadger -E -X --month-report 2919-08 /var/www/pg_reports/ + + This is the same when using the rebuild option ( -R | --rebuild ). + BINARY FORMAT Using the binary format it is possible to create custom incremental and cumulative reports. For example, if you want to refresh a pgBadger diff --git a/README.md b/README.md index 391e0e7..15afc47 100644 --- a/README.md +++ b/README.md @@ -284,7 +284,8 @@ To rebuild all incremental html reports after, proceed as follow: rm /path/to/reports/*.css pgbadger -X -I -O /path/to/reports/ --rebuild -it will also update all resource files (JS and CSS). +it will also update all resource files (JS and CSS). Use -E or --explode +if the reports were built using this option. pgBadger also support Heroku PostgreSQL logs using logplex format: @@ -303,6 +304,7 @@ To create a cumulative report over a month use command: this will add a link to the month name into the calendar view in incremental reports to look at report for month 2019 May. +Use -E or --explode if the reports were built using this option. ### DESCRIPTION @@ -641,6 +643,21 @@ option to force pgBadger to write JavaScript and CSS to separate files in the output directory. The resources will then be loaded using script and link tags. +#### Rebuilding reports + +Incremental reports can be rebuilt after a pgbadger report fix or a new +feature to update all HTML reports. To rebuild all reports where a binary +file is still present proceed as follow: + + rm /path/to/reports/*.js + rm /path/to/reports/*.css + pgbadger -X -I -O /path/to/reports/ --rebuild + +it will also update all resource files (JS and CSS). Use -E or --explode +if the reports were built using this option. + +#### Monthly reports + By default pgBadger in incremental mode only compute daily and weekly reports. If you want monthly cumulative reports you will have to use a separate command to specify the report to build. For example to build a report for August 2019: @@ -652,6 +669,13 @@ reports to look at monthly report. The report for a current month can be run every day it is entirely rebuilt each time. The monthly report is not built by default because it could take lot of time following the amount of data. +If reports were built with the per database option ( -E | --explode ) it must +be used too when calling pgbadger to build monthly report: + + pgbadger -E -X --month-report 2919-08 /var/www/pg_reports/ + +This is the same when using the rebuild option ( -R | --rebuild ). + ### BINARY FORMAT Using the binary format it is possible to create custom incremental and diff --git a/doc/pgBadger.pod b/doc/pgBadger.pod index a185f99..e0be453 100644 --- a/doc/pgBadger.pod +++ b/doc/pgBadger.pod @@ -267,7 +267,8 @@ To rebuild all incremental html reports after, proceed as follow: rm /path/to/reports/*.css pgbadger -X -I -O /path/to/reports/ --rebuild -it will also update all resource files (JS and CSS). +it will also update all resource files (JS and CSS). Use -E or --explode +if the reports were built using this option. pgBadger also support Heroku PostgreSQL logs using logplex format: @@ -286,6 +287,7 @@ To create a cumulative report over a month use command: this will add a link to the month name into the calendar view in incremental reports to look at report for month 2019 May. +Use -E or --explode if the reports were built using this option. =head1 DESCRIPTION @@ -625,6 +627,21 @@ option to force pgBadger to write JavaScript and CSS to separate files in the output directory. The resources will then be loaded using script and link tags. +=head2 Rebuilding reports + +Incremental reports can be rebuilt after a pgbadger report fix or a new +feature to update all HTML reports. To rebuild all reports where a binary +file is still present proceed as follow: + + rm /path/to/reports/*.js + rm /path/to/reports/*.css + pgbadger -X -I -O /path/to/reports/ --rebuild + +it will also update all resource files (JS and CSS). Use -E or --explode +if the reports were built using this option. + +=head2 Monthly reports + By default pgBadger in incremental mode only compute daily and weekly reports. If you want monthly cumulative reports you will have to use a separate command to specify the report to build. For example to build a report for August 2019: @@ -636,6 +653,13 @@ reports to look at monthly report. The report for a current month can be run every day it is entirely rebuilt each time. The monthly report is not built by default because it could take lot of time following the amount of data. +If reports were built with the per database option ( -E | --explode ) it must +be used too when calling pgbadger to build monthly report: + + pgbadger -E -X --month-report 2919-08 /var/www/pg_reports/ + +This is the same when using the rebuild option ( -R | --rebuild ). + =head1 BINARY FORMAT Using the binary format it is possible to create custom incremental and diff --git a/pgbadger b/pgbadger index eeaaaf2..08b7c96 100755 --- a/pgbadger +++ b/pgbadger @@ -2141,7 +2141,8 @@ To rebuild all incremental html reports after, proceed as follow: rm /path/to/reports/*.css pgbadger -X -I -O /path/to/reports/ --rebuild -it will also update all resource files (JS and CSS). +it will also update all resource files (JS and CSS). Use -E or --explode +if the reports were built using this option. pgBadger also support Heroku PostgreSQL logs using logplex format: @@ -2160,6 +2161,7 @@ To create a cumulative report over a month use command: this will add a link to the month name into the calendar view in incremental reports to look at report for month 2019 May. +Use -E or --explode if the reports were built using this option. }; # Note that usage must be terminated by an extra newline