]> granicus.if.org Git - pgbadger/commitdiff
Add information about URI notation to parse remote log files.
authorGilles Darold <gilles.darold@dalibo.com>
Sun, 23 Dec 2018 22:07:50 +0000 (23:07 +0100)
committerGilles Darold <gilles.darold@dalibo.com>
Sun, 23 Dec 2018 22:07:50 +0000 (23:07 +0100)
README
doc/pgBadger.pod
pgbadger

diff --git a/README b/README
index 2199e64965fdca62f0e6ecf78f790eb2af212f3e..f8e9f4a4381f07b34edcf0692b0164b85eee5535 100644 (file)
--- a/README
+++ b/README
@@ -171,6 +171,12 @@ SYNOPSIS
                                      -o ConnectTimeout=$ssh_timeout
                                      -o PreferredAuthentications=hostbased,publickey
 
+    Log file to parse can also be specified using an URI, supported protocol
+    are http[s] [s]ftp. The curl command will be used to download the file
+    and the file will be parsed during download. The ssh protocol is also
+    supported and will use the ssh command like with the remote host use.
+    See examples bellow.
+
     Examples:
 
             pgbadger /var/log/postgresql.log
@@ -187,6 +193,17 @@ SYNOPSIS
             # Use my 8 CPUs to parse my 10GB file faster, much faster
             perl pgbadger -j 8 /pglog/postgresql-9.1-main.log
 
+    Use URI notation for remote log file:
+
+            perl pgbadger http://172.12.19.1//var/log/postgresql/postgresql-9.1-main.log
+            perl pgbadger ftp://username.12.19.14/postgresql-9.1-main.log
+            perl pgbadger ssh://username.12.19.14//var/log/postgresql/postgresql-9.1-main.log.2.gz
+
+    You can use together a local PostgreSQL log and a remote pgbouncer log
+    file to parse:
+
+            perl pgbadger /var/log/postgresql/postgresql-9.1-main.log ssh://username.12.19.14/pgbouncer.log
+
     Generate Tsung sessions XML file with select queries only:
 
         perl pgbadger -S -o sessions.tsung --prefix '%t [%p]: user=%u,db=%d ' /pglog/postgresql-9.1.log
@@ -376,11 +393,11 @@ REQUIREMENT
     don't need to install it. You can install it on a Debian like system
     using:
 
-        sudo apt-get install libjson-xs-perl
+            sudo apt-get install libjson-xs-perl
 
     and in RPM like system using:
 
-        sudo yum install perl-JSON-XS
+            sudo yum install perl-JSON-XS
 
     Compressed log file format is autodetected from the file extension. If
     pgBadger find a gz extension it will use the zcat utility, with a bz2
index 4aae2c2b3340c11c294b41e5e6c42d49dcf6c1c5..5ff375ade26a0903afbf0677f1f25356a3308935 100644 (file)
@@ -173,6 +173,11 @@ some additional options to fully control the ssh connection.
                                  -o ConnectTimeout=$ssh_timeout
                                  -o PreferredAuthentications=hostbased,publickey
 
+Log file to parse can also be specified using an URI, supported protocol are http[s]
+[s]ftp. The curl command will be used to download the file and the file will be parsed
+during download. The ssh protocol is also supported and will use the ssh command like
+with the remote host use. See examples bellow.
+
 Examples:
 
        pgbadger /var/log/postgresql.log
@@ -189,6 +194,15 @@ Examples:
        # Use my 8 CPUs to parse my 10GB file faster, much faster
        perl pgbadger -j 8 /pglog/postgresql-9.1-main.log
 
+Use URI notation for remote log file:
+
+       perl pgbadger http://172.12.19.1//var/log/postgresql/postgresql-9.1-main.log
+       perl pgbadger ftp://username.12.19.14/postgresql-9.1-main.log
+       perl pgbadger ssh://username.12.19.14//var/log/postgresql/postgresql-9.1-main.log.2.gz
+
+You can use together a local PostgreSQL log and a remote pgbouncer log file to parse:
+
+       perl pgbadger /var/log/postgresql/postgresql-9.1-main.log ssh://username.12.19.14/pgbouncer.log
 
 Generate Tsung sessions XML file with select queries only:
 
@@ -243,6 +257,7 @@ To rebuild all incremental html reports after, proceed as follow:
 
 it will also update all resource files (JS and CSS).
 
+
 =head1 DESCRIPTION
 
 pgBadger is a PostgreSQL log analyzer built for speed with fully reports
@@ -371,11 +386,11 @@ If you want to export statistics as JSON file you need an additional Perl module
 This module is optional, if you don't select the json output format you don't
 need to install it. You can install it on a Debian like system using:
 
-    sudo apt-get install libjson-xs-perl
+       sudo apt-get install libjson-xs-perl
 
 and in RPM like system using:
 
-    sudo yum install perl-JSON-XS
+       sudo yum install perl-JSON-XS
 
 Compressed log file format is autodetected from the file extension. If pgBadger find
 a gz extension it will use the zcat utility, with a bz2 extension it will use bzcat
index 154d0a21aabbc49cbe1efded3780fb439a196396..11900b134fba0f61649d4882b84a2a549fd81083 100755 (executable)
--- a/pgbadger
+++ b/pgbadger
@@ -1853,6 +1853,11 @@ some additional options to fully control the ssh connection.
                                  -o ConnectTimeout=\$ssh_timeout
                                  -o PreferredAuthentications=hostbased,publickey
 
+Log file to parse can also be specified using an URI, supported protocol are http[s]
+[s]ftp. The curl command will be used to download the file and the file will be parsed
+during download. The ssh protocol is also supported and will use the ssh command like
+with the remote host use. See examples bellow.
+
 Examples:
 
        pgbadger /var/log/postgresql.log
@@ -1869,6 +1874,15 @@ Examples:
        # Use my 8 CPUs to parse my 10GB file faster, much faster
        perl pgbadger -j 8 /pglog/postgresql-9.1-main.log
 
+Use URI notation for remote log file:
+
+       perl pgbadger http://172.12.19.1//var/log/postgresql/postgresql-9.1-main.log
+       perl pgbadger ftp://username@172.12.19.14/postgresql-9.1-main.log
+       perl pgbadger ssh://username@172.12.19.14//var/log/postgresql/postgresql-9.1-main.log.2.gz
+
+You can use together a local PostgreSQL log and a remote pgbouncer log file to parse:
+
+       perl pgbadger /var/log/postgresql/postgresql-9.1-main.log ssh://username@172.12.19.14/pgbouncer.log
 
 Generate Tsung sessions XML file with select queries only: