]> granicus.if.org Git - pgbadger/commitdiff
Add support to pgbouncer 1.8 Stats log format. Thanks to Levente Birta for the report.
authorGilles Darold <gilles.darold@dalibo.com>
Thu, 15 Nov 2018 17:23:58 +0000 (18:23 +0100)
committerGilles Darold <gilles.darold@dalibo.com>
Thu, 15 Nov 2018 17:23:58 +0000 (18:23 +0100)
pgbadger

index 49817b6cbebb255d3f9ad2f9f66ea21d6a0885fe..18bbbf4ef5713ae422df3d20edefa00774b7cd16 100755 (executable)
--- a/pgbadger
+++ b/pgbadger
@@ -2660,6 +2660,14 @@ sub process_file
                                                $prefix_vars{'t_inbytes/s'} = $2;
                                                $prefix_vars{'t_outbytes/s'} = $3;
                                                $prefix_vars{'t_avgduration'} = $4;
+                                       } elsif ($prefix_vars{'t_query'} =~ /[Ss]tats: (\d+) xacts\/s, (\d+) queries\/s, in (\d+) B\/s, out (\d+) B\/s, xact (\d+) us, query (\d+) us/) {
+                                               $prefix_vars{'t_loglevel'} = 'STATS';
+                                               $prefix_vars{'t_xact/s'} = $1;
+                                               $prefix_vars{'t_req/s'} = $2;
+                                               $prefix_vars{'t_inbytes/s'} = $3;
+                                               $prefix_vars{'t_outbytes/s'} = $4;
+                                               $prefix_vars{'t_avgtxduration'} = $5;
+                                               $prefix_vars{'t_avgduration'} = $6;
                                        }
                                }
 
@@ -3058,6 +3066,7 @@ sub process_file
 
                                        # Jump to the last line parsed if required
                                        next if (!&check_incremental_position($fmt, $prefix_vars{'t_timestamp'}, $line));
+
                                        # We have reach previous incremental position (or we not in increment mode)
                                        $goon = 1;