]> granicus.if.org Git - pgbadger/commitdiff
Improve documentation about rebuilding and monthmy report.
authorGilles Darold <gilles@darold.net>
Mon, 16 Sep 2019 13:22:39 +0000 (15:22 +0200)
committerGilles Darold <gilles@darold.net>
Mon, 16 Sep 2019 13:22:39 +0000 (15:22 +0200)
Makefile.PL
README
README.md
doc/pgBadger.pod
pgbadger

index 38c1e3409812b66485e84fe4c54616297443ac12..51d5bbfdc3bc83f90c02921cf8683db2c88f4f63 100644 (file)
@@ -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 50c5b779ae7cb0786276e9d7b560d51293862798..e5b553c801e0256550ae9d3062a22cb4299c2fda 100644 (file)
--- 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
index 391e0e79acb031934da7dd362eb84c389210ec20..15afc4782cdfe8e23ee768e7f2169d6bca59a59d 100644 (file)
--- 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
index a185f9998e7dda553404fed58a88506d8f334a3e..e0be453c1ceb3b9f7e27799bc33c25cdef79c3bf 100644 (file)
@@ -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
index eeaaaf2f30eb9c2f261208a1bdc8c1fa0f43994f..08b7c962fa8238be919d49e4d26539570c6f272c 100755 (executable)
--- 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