]> granicus.if.org Git - pgbadger/commitdiff
Add minimal documentation about JSON output format.
authorDarold Gilles <gilles@darold.net>
Fri, 11 Jul 2014 14:13:15 +0000 (16:13 +0200)
committerDarold Gilles <gilles@darold.net>
Fri, 11 Jul 2014 14:13:15 +0000 (16:13 +0200)
README
doc/pgBadger.pod
pgbadger

diff --git a/README b/README
index be482b05185bd527f32b665552ce4feadbe6e6c7..365c3e79f1403f22c7841e7e573ef180d298e9ab 100644 (file)
--- a/README
+++ b/README
@@ -42,9 +42,8 @@ SYNOPSIS
         -n | --nohighlight     : disable SQL code highlighting.
         -N | --appname name    : only report on entries for given application name
         -o | --outfile filename: define the filename for the output. Default depends
-                                 on the output format: out.html, out.txt or out.tsung.
-                                 With Perl module JSON::XS installed, you can save
-                                 output in JSON format too.
+                                 on the output format: out.html, out.txt, out.bin,
+                                 out.json or out.tsung.
                                  To dump output to stdout use - as filename.
         -O | --outdir path     : directory where out file must be saved.
         -p | --prefix string   : the value of your custom log_line_prefix as
@@ -66,7 +65,8 @@ SYNOPSIS
         -v | --verbose         : enable verbose or debug mode. Disabled by default.
         -V | --version         : show pgBadger version and exit.
         -w | --watch-mode      : only report errors just like logwatch could do.
-        -x | --extension       : output format. Values: text, html or tsung. Default: html
+        -x | --extension       : output format. Values: text, html, binary, json or
+                                 tsung. Default: html
         -z | --zcat exec_path  : set the full path to the zcat program. Use it if
                                  zcat or bzcat or unzip is not in your path.
         --pie-limit num        : pie data lower than num% will show a sum instead.
@@ -262,8 +262,13 @@ REQUIREMENT
     This module is optional, if you don't have PostgreSQL log in the CSV
     format you don't need to install it.
 
-    Also if you planned to save output in JSON format you need install
-    Perl module JSON::XS first, this module is optional.
+    If you want to export statistics as JSON file you need an additional
+    Perl module:
+
+            JSON::XS - JSON serialising/deserialising, done correctly and fast
+
+    This module is optional, if you don't select the json output format you
+    don't need to install it.
 
     Compressed log file format is autodetected from the file exension. If
     pgBadger find a gz extension it will use the zcat utility, with a bz2
@@ -288,8 +293,8 @@ REQUIREMENT
 INSTALLATION
     Download the tarball from github and unpack the archive as follow:
 
-            tar xzf pgbadger-4.x.tar.gz
-            cd pgbadger-4.x/
+            tar xzf pgbadger-5.x.tar.gz
+            cd pgbadger-5.x/
             perl Makefile.PL
             make && sudo make install
 
@@ -486,6 +491,11 @@ BINARY FORMAT
 
     Adjust the commands following your needs.
 
+JSON FORMAT
+    JSON format is good for sharing data with other languages, which makes
+    it easy to integrate pgBadger's result into other monitoring tools like
+    Cacti or Graphite.
+
 AUTHORS
     pgBadger is an original work from Gilles Darold.
 
index 2ff9fa1fedb4f1e9c309e04c78fb9b44aec4c504..3077b14dbe0b3df3af261b60268de2e2bc0fbf2f 100644 (file)
@@ -44,7 +44,8 @@ Options:
     -n | --nohighlight     : disable SQL code highlighting.
     -N | --appname name    : only report on entries for given application name
     -o | --outfile filename: define the filename for the output. Default depends
-                             on the output format: out.html, out.txt or out.tsung.
+                             on the output format: out.html, out.txt, out.bin,
+                             out.json or out.tsung.
                              To dump output to stdout use - as filename.
     -O | --outdir path     : directory where out file must be saved.
     -p | --prefix string   : the value of your custom log_line_prefix as
@@ -66,7 +67,8 @@ Options:
     -v | --verbose         : enable verbose or debug mode. Disabled by default.
     -V | --version         : show pgBadger version and exit.
     -w | --watch-mode      : only report errors just like logwatch could do.
-    -x | --extension       : output format. Values: text, html or tsung. Default: html
+    -x | --extension       : output format. Values: text, html, binary, json or
+                             tsung. Default: html
     -z | --zcat exec_path  : set the full path to the zcat program. Use it if
                              zcat or bzcat or unzip is not in your path.
     --pie-limit num        : pie data lower than num% will show a sum instead.
@@ -244,6 +246,13 @@ If you planned to parse PostgreSQL CSV log files you might need some Perl Module
 This module is optional, if you don't have PostgreSQL log in the CSV format you don't
 need to install it.
 
+If you want to export statistics as JSON file you need an additional Perl module:
+
+       JSON::XS - JSON serialising/deserialising, done correctly and fast
+
+This module is optional, if you don't select the json output format you don't
+need to install it.
+
 Compressed log file format is autodetected from the file exension. If pgBadger find
 a gz extension it will use the zcat utility, with a bz2 extension it will use bzcat
 and if the file extension is zip or xz then the unzip or xz utilities will be used.
@@ -266,8 +275,8 @@ well as under Windows platform.
 
 Download the tarball from github and unpack the archive as follow:
 
-       tar xzf pgbadger-4.x.tar.gz
-       cd pgbadger-4.x/
+       tar xzf pgbadger-5.x.tar.gz
+       cd pgbadger-5.x/
        perl Makefile.PL
        make && sudo make install
 
@@ -458,6 +467,12 @@ is generated, just do the following:
 
 Adjust the commands following your needs.
 
+=head1 JSON FORMAT
+
+JSON format is good for sharing data with other languages, which makes it
+easy to integrate pgBadger's result into other monitoring tools like Cacti
+or Graphite.
+
 =head1 AUTHORS
 
 pgBadger is an original work from Gilles Darold.
index c327b38d6d52dc65231ec3d7b29888e8a4e49c3b..433eaf1566d1271f3ab20b8f975aaf0939350158 100755 (executable)
--- a/pgbadger
+++ b/pgbadger
@@ -1332,7 +1332,8 @@ Options:
     -n | --nohighlight     : disable SQL code highlighting.
     -N | --appname name    : only report on entries for given application name
     -o | --outfile filename: define the filename for the output. Default depends
-                             on the output format: out.html, out.txt or out.tsung.
+                             on the output format: out.html, out.txt, out.bin,
+                             out.json or out.tsung.
                              With module JSON::XS installed, you can output file
                              in JSON format either.
                              To dump output to stdout use - as filename.
@@ -1356,7 +1357,8 @@ Options:
     -v | --verbose         : enable verbose or debug mode. Disabled by default.
     -V | --version         : show pgBadger version and exit.
     -w | --watch-mode      : only report errors just like logwatch could do.
-    -x | --extension       : output format. Values: text, html or tsung. Default: html
+    -x | --extension       : output format. Values: text, html, bin, json or
+                             tsung. Default: html
     -z | --zcat exec_path  : set the full path to the zcat program. Use it if
                              zcat or bzcat or unzip is not in your path.
     --pie-limit num        : pie data lower than num% will show a sum instead.