From dd5c82ac1db8b94c2c528ae2e148d377acdb6646 Mon Sep 17 00:00:00 2001 From: Jaime Soriano Pastor Date: Wed, 17 Mar 2021 16:42:46 +0100 Subject: [PATCH 1/7] Add examples with log_statment: all --- .../test/postgresql-13-log-statement-all.log | 235 ++ ...sql-13-log-statement-all.log-expected.json | 2602 ++++++++++++++++ .../test/postgresql-9-log-statement-all.log | 230 ++ ...esql-9-log-statement-all.log-expected.json | 2608 +++++++++++++++++ 4 files changed, 5675 insertions(+) create mode 100644 filebeat/module/postgresql/log/test/postgresql-13-log-statement-all.log create mode 100644 filebeat/module/postgresql/log/test/postgresql-13-log-statement-all.log-expected.json create mode 100644 filebeat/module/postgresql/log/test/postgresql-9-log-statement-all.log create mode 100644 filebeat/module/postgresql/log/test/postgresql-9-log-statement-all.log-expected.json diff --git a/filebeat/module/postgresql/log/test/postgresql-13-log-statement-all.log b/filebeat/module/postgresql/log/test/postgresql-13-log-statement-all.log new file mode 100644 index 00000000000..2755525218c --- /dev/null +++ b/filebeat/module/postgresql/log/test/postgresql-13-log-statement-all.log @@ -0,0 +1,235 @@ +2021-03-17 15:18:00.201 UTC [149] postgres@postgres LOG: statement: CREATE DATABASE accounts; +2021-03-17 15:18:00.631 UTC [149] postgres@postgres LOG: duration: 430.394 ms +2021-03-17 15:18:02.732 UTC [151] postgres@accounts LOG: statement: drop table if exists pgbench_accounts, pgbench_branches, pgbench_history, pgbench_tellers +2021-03-17 15:18:02.732 UTC [151] postgres@accounts LOG: duration: 0.559 ms +2021-03-17 15:18:02.732 UTC [151] postgres@accounts LOG: statement: create table pgbench_history(tid int,bid int,aid int,delta int,mtime timestamp,filler char(22)) +2021-03-17 15:18:02.737 UTC [151] postgres@accounts LOG: duration: 4.812 ms +2021-03-17 15:18:02.738 UTC [151] postgres@accounts LOG: statement: create table pgbench_tellers(tid int not null,bid int,tbalance int,filler char(84)) with (fillfactor=100) +2021-03-17 15:18:02.740 UTC [151] postgres@accounts LOG: duration: 1.900 ms +2021-03-17 15:18:02.740 UTC [151] postgres@accounts LOG: statement: create table pgbench_accounts(aid int not null,bid int,abalance int,filler char(84)) with (fillfactor=100) +2021-03-17 15:18:02.741 UTC [151] postgres@accounts LOG: duration: 1.444 ms +2021-03-17 15:18:02.741 UTC [151] postgres@accounts LOG: statement: create table pgbench_branches(bid int not null,bbalance int,filler char(88)) with (fillfactor=100) +2021-03-17 15:18:02.743 UTC [151] postgres@accounts LOG: duration: 1.336 ms +2021-03-17 15:18:02.743 UTC [151] postgres@accounts LOG: statement: begin +2021-03-17 15:18:02.743 UTC [151] postgres@accounts LOG: duration: 0.068 ms +2021-03-17 15:18:02.743 UTC [151] postgres@accounts LOG: statement: truncate table pgbench_accounts, pgbench_branches, pgbench_history, pgbench_tellers +2021-03-17 15:18:02.744 UTC [151] postgres@accounts LOG: duration: 0.656 ms +2021-03-17 15:18:02.744 UTC [151] postgres@accounts LOG: statement: insert into pgbench_branches(bid,bbalance) values(1,0) +2021-03-17 15:18:02.744 UTC [151] postgres@accounts LOG: duration: 0.538 ms +2021-03-17 15:18:02.744 UTC [151] postgres@accounts LOG: statement: insert into pgbench_tellers(tid,bid,tbalance) values (1,1,0) +2021-03-17 15:18:02.745 UTC [151] postgres@accounts LOG: duration: 0.304 ms +2021-03-17 15:18:02.745 UTC [151] postgres@accounts LOG: statement: insert into pgbench_tellers(tid,bid,tbalance) values (2,1,0) +2021-03-17 15:18:02.746 UTC [151] postgres@accounts LOG: duration: 1.510 ms +2021-03-17 15:18:02.746 UTC [151] postgres@accounts LOG: statement: insert into pgbench_tellers(tid,bid,tbalance) values (3,1,0) +2021-03-17 15:18:02.746 UTC [151] postgres@accounts LOG: duration: 0.094 ms +2021-03-17 15:18:02.746 UTC [151] postgres@accounts LOG: statement: insert into pgbench_tellers(tid,bid,tbalance) values (4,1,0) +2021-03-17 15:18:02.746 UTC [151] postgres@accounts LOG: duration: 0.056 ms +2021-03-17 15:18:02.746 UTC [151] postgres@accounts LOG: statement: insert into pgbench_tellers(tid,bid,tbalance) values (5,1,0) +2021-03-17 15:18:02.746 UTC [151] postgres@accounts LOG: duration: 0.052 ms +2021-03-17 15:18:02.747 UTC [151] postgres@accounts LOG: statement: insert into pgbench_tellers(tid,bid,tbalance) values (6,1,0) +2021-03-17 15:18:02.747 UTC [151] postgres@accounts LOG: duration: 0.051 ms +2021-03-17 15:18:02.747 UTC [151] postgres@accounts LOG: statement: insert into pgbench_tellers(tid,bid,tbalance) values (7,1,0) +2021-03-17 15:18:02.747 UTC [151] postgres@accounts LOG: duration: 0.051 ms +2021-03-17 15:18:02.747 UTC [151] postgres@accounts LOG: statement: insert into pgbench_tellers(tid,bid,tbalance) values (8,1,0) +2021-03-17 15:18:02.747 UTC [151] postgres@accounts LOG: duration: 0.050 ms +2021-03-17 15:18:02.747 UTC [151] postgres@accounts LOG: statement: insert into pgbench_tellers(tid,bid,tbalance) values (9,1,0) +2021-03-17 15:18:02.747 UTC [151] postgres@accounts LOG: duration: 0.052 ms +2021-03-17 15:18:02.747 UTC [151] postgres@accounts LOG: statement: insert into pgbench_tellers(tid,bid,tbalance) values (10,1,0) +2021-03-17 15:18:02.747 UTC [151] postgres@accounts LOG: duration: 0.052 ms +2021-03-17 15:18:02.747 UTC [151] postgres@accounts LOG: statement: copy pgbench_accounts from stdin +2021-03-17 15:18:02.987 UTC [151] postgres@accounts LOG: duration: 239.763 ms +2021-03-17 15:18:02.987 UTC [151] postgres@accounts LOG: statement: commit +2021-03-17 15:18:03.054 UTC [151] postgres@accounts LOG: duration: 67.302 ms +2021-03-17 15:18:03.057 UTC [151] postgres@accounts LOG: statement: vacuum analyze pgbench_branches +2021-03-17 15:18:03.073 UTC [151] postgres@accounts LOG: duration: 15.246 ms +2021-03-17 15:18:03.073 UTC [151] postgres@accounts LOG: statement: vacuum analyze pgbench_tellers +2021-03-17 15:18:03.076 UTC [151] postgres@accounts LOG: duration: 3.531 ms +2021-03-17 15:18:03.077 UTC [151] postgres@accounts LOG: statement: vacuum analyze pgbench_accounts +2021-03-17 15:18:03.157 UTC [151] postgres@accounts LOG: duration: 80.735 ms +2021-03-17 15:18:03.158 UTC [151] postgres@accounts LOG: statement: vacuum analyze pgbench_history +2021-03-17 15:18:03.159 UTC [151] postgres@accounts LOG: duration: 0.893 ms +2021-03-17 15:18:03.159 UTC [151] postgres@accounts LOG: statement: alter table pgbench_branches add primary key (bid) +2021-03-17 15:18:03.165 UTC [151] postgres@accounts LOG: duration: 5.266 ms +2021-03-17 15:18:03.165 UTC [151] postgres@accounts LOG: statement: alter table pgbench_tellers add primary key (tid) +2021-03-17 15:18:03.168 UTC [151] postgres@accounts LOG: duration: 2.807 ms +2021-03-17 15:18:03.168 UTC [151] postgres@accounts LOG: statement: alter table pgbench_accounts add primary key (aid) +2021-03-17 15:18:03.249 UTC [151] postgres@accounts LOG: duration: 81.593 ms +2021-03-17 15:18:04.110 UTC [154] postgres@accounts LOG: statement: drop table if exists pgbench_accounts, pgbench_branches, pgbench_history, pgbench_tellers +2021-03-17 15:18:04.130 UTC [154] postgres@accounts LOG: duration: 20.521 ms +2021-03-17 15:18:04.132 UTC [154] postgres@accounts LOG: statement: create table pgbench_history(tid int,bid int,aid int,delta int,mtime timestamp,filler char(22)) +2021-03-17 15:18:04.143 UTC [154] postgres@accounts LOG: duration: 11.098 ms +2021-03-17 15:18:04.143 UTC [154] postgres@accounts LOG: statement: create table pgbench_tellers(tid int not null,bid int,tbalance int,filler char(84)) with (fillfactor=100) +2021-03-17 15:18:04.152 UTC [154] postgres@accounts LOG: duration: 8.950 ms +2021-03-17 15:18:04.152 UTC [154] postgres@accounts LOG: statement: create table pgbench_accounts(aid int not null,bid int,abalance int,filler char(84)) with (fillfactor=100) +2021-03-17 15:18:04.156 UTC [154] postgres@accounts LOG: duration: 4.302 ms +2021-03-17 15:18:04.156 UTC [154] postgres@accounts LOG: statement: create table pgbench_branches(bid int not null,bbalance int,filler char(88)) with (fillfactor=100) +2021-03-17 15:18:04.163 UTC [154] postgres@accounts LOG: duration: 6.999 ms +2021-03-17 15:18:04.164 UTC [154] postgres@accounts LOG: statement: begin +2021-03-17 15:18:04.164 UTC [154] postgres@accounts LOG: duration: 0.075 ms +2021-03-17 15:18:04.164 UTC [154] postgres@accounts LOG: statement: truncate table pgbench_accounts, pgbench_branches, pgbench_history, pgbench_tellers +2021-03-17 15:18:04.164 UTC [154] postgres@accounts LOG: duration: 0.676 ms +2021-03-17 15:18:04.164 UTC [154] postgres@accounts LOG: statement: insert into pgbench_branches(bid,bbalance) values(1,0) +2021-03-17 15:18:04.165 UTC [154] postgres@accounts LOG: duration: 0.247 ms +2021-03-17 15:18:04.165 UTC [154] postgres@accounts LOG: statement: insert into pgbench_tellers(tid,bid,tbalance) values (1,1,0) +2021-03-17 15:18:04.165 UTC [154] postgres@accounts LOG: duration: 0.164 ms +2021-03-17 15:18:04.165 UTC [154] postgres@accounts LOG: statement: insert into pgbench_tellers(tid,bid,tbalance) values (2,1,0) +2021-03-17 15:18:04.165 UTC [154] postgres@accounts LOG: duration: 0.080 ms +2021-03-17 15:18:04.165 UTC [154] postgres@accounts LOG: statement: insert into pgbench_tellers(tid,bid,tbalance) values (3,1,0) +2021-03-17 15:18:04.165 UTC [154] postgres@accounts LOG: duration: 0.077 ms +2021-03-17 15:18:04.165 UTC [154] postgres@accounts LOG: statement: insert into pgbench_tellers(tid,bid,tbalance) values (4,1,0) +2021-03-17 15:18:04.165 UTC [154] postgres@accounts LOG: duration: 0.075 ms +2021-03-17 15:18:04.165 UTC [154] postgres@accounts LOG: statement: insert into pgbench_tellers(tid,bid,tbalance) values (5,1,0) +2021-03-17 15:18:04.165 UTC [154] postgres@accounts LOG: duration: 0.074 ms +2021-03-17 15:18:04.165 UTC [154] postgres@accounts LOG: statement: insert into pgbench_tellers(tid,bid,tbalance) values (6,1,0) +2021-03-17 15:18:04.166 UTC [154] postgres@accounts LOG: duration: 0.071 ms +2021-03-17 15:18:04.166 UTC [154] postgres@accounts LOG: statement: insert into pgbench_tellers(tid,bid,tbalance) values (7,1,0) +2021-03-17 15:18:04.166 UTC [154] postgres@accounts LOG: duration: 0.071 ms +2021-03-17 15:18:04.166 UTC [154] postgres@accounts LOG: statement: insert into pgbench_tellers(tid,bid,tbalance) values (8,1,0) +2021-03-17 15:18:04.166 UTC [154] postgres@accounts LOG: duration: 0.069 ms +2021-03-17 15:18:04.166 UTC [154] postgres@accounts LOG: statement: insert into pgbench_tellers(tid,bid,tbalance) values (9,1,0) +2021-03-17 15:18:04.166 UTC [154] postgres@accounts LOG: duration: 0.071 ms +2021-03-17 15:18:04.166 UTC [154] postgres@accounts LOG: statement: insert into pgbench_tellers(tid,bid,tbalance) values (10,1,0) +2021-03-17 15:18:04.166 UTC [154] postgres@accounts LOG: duration: 0.072 ms +2021-03-17 15:18:04.166 UTC [154] postgres@accounts LOG: statement: copy pgbench_accounts from stdin +2021-03-17 15:18:04.355 UTC [154] postgres@accounts LOG: duration: 188.620 ms +2021-03-17 15:18:04.355 UTC [154] postgres@accounts LOG: statement: commit +2021-03-17 15:18:04.366 UTC [154] postgres@accounts LOG: duration: 11.135 ms +2021-03-17 15:18:04.366 UTC [154] postgres@accounts LOG: statement: vacuum analyze pgbench_branches +2021-03-17 15:18:04.383 UTC [154] postgres@accounts LOG: duration: 16.594 ms +2021-03-17 15:18:04.383 UTC [154] postgres@accounts LOG: statement: vacuum analyze pgbench_tellers +2021-03-17 15:18:04.386 UTC [154] postgres@accounts LOG: duration: 3.410 ms +2021-03-17 15:18:04.386 UTC [154] postgres@accounts LOG: statement: vacuum analyze pgbench_accounts +2021-03-17 15:18:04.466 UTC [154] postgres@accounts LOG: duration: 79.842 ms +2021-03-17 15:18:04.466 UTC [154] postgres@accounts LOG: statement: vacuum analyze pgbench_history +2021-03-17 15:18:04.467 UTC [154] postgres@accounts LOG: duration: 0.907 ms +2021-03-17 15:18:04.468 UTC [154] postgres@accounts LOG: statement: alter table pgbench_branches add primary key (bid) +2021-03-17 15:18:04.471 UTC [154] postgres@accounts LOG: duration: 3.192 ms +2021-03-17 15:18:04.471 UTC [154] postgres@accounts LOG: statement: alter table pgbench_tellers add primary key (tid) +2021-03-17 15:18:04.473 UTC [154] postgres@accounts LOG: duration: 2.332 ms +2021-03-17 15:18:04.473 UTC [154] postgres@accounts LOG: statement: alter table pgbench_accounts add primary key (aid) +2021-03-17 15:18:04.545 UTC [154] postgres@accounts LOG: duration: 71.641 ms +2021-03-17 15:18:05.633 UTC [170] postgres@postgres LOG: statement: SELECT d.datname as "Name", + pg_catalog.pg_get_userbyid(d.datdba) as "Owner", + pg_catalog.pg_encoding_to_char(d.encoding) as "Encoding", + d.datcollate as "Collate", + d.datctype as "Ctype", + pg_catalog.array_to_string(d.datacl, E'\n') AS "Access privileges" + FROM pg_catalog.pg_database d + ORDER BY 1; +2021-03-17 15:18:05.634 UTC [170] postgres@postgres LOG: duration: 1.095 ms +2021-03-17 15:18:15.868 UTC [185] postgres@postgres LOG: statement: SELECT d.datname as "Name", + pg_catalog.pg_get_userbyid(d.datdba) as "Owner", + pg_catalog.pg_encoding_to_char(d.encoding) as "Encoding", + d.datcollate as "Collate", + d.datctype as "Ctype", + pg_catalog.array_to_string(d.datacl, E'\n') AS "Access privileges" + FROM pg_catalog.pg_database d + ORDER BY 1; +2021-03-17 15:18:15.869 UTC [185] postgres@postgres LOG: duration: 1.125 ms +2021-03-17 15:18:18.861 UTC [187] postgres@accounts LOG: statement: select count(*) from pgbench_branches +2021-03-17 15:18:18.863 UTC [187] postgres@accounts LOG: duration: 1.694 ms +2021-03-17 15:18:18.863 UTC [187] postgres@accounts LOG: statement: select o.n, p.partstrat, pg_catalog.count(i.inhparent) from pg_catalog.pg_class as c join pg_catalog.pg_namespace as n on (n.oid = c.relnamespace) cross join lateral (select pg_catalog.array_position(pg_catalog.current_schemas(true), n.nspname)) as o(n) left join pg_catalog.pg_partitioned_table as p on (p.partrelid = c.oid) left join pg_catalog.pg_inherits as i on (c.oid = i.inhparent) where c.relname = 'pgbench_accounts' and o.n is not null group by 1, 2 order by 1 asc limit 1 +2021-03-17 15:18:18.867 UTC [187] postgres@accounts LOG: duration: 4.281 ms +2021-03-17 15:18:18.868 UTC [187] postgres@accounts LOG: statement: vacuum pgbench_branches +2021-03-17 15:18:18.882 UTC [187] postgres@accounts LOG: duration: 13.791 ms +2021-03-17 15:18:18.883 UTC [187] postgres@accounts LOG: statement: vacuum pgbench_tellers +2021-03-17 15:18:18.884 UTC [187] postgres@accounts LOG: duration: 1.842 ms +2021-03-17 15:18:18.886 UTC [187] postgres@accounts LOG: statement: truncate pgbench_history +2021-03-17 15:18:18.897 UTC [187] postgres@accounts LOG: duration: 11.270 ms +2021-03-17 15:18:19.012 UTC [188] postgres@accounts LOG: statement: BEGIN; +2021-03-17 15:18:19.012 UTC [188] postgres@accounts LOG: duration: 5.739 ms +2021-03-17 15:18:19.012 UTC [188] postgres@accounts LOG: statement: UPDATE pgbench_accounts SET abalance = abalance + 1113 WHERE aid = 92718; +2021-03-17 15:18:19.016 UTC [188] postgres@accounts LOG: duration: 3.784 ms +2021-03-17 15:18:19.021 UTC [188] postgres@accounts LOG: statement: SELECT abalance FROM pgbench_accounts WHERE aid = 92718; +2021-03-17 15:18:19.021 UTC [188] postgres@accounts LOG: duration: 0.372 ms +2021-03-17 15:18:19.021 UTC [188] postgres@accounts LOG: statement: UPDATE pgbench_tellers SET tbalance = tbalance + 1113 WHERE tid = 2; +2021-03-17 15:18:19.022 UTC [188] postgres@accounts LOG: duration: 0.902 ms +2021-03-17 15:18:19.022 UTC [188] postgres@accounts LOG: statement: UPDATE pgbench_branches SET bbalance = bbalance + 1113 WHERE bid = 1; +2021-03-17 15:18:19.023 UTC [188] postgres@accounts LOG: duration: 0.407 ms +2021-03-17 15:18:19.023 UTC [188] postgres@accounts LOG: statement: INSERT INTO pgbench_history (tid, bid, aid, delta, mtime) VALUES (2, 1, 92718, 1113, CURRENT_TIMESTAMP); +2021-03-17 15:18:19.023 UTC [188] postgres@accounts LOG: duration: 0.384 ms +2021-03-17 15:18:19.023 UTC [188] postgres@accounts LOG: statement: END; +2021-03-17 15:18:19.025 UTC [188] postgres@accounts LOG: duration: 1.814 ms +2021-03-17 15:18:19.600 UTC [189] postgres@accounts LOG: statement: BEGIN; +2021-03-17 15:18:19.600 UTC [189] postgres@accounts LOG: duration: 0.267 ms +2021-03-17 15:18:19.600 UTC [189] postgres@accounts LOG: statement: UPDATE pgbench_accounts SET abalance = abalance + 4043 WHERE aid = 81209; +2021-03-17 15:18:19.602 UTC [189] postgres@accounts LOG: duration: 2.114 ms +2021-03-17 15:18:19.602 UTC [189] postgres@accounts LOG: statement: SELECT abalance FROM pgbench_accounts WHERE aid = 81209; +2021-03-17 15:18:19.603 UTC [189] postgres@accounts LOG: duration: 0.261 ms +2021-03-17 15:18:19.603 UTC [189] postgres@accounts LOG: statement: UPDATE pgbench_tellers SET tbalance = tbalance + 4043 WHERE tid = 7; +2021-03-17 15:18:19.603 UTC [189] postgres@accounts LOG: duration: 0.728 ms +2021-03-17 15:18:19.604 UTC [189] postgres@accounts LOG: statement: UPDATE pgbench_branches SET bbalance = bbalance + 4043 WHERE bid = 1; +2021-03-17 15:18:19.604 UTC [189] postgres@accounts LOG: duration: 0.699 ms +2021-03-17 15:18:19.605 UTC [189] postgres@accounts LOG: statement: INSERT INTO pgbench_history (tid, bid, aid, delta, mtime) VALUES (7, 1, 81209, 4043, CURRENT_TIMESTAMP); +2021-03-17 15:18:19.605 UTC [189] postgres@accounts LOG: duration: 0.518 ms +2021-03-17 15:18:19.605 UTC [189] postgres@accounts LOG: statement: END; +2021-03-17 15:18:19.610 UTC [189] postgres@accounts LOG: duration: 4.495 ms +2021-03-17 15:18:20.137 UTC [190] postgres@accounts LOG: statement: BEGIN; +2021-03-17 15:18:20.137 UTC [190] postgres@accounts LOG: duration: 0.141 ms +2021-03-17 15:18:20.137 UTC [190] postgres@accounts LOG: statement: UPDATE pgbench_accounts SET abalance = abalance + 1240 WHERE aid = 12035; +2021-03-17 15:18:20.138 UTC [190] postgres@accounts LOG: duration: 0.953 ms +2021-03-17 15:18:20.138 UTC [190] postgres@accounts LOG: statement: SELECT abalance FROM pgbench_accounts WHERE aid = 12035; +2021-03-17 15:18:20.138 UTC [190] postgres@accounts LOG: duration: 0.120 ms +2021-03-17 15:18:20.138 UTC [190] postgres@accounts LOG: statement: UPDATE pgbench_tellers SET tbalance = tbalance + 1240 WHERE tid = 10; +2021-03-17 15:18:20.138 UTC [190] postgres@accounts LOG: duration: 0.256 ms +2021-03-17 15:18:20.139 UTC [190] postgres@accounts LOG: statement: UPDATE pgbench_branches SET bbalance = bbalance + 1240 WHERE bid = 1; +2021-03-17 15:18:20.139 UTC [190] postgres@accounts LOG: duration: 0.214 ms +2021-03-17 15:18:20.139 UTC [190] postgres@accounts LOG: statement: INSERT INTO pgbench_history (tid, bid, aid, delta, mtime) VALUES (10, 1, 12035, 1240, CURRENT_TIMESTAMP); +2021-03-17 15:18:20.139 UTC [190] postgres@accounts LOG: duration: 0.191 ms +2021-03-17 15:18:20.139 UTC [190] postgres@accounts LOG: statement: END; +2021-03-17 15:18:20.140 UTC [190] postgres@accounts LOG: duration: 0.874 ms +2021-03-17 15:18:21.461 UTC [191] postgres@accounts LOG: statement: BEGIN; +2021-03-17 15:18:21.461 UTC [191] postgres@accounts LOG: duration: 0.282 ms +2021-03-17 15:18:21.461 UTC [191] postgres@accounts LOG: statement: UPDATE pgbench_accounts SET abalance = abalance + -3890 WHERE aid = 82888; +2021-03-17 15:18:21.464 UTC [191] postgres@accounts LOG: duration: 2.364 ms +2021-03-17 15:18:21.464 UTC [191] postgres@accounts LOG: statement: SELECT abalance FROM pgbench_accounts WHERE aid = 82888; +2021-03-17 15:18:21.464 UTC [191] postgres@accounts LOG: duration: 0.339 ms +2021-03-17 15:18:21.464 UTC [191] postgres@accounts LOG: statement: UPDATE pgbench_tellers SET tbalance = tbalance + -3890 WHERE tid = 2; +2021-03-17 15:18:21.465 UTC [191] postgres@accounts LOG: duration: 0.716 ms +2021-03-17 15:18:21.465 UTC [191] postgres@accounts LOG: statement: UPDATE pgbench_branches SET bbalance = bbalance + -3890 WHERE bid = 1; +2021-03-17 15:18:21.466 UTC [191] postgres@accounts LOG: duration: 0.644 ms +2021-03-17 15:18:21.466 UTC [191] postgres@accounts LOG: statement: INSERT INTO pgbench_history (tid, bid, aid, delta, mtime) VALUES (2, 1, 82888, -3890, CURRENT_TIMESTAMP); +2021-03-17 15:18:21.466 UTC [191] postgres@accounts LOG: duration: 0.537 ms +2021-03-17 15:18:21.467 UTC [191] postgres@accounts LOG: statement: END; +2021-03-17 15:18:21.469 UTC [191] postgres@accounts LOG: duration: 2.604 ms +2021-03-17 15:18:21.551 UTC [192] postgres@accounts LOG: statement: BEGIN; +2021-03-17 15:18:21.551 UTC [192] postgres@accounts LOG: duration: 0.676 ms +2021-03-17 15:18:21.552 UTC [192] postgres@accounts LOG: statement: UPDATE pgbench_accounts SET abalance = abalance + 2966 WHERE aid = 21833; +2021-03-17 15:18:21.554 UTC [192] postgres@accounts LOG: duration: 2.755 ms +2021-03-17 15:18:21.555 UTC [192] postgres@accounts LOG: statement: SELECT abalance FROM pgbench_accounts WHERE aid = 21833; +2021-03-17 15:18:21.555 UTC [192] postgres@accounts LOG: duration: 0.329 ms +2021-03-17 15:18:21.555 UTC [192] postgres@accounts LOG: statement: UPDATE pgbench_tellers SET tbalance = tbalance + 2966 WHERE tid = 9; +2021-03-17 15:18:21.556 UTC [192] postgres@accounts LOG: duration: 0.630 ms +2021-03-17 15:18:21.556 UTC [192] postgres@accounts LOG: statement: UPDATE pgbench_branches SET bbalance = bbalance + 2966 WHERE bid = 1; +2021-03-17 15:18:21.557 UTC [192] postgres@accounts LOG: duration: 0.690 ms +2021-03-17 15:18:21.557 UTC [192] postgres@accounts LOG: statement: INSERT INTO pgbench_history (tid, bid, aid, delta, mtime) VALUES (9, 1, 21833, 2966, CURRENT_TIMESTAMP); +2021-03-17 15:18:21.557 UTC [192] postgres@accounts LOG: duration: 0.542 ms +2021-03-17 15:18:21.558 UTC [192] postgres@accounts LOG: statement: END; +2021-03-17 15:18:21.559 UTC [192] postgres@accounts LOG: duration: 1.938 ms +2021-03-17 15:18:22.825 UTC [193] postgres@accounts LOG: statement: BEGIN; +2021-03-17 15:18:22.825 UTC [193] postgres@accounts LOG: duration: 0.280 ms +2021-03-17 15:18:22.826 UTC [193] postgres@accounts LOG: statement: UPDATE pgbench_accounts SET abalance = abalance + -442 WHERE aid = 93281; +2021-03-17 15:18:22.828 UTC [193] postgres@accounts LOG: duration: 2.183 ms +2021-03-17 15:18:22.828 UTC [193] postgres@accounts LOG: statement: SELECT abalance FROM pgbench_accounts WHERE aid = 93281; +2021-03-17 15:18:22.828 UTC [193] postgres@accounts LOG: duration: 0.302 ms +2021-03-17 15:18:22.828 UTC [193] postgres@accounts LOG: statement: UPDATE pgbench_tellers SET tbalance = tbalance + -442 WHERE tid = 4; +2021-03-17 15:18:22.829 UTC [193] postgres@accounts LOG: duration: 0.703 ms +2021-03-17 15:18:22.829 UTC [193] postgres@accounts LOG: statement: UPDATE pgbench_branches SET bbalance = bbalance + -442 WHERE bid = 1; +2021-03-17 15:18:22.830 UTC [193] postgres@accounts LOG: duration: 0.759 ms +2021-03-17 15:18:22.830 UTC [193] postgres@accounts LOG: statement: INSERT INTO pgbench_history (tid, bid, aid, delta, mtime) VALUES (4, 1, 93281, -442, CURRENT_TIMESTAMP); +2021-03-17 15:18:22.831 UTC [193] postgres@accounts LOG: duration: 0.773 ms +2021-03-17 15:18:22.831 UTC [193] postgres@accounts LOG: statement: END; +2021-03-17 15:18:22.833 UTC [193] postgres@accounts LOG: duration: 2.048 ms +2021-03-17 15:18:22.881 UTC [194] postgres@accounts LOG: statement: BEGIN; +2021-03-17 15:18:22.881 UTC [194] postgres@accounts LOG: duration: 0.316 ms +2021-03-17 15:18:22.881 UTC [194] postgres@accounts LOG: statement: UPDATE pgbench_accounts SET abalance = abalance + -1591 WHERE aid = 2814; +2021-03-17 15:18:22.884 UTC [194] postgres@accounts LOG: duration: 2.911 ms +2021-03-17 15:18:22.884 UTC [194] postgres@accounts LOG: statement: SELECT abalance FROM pgbench_accounts WHERE aid = 2814; +2021-03-17 15:18:22.885 UTC [194] postgres@accounts LOG: duration: 0.695 ms +2021-03-17 15:18:22.885 UTC [194] postgres@accounts LOG: statement: UPDATE pgbench_tellers SET tbalance = tbalance + -1591 WHERE tid = 10; +2021-03-17 15:18:22.886 UTC [194] postgres@accounts LOG: duration: 0.902 ms +2021-03-17 15:18:22.886 UTC [194] postgres@accounts LOG: statement: UPDATE pgbench_branches SET bbalance = bbalance + -1591 WHERE bid = 1; +2021-03-17 15:18:22.887 UTC [194] postgres@accounts LOG: duration: 0.863 ms +2021-03-17 15:18:22.887 UTC [194] postgres@accounts LOG: statement: INSERT INTO pgbench_history (tid, bid, aid, delta, mtime) VALUES (10, 1, 2814, -1591, CURRENT_TIMESTAMP); +2021-03-17 15:18:22.888 UTC [194] postgres@accounts LOG: duration: 0.584 ms +2021-03-17 15:18:22.890 UTC [194] postgres@accounts LOG: statement: END; diff --git a/filebeat/module/postgresql/log/test/postgresql-13-log-statement-all.log-expected.json b/filebeat/module/postgresql/log/test/postgresql-13-log-statement-all.log-expected.json new file mode 100644 index 00000000000..389d82f3c11 --- /dev/null +++ b/filebeat/module/postgresql/log/test/postgresql-13-log-statement-all.log-expected.json @@ -0,0 +1,2602 @@ +[ + { + "@timestamp": "2021-03-17T15:18:00.201Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 0, + "message": "statement: CREATE DATABASE accounts;", + "postgresql.log.database": "postgres", + "postgresql.log.timestamp": "2021-03-17 15:18:00.201 UTC", + "process.pid": 149, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:18:00.631Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 95, + "message": "duration: 430.394 ms", + "postgresql.log.database": "postgres", + "postgresql.log.timestamp": "2021-03-17 15:18:00.631 UTC", + "process.pid": 149, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:18:02.732Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 174, + "message": "statement: drop table if exists pgbench_accounts, pgbench_branches, pgbench_history, pgbench_tellers", + "postgresql.log.database": "accounts", + "postgresql.log.timestamp": "2021-03-17 15:18:02.732 UTC", + "process.pid": 151, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:18:02.732Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 333, + "message": "duration: 0.559 ms", + "postgresql.log.database": "accounts", + "postgresql.log.timestamp": "2021-03-17 15:18:02.732 UTC", + "process.pid": 151, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:18:02.732Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 410, + "message": "statement: create table pgbench_history(tid int,bid int,aid int,delta int,mtime timestamp,filler char(22))", + "postgresql.log.database": "accounts", + "postgresql.log.timestamp": "2021-03-17 15:18:02.732 UTC", + "process.pid": 151, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:18:02.737Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 578, + "message": "duration: 4.812 ms", + "postgresql.log.database": "accounts", + "postgresql.log.timestamp": "2021-03-17 15:18:02.737 UTC", + "process.pid": 151, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:18:02.738Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 655, + "message": "statement: create table pgbench_tellers(tid int not null,bid int,tbalance int,filler char(84)) with (fillfactor=100)", + "postgresql.log.database": "accounts", + "postgresql.log.timestamp": "2021-03-17 15:18:02.738 UTC", + "process.pid": 151, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:18:02.740Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 830, + "message": "duration: 1.900 ms", + "postgresql.log.database": "accounts", + "postgresql.log.timestamp": "2021-03-17 15:18:02.740 UTC", + "process.pid": 151, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:18:02.740Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 907, + "message": "statement: create table pgbench_accounts(aid int not null,bid int,abalance int,filler char(84)) with (fillfactor=100)", + "postgresql.log.database": "accounts", + "postgresql.log.timestamp": "2021-03-17 15:18:02.740 UTC", + "process.pid": 151, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:18:02.741Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 1086, + "message": "duration: 1.444 ms", + "postgresql.log.database": "accounts", + "postgresql.log.timestamp": "2021-03-17 15:18:02.741 UTC", + "process.pid": 151, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:18:02.741Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 1163, + "message": "statement: create table pgbench_branches(bid int not null,bbalance int,filler char(88)) with (fillfactor=100)", + "postgresql.log.database": "accounts", + "postgresql.log.timestamp": "2021-03-17 15:18:02.741 UTC", + "process.pid": 151, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:18:02.743Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 1331, + "message": "duration: 1.336 ms", + "postgresql.log.database": "accounts", + "postgresql.log.timestamp": "2021-03-17 15:18:02.743 UTC", + "process.pid": 151, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:18:02.743Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 1408, + "message": "statement: begin", + "postgresql.log.database": "accounts", + "postgresql.log.timestamp": "2021-03-17 15:18:02.743 UTC", + "process.pid": 151, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:18:02.743Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 1483, + "message": "duration: 0.068 ms", + "postgresql.log.database": "accounts", + "postgresql.log.timestamp": "2021-03-17 15:18:02.743 UTC", + "process.pid": 151, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:18:02.743Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 1560, + "message": "statement: truncate table pgbench_accounts, pgbench_branches, pgbench_history, pgbench_tellers", + "postgresql.log.database": "accounts", + "postgresql.log.timestamp": "2021-03-17 15:18:02.743 UTC", + "process.pid": 151, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:18:02.744Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 1713, + "message": "duration: 0.656 ms", + "postgresql.log.database": "accounts", + "postgresql.log.timestamp": "2021-03-17 15:18:02.744 UTC", + "process.pid": 151, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:18:02.744Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 1790, + "message": "statement: insert into pgbench_branches(bid,bbalance) values(1,0)", + "postgresql.log.database": "accounts", + "postgresql.log.timestamp": "2021-03-17 15:18:02.744 UTC", + "process.pid": 151, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:18:02.744Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 1914, + "message": "duration: 0.538 ms", + "postgresql.log.database": "accounts", + "postgresql.log.timestamp": "2021-03-17 15:18:02.744 UTC", + "process.pid": 151, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:18:02.744Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 1991, + "message": "statement: insert into pgbench_tellers(tid,bid,tbalance) values (1,1,0)", + "postgresql.log.database": "accounts", + "postgresql.log.timestamp": "2021-03-17 15:18:02.744 UTC", + "process.pid": 151, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:18:02.745Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 2121, + "message": "duration: 0.304 ms", + "postgresql.log.database": "accounts", + "postgresql.log.timestamp": "2021-03-17 15:18:02.745 UTC", + "process.pid": 151, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:18:02.745Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 2198, + "message": "statement: insert into pgbench_tellers(tid,bid,tbalance) values (2,1,0)", + "postgresql.log.database": "accounts", + "postgresql.log.timestamp": "2021-03-17 15:18:02.745 UTC", + "process.pid": 151, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:18:02.746Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 2328, + "message": "duration: 1.510 ms", + "postgresql.log.database": "accounts", + "postgresql.log.timestamp": "2021-03-17 15:18:02.746 UTC", + "process.pid": 151, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:18:02.746Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 2405, + "message": "statement: insert into pgbench_tellers(tid,bid,tbalance) values (3,1,0)", + "postgresql.log.database": "accounts", + "postgresql.log.timestamp": "2021-03-17 15:18:02.746 UTC", + "process.pid": 151, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:18:02.746Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 2535, + "message": "duration: 0.094 ms", + "postgresql.log.database": "accounts", + "postgresql.log.timestamp": "2021-03-17 15:18:02.746 UTC", + "process.pid": 151, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:18:02.746Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 2612, + "message": "statement: insert into pgbench_tellers(tid,bid,tbalance) values (4,1,0)", + "postgresql.log.database": "accounts", + "postgresql.log.timestamp": "2021-03-17 15:18:02.746 UTC", + "process.pid": 151, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:18:02.746Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 2742, + "message": "duration: 0.056 ms", + "postgresql.log.database": "accounts", + "postgresql.log.timestamp": "2021-03-17 15:18:02.746 UTC", + "process.pid": 151, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:18:02.746Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 2819, + "message": "statement: insert into pgbench_tellers(tid,bid,tbalance) values (5,1,0)", + "postgresql.log.database": "accounts", + "postgresql.log.timestamp": "2021-03-17 15:18:02.746 UTC", + "process.pid": 151, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:18:02.746Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 2949, + "message": "duration: 0.052 ms", + "postgresql.log.database": "accounts", + "postgresql.log.timestamp": "2021-03-17 15:18:02.746 UTC", + "process.pid": 151, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:18:02.747Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 3026, + "message": "statement: insert into pgbench_tellers(tid,bid,tbalance) values (6,1,0)", + "postgresql.log.database": "accounts", + "postgresql.log.timestamp": "2021-03-17 15:18:02.747 UTC", + "process.pid": 151, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:18:02.747Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 3156, + "message": "duration: 0.051 ms", + "postgresql.log.database": "accounts", + "postgresql.log.timestamp": "2021-03-17 15:18:02.747 UTC", + "process.pid": 151, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:18:02.747Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 3233, + "message": "statement: insert into pgbench_tellers(tid,bid,tbalance) values (7,1,0)", + "postgresql.log.database": "accounts", + "postgresql.log.timestamp": "2021-03-17 15:18:02.747 UTC", + "process.pid": 151, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:18:02.747Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 3363, + "message": "duration: 0.051 ms", + "postgresql.log.database": "accounts", + "postgresql.log.timestamp": "2021-03-17 15:18:02.747 UTC", + "process.pid": 151, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:18:02.747Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 3440, + "message": "statement: insert into pgbench_tellers(tid,bid,tbalance) values (8,1,0)", + "postgresql.log.database": "accounts", + "postgresql.log.timestamp": "2021-03-17 15:18:02.747 UTC", + "process.pid": 151, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:18:02.747Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 3570, + "message": "duration: 0.050 ms", + "postgresql.log.database": "accounts", + "postgresql.log.timestamp": "2021-03-17 15:18:02.747 UTC", + "process.pid": 151, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:18:02.747Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 3647, + "message": "statement: insert into pgbench_tellers(tid,bid,tbalance) values (9,1,0)", + "postgresql.log.database": "accounts", + "postgresql.log.timestamp": "2021-03-17 15:18:02.747 UTC", + "process.pid": 151, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:18:02.747Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 3777, + "message": "duration: 0.052 ms", + "postgresql.log.database": "accounts", + "postgresql.log.timestamp": "2021-03-17 15:18:02.747 UTC", + "process.pid": 151, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:18:02.747Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 3854, + "message": "statement: insert into pgbench_tellers(tid,bid,tbalance) values (10,1,0)", + "postgresql.log.database": "accounts", + "postgresql.log.timestamp": "2021-03-17 15:18:02.747 UTC", + "process.pid": 151, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:18:02.747Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 3985, + "message": "duration: 0.052 ms", + "postgresql.log.database": "accounts", + "postgresql.log.timestamp": "2021-03-17 15:18:02.747 UTC", + "process.pid": 151, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:18:02.747Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 4062, + "message": "statement: copy pgbench_accounts from stdin", + "postgresql.log.database": "accounts", + "postgresql.log.timestamp": "2021-03-17 15:18:02.747 UTC", + "process.pid": 151, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:18:02.987Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 4164, + "message": "duration: 239.763 ms", + "postgresql.log.database": "accounts", + "postgresql.log.timestamp": "2021-03-17 15:18:02.987 UTC", + "process.pid": 151, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:18:02.987Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 4243, + "message": "statement: commit", + "postgresql.log.database": "accounts", + "postgresql.log.timestamp": "2021-03-17 15:18:02.987 UTC", + "process.pid": 151, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:18:03.054Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 4319, + "message": "duration: 67.302 ms", + "postgresql.log.database": "accounts", + "postgresql.log.timestamp": "2021-03-17 15:18:03.054 UTC", + "process.pid": 151, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:18:03.057Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 4397, + "message": "statement: vacuum analyze pgbench_branches", + "postgresql.log.database": "accounts", + "postgresql.log.timestamp": "2021-03-17 15:18:03.057 UTC", + "process.pid": 151, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:18:03.073Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 4498, + "message": "duration: 15.246 ms", + "postgresql.log.database": "accounts", + "postgresql.log.timestamp": "2021-03-17 15:18:03.073 UTC", + "process.pid": 151, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:18:03.073Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 4576, + "message": "statement: vacuum analyze pgbench_tellers", + "postgresql.log.database": "accounts", + "postgresql.log.timestamp": "2021-03-17 15:18:03.073 UTC", + "process.pid": 151, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:18:03.076Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 4676, + "message": "duration: 3.531 ms", + "postgresql.log.database": "accounts", + "postgresql.log.timestamp": "2021-03-17 15:18:03.076 UTC", + "process.pid": 151, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:18:03.077Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 4753, + "message": "statement: vacuum analyze pgbench_accounts", + "postgresql.log.database": "accounts", + "postgresql.log.timestamp": "2021-03-17 15:18:03.077 UTC", + "process.pid": 151, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:18:03.157Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 4854, + "message": "duration: 80.735 ms", + "postgresql.log.database": "accounts", + "postgresql.log.timestamp": "2021-03-17 15:18:03.157 UTC", + "process.pid": 151, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:18:03.158Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 4932, + "message": "statement: vacuum analyze pgbench_history", + "postgresql.log.database": "accounts", + "postgresql.log.timestamp": "2021-03-17 15:18:03.158 UTC", + "process.pid": 151, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:18:03.159Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 5032, + "message": "duration: 0.893 ms", + "postgresql.log.database": "accounts", + "postgresql.log.timestamp": "2021-03-17 15:18:03.159 UTC", + "process.pid": 151, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:18:03.159Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 5109, + "message": "statement: alter table pgbench_branches add primary key (bid)", + "postgresql.log.database": "accounts", + "postgresql.log.timestamp": "2021-03-17 15:18:03.159 UTC", + "process.pid": 151, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:18:03.165Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 5229, + "message": "duration: 5.266 ms", + "postgresql.log.database": "accounts", + "postgresql.log.timestamp": "2021-03-17 15:18:03.165 UTC", + "process.pid": 151, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:18:03.165Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 5306, + "message": "statement: alter table pgbench_tellers add primary key (tid)", + "postgresql.log.database": "accounts", + "postgresql.log.timestamp": "2021-03-17 15:18:03.165 UTC", + "process.pid": 151, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:18:03.168Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 5425, + "message": "duration: 2.807 ms", + "postgresql.log.database": "accounts", + "postgresql.log.timestamp": "2021-03-17 15:18:03.168 UTC", + "process.pid": 151, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:18:03.168Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 5502, + "message": "statement: alter table pgbench_accounts add primary key (aid)", + "postgresql.log.database": "accounts", + "postgresql.log.timestamp": "2021-03-17 15:18:03.168 UTC", + "process.pid": 151, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:18:03.249Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 5622, + "message": "duration: 81.593 ms", + "postgresql.log.database": "accounts", + "postgresql.log.timestamp": "2021-03-17 15:18:03.249 UTC", + "process.pid": 151, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:18:04.110Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 5700, + "message": "statement: drop table if exists pgbench_accounts, pgbench_branches, pgbench_history, pgbench_tellers", + "postgresql.log.database": "accounts", + "postgresql.log.timestamp": "2021-03-17 15:18:04.110 UTC", + "process.pid": 154, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:18:04.130Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 5859, + "message": "duration: 20.521 ms", + "postgresql.log.database": "accounts", + "postgresql.log.timestamp": "2021-03-17 15:18:04.130 UTC", + "process.pid": 154, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:18:04.132Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 5937, + "message": "statement: create table pgbench_history(tid int,bid int,aid int,delta int,mtime timestamp,filler char(22))", + "postgresql.log.database": "accounts", + "postgresql.log.timestamp": "2021-03-17 15:18:04.132 UTC", + "process.pid": 154, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:18:04.143Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 6105, + "message": "duration: 11.098 ms", + "postgresql.log.database": "accounts", + "postgresql.log.timestamp": "2021-03-17 15:18:04.143 UTC", + "process.pid": 154, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:18:04.143Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 6183, + "message": "statement: create table pgbench_tellers(tid int not null,bid int,tbalance int,filler char(84)) with (fillfactor=100)", + "postgresql.log.database": "accounts", + "postgresql.log.timestamp": "2021-03-17 15:18:04.143 UTC", + "process.pid": 154, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:18:04.152Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 6358, + "message": "duration: 8.950 ms", + "postgresql.log.database": "accounts", + "postgresql.log.timestamp": "2021-03-17 15:18:04.152 UTC", + "process.pid": 154, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:18:04.152Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 6435, + "message": "statement: create table pgbench_accounts(aid int not null,bid int,abalance int,filler char(84)) with (fillfactor=100)", + "postgresql.log.database": "accounts", + "postgresql.log.timestamp": "2021-03-17 15:18:04.152 UTC", + "process.pid": 154, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:18:04.156Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 6614, + "message": "duration: 4.302 ms", + "postgresql.log.database": "accounts", + "postgresql.log.timestamp": "2021-03-17 15:18:04.156 UTC", + "process.pid": 154, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:18:04.156Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 6691, + "message": "statement: create table pgbench_branches(bid int not null,bbalance int,filler char(88)) with (fillfactor=100)", + "postgresql.log.database": "accounts", + "postgresql.log.timestamp": "2021-03-17 15:18:04.156 UTC", + "process.pid": 154, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:18:04.163Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 6859, + "message": "duration: 6.999 ms", + "postgresql.log.database": "accounts", + "postgresql.log.timestamp": "2021-03-17 15:18:04.163 UTC", + "process.pid": 154, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:18:04.164Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 6936, + "message": "statement: begin", + "postgresql.log.database": "accounts", + "postgresql.log.timestamp": "2021-03-17 15:18:04.164 UTC", + "process.pid": 154, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:18:04.164Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 7011, + "message": "duration: 0.075 ms", + "postgresql.log.database": "accounts", + "postgresql.log.timestamp": "2021-03-17 15:18:04.164 UTC", + "process.pid": 154, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:18:04.164Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 7088, + "message": "statement: truncate table pgbench_accounts, pgbench_branches, pgbench_history, pgbench_tellers", + "postgresql.log.database": "accounts", + "postgresql.log.timestamp": "2021-03-17 15:18:04.164 UTC", + "process.pid": 154, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:18:04.164Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 7241, + "message": "duration: 0.676 ms", + "postgresql.log.database": "accounts", + "postgresql.log.timestamp": "2021-03-17 15:18:04.164 UTC", + "process.pid": 154, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:18:04.164Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 7318, + "message": "statement: insert into pgbench_branches(bid,bbalance) values(1,0)", + "postgresql.log.database": "accounts", + "postgresql.log.timestamp": "2021-03-17 15:18:04.164 UTC", + "process.pid": 154, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:18:04.165Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 7442, + "message": "duration: 0.247 ms", + "postgresql.log.database": "accounts", + "postgresql.log.timestamp": "2021-03-17 15:18:04.165 UTC", + "process.pid": 154, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:18:04.165Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 7519, + "message": "statement: insert into pgbench_tellers(tid,bid,tbalance) values (1,1,0)", + "postgresql.log.database": "accounts", + "postgresql.log.timestamp": "2021-03-17 15:18:04.165 UTC", + "process.pid": 154, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:18:04.165Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 7649, + "message": "duration: 0.164 ms", + "postgresql.log.database": "accounts", + "postgresql.log.timestamp": "2021-03-17 15:18:04.165 UTC", + "process.pid": 154, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:18:04.165Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 7726, + "message": "statement: insert into pgbench_tellers(tid,bid,tbalance) values (2,1,0)", + "postgresql.log.database": "accounts", + "postgresql.log.timestamp": "2021-03-17 15:18:04.165 UTC", + "process.pid": 154, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:18:04.165Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 7856, + "message": "duration: 0.080 ms", + "postgresql.log.database": "accounts", + "postgresql.log.timestamp": "2021-03-17 15:18:04.165 UTC", + "process.pid": 154, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:18:04.165Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 7933, + "message": "statement: insert into pgbench_tellers(tid,bid,tbalance) values (3,1,0)", + "postgresql.log.database": "accounts", + "postgresql.log.timestamp": "2021-03-17 15:18:04.165 UTC", + "process.pid": 154, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:18:04.165Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 8063, + "message": "duration: 0.077 ms", + "postgresql.log.database": "accounts", + "postgresql.log.timestamp": "2021-03-17 15:18:04.165 UTC", + "process.pid": 154, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:18:04.165Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 8140, + "message": "statement: insert into pgbench_tellers(tid,bid,tbalance) values (4,1,0)", + "postgresql.log.database": "accounts", + "postgresql.log.timestamp": "2021-03-17 15:18:04.165 UTC", + "process.pid": 154, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:18:04.165Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 8270, + "message": "duration: 0.075 ms", + "postgresql.log.database": "accounts", + "postgresql.log.timestamp": "2021-03-17 15:18:04.165 UTC", + "process.pid": 154, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:18:04.165Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 8347, + "message": "statement: insert into pgbench_tellers(tid,bid,tbalance) values (5,1,0)", + "postgresql.log.database": "accounts", + "postgresql.log.timestamp": "2021-03-17 15:18:04.165 UTC", + "process.pid": 154, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:18:04.165Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 8477, + "message": "duration: 0.074 ms", + "postgresql.log.database": "accounts", + "postgresql.log.timestamp": "2021-03-17 15:18:04.165 UTC", + "process.pid": 154, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:18:04.165Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 8554, + "message": "statement: insert into pgbench_tellers(tid,bid,tbalance) values (6,1,0)", + "postgresql.log.database": "accounts", + "postgresql.log.timestamp": "2021-03-17 15:18:04.165 UTC", + "process.pid": 154, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:18:04.166Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 8684, + "message": "duration: 0.071 ms", + "postgresql.log.database": "accounts", + "postgresql.log.timestamp": "2021-03-17 15:18:04.166 UTC", + "process.pid": 154, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:18:04.166Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 8761, + "message": "statement: insert into pgbench_tellers(tid,bid,tbalance) values (7,1,0)", + "postgresql.log.database": "accounts", + "postgresql.log.timestamp": "2021-03-17 15:18:04.166 UTC", + "process.pid": 154, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:18:04.166Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 8891, + "message": "duration: 0.071 ms", + "postgresql.log.database": "accounts", + "postgresql.log.timestamp": "2021-03-17 15:18:04.166 UTC", + "process.pid": 154, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:18:04.166Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 8968, + "message": "statement: insert into pgbench_tellers(tid,bid,tbalance) values (8,1,0)", + "postgresql.log.database": "accounts", + "postgresql.log.timestamp": "2021-03-17 15:18:04.166 UTC", + "process.pid": 154, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:18:04.166Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 9098, + "message": "duration: 0.069 ms", + "postgresql.log.database": "accounts", + "postgresql.log.timestamp": "2021-03-17 15:18:04.166 UTC", + "process.pid": 154, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:18:04.166Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 9175, + "message": "statement: insert into pgbench_tellers(tid,bid,tbalance) values (9,1,0)", + "postgresql.log.database": "accounts", + "postgresql.log.timestamp": "2021-03-17 15:18:04.166 UTC", + "process.pid": 154, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:18:04.166Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 9305, + "message": "duration: 0.071 ms", + "postgresql.log.database": "accounts", + "postgresql.log.timestamp": "2021-03-17 15:18:04.166 UTC", + "process.pid": 154, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:18:04.166Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 9382, + "message": "statement: insert into pgbench_tellers(tid,bid,tbalance) values (10,1,0)", + "postgresql.log.database": "accounts", + "postgresql.log.timestamp": "2021-03-17 15:18:04.166 UTC", + "process.pid": 154, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:18:04.166Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 9513, + "message": "duration: 0.072 ms", + "postgresql.log.database": "accounts", + "postgresql.log.timestamp": "2021-03-17 15:18:04.166 UTC", + "process.pid": 154, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:18:04.166Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 9590, + "message": "statement: copy pgbench_accounts from stdin", + "postgresql.log.database": "accounts", + "postgresql.log.timestamp": "2021-03-17 15:18:04.166 UTC", + "process.pid": 154, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:18:04.355Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 9692, + "message": "duration: 188.620 ms", + "postgresql.log.database": "accounts", + "postgresql.log.timestamp": "2021-03-17 15:18:04.355 UTC", + "process.pid": 154, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:18:04.355Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 9771, + "message": "statement: commit", + "postgresql.log.database": "accounts", + "postgresql.log.timestamp": "2021-03-17 15:18:04.355 UTC", + "process.pid": 154, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:18:04.366Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 9847, + "message": "duration: 11.135 ms", + "postgresql.log.database": "accounts", + "postgresql.log.timestamp": "2021-03-17 15:18:04.366 UTC", + "process.pid": 154, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:18:04.366Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 9925, + "message": "statement: vacuum analyze pgbench_branches", + "postgresql.log.database": "accounts", + "postgresql.log.timestamp": "2021-03-17 15:18:04.366 UTC", + "process.pid": 154, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:18:04.383Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 10026, + "message": "duration: 16.594 ms", + "postgresql.log.database": "accounts", + "postgresql.log.timestamp": "2021-03-17 15:18:04.383 UTC", + "process.pid": 154, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:18:04.383Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 10104, + "message": "statement: vacuum analyze pgbench_tellers", + "postgresql.log.database": "accounts", + "postgresql.log.timestamp": "2021-03-17 15:18:04.383 UTC", + "process.pid": 154, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:18:04.386Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 10204, + "message": "duration: 3.410 ms", + "postgresql.log.database": "accounts", + "postgresql.log.timestamp": "2021-03-17 15:18:04.386 UTC", + "process.pid": 154, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + } +] \ No newline at end of file diff --git a/filebeat/module/postgresql/log/test/postgresql-9-log-statement-all.log b/filebeat/module/postgresql/log/test/postgresql-9-log-statement-all.log new file mode 100644 index 00000000000..ad7d979c681 --- /dev/null +++ b/filebeat/module/postgresql/log/test/postgresql-9-log-statement-all.log @@ -0,0 +1,230 @@ +2021-03-17 15:10:20.767 UTC [118] postgres@postgres LOG: statement: CREATE DATABASE accounts; +2021-03-17 15:10:21.486 UTC [118] postgres@postgres LOG: duration: 719.436 ms +2021-03-17 15:10:27.112 UTC [126] postgres@postgres LOG: statement: SELECT d.datname as "Name", + pg_catalog.pg_get_userbyid(d.datdba) as "Owner", + pg_catalog.pg_encoding_to_char(d.encoding) as "Encoding", + d.datcollate as "Collate", + d.datctype as "Ctype", + pg_catalog.array_to_string(d.datacl, E'\n') AS "Access privileges" + FROM pg_catalog.pg_database d + ORDER BY 1; +2021-03-17 15:10:27.115 UTC [126] postgres@postgres LOG: duration: 2.710 ms +2021-03-17 15:10:37.302 UTC [135] postgres@postgres LOG: statement: SELECT d.datname as "Name", + pg_catalog.pg_get_userbyid(d.datdba) as "Owner", + pg_catalog.pg_encoding_to_char(d.encoding) as "Encoding", + d.datcollate as "Collate", + d.datctype as "Ctype", + pg_catalog.array_to_string(d.datacl, E'\n') AS "Access privileges" + FROM pg_catalog.pg_database d + ORDER BY 1; +2021-03-17 15:10:37.303 UTC [135] postgres@postgres LOG: duration: 1.111 ms +2021-03-17 15:10:42.085 UTC [137] postgres@accounts LOG: statement: drop table if exists pgbench_history +2021-03-17 15:10:42.085 UTC [137] postgres@accounts LOG: duration: 0.648 ms +2021-03-17 15:10:42.085 UTC [137] postgres@accounts LOG: statement: create table pgbench_history(tid int,bid int,aid int,delta int,mtime timestamp,filler char(22)) +2021-03-17 15:10:42.088 UTC [137] postgres@accounts LOG: duration: 3.140 ms +2021-03-17 15:10:42.089 UTC [137] postgres@accounts LOG: statement: drop table if exists pgbench_tellers +2021-03-17 15:10:42.089 UTC [137] postgres@accounts LOG: duration: 0.229 ms +2021-03-17 15:10:42.089 UTC [137] postgres@accounts LOG: statement: create table pgbench_tellers(tid int not null,bid int,tbalance int,filler char(84)) with (fillfactor=100) +2021-03-17 15:10:42.092 UTC [137] postgres@accounts LOG: duration: 3.339 ms +2021-03-17 15:10:42.095 UTC [137] postgres@accounts LOG: statement: drop table if exists pgbench_accounts +2021-03-17 15:10:42.095 UTC [137] postgres@accounts LOG: duration: 0.229 ms +2021-03-17 15:10:42.095 UTC [137] postgres@accounts LOG: statement: create table pgbench_accounts(aid int not null,bid int,abalance int,filler char(84)) with (fillfactor=100) +2021-03-17 15:10:42.096 UTC [137] postgres@accounts LOG: duration: 1.494 ms +2021-03-17 15:10:42.097 UTC [137] postgres@accounts LOG: statement: drop table if exists pgbench_branches +2021-03-17 15:10:42.097 UTC [137] postgres@accounts LOG: duration: 0.166 ms +2021-03-17 15:10:42.097 UTC [137] postgres@accounts LOG: statement: create table pgbench_branches(bid int not null,bbalance int,filler char(88)) with (fillfactor=100) +2021-03-17 15:10:42.099 UTC [137] postgres@accounts LOG: duration: 1.914 ms +2021-03-17 15:10:42.099 UTC [137] postgres@accounts LOG: statement: begin +2021-03-17 15:10:42.100 UTC [137] postgres@accounts LOG: duration: 0.559 ms +2021-03-17 15:10:42.100 UTC [137] postgres@accounts LOG: statement: insert into pgbench_branches(bid,bbalance) values(1,0) +2021-03-17 15:10:42.100 UTC [137] postgres@accounts LOG: duration: 0.399 ms +2021-03-17 15:10:42.100 UTC [137] postgres@accounts LOG: statement: insert into pgbench_tellers(tid,bid,tbalance) values (1,1,0) +2021-03-17 15:10:42.101 UTC [137] postgres@accounts LOG: duration: 0.281 ms +2021-03-17 15:10:42.101 UTC [137] postgres@accounts LOG: statement: insert into pgbench_tellers(tid,bid,tbalance) values (2,1,0) +2021-03-17 15:10:42.101 UTC [137] postgres@accounts LOG: duration: 0.090 ms +2021-03-17 15:10:42.101 UTC [137] postgres@accounts LOG: statement: insert into pgbench_tellers(tid,bid,tbalance) values (3,1,0) +2021-03-17 15:10:42.101 UTC [137] postgres@accounts LOG: duration: 0.077 ms +2021-03-17 15:10:42.101 UTC [137] postgres@accounts LOG: statement: insert into pgbench_tellers(tid,bid,tbalance) values (4,1,0) +2021-03-17 15:10:42.101 UTC [137] postgres@accounts LOG: duration: 0.052 ms +2021-03-17 15:10:42.101 UTC [137] postgres@accounts LOG: statement: insert into pgbench_tellers(tid,bid,tbalance) values (5,1,0) +2021-03-17 15:10:42.101 UTC [137] postgres@accounts LOG: duration: 0.090 ms +2021-03-17 15:10:42.101 UTC [137] postgres@accounts LOG: statement: insert into pgbench_tellers(tid,bid,tbalance) values (6,1,0) +2021-03-17 15:10:42.101 UTC [137] postgres@accounts LOG: duration: 0.075 ms +2021-03-17 15:10:42.101 UTC [137] postgres@accounts LOG: statement: insert into pgbench_tellers(tid,bid,tbalance) values (7,1,0) +2021-03-17 15:10:42.101 UTC [137] postgres@accounts LOG: duration: 0.059 ms +2021-03-17 15:10:42.101 UTC [137] postgres@accounts LOG: statement: insert into pgbench_tellers(tid,bid,tbalance) values (8,1,0) +2021-03-17 15:10:42.101 UTC [137] postgres@accounts LOG: duration: 0.072 ms +2021-03-17 15:10:42.102 UTC [137] postgres@accounts LOG: statement: insert into pgbench_tellers(tid,bid,tbalance) values (9,1,0) +2021-03-17 15:10:42.102 UTC [137] postgres@accounts LOG: duration: 0.077 ms +2021-03-17 15:10:42.102 UTC [137] postgres@accounts LOG: statement: insert into pgbench_tellers(tid,bid,tbalance) values (10,1,0) +2021-03-17 15:10:42.102 UTC [137] postgres@accounts LOG: duration: 0.073 ms +2021-03-17 15:10:42.102 UTC [137] postgres@accounts LOG: statement: commit +2021-03-17 15:10:42.103 UTC [137] postgres@accounts LOG: duration: 0.879 ms +2021-03-17 15:10:42.103 UTC [137] postgres@accounts LOG: statement: begin +2021-03-17 15:10:42.103 UTC [137] postgres@accounts LOG: duration: 0.062 ms +2021-03-17 15:10:42.103 UTC [137] postgres@accounts LOG: statement: truncate pgbench_accounts +2021-03-17 15:10:42.103 UTC [137] postgres@accounts LOG: duration: 0.363 ms +2021-03-17 15:10:42.103 UTC [137] postgres@accounts LOG: statement: copy pgbench_accounts from stdin +2021-03-17 15:10:42.295 UTC [137] postgres@accounts LOG: duration: 192.094 ms +2021-03-17 15:10:42.296 UTC [137] postgres@accounts LOG: statement: commit +2021-03-17 15:10:42.297 UTC [137] postgres@accounts LOG: duration: 1.318 ms +2021-03-17 15:10:42.297 UTC [137] postgres@accounts LOG: statement: vacuum analyze pgbench_branches +2021-03-17 15:10:42.314 UTC [137] postgres@accounts LOG: duration: 17.051 ms +2021-03-17 15:10:42.314 UTC [137] postgres@accounts LOG: statement: vacuum analyze pgbench_tellers +2021-03-17 15:10:42.317 UTC [137] postgres@accounts LOG: duration: 2.798 ms +2021-03-17 15:10:42.317 UTC [137] postgres@accounts LOG: statement: vacuum analyze pgbench_accounts +2021-03-17 15:10:42.406 UTC [137] postgres@accounts LOG: duration: 88.800 ms +2021-03-17 15:10:42.406 UTC [137] postgres@accounts LOG: statement: vacuum analyze pgbench_history +2021-03-17 15:10:42.406 UTC [137] postgres@accounts LOG: duration: 0.442 ms +2021-03-17 15:10:42.406 UTC [137] postgres@accounts LOG: statement: alter table pgbench_branches add primary key (bid) +2021-03-17 15:10:42.409 UTC [137] postgres@accounts LOG: duration: 2.602 ms +2021-03-17 15:10:42.409 UTC [137] postgres@accounts LOG: statement: alter table pgbench_tellers add primary key (tid) +2021-03-17 15:10:42.411 UTC [137] postgres@accounts LOG: duration: 2.433 ms +2021-03-17 15:10:42.411 UTC [137] postgres@accounts LOG: statement: alter table pgbench_accounts add primary key (aid) +2021-03-17 15:10:42.454 UTC [137] postgres@accounts LOG: duration: 42.396 ms +2021-03-17 15:10:44.222 UTC [139] postgres@accounts LOG: statement: drop table if exists pgbench_history +2021-03-17 15:10:44.226 UTC [139] postgres@accounts LOG: duration: 4.849 ms +2021-03-17 15:10:44.228 UTC [139] postgres@accounts LOG: statement: create table pgbench_history(tid int,bid int,aid int,delta int,mtime timestamp,filler char(22)) +2021-03-17 15:10:44.231 UTC [139] postgres@accounts LOG: duration: 3.311 ms +2021-03-17 15:10:44.232 UTC [139] postgres@accounts LOG: statement: drop table if exists pgbench_tellers +2021-03-17 15:10:44.235 UTC [139] postgres@accounts LOG: duration: 3.302 ms +2021-03-17 15:10:44.236 UTC [139] postgres@accounts LOG: statement: create table pgbench_tellers(tid int not null,bid int,tbalance int,filler char(84)) with (fillfactor=100) +2021-03-17 15:10:44.238 UTC [139] postgres@accounts LOG: duration: 2.279 ms +2021-03-17 15:10:44.238 UTC [139] postgres@accounts LOG: statement: drop table if exists pgbench_accounts +2021-03-17 15:10:44.245 UTC [139] postgres@accounts LOG: duration: 7.119 ms +2021-03-17 15:10:44.248 UTC [139] postgres@accounts LOG: statement: create table pgbench_accounts(aid int not null,bid int,abalance int,filler char(84)) with (fillfactor=100) +2021-03-17 15:10:44.250 UTC [139] postgres@accounts LOG: duration: 2.267 ms +2021-03-17 15:10:44.255 UTC [139] postgres@accounts LOG: statement: drop table if exists pgbench_branches +2021-03-17 15:10:44.260 UTC [139] postgres@accounts LOG: duration: 4.857 ms +2021-03-17 15:10:44.263 UTC [139] postgres@accounts LOG: statement: create table pgbench_branches(bid int not null,bbalance int,filler char(88)) with (fillfactor=100) +2021-03-17 15:10:44.265 UTC [139] postgres@accounts LOG: duration: 2.494 ms +2021-03-17 15:10:44.265 UTC [139] postgres@accounts LOG: statement: begin +2021-03-17 15:10:44.265 UTC [139] postgres@accounts LOG: duration: 0.081 ms +2021-03-17 15:10:44.265 UTC [139] postgres@accounts LOG: statement: insert into pgbench_branches(bid,bbalance) values(1,0) +2021-03-17 15:10:44.266 UTC [139] postgres@accounts LOG: duration: 0.319 ms +2021-03-17 15:10:44.266 UTC [139] postgres@accounts LOG: statement: insert into pgbench_tellers(tid,bid,tbalance) values (1,1,0) +2021-03-17 15:10:44.266 UTC [139] postgres@accounts LOG: duration: 0.189 ms +2021-03-17 15:10:44.266 UTC [139] postgres@accounts LOG: statement: insert into pgbench_tellers(tid,bid,tbalance) values (2,1,0) +2021-03-17 15:10:44.266 UTC [139] postgres@accounts LOG: duration: 0.071 ms +2021-03-17 15:10:44.266 UTC [139] postgres@accounts LOG: statement: insert into pgbench_tellers(tid,bid,tbalance) values (3,1,0) +2021-03-17 15:10:44.266 UTC [139] postgres@accounts LOG: duration: 0.075 ms +2021-03-17 15:10:44.266 UTC [139] postgres@accounts LOG: statement: insert into pgbench_tellers(tid,bid,tbalance) values (4,1,0) +2021-03-17 15:10:44.266 UTC [139] postgres@accounts LOG: duration: 0.087 ms +2021-03-17 15:10:44.266 UTC [139] postgres@accounts LOG: statement: insert into pgbench_tellers(tid,bid,tbalance) values (5,1,0) +2021-03-17 15:10:44.266 UTC [139] postgres@accounts LOG: duration: 0.109 ms +2021-03-17 15:10:44.267 UTC [139] postgres@accounts LOG: statement: insert into pgbench_tellers(tid,bid,tbalance) values (6,1,0) +2021-03-17 15:10:44.267 UTC [139] postgres@accounts LOG: duration: 0.169 ms +2021-03-17 15:10:44.267 UTC [139] postgres@accounts LOG: statement: insert into pgbench_tellers(tid,bid,tbalance) values (7,1,0) +2021-03-17 15:10:44.267 UTC [139] postgres@accounts LOG: duration: 0.099 ms +2021-03-17 15:10:44.267 UTC [139] postgres@accounts LOG: statement: insert into pgbench_tellers(tid,bid,tbalance) values (8,1,0) +2021-03-17 15:10:44.267 UTC [139] postgres@accounts LOG: duration: 0.105 ms +2021-03-17 15:10:44.267 UTC [139] postgres@accounts LOG: statement: insert into pgbench_tellers(tid,bid,tbalance) values (9,1,0) +2021-03-17 15:10:44.267 UTC [139] postgres@accounts LOG: duration: 0.081 ms +2021-03-17 15:10:44.267 UTC [139] postgres@accounts LOG: statement: insert into pgbench_tellers(tid,bid,tbalance) values (10,1,0) +2021-03-17 15:10:44.268 UTC [139] postgres@accounts LOG: duration: 0.080 ms +2021-03-17 15:10:44.268 UTC [139] postgres@accounts LOG: statement: commit +2021-03-17 15:10:44.271 UTC [139] postgres@accounts LOG: duration: 3.046 ms +2021-03-17 15:10:44.271 UTC [139] postgres@accounts LOG: statement: begin +2021-03-17 15:10:44.271 UTC [139] postgres@accounts LOG: duration: 0.099 ms +2021-03-17 15:10:44.271 UTC [139] postgres@accounts LOG: statement: truncate pgbench_accounts +2021-03-17 15:10:44.271 UTC [139] postgres@accounts LOG: duration: 0.416 ms +2021-03-17 15:10:44.272 UTC [139] postgres@accounts LOG: statement: copy pgbench_accounts from stdin +2021-03-17 15:10:44.562 UTC [139] postgres@accounts LOG: duration: 289.924 ms +2021-03-17 15:10:44.562 UTC [139] postgres@accounts LOG: statement: commit +2021-03-17 15:10:44.563 UTC [139] postgres@accounts LOG: duration: 1.862 ms +2021-03-17 15:10:44.564 UTC [139] postgres@accounts LOG: statement: vacuum analyze pgbench_branches +2021-03-17 15:10:44.577 UTC [139] postgres@accounts LOG: duration: 13.040 ms +2021-03-17 15:10:44.577 UTC [139] postgres@accounts LOG: statement: vacuum analyze pgbench_tellers +2021-03-17 15:10:44.580 UTC [139] postgres@accounts LOG: duration: 2.934 ms +2021-03-17 15:10:44.580 UTC [139] postgres@accounts LOG: statement: vacuum analyze pgbench_accounts +2021-03-17 15:10:44.664 UTC [139] postgres@accounts LOG: duration: 84.018 ms +2021-03-17 15:10:44.664 UTC [139] postgres@accounts LOG: statement: vacuum analyze pgbench_history +2021-03-17 15:10:44.665 UTC [139] postgres@accounts LOG: duration: 0.793 ms +2021-03-17 15:10:44.665 UTC [139] postgres@accounts LOG: statement: alter table pgbench_branches add primary key (bid) +2021-03-17 15:10:44.668 UTC [139] postgres@accounts LOG: duration: 3.258 ms +2021-03-17 15:10:44.668 UTC [139] postgres@accounts LOG: statement: alter table pgbench_tellers add primary key (tid) +2021-03-17 15:10:44.671 UTC [139] postgres@accounts LOG: duration: 2.944 ms +2021-03-17 15:10:44.671 UTC [139] postgres@accounts LOG: statement: alter table pgbench_accounts add primary key (aid) +2021-03-17 15:10:44.739 UTC [139] postgres@accounts LOG: duration: 68.048 ms +2021-03-17 15:10:47.438 UTC [149] postgres@postgres LOG: statement: SELECT d.datname as "Name", + pg_catalog.pg_get_userbyid(d.datdba) as "Owner", + pg_catalog.pg_encoding_to_char(d.encoding) as "Encoding", + d.datcollate as "Collate", + d.datctype as "Ctype", + pg_catalog.array_to_string(d.datacl, E'\n') AS "Access privileges" + FROM pg_catalog.pg_database d + ORDER BY 1; +2021-03-17 15:10:47.439 UTC [149] postgres@postgres LOG: duration: 0.754 ms +2021-03-17 15:10:57.720 UTC [157] postgres@postgres LOG: statement: SELECT d.datname as "Name", + pg_catalog.pg_get_userbyid(d.datdba) as "Owner", + pg_catalog.pg_encoding_to_char(d.encoding) as "Encoding", + d.datcollate as "Collate", + d.datctype as "Ctype", + pg_catalog.array_to_string(d.datacl, E'\n') AS "Access privileges" + FROM pg_catalog.pg_database d + ORDER BY 1; +2021-03-17 15:10:57.721 UTC [157] postgres@postgres LOG: duration: 1.267 ms +2021-03-17 15:11:05.347 UTC [160] postgres@accounts LOG: statement: select count(*) from pgbench_branches +2021-03-17 15:11:05.350 UTC [160] postgres@accounts LOG: duration: 3.579 ms +2021-03-17 15:11:05.351 UTC [160] postgres@accounts LOG: statement: vacuum pgbench_branches +2021-03-17 15:11:05.364 UTC [160] postgres@accounts LOG: duration: 13.357 ms +2021-03-17 15:11:05.364 UTC [160] postgres@accounts LOG: statement: vacuum pgbench_tellers +2021-03-17 15:11:05.366 UTC [160] postgres@accounts LOG: duration: 1.519 ms +2021-03-17 15:11:05.366 UTC [160] postgres@accounts LOG: statement: truncate pgbench_history +2021-03-17 15:11:05.370 UTC [160] postgres@accounts LOG: duration: 3.909 ms +2021-03-17 15:11:05.502 UTC [161] postgres@accounts LOG: statement: BEGIN; +2021-03-17 15:11:05.502 UTC [161] postgres@accounts LOG: duration: 0.206 ms +2021-03-17 15:11:05.502 UTC [161] postgres@accounts LOG: statement: UPDATE pgbench_accounts SET abalance = abalance + 4666 WHERE aid = 31910; +2021-03-17 15:11:05.504 UTC [161] postgres@accounts LOG: duration: 2.372 ms +2021-03-17 15:11:05.504 UTC [161] postgres@accounts LOG: statement: SELECT abalance FROM pgbench_accounts WHERE aid = 31910; +2021-03-17 15:11:05.505 UTC [161] postgres@accounts LOG: duration: 0.230 ms +2021-03-17 15:11:05.505 UTC [161] postgres@accounts LOG: statement: UPDATE pgbench_tellers SET tbalance = tbalance + 4666 WHERE tid = 4; +2021-03-17 15:11:05.505 UTC [161] postgres@accounts LOG: duration: 0.335 ms +2021-03-17 15:11:05.505 UTC [161] postgres@accounts LOG: statement: UPDATE pgbench_branches SET bbalance = bbalance + 4666 WHERE bid = 1; +2021-03-17 15:11:05.505 UTC [161] postgres@accounts LOG: duration: 0.266 ms +2021-03-17 15:11:05.505 UTC [161] postgres@accounts LOG: statement: INSERT INTO pgbench_history (tid, bid, aid, delta, mtime) VALUES (4, 1, 31910, 4666, CURRENT_TIMESTAMP); +2021-03-17 15:11:05.506 UTC [161] postgres@accounts LOG: duration: 0.353 ms +2021-03-17 15:11:05.506 UTC [161] postgres@accounts LOG: statement: END; +2021-03-17 15:11:05.507 UTC [161] postgres@accounts LOG: duration: 1.203 ms +2021-03-17 15:11:06.264 UTC [162] postgres@accounts LOG: statement: BEGIN; +2021-03-17 15:11:06.265 UTC [162] postgres@accounts LOG: duration: 0.867 ms +2021-03-17 15:11:06.265 UTC [162] postgres@accounts LOG: statement: UPDATE pgbench_accounts SET abalance = abalance + -3403 WHERE aid = 84799; +2021-03-17 15:11:06.268 UTC [162] postgres@accounts LOG: duration: 3.093 ms +2021-03-17 15:11:06.269 UTC [162] postgres@accounts LOG: statement: SELECT abalance FROM pgbench_accounts WHERE aid = 84799; +2021-03-17 15:11:06.269 UTC [162] postgres@accounts LOG: duration: 0.547 ms +2021-03-17 15:11:06.270 UTC [162] postgres@accounts LOG: statement: UPDATE pgbench_tellers SET tbalance = tbalance + -3403 WHERE tid = 1; +2021-03-17 15:11:06.271 UTC [162] postgres@accounts LOG: duration: 1.155 ms +2021-03-17 15:11:06.271 UTC [162] postgres@accounts LOG: statement: UPDATE pgbench_branches SET bbalance = bbalance + -3403 WHERE bid = 1; +2021-03-17 15:11:06.272 UTC [162] postgres@accounts LOG: duration: 0.830 ms +2021-03-17 15:11:06.272 UTC [162] postgres@accounts LOG: statement: INSERT INTO pgbench_history (tid, bid, aid, delta, mtime) VALUES (1, 1, 84799, -3403, CURRENT_TIMESTAMP); +2021-03-17 15:11:06.273 UTC [162] postgres@accounts LOG: duration: 0.967 ms +2021-03-17 15:11:06.274 UTC [162] postgres@accounts LOG: statement: END; +2021-03-17 15:11:06.276 UTC [162] postgres@accounts LOG: duration: 2.296 ms +2021-03-17 15:11:06.322 UTC [163] postgres@accounts LOG: statement: BEGIN; +2021-03-17 15:11:06.323 UTC [163] postgres@accounts LOG: duration: 0.427 ms +2021-03-17 15:11:06.323 UTC [163] postgres@accounts LOG: statement: UPDATE pgbench_accounts SET abalance = abalance + -3703 WHERE aid = 87965; +2021-03-17 15:11:06.326 UTC [163] postgres@accounts LOG: duration: 3.367 ms +2021-03-17 15:11:06.327 UTC [163] postgres@accounts LOG: statement: SELECT abalance FROM pgbench_accounts WHERE aid = 87965; +2021-03-17 15:11:06.327 UTC [163] postgres@accounts LOG: duration: 0.620 ms +2021-03-17 15:11:06.328 UTC [163] postgres@accounts LOG: statement: UPDATE pgbench_tellers SET tbalance = tbalance + -3703 WHERE tid = 4; +2021-03-17 15:11:06.330 UTC [163] postgres@accounts LOG: duration: 2.630 ms +2021-03-17 15:11:06.331 UTC [163] postgres@accounts LOG: statement: UPDATE pgbench_branches SET bbalance = bbalance + -3703 WHERE bid = 1; +2021-03-17 15:11:06.332 UTC [163] postgres@accounts LOG: duration: 1.581 ms +2021-03-17 15:11:06.333 UTC [163] postgres@accounts LOG: statement: INSERT INTO pgbench_history (tid, bid, aid, delta, mtime) VALUES (4, 1, 87965, -3703, CURRENT_TIMESTAMP); +2021-03-17 15:11:06.334 UTC [163] postgres@accounts LOG: duration: 1.282 ms +2021-03-17 15:11:06.334 UTC [163] postgres@accounts LOG: statement: END; +2021-03-17 15:11:06.337 UTC [163] postgres@accounts LOG: duration: 2.580 ms +2021-03-17 15:11:06.586 UTC [164] postgres@accounts LOG: statement: BEGIN; +2021-03-17 15:11:06.587 UTC [164] postgres@accounts LOG: duration: 0.389 ms +2021-03-17 15:11:06.587 UTC [164] postgres@accounts LOG: statement: UPDATE pgbench_accounts SET abalance = abalance + 2855 WHERE aid = 24128; +2021-03-17 15:11:06.589 UTC [164] postgres@accounts LOG: duration: 2.526 ms +2021-03-17 15:11:06.590 UTC [164] postgres@accounts LOG: statement: SELECT abalance FROM pgbench_accounts WHERE aid = 24128; +2021-03-17 15:11:06.590 UTC [164] postgres@accounts LOG: duration: 0.468 ms +2021-03-17 15:11:06.591 UTC [164] postgres@accounts LOG: statement: UPDATE pgbench_tellers SET tbalance = tbalance + 2855 WHERE tid = 7; +2021-03-17 15:11:06.591 UTC [164] postgres@accounts LOG: duration: 0.940 ms +2021-03-17 15:11:06.592 UTC [164] postgres@accounts LOG: statement: UPDATE pgbench_branches SET bbalance = bbalance + 2855 WHERE bid = 1; +2021-03-17 15:11:06.593 UTC [164] postgres@accounts LOG: duration: 0.862 ms +2021-03-17 15:11:06.593 UTC [164] postgres@accounts LOG: statement: INSERT INTO pgbench_history (tid, bid, aid, delta, mtime) VALUES (7, 1, 24128, 2855, CURRENT_TIMESTAMP); +2021-03-17 15:11:06.594 UTC [164] postgres@accounts LOG: duration: 0.838 ms +2021-03-17 15:11:06.594 UTC [164] postgres@accounts LOG: statement: END; +2021-03-17 15:11:06.596 UTC [164] postgres@accounts LOG: duration: 2.070 ms diff --git a/filebeat/module/postgresql/log/test/postgresql-9-log-statement-all.log-expected.json b/filebeat/module/postgresql/log/test/postgresql-9-log-statement-all.log-expected.json new file mode 100644 index 00000000000..041afb8d578 --- /dev/null +++ b/filebeat/module/postgresql/log/test/postgresql-9-log-statement-all.log-expected.json @@ -0,0 +1,2608 @@ +[ + { + "@timestamp": "2021-03-17T15:10:20.767Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 0, + "message": "statement: CREATE DATABASE accounts;", + "postgresql.log.database": "postgres", + "postgresql.log.timestamp": "2021-03-17 15:10:20.767 UTC", + "process.pid": 118, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:10:21.486Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 95, + "message": "duration: 719.436 ms", + "postgresql.log.database": "postgres", + "postgresql.log.timestamp": "2021-03-17 15:10:21.486 UTC", + "process.pid": 118, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:10:27.112Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.flags": [ + "multiline" + ], + "log.level": "LOG", + "log.offset": 174, + "message": "statement: SELECT d.datname as \"Name\",\n\t pg_catalog.pg_get_userbyid(d.datdba) as \"Owner\",\n\t pg_catalog.pg_encoding_to_char(d.encoding) as \"Encoding\",\n\t d.datcollate as \"Collate\",\n\t d.datctype as \"Ctype\",\n\t pg_catalog.array_to_string(d.datacl, E'\\n') AS \"Access privileges\"\n\tFROM pg_catalog.pg_database d\n\tORDER BY 1;", + "postgresql.log.database": "postgres", + "postgresql.log.timestamp": "2021-03-17 15:10:27.112 UTC", + "process.pid": 126, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:10:27.115Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 579, + "message": "duration: 2.710 ms", + "postgresql.log.database": "postgres", + "postgresql.log.timestamp": "2021-03-17 15:10:27.115 UTC", + "process.pid": 126, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:10:37.302Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.flags": [ + "multiline" + ], + "log.level": "LOG", + "log.offset": 656, + "message": "statement: SELECT d.datname as \"Name\",\n\t pg_catalog.pg_get_userbyid(d.datdba) as \"Owner\",\n\t pg_catalog.pg_encoding_to_char(d.encoding) as \"Encoding\",\n\t d.datcollate as \"Collate\",\n\t d.datctype as \"Ctype\",\n\t pg_catalog.array_to_string(d.datacl, E'\\n') AS \"Access privileges\"\n\tFROM pg_catalog.pg_database d\n\tORDER BY 1;", + "postgresql.log.database": "postgres", + "postgresql.log.timestamp": "2021-03-17 15:10:37.302 UTC", + "process.pid": 135, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:10:37.303Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 1061, + "message": "duration: 1.111 ms", + "postgresql.log.database": "postgres", + "postgresql.log.timestamp": "2021-03-17 15:10:37.303 UTC", + "process.pid": 135, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:10:42.085Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 1138, + "message": "statement: drop table if exists pgbench_history", + "postgresql.log.database": "accounts", + "postgresql.log.timestamp": "2021-03-17 15:10:42.085 UTC", + "process.pid": 137, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:10:42.085Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 1244, + "message": "duration: 0.648 ms", + "postgresql.log.database": "accounts", + "postgresql.log.timestamp": "2021-03-17 15:10:42.085 UTC", + "process.pid": 137, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:10:42.085Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 1321, + "message": "statement: create table pgbench_history(tid int,bid int,aid int,delta int,mtime timestamp,filler char(22))", + "postgresql.log.database": "accounts", + "postgresql.log.timestamp": "2021-03-17 15:10:42.085 UTC", + "process.pid": 137, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:10:42.088Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 1489, + "message": "duration: 3.140 ms", + "postgresql.log.database": "accounts", + "postgresql.log.timestamp": "2021-03-17 15:10:42.088 UTC", + "process.pid": 137, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:10:42.089Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 1566, + "message": "statement: drop table if exists pgbench_tellers", + "postgresql.log.database": "accounts", + "postgresql.log.timestamp": "2021-03-17 15:10:42.089 UTC", + "process.pid": 137, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:10:42.089Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 1672, + "message": "duration: 0.229 ms", + "postgresql.log.database": "accounts", + "postgresql.log.timestamp": "2021-03-17 15:10:42.089 UTC", + "process.pid": 137, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:10:42.089Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 1749, + "message": "statement: create table pgbench_tellers(tid int not null,bid int,tbalance int,filler char(84)) with (fillfactor=100)", + "postgresql.log.database": "accounts", + "postgresql.log.timestamp": "2021-03-17 15:10:42.089 UTC", + "process.pid": 137, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:10:42.092Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 1924, + "message": "duration: 3.339 ms", + "postgresql.log.database": "accounts", + "postgresql.log.timestamp": "2021-03-17 15:10:42.092 UTC", + "process.pid": 137, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:10:42.095Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 2001, + "message": "statement: drop table if exists pgbench_accounts", + "postgresql.log.database": "accounts", + "postgresql.log.timestamp": "2021-03-17 15:10:42.095 UTC", + "process.pid": 137, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:10:42.095Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 2108, + "message": "duration: 0.229 ms", + "postgresql.log.database": "accounts", + "postgresql.log.timestamp": "2021-03-17 15:10:42.095 UTC", + "process.pid": 137, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:10:42.095Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 2185, + "message": "statement: create table pgbench_accounts(aid int not null,bid int,abalance int,filler char(84)) with (fillfactor=100)", + "postgresql.log.database": "accounts", + "postgresql.log.timestamp": "2021-03-17 15:10:42.095 UTC", + "process.pid": 137, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:10:42.096Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 2364, + "message": "duration: 1.494 ms", + "postgresql.log.database": "accounts", + "postgresql.log.timestamp": "2021-03-17 15:10:42.096 UTC", + "process.pid": 137, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:10:42.097Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 2441, + "message": "statement: drop table if exists pgbench_branches", + "postgresql.log.database": "accounts", + "postgresql.log.timestamp": "2021-03-17 15:10:42.097 UTC", + "process.pid": 137, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:10:42.097Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 2548, + "message": "duration: 0.166 ms", + "postgresql.log.database": "accounts", + "postgresql.log.timestamp": "2021-03-17 15:10:42.097 UTC", + "process.pid": 137, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:10:42.097Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 2625, + "message": "statement: create table pgbench_branches(bid int not null,bbalance int,filler char(88)) with (fillfactor=100)", + "postgresql.log.database": "accounts", + "postgresql.log.timestamp": "2021-03-17 15:10:42.097 UTC", + "process.pid": 137, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:10:42.099Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 2793, + "message": "duration: 1.914 ms", + "postgresql.log.database": "accounts", + "postgresql.log.timestamp": "2021-03-17 15:10:42.099 UTC", + "process.pid": 137, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:10:42.099Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 2870, + "message": "statement: begin", + "postgresql.log.database": "accounts", + "postgresql.log.timestamp": "2021-03-17 15:10:42.099 UTC", + "process.pid": 137, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:10:42.100Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 2945, + "message": "duration: 0.559 ms", + "postgresql.log.database": "accounts", + "postgresql.log.timestamp": "2021-03-17 15:10:42.100 UTC", + "process.pid": 137, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:10:42.100Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 3022, + "message": "statement: insert into pgbench_branches(bid,bbalance) values(1,0)", + "postgresql.log.database": "accounts", + "postgresql.log.timestamp": "2021-03-17 15:10:42.100 UTC", + "process.pid": 137, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:10:42.100Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 3146, + "message": "duration: 0.399 ms", + "postgresql.log.database": "accounts", + "postgresql.log.timestamp": "2021-03-17 15:10:42.100 UTC", + "process.pid": 137, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:10:42.100Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 3223, + "message": "statement: insert into pgbench_tellers(tid,bid,tbalance) values (1,1,0)", + "postgresql.log.database": "accounts", + "postgresql.log.timestamp": "2021-03-17 15:10:42.100 UTC", + "process.pid": 137, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:10:42.101Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 3353, + "message": "duration: 0.281 ms", + "postgresql.log.database": "accounts", + "postgresql.log.timestamp": "2021-03-17 15:10:42.101 UTC", + "process.pid": 137, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:10:42.101Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 3430, + "message": "statement: insert into pgbench_tellers(tid,bid,tbalance) values (2,1,0)", + "postgresql.log.database": "accounts", + "postgresql.log.timestamp": "2021-03-17 15:10:42.101 UTC", + "process.pid": 137, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:10:42.101Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 3560, + "message": "duration: 0.090 ms", + "postgresql.log.database": "accounts", + "postgresql.log.timestamp": "2021-03-17 15:10:42.101 UTC", + "process.pid": 137, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:10:42.101Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 3637, + "message": "statement: insert into pgbench_tellers(tid,bid,tbalance) values (3,1,0)", + "postgresql.log.database": "accounts", + "postgresql.log.timestamp": "2021-03-17 15:10:42.101 UTC", + "process.pid": 137, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:10:42.101Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 3767, + "message": "duration: 0.077 ms", + "postgresql.log.database": "accounts", + "postgresql.log.timestamp": "2021-03-17 15:10:42.101 UTC", + "process.pid": 137, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:10:42.101Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 3844, + "message": "statement: insert into pgbench_tellers(tid,bid,tbalance) values (4,1,0)", + "postgresql.log.database": "accounts", + "postgresql.log.timestamp": "2021-03-17 15:10:42.101 UTC", + "process.pid": 137, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:10:42.101Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 3974, + "message": "duration: 0.052 ms", + "postgresql.log.database": "accounts", + "postgresql.log.timestamp": "2021-03-17 15:10:42.101 UTC", + "process.pid": 137, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:10:42.101Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 4051, + "message": "statement: insert into pgbench_tellers(tid,bid,tbalance) values (5,1,0)", + "postgresql.log.database": "accounts", + "postgresql.log.timestamp": "2021-03-17 15:10:42.101 UTC", + "process.pid": 137, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:10:42.101Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 4181, + "message": "duration: 0.090 ms", + "postgresql.log.database": "accounts", + "postgresql.log.timestamp": "2021-03-17 15:10:42.101 UTC", + "process.pid": 137, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:10:42.101Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 4258, + "message": "statement: insert into pgbench_tellers(tid,bid,tbalance) values (6,1,0)", + "postgresql.log.database": "accounts", + "postgresql.log.timestamp": "2021-03-17 15:10:42.101 UTC", + "process.pid": 137, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:10:42.101Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 4388, + "message": "duration: 0.075 ms", + "postgresql.log.database": "accounts", + "postgresql.log.timestamp": "2021-03-17 15:10:42.101 UTC", + "process.pid": 137, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:10:42.101Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 4465, + "message": "statement: insert into pgbench_tellers(tid,bid,tbalance) values (7,1,0)", + "postgresql.log.database": "accounts", + "postgresql.log.timestamp": "2021-03-17 15:10:42.101 UTC", + "process.pid": 137, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:10:42.101Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 4595, + "message": "duration: 0.059 ms", + "postgresql.log.database": "accounts", + "postgresql.log.timestamp": "2021-03-17 15:10:42.101 UTC", + "process.pid": 137, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:10:42.101Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 4672, + "message": "statement: insert into pgbench_tellers(tid,bid,tbalance) values (8,1,0)", + "postgresql.log.database": "accounts", + "postgresql.log.timestamp": "2021-03-17 15:10:42.101 UTC", + "process.pid": 137, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:10:42.101Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 4802, + "message": "duration: 0.072 ms", + "postgresql.log.database": "accounts", + "postgresql.log.timestamp": "2021-03-17 15:10:42.101 UTC", + "process.pid": 137, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:10:42.102Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 4879, + "message": "statement: insert into pgbench_tellers(tid,bid,tbalance) values (9,1,0)", + "postgresql.log.database": "accounts", + "postgresql.log.timestamp": "2021-03-17 15:10:42.102 UTC", + "process.pid": 137, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:10:42.102Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 5009, + "message": "duration: 0.077 ms", + "postgresql.log.database": "accounts", + "postgresql.log.timestamp": "2021-03-17 15:10:42.102 UTC", + "process.pid": 137, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:10:42.102Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 5086, + "message": "statement: insert into pgbench_tellers(tid,bid,tbalance) values (10,1,0)", + "postgresql.log.database": "accounts", + "postgresql.log.timestamp": "2021-03-17 15:10:42.102 UTC", + "process.pid": 137, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:10:42.102Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 5217, + "message": "duration: 0.073 ms", + "postgresql.log.database": "accounts", + "postgresql.log.timestamp": "2021-03-17 15:10:42.102 UTC", + "process.pid": 137, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:10:42.102Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 5294, + "message": "statement: commit", + "postgresql.log.database": "accounts", + "postgresql.log.timestamp": "2021-03-17 15:10:42.102 UTC", + "process.pid": 137, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:10:42.103Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 5370, + "message": "duration: 0.879 ms", + "postgresql.log.database": "accounts", + "postgresql.log.timestamp": "2021-03-17 15:10:42.103 UTC", + "process.pid": 137, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:10:42.103Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 5447, + "message": "statement: begin", + "postgresql.log.database": "accounts", + "postgresql.log.timestamp": "2021-03-17 15:10:42.103 UTC", + "process.pid": 137, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:10:42.103Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 5522, + "message": "duration: 0.062 ms", + "postgresql.log.database": "accounts", + "postgresql.log.timestamp": "2021-03-17 15:10:42.103 UTC", + "process.pid": 137, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:10:42.103Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 5599, + "message": "statement: truncate pgbench_accounts", + "postgresql.log.database": "accounts", + "postgresql.log.timestamp": "2021-03-17 15:10:42.103 UTC", + "process.pid": 137, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:10:42.103Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 5694, + "message": "duration: 0.363 ms", + "postgresql.log.database": "accounts", + "postgresql.log.timestamp": "2021-03-17 15:10:42.103 UTC", + "process.pid": 137, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:10:42.103Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 5771, + "message": "statement: copy pgbench_accounts from stdin", + "postgresql.log.database": "accounts", + "postgresql.log.timestamp": "2021-03-17 15:10:42.103 UTC", + "process.pid": 137, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:10:42.295Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 5873, + "message": "duration: 192.094 ms", + "postgresql.log.database": "accounts", + "postgresql.log.timestamp": "2021-03-17 15:10:42.295 UTC", + "process.pid": 137, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:10:42.296Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 5952, + "message": "statement: commit", + "postgresql.log.database": "accounts", + "postgresql.log.timestamp": "2021-03-17 15:10:42.296 UTC", + "process.pid": 137, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:10:42.297Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 6028, + "message": "duration: 1.318 ms", + "postgresql.log.database": "accounts", + "postgresql.log.timestamp": "2021-03-17 15:10:42.297 UTC", + "process.pid": 137, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:10:42.297Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 6105, + "message": "statement: vacuum analyze pgbench_branches", + "postgresql.log.database": "accounts", + "postgresql.log.timestamp": "2021-03-17 15:10:42.297 UTC", + "process.pid": 137, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:10:42.314Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 6206, + "message": "duration: 17.051 ms", + "postgresql.log.database": "accounts", + "postgresql.log.timestamp": "2021-03-17 15:10:42.314 UTC", + "process.pid": 137, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:10:42.314Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 6284, + "message": "statement: vacuum analyze pgbench_tellers", + "postgresql.log.database": "accounts", + "postgresql.log.timestamp": "2021-03-17 15:10:42.314 UTC", + "process.pid": 137, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:10:42.317Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 6384, + "message": "duration: 2.798 ms", + "postgresql.log.database": "accounts", + "postgresql.log.timestamp": "2021-03-17 15:10:42.317 UTC", + "process.pid": 137, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:10:42.317Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 6461, + "message": "statement: vacuum analyze pgbench_accounts", + "postgresql.log.database": "accounts", + "postgresql.log.timestamp": "2021-03-17 15:10:42.317 UTC", + "process.pid": 137, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:10:42.406Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 6562, + "message": "duration: 88.800 ms", + "postgresql.log.database": "accounts", + "postgresql.log.timestamp": "2021-03-17 15:10:42.406 UTC", + "process.pid": 137, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:10:42.406Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 6640, + "message": "statement: vacuum analyze pgbench_history", + "postgresql.log.database": "accounts", + "postgresql.log.timestamp": "2021-03-17 15:10:42.406 UTC", + "process.pid": 137, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:10:42.406Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 6740, + "message": "duration: 0.442 ms", + "postgresql.log.database": "accounts", + "postgresql.log.timestamp": "2021-03-17 15:10:42.406 UTC", + "process.pid": 137, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:10:42.406Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 6817, + "message": "statement: alter table pgbench_branches add primary key (bid)", + "postgresql.log.database": "accounts", + "postgresql.log.timestamp": "2021-03-17 15:10:42.406 UTC", + "process.pid": 137, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:10:42.409Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 6937, + "message": "duration: 2.602 ms", + "postgresql.log.database": "accounts", + "postgresql.log.timestamp": "2021-03-17 15:10:42.409 UTC", + "process.pid": 137, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:10:42.409Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 7014, + "message": "statement: alter table pgbench_tellers add primary key (tid)", + "postgresql.log.database": "accounts", + "postgresql.log.timestamp": "2021-03-17 15:10:42.409 UTC", + "process.pid": 137, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:10:42.411Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 7133, + "message": "duration: 2.433 ms", + "postgresql.log.database": "accounts", + "postgresql.log.timestamp": "2021-03-17 15:10:42.411 UTC", + "process.pid": 137, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:10:42.411Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 7210, + "message": "statement: alter table pgbench_accounts add primary key (aid)", + "postgresql.log.database": "accounts", + "postgresql.log.timestamp": "2021-03-17 15:10:42.411 UTC", + "process.pid": 137, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:10:42.454Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 7330, + "message": "duration: 42.396 ms", + "postgresql.log.database": "accounts", + "postgresql.log.timestamp": "2021-03-17 15:10:42.454 UTC", + "process.pid": 137, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:10:44.222Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 7408, + "message": "statement: drop table if exists pgbench_history", + "postgresql.log.database": "accounts", + "postgresql.log.timestamp": "2021-03-17 15:10:44.222 UTC", + "process.pid": 139, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:10:44.226Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 7514, + "message": "duration: 4.849 ms", + "postgresql.log.database": "accounts", + "postgresql.log.timestamp": "2021-03-17 15:10:44.226 UTC", + "process.pid": 139, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:10:44.228Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 7591, + "message": "statement: create table pgbench_history(tid int,bid int,aid int,delta int,mtime timestamp,filler char(22))", + "postgresql.log.database": "accounts", + "postgresql.log.timestamp": "2021-03-17 15:10:44.228 UTC", + "process.pid": 139, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:10:44.231Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 7759, + "message": "duration: 3.311 ms", + "postgresql.log.database": "accounts", + "postgresql.log.timestamp": "2021-03-17 15:10:44.231 UTC", + "process.pid": 139, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:10:44.232Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 7836, + "message": "statement: drop table if exists pgbench_tellers", + "postgresql.log.database": "accounts", + "postgresql.log.timestamp": "2021-03-17 15:10:44.232 UTC", + "process.pid": 139, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:10:44.235Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 7942, + "message": "duration: 3.302 ms", + "postgresql.log.database": "accounts", + "postgresql.log.timestamp": "2021-03-17 15:10:44.235 UTC", + "process.pid": 139, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:10:44.236Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 8019, + "message": "statement: create table pgbench_tellers(tid int not null,bid int,tbalance int,filler char(84)) with (fillfactor=100)", + "postgresql.log.database": "accounts", + "postgresql.log.timestamp": "2021-03-17 15:10:44.236 UTC", + "process.pid": 139, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:10:44.238Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 8194, + "message": "duration: 2.279 ms", + "postgresql.log.database": "accounts", + "postgresql.log.timestamp": "2021-03-17 15:10:44.238 UTC", + "process.pid": 139, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:10:44.238Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 8271, + "message": "statement: drop table if exists pgbench_accounts", + "postgresql.log.database": "accounts", + "postgresql.log.timestamp": "2021-03-17 15:10:44.238 UTC", + "process.pid": 139, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:10:44.245Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 8378, + "message": "duration: 7.119 ms", + "postgresql.log.database": "accounts", + "postgresql.log.timestamp": "2021-03-17 15:10:44.245 UTC", + "process.pid": 139, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:10:44.248Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 8455, + "message": "statement: create table pgbench_accounts(aid int not null,bid int,abalance int,filler char(84)) with (fillfactor=100)", + "postgresql.log.database": "accounts", + "postgresql.log.timestamp": "2021-03-17 15:10:44.248 UTC", + "process.pid": 139, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:10:44.250Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 8634, + "message": "duration: 2.267 ms", + "postgresql.log.database": "accounts", + "postgresql.log.timestamp": "2021-03-17 15:10:44.250 UTC", + "process.pid": 139, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:10:44.255Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 8711, + "message": "statement: drop table if exists pgbench_branches", + "postgresql.log.database": "accounts", + "postgresql.log.timestamp": "2021-03-17 15:10:44.255 UTC", + "process.pid": 139, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:10:44.260Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 8818, + "message": "duration: 4.857 ms", + "postgresql.log.database": "accounts", + "postgresql.log.timestamp": "2021-03-17 15:10:44.260 UTC", + "process.pid": 139, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:10:44.263Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 8895, + "message": "statement: create table pgbench_branches(bid int not null,bbalance int,filler char(88)) with (fillfactor=100)", + "postgresql.log.database": "accounts", + "postgresql.log.timestamp": "2021-03-17 15:10:44.263 UTC", + "process.pid": 139, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:10:44.265Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 9063, + "message": "duration: 2.494 ms", + "postgresql.log.database": "accounts", + "postgresql.log.timestamp": "2021-03-17 15:10:44.265 UTC", + "process.pid": 139, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:10:44.265Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 9140, + "message": "statement: begin", + "postgresql.log.database": "accounts", + "postgresql.log.timestamp": "2021-03-17 15:10:44.265 UTC", + "process.pid": 139, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:10:44.265Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 9215, + "message": "duration: 0.081 ms", + "postgresql.log.database": "accounts", + "postgresql.log.timestamp": "2021-03-17 15:10:44.265 UTC", + "process.pid": 139, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:10:44.265Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 9292, + "message": "statement: insert into pgbench_branches(bid,bbalance) values(1,0)", + "postgresql.log.database": "accounts", + "postgresql.log.timestamp": "2021-03-17 15:10:44.265 UTC", + "process.pid": 139, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:10:44.266Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 9416, + "message": "duration: 0.319 ms", + "postgresql.log.database": "accounts", + "postgresql.log.timestamp": "2021-03-17 15:10:44.266 UTC", + "process.pid": 139, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:10:44.266Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 9493, + "message": "statement: insert into pgbench_tellers(tid,bid,tbalance) values (1,1,0)", + "postgresql.log.database": "accounts", + "postgresql.log.timestamp": "2021-03-17 15:10:44.266 UTC", + "process.pid": 139, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:10:44.266Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 9623, + "message": "duration: 0.189 ms", + "postgresql.log.database": "accounts", + "postgresql.log.timestamp": "2021-03-17 15:10:44.266 UTC", + "process.pid": 139, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:10:44.266Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 9700, + "message": "statement: insert into pgbench_tellers(tid,bid,tbalance) values (2,1,0)", + "postgresql.log.database": "accounts", + "postgresql.log.timestamp": "2021-03-17 15:10:44.266 UTC", + "process.pid": 139, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:10:44.266Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 9830, + "message": "duration: 0.071 ms", + "postgresql.log.database": "accounts", + "postgresql.log.timestamp": "2021-03-17 15:10:44.266 UTC", + "process.pid": 139, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:10:44.266Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 9907, + "message": "statement: insert into pgbench_tellers(tid,bid,tbalance) values (3,1,0)", + "postgresql.log.database": "accounts", + "postgresql.log.timestamp": "2021-03-17 15:10:44.266 UTC", + "process.pid": 139, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:10:44.266Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 10037, + "message": "duration: 0.075 ms", + "postgresql.log.database": "accounts", + "postgresql.log.timestamp": "2021-03-17 15:10:44.266 UTC", + "process.pid": 139, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:10:44.266Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 10114, + "message": "statement: insert into pgbench_tellers(tid,bid,tbalance) values (4,1,0)", + "postgresql.log.database": "accounts", + "postgresql.log.timestamp": "2021-03-17 15:10:44.266 UTC", + "process.pid": 139, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:10:44.266Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 10244, + "message": "duration: 0.087 ms", + "postgresql.log.database": "accounts", + "postgresql.log.timestamp": "2021-03-17 15:10:44.266 UTC", + "process.pid": 139, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:10:44.266Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 10321, + "message": "statement: insert into pgbench_tellers(tid,bid,tbalance) values (5,1,0)", + "postgresql.log.database": "accounts", + "postgresql.log.timestamp": "2021-03-17 15:10:44.266 UTC", + "process.pid": 139, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + }, + { + "@timestamp": "2021-03-17T15:10:44.266Z", + "event.category": [ + "database" + ], + "event.dataset": "postgresql.log", + "event.kind": "event", + "event.module": "postgresql", + "event.timezone": "UTC", + "event.type": [ + "info" + ], + "fileset.name": "log", + "input.type": "log", + "log.level": "LOG", + "log.offset": 10451, + "message": "duration: 0.109 ms", + "postgresql.log.database": "accounts", + "postgresql.log.timestamp": "2021-03-17 15:10:44.266 UTC", + "process.pid": 139, + "related.user": [ + "postgres" + ], + "service.type": "postgresql", + "user.name": "postgres" + } +] \ No newline at end of file From cb62f872a606213f8e94fca00377f912875c352a Mon Sep 17 00:00:00 2001 From: Jaime Soriano Pastor Date: Wed, 17 Mar 2021 16:44:00 +0100 Subject: [PATCH 2/7] Parse statements without durations --- .../postgresql/log/ingest/pipeline-log.yml | 2 +- ...sql-13-log-statement-all.log-expected.json | 150 ++++++++++++------ ...esql-9-log-statement-all.log-expected.json | 150 ++++++++++++------ 3 files changed, 201 insertions(+), 101 deletions(-) diff --git a/filebeat/module/postgresql/log/ingest/pipeline-log.yml b/filebeat/module/postgresql/log/ingest/pipeline-log.yml index 3ca507d58ba..c0bb329c800 100644 --- a/filebeat/module/postgresql/log/ingest/pipeline-log.yml +++ b/filebeat/module/postgresql/log/ingest/pipeline-log.yml @@ -4,7 +4,7 @@ processors: field: raw_message ignore_missing: true patterns: - - '^(\[%{NUMBER:process.pid:long}(-%{BASE16FLOAT:postgresql.log.session_line_number:long})?\] ((\[%{USERNAME:user.name}\]@\[%{POSTGRESQL_DB_NAME:postgresql.log.database}\]|%{USERNAME:user.name}@%{POSTGRESQL_DB_NAME:postgresql.log.database}) )?)?%{WORD:log.level}: (?:%{POSTGRESQL_ERROR:postgresql.log.sql_state_code}|%{SPACE})(duration: %{NUMBER:temp.duration:float} ms %{POSTGRESQL_QUERY_STEP}: %{GREEDYDATA:postgresql.log.query}|: %{GREEDYDATA:message}|%{GREEDYDATA:message})' + - '^(\[%{NUMBER:process.pid:long}(-%{BASE16FLOAT:postgresql.log.session_line_number:long})?\] ((\[%{USERNAME:user.name}\]@\[%{POSTGRESQL_DB_NAME:postgresql.log.database}\]|%{USERNAME:user.name}@%{POSTGRESQL_DB_NAME:postgresql.log.database}) )?)?%{WORD:log.level}: (?:%{POSTGRESQL_ERROR:postgresql.log.sql_state_code}|%{SPACE})(duration: %{NUMBER:temp.duration:float} ms %{POSTGRESQL_QUERY_STEP}: %{GREEDYDATA:postgresql.log.query}|statement: %{GREEDYDATA:postgresql.log.query}|: %{GREEDYDATA:message}|%{GREEDYDATA:message})' pattern_definitions: GREEDYDATA: |- (.| diff --git a/filebeat/module/postgresql/log/test/postgresql-13-log-statement-all.log-expected.json b/filebeat/module/postgresql/log/test/postgresql-13-log-statement-all.log-expected.json index 389d82f3c11..9f107f845db 100644 --- a/filebeat/module/postgresql/log/test/postgresql-13-log-statement-all.log-expected.json +++ b/filebeat/module/postgresql/log/test/postgresql-13-log-statement-all.log-expected.json @@ -15,8 +15,9 @@ "input.type": "log", "log.level": "LOG", "log.offset": 0, - "message": "statement: CREATE DATABASE accounts;", + "message": "2021-03-17 15:18:00.201 UTC [149] postgres@postgres LOG: statement: CREATE DATABASE accounts;", "postgresql.log.database": "postgres", + "postgresql.log.query": "CREATE DATABASE accounts;", "postgresql.log.timestamp": "2021-03-17 15:18:00.201 UTC", "process.pid": 149, "related.user": [ @@ -67,8 +68,9 @@ "input.type": "log", "log.level": "LOG", "log.offset": 174, - "message": "statement: drop table if exists pgbench_accounts, pgbench_branches, pgbench_history, pgbench_tellers", + "message": "2021-03-17 15:18:02.732 UTC [151] postgres@accounts LOG: statement: drop table if exists pgbench_accounts, pgbench_branches, pgbench_history, pgbench_tellers", "postgresql.log.database": "accounts", + "postgresql.log.query": "drop table if exists pgbench_accounts, pgbench_branches, pgbench_history, pgbench_tellers", "postgresql.log.timestamp": "2021-03-17 15:18:02.732 UTC", "process.pid": 151, "related.user": [ @@ -119,8 +121,9 @@ "input.type": "log", "log.level": "LOG", "log.offset": 410, - "message": "statement: create table pgbench_history(tid int,bid int,aid int,delta int,mtime timestamp,filler char(22))", + "message": "2021-03-17 15:18:02.732 UTC [151] postgres@accounts LOG: statement: create table pgbench_history(tid int,bid int,aid int,delta int,mtime timestamp,filler char(22))", "postgresql.log.database": "accounts", + "postgresql.log.query": "create table pgbench_history(tid int,bid int,aid int,delta int,mtime timestamp,filler char(22))", "postgresql.log.timestamp": "2021-03-17 15:18:02.732 UTC", "process.pid": 151, "related.user": [ @@ -171,8 +174,9 @@ "input.type": "log", "log.level": "LOG", "log.offset": 655, - "message": "statement: create table pgbench_tellers(tid int not null,bid int,tbalance int,filler char(84)) with (fillfactor=100)", + "message": "2021-03-17 15:18:02.738 UTC [151] postgres@accounts LOG: statement: create table pgbench_tellers(tid int not null,bid int,tbalance int,filler char(84)) with (fillfactor=100)", "postgresql.log.database": "accounts", + "postgresql.log.query": "create table pgbench_tellers(tid int not null,bid int,tbalance int,filler char(84)) with (fillfactor=100)", "postgresql.log.timestamp": "2021-03-17 15:18:02.738 UTC", "process.pid": 151, "related.user": [ @@ -223,8 +227,9 @@ "input.type": "log", "log.level": "LOG", "log.offset": 907, - "message": "statement: create table pgbench_accounts(aid int not null,bid int,abalance int,filler char(84)) with (fillfactor=100)", + "message": "2021-03-17 15:18:02.740 UTC [151] postgres@accounts LOG: statement: create table pgbench_accounts(aid int not null,bid int,abalance int,filler char(84)) with (fillfactor=100)", "postgresql.log.database": "accounts", + "postgresql.log.query": "create table pgbench_accounts(aid int not null,bid int,abalance int,filler char(84)) with (fillfactor=100)", "postgresql.log.timestamp": "2021-03-17 15:18:02.740 UTC", "process.pid": 151, "related.user": [ @@ -275,8 +280,9 @@ "input.type": "log", "log.level": "LOG", "log.offset": 1163, - "message": "statement: create table pgbench_branches(bid int not null,bbalance int,filler char(88)) with (fillfactor=100)", + "message": "2021-03-17 15:18:02.741 UTC [151] postgres@accounts LOG: statement: create table pgbench_branches(bid int not null,bbalance int,filler char(88)) with (fillfactor=100)", "postgresql.log.database": "accounts", + "postgresql.log.query": "create table pgbench_branches(bid int not null,bbalance int,filler char(88)) with (fillfactor=100)", "postgresql.log.timestamp": "2021-03-17 15:18:02.741 UTC", "process.pid": 151, "related.user": [ @@ -327,8 +333,9 @@ "input.type": "log", "log.level": "LOG", "log.offset": 1408, - "message": "statement: begin", + "message": "2021-03-17 15:18:02.743 UTC [151] postgres@accounts LOG: statement: begin", "postgresql.log.database": "accounts", + "postgresql.log.query": "begin", "postgresql.log.timestamp": "2021-03-17 15:18:02.743 UTC", "process.pid": 151, "related.user": [ @@ -379,8 +386,9 @@ "input.type": "log", "log.level": "LOG", "log.offset": 1560, - "message": "statement: truncate table pgbench_accounts, pgbench_branches, pgbench_history, pgbench_tellers", + "message": "2021-03-17 15:18:02.743 UTC [151] postgres@accounts LOG: statement: truncate table pgbench_accounts, pgbench_branches, pgbench_history, pgbench_tellers", "postgresql.log.database": "accounts", + "postgresql.log.query": "truncate table pgbench_accounts, pgbench_branches, pgbench_history, pgbench_tellers", "postgresql.log.timestamp": "2021-03-17 15:18:02.743 UTC", "process.pid": 151, "related.user": [ @@ -431,8 +439,9 @@ "input.type": "log", "log.level": "LOG", "log.offset": 1790, - "message": "statement: insert into pgbench_branches(bid,bbalance) values(1,0)", + "message": "2021-03-17 15:18:02.744 UTC [151] postgres@accounts LOG: statement: insert into pgbench_branches(bid,bbalance) values(1,0)", "postgresql.log.database": "accounts", + "postgresql.log.query": "insert into pgbench_branches(bid,bbalance) values(1,0)", "postgresql.log.timestamp": "2021-03-17 15:18:02.744 UTC", "process.pid": 151, "related.user": [ @@ -483,8 +492,9 @@ "input.type": "log", "log.level": "LOG", "log.offset": 1991, - "message": "statement: insert into pgbench_tellers(tid,bid,tbalance) values (1,1,0)", + "message": "2021-03-17 15:18:02.744 UTC [151] postgres@accounts LOG: statement: insert into pgbench_tellers(tid,bid,tbalance) values (1,1,0)", "postgresql.log.database": "accounts", + "postgresql.log.query": "insert into pgbench_tellers(tid,bid,tbalance) values (1,1,0)", "postgresql.log.timestamp": "2021-03-17 15:18:02.744 UTC", "process.pid": 151, "related.user": [ @@ -535,8 +545,9 @@ "input.type": "log", "log.level": "LOG", "log.offset": 2198, - "message": "statement: insert into pgbench_tellers(tid,bid,tbalance) values (2,1,0)", + "message": "2021-03-17 15:18:02.745 UTC [151] postgres@accounts LOG: statement: insert into pgbench_tellers(tid,bid,tbalance) values (2,1,0)", "postgresql.log.database": "accounts", + "postgresql.log.query": "insert into pgbench_tellers(tid,bid,tbalance) values (2,1,0)", "postgresql.log.timestamp": "2021-03-17 15:18:02.745 UTC", "process.pid": 151, "related.user": [ @@ -587,8 +598,9 @@ "input.type": "log", "log.level": "LOG", "log.offset": 2405, - "message": "statement: insert into pgbench_tellers(tid,bid,tbalance) values (3,1,0)", + "message": "2021-03-17 15:18:02.746 UTC [151] postgres@accounts LOG: statement: insert into pgbench_tellers(tid,bid,tbalance) values (3,1,0)", "postgresql.log.database": "accounts", + "postgresql.log.query": "insert into pgbench_tellers(tid,bid,tbalance) values (3,1,0)", "postgresql.log.timestamp": "2021-03-17 15:18:02.746 UTC", "process.pid": 151, "related.user": [ @@ -639,8 +651,9 @@ "input.type": "log", "log.level": "LOG", "log.offset": 2612, - "message": "statement: insert into pgbench_tellers(tid,bid,tbalance) values (4,1,0)", + "message": "2021-03-17 15:18:02.746 UTC [151] postgres@accounts LOG: statement: insert into pgbench_tellers(tid,bid,tbalance) values (4,1,0)", "postgresql.log.database": "accounts", + "postgresql.log.query": "insert into pgbench_tellers(tid,bid,tbalance) values (4,1,0)", "postgresql.log.timestamp": "2021-03-17 15:18:02.746 UTC", "process.pid": 151, "related.user": [ @@ -691,8 +704,9 @@ "input.type": "log", "log.level": "LOG", "log.offset": 2819, - "message": "statement: insert into pgbench_tellers(tid,bid,tbalance) values (5,1,0)", + "message": "2021-03-17 15:18:02.746 UTC [151] postgres@accounts LOG: statement: insert into pgbench_tellers(tid,bid,tbalance) values (5,1,0)", "postgresql.log.database": "accounts", + "postgresql.log.query": "insert into pgbench_tellers(tid,bid,tbalance) values (5,1,0)", "postgresql.log.timestamp": "2021-03-17 15:18:02.746 UTC", "process.pid": 151, "related.user": [ @@ -743,8 +757,9 @@ "input.type": "log", "log.level": "LOG", "log.offset": 3026, - "message": "statement: insert into pgbench_tellers(tid,bid,tbalance) values (6,1,0)", + "message": "2021-03-17 15:18:02.747 UTC [151] postgres@accounts LOG: statement: insert into pgbench_tellers(tid,bid,tbalance) values (6,1,0)", "postgresql.log.database": "accounts", + "postgresql.log.query": "insert into pgbench_tellers(tid,bid,tbalance) values (6,1,0)", "postgresql.log.timestamp": "2021-03-17 15:18:02.747 UTC", "process.pid": 151, "related.user": [ @@ -795,8 +810,9 @@ "input.type": "log", "log.level": "LOG", "log.offset": 3233, - "message": "statement: insert into pgbench_tellers(tid,bid,tbalance) values (7,1,0)", + "message": "2021-03-17 15:18:02.747 UTC [151] postgres@accounts LOG: statement: insert into pgbench_tellers(tid,bid,tbalance) values (7,1,0)", "postgresql.log.database": "accounts", + "postgresql.log.query": "insert into pgbench_tellers(tid,bid,tbalance) values (7,1,0)", "postgresql.log.timestamp": "2021-03-17 15:18:02.747 UTC", "process.pid": 151, "related.user": [ @@ -847,8 +863,9 @@ "input.type": "log", "log.level": "LOG", "log.offset": 3440, - "message": "statement: insert into pgbench_tellers(tid,bid,tbalance) values (8,1,0)", + "message": "2021-03-17 15:18:02.747 UTC [151] postgres@accounts LOG: statement: insert into pgbench_tellers(tid,bid,tbalance) values (8,1,0)", "postgresql.log.database": "accounts", + "postgresql.log.query": "insert into pgbench_tellers(tid,bid,tbalance) values (8,1,0)", "postgresql.log.timestamp": "2021-03-17 15:18:02.747 UTC", "process.pid": 151, "related.user": [ @@ -899,8 +916,9 @@ "input.type": "log", "log.level": "LOG", "log.offset": 3647, - "message": "statement: insert into pgbench_tellers(tid,bid,tbalance) values (9,1,0)", + "message": "2021-03-17 15:18:02.747 UTC [151] postgres@accounts LOG: statement: insert into pgbench_tellers(tid,bid,tbalance) values (9,1,0)", "postgresql.log.database": "accounts", + "postgresql.log.query": "insert into pgbench_tellers(tid,bid,tbalance) values (9,1,0)", "postgresql.log.timestamp": "2021-03-17 15:18:02.747 UTC", "process.pid": 151, "related.user": [ @@ -951,8 +969,9 @@ "input.type": "log", "log.level": "LOG", "log.offset": 3854, - "message": "statement: insert into pgbench_tellers(tid,bid,tbalance) values (10,1,0)", + "message": "2021-03-17 15:18:02.747 UTC [151] postgres@accounts LOG: statement: insert into pgbench_tellers(tid,bid,tbalance) values (10,1,0)", "postgresql.log.database": "accounts", + "postgresql.log.query": "insert into pgbench_tellers(tid,bid,tbalance) values (10,1,0)", "postgresql.log.timestamp": "2021-03-17 15:18:02.747 UTC", "process.pid": 151, "related.user": [ @@ -1003,8 +1022,9 @@ "input.type": "log", "log.level": "LOG", "log.offset": 4062, - "message": "statement: copy pgbench_accounts from stdin", + "message": "2021-03-17 15:18:02.747 UTC [151] postgres@accounts LOG: statement: copy pgbench_accounts from stdin", "postgresql.log.database": "accounts", + "postgresql.log.query": "copy pgbench_accounts from stdin", "postgresql.log.timestamp": "2021-03-17 15:18:02.747 UTC", "process.pid": 151, "related.user": [ @@ -1055,8 +1075,9 @@ "input.type": "log", "log.level": "LOG", "log.offset": 4243, - "message": "statement: commit", + "message": "2021-03-17 15:18:02.987 UTC [151] postgres@accounts LOG: statement: commit", "postgresql.log.database": "accounts", + "postgresql.log.query": "commit", "postgresql.log.timestamp": "2021-03-17 15:18:02.987 UTC", "process.pid": 151, "related.user": [ @@ -1107,8 +1128,9 @@ "input.type": "log", "log.level": "LOG", "log.offset": 4397, - "message": "statement: vacuum analyze pgbench_branches", + "message": "2021-03-17 15:18:03.057 UTC [151] postgres@accounts LOG: statement: vacuum analyze pgbench_branches", "postgresql.log.database": "accounts", + "postgresql.log.query": "vacuum analyze pgbench_branches", "postgresql.log.timestamp": "2021-03-17 15:18:03.057 UTC", "process.pid": 151, "related.user": [ @@ -1159,8 +1181,9 @@ "input.type": "log", "log.level": "LOG", "log.offset": 4576, - "message": "statement: vacuum analyze pgbench_tellers", + "message": "2021-03-17 15:18:03.073 UTC [151] postgres@accounts LOG: statement: vacuum analyze pgbench_tellers", "postgresql.log.database": "accounts", + "postgresql.log.query": "vacuum analyze pgbench_tellers", "postgresql.log.timestamp": "2021-03-17 15:18:03.073 UTC", "process.pid": 151, "related.user": [ @@ -1211,8 +1234,9 @@ "input.type": "log", "log.level": "LOG", "log.offset": 4753, - "message": "statement: vacuum analyze pgbench_accounts", + "message": "2021-03-17 15:18:03.077 UTC [151] postgres@accounts LOG: statement: vacuum analyze pgbench_accounts", "postgresql.log.database": "accounts", + "postgresql.log.query": "vacuum analyze pgbench_accounts", "postgresql.log.timestamp": "2021-03-17 15:18:03.077 UTC", "process.pid": 151, "related.user": [ @@ -1263,8 +1287,9 @@ "input.type": "log", "log.level": "LOG", "log.offset": 4932, - "message": "statement: vacuum analyze pgbench_history", + "message": "2021-03-17 15:18:03.158 UTC [151] postgres@accounts LOG: statement: vacuum analyze pgbench_history", "postgresql.log.database": "accounts", + "postgresql.log.query": "vacuum analyze pgbench_history", "postgresql.log.timestamp": "2021-03-17 15:18:03.158 UTC", "process.pid": 151, "related.user": [ @@ -1315,8 +1340,9 @@ "input.type": "log", "log.level": "LOG", "log.offset": 5109, - "message": "statement: alter table pgbench_branches add primary key (bid)", + "message": "2021-03-17 15:18:03.159 UTC [151] postgres@accounts LOG: statement: alter table pgbench_branches add primary key (bid)", "postgresql.log.database": "accounts", + "postgresql.log.query": "alter table pgbench_branches add primary key (bid)", "postgresql.log.timestamp": "2021-03-17 15:18:03.159 UTC", "process.pid": 151, "related.user": [ @@ -1367,8 +1393,9 @@ "input.type": "log", "log.level": "LOG", "log.offset": 5306, - "message": "statement: alter table pgbench_tellers add primary key (tid)", + "message": "2021-03-17 15:18:03.165 UTC [151] postgres@accounts LOG: statement: alter table pgbench_tellers add primary key (tid)", "postgresql.log.database": "accounts", + "postgresql.log.query": "alter table pgbench_tellers add primary key (tid)", "postgresql.log.timestamp": "2021-03-17 15:18:03.165 UTC", "process.pid": 151, "related.user": [ @@ -1419,8 +1446,9 @@ "input.type": "log", "log.level": "LOG", "log.offset": 5502, - "message": "statement: alter table pgbench_accounts add primary key (aid)", + "message": "2021-03-17 15:18:03.168 UTC [151] postgres@accounts LOG: statement: alter table pgbench_accounts add primary key (aid)", "postgresql.log.database": "accounts", + "postgresql.log.query": "alter table pgbench_accounts add primary key (aid)", "postgresql.log.timestamp": "2021-03-17 15:18:03.168 UTC", "process.pid": 151, "related.user": [ @@ -1471,8 +1499,9 @@ "input.type": "log", "log.level": "LOG", "log.offset": 5700, - "message": "statement: drop table if exists pgbench_accounts, pgbench_branches, pgbench_history, pgbench_tellers", + "message": "2021-03-17 15:18:04.110 UTC [154] postgres@accounts LOG: statement: drop table if exists pgbench_accounts, pgbench_branches, pgbench_history, pgbench_tellers", "postgresql.log.database": "accounts", + "postgresql.log.query": "drop table if exists pgbench_accounts, pgbench_branches, pgbench_history, pgbench_tellers", "postgresql.log.timestamp": "2021-03-17 15:18:04.110 UTC", "process.pid": 154, "related.user": [ @@ -1523,8 +1552,9 @@ "input.type": "log", "log.level": "LOG", "log.offset": 5937, - "message": "statement: create table pgbench_history(tid int,bid int,aid int,delta int,mtime timestamp,filler char(22))", + "message": "2021-03-17 15:18:04.132 UTC [154] postgres@accounts LOG: statement: create table pgbench_history(tid int,bid int,aid int,delta int,mtime timestamp,filler char(22))", "postgresql.log.database": "accounts", + "postgresql.log.query": "create table pgbench_history(tid int,bid int,aid int,delta int,mtime timestamp,filler char(22))", "postgresql.log.timestamp": "2021-03-17 15:18:04.132 UTC", "process.pid": 154, "related.user": [ @@ -1575,8 +1605,9 @@ "input.type": "log", "log.level": "LOG", "log.offset": 6183, - "message": "statement: create table pgbench_tellers(tid int not null,bid int,tbalance int,filler char(84)) with (fillfactor=100)", + "message": "2021-03-17 15:18:04.143 UTC [154] postgres@accounts LOG: statement: create table pgbench_tellers(tid int not null,bid int,tbalance int,filler char(84)) with (fillfactor=100)", "postgresql.log.database": "accounts", + "postgresql.log.query": "create table pgbench_tellers(tid int not null,bid int,tbalance int,filler char(84)) with (fillfactor=100)", "postgresql.log.timestamp": "2021-03-17 15:18:04.143 UTC", "process.pid": 154, "related.user": [ @@ -1627,8 +1658,9 @@ "input.type": "log", "log.level": "LOG", "log.offset": 6435, - "message": "statement: create table pgbench_accounts(aid int not null,bid int,abalance int,filler char(84)) with (fillfactor=100)", + "message": "2021-03-17 15:18:04.152 UTC [154] postgres@accounts LOG: statement: create table pgbench_accounts(aid int not null,bid int,abalance int,filler char(84)) with (fillfactor=100)", "postgresql.log.database": "accounts", + "postgresql.log.query": "create table pgbench_accounts(aid int not null,bid int,abalance int,filler char(84)) with (fillfactor=100)", "postgresql.log.timestamp": "2021-03-17 15:18:04.152 UTC", "process.pid": 154, "related.user": [ @@ -1679,8 +1711,9 @@ "input.type": "log", "log.level": "LOG", "log.offset": 6691, - "message": "statement: create table pgbench_branches(bid int not null,bbalance int,filler char(88)) with (fillfactor=100)", + "message": "2021-03-17 15:18:04.156 UTC [154] postgres@accounts LOG: statement: create table pgbench_branches(bid int not null,bbalance int,filler char(88)) with (fillfactor=100)", "postgresql.log.database": "accounts", + "postgresql.log.query": "create table pgbench_branches(bid int not null,bbalance int,filler char(88)) with (fillfactor=100)", "postgresql.log.timestamp": "2021-03-17 15:18:04.156 UTC", "process.pid": 154, "related.user": [ @@ -1731,8 +1764,9 @@ "input.type": "log", "log.level": "LOG", "log.offset": 6936, - "message": "statement: begin", + "message": "2021-03-17 15:18:04.164 UTC [154] postgres@accounts LOG: statement: begin", "postgresql.log.database": "accounts", + "postgresql.log.query": "begin", "postgresql.log.timestamp": "2021-03-17 15:18:04.164 UTC", "process.pid": 154, "related.user": [ @@ -1783,8 +1817,9 @@ "input.type": "log", "log.level": "LOG", "log.offset": 7088, - "message": "statement: truncate table pgbench_accounts, pgbench_branches, pgbench_history, pgbench_tellers", + "message": "2021-03-17 15:18:04.164 UTC [154] postgres@accounts LOG: statement: truncate table pgbench_accounts, pgbench_branches, pgbench_history, pgbench_tellers", "postgresql.log.database": "accounts", + "postgresql.log.query": "truncate table pgbench_accounts, pgbench_branches, pgbench_history, pgbench_tellers", "postgresql.log.timestamp": "2021-03-17 15:18:04.164 UTC", "process.pid": 154, "related.user": [ @@ -1835,8 +1870,9 @@ "input.type": "log", "log.level": "LOG", "log.offset": 7318, - "message": "statement: insert into pgbench_branches(bid,bbalance) values(1,0)", + "message": "2021-03-17 15:18:04.164 UTC [154] postgres@accounts LOG: statement: insert into pgbench_branches(bid,bbalance) values(1,0)", "postgresql.log.database": "accounts", + "postgresql.log.query": "insert into pgbench_branches(bid,bbalance) values(1,0)", "postgresql.log.timestamp": "2021-03-17 15:18:04.164 UTC", "process.pid": 154, "related.user": [ @@ -1887,8 +1923,9 @@ "input.type": "log", "log.level": "LOG", "log.offset": 7519, - "message": "statement: insert into pgbench_tellers(tid,bid,tbalance) values (1,1,0)", + "message": "2021-03-17 15:18:04.165 UTC [154] postgres@accounts LOG: statement: insert into pgbench_tellers(tid,bid,tbalance) values (1,1,0)", "postgresql.log.database": "accounts", + "postgresql.log.query": "insert into pgbench_tellers(tid,bid,tbalance) values (1,1,0)", "postgresql.log.timestamp": "2021-03-17 15:18:04.165 UTC", "process.pid": 154, "related.user": [ @@ -1939,8 +1976,9 @@ "input.type": "log", "log.level": "LOG", "log.offset": 7726, - "message": "statement: insert into pgbench_tellers(tid,bid,tbalance) values (2,1,0)", + "message": "2021-03-17 15:18:04.165 UTC [154] postgres@accounts LOG: statement: insert into pgbench_tellers(tid,bid,tbalance) values (2,1,0)", "postgresql.log.database": "accounts", + "postgresql.log.query": "insert into pgbench_tellers(tid,bid,tbalance) values (2,1,0)", "postgresql.log.timestamp": "2021-03-17 15:18:04.165 UTC", "process.pid": 154, "related.user": [ @@ -1991,8 +2029,9 @@ "input.type": "log", "log.level": "LOG", "log.offset": 7933, - "message": "statement: insert into pgbench_tellers(tid,bid,tbalance) values (3,1,0)", + "message": "2021-03-17 15:18:04.165 UTC [154] postgres@accounts LOG: statement: insert into pgbench_tellers(tid,bid,tbalance) values (3,1,0)", "postgresql.log.database": "accounts", + "postgresql.log.query": "insert into pgbench_tellers(tid,bid,tbalance) values (3,1,0)", "postgresql.log.timestamp": "2021-03-17 15:18:04.165 UTC", "process.pid": 154, "related.user": [ @@ -2043,8 +2082,9 @@ "input.type": "log", "log.level": "LOG", "log.offset": 8140, - "message": "statement: insert into pgbench_tellers(tid,bid,tbalance) values (4,1,0)", + "message": "2021-03-17 15:18:04.165 UTC [154] postgres@accounts LOG: statement: insert into pgbench_tellers(tid,bid,tbalance) values (4,1,0)", "postgresql.log.database": "accounts", + "postgresql.log.query": "insert into pgbench_tellers(tid,bid,tbalance) values (4,1,0)", "postgresql.log.timestamp": "2021-03-17 15:18:04.165 UTC", "process.pid": 154, "related.user": [ @@ -2095,8 +2135,9 @@ "input.type": "log", "log.level": "LOG", "log.offset": 8347, - "message": "statement: insert into pgbench_tellers(tid,bid,tbalance) values (5,1,0)", + "message": "2021-03-17 15:18:04.165 UTC [154] postgres@accounts LOG: statement: insert into pgbench_tellers(tid,bid,tbalance) values (5,1,0)", "postgresql.log.database": "accounts", + "postgresql.log.query": "insert into pgbench_tellers(tid,bid,tbalance) values (5,1,0)", "postgresql.log.timestamp": "2021-03-17 15:18:04.165 UTC", "process.pid": 154, "related.user": [ @@ -2147,8 +2188,9 @@ "input.type": "log", "log.level": "LOG", "log.offset": 8554, - "message": "statement: insert into pgbench_tellers(tid,bid,tbalance) values (6,1,0)", + "message": "2021-03-17 15:18:04.165 UTC [154] postgres@accounts LOG: statement: insert into pgbench_tellers(tid,bid,tbalance) values (6,1,0)", "postgresql.log.database": "accounts", + "postgresql.log.query": "insert into pgbench_tellers(tid,bid,tbalance) values (6,1,0)", "postgresql.log.timestamp": "2021-03-17 15:18:04.165 UTC", "process.pid": 154, "related.user": [ @@ -2199,8 +2241,9 @@ "input.type": "log", "log.level": "LOG", "log.offset": 8761, - "message": "statement: insert into pgbench_tellers(tid,bid,tbalance) values (7,1,0)", + "message": "2021-03-17 15:18:04.166 UTC [154] postgres@accounts LOG: statement: insert into pgbench_tellers(tid,bid,tbalance) values (7,1,0)", "postgresql.log.database": "accounts", + "postgresql.log.query": "insert into pgbench_tellers(tid,bid,tbalance) values (7,1,0)", "postgresql.log.timestamp": "2021-03-17 15:18:04.166 UTC", "process.pid": 154, "related.user": [ @@ -2251,8 +2294,9 @@ "input.type": "log", "log.level": "LOG", "log.offset": 8968, - "message": "statement: insert into pgbench_tellers(tid,bid,tbalance) values (8,1,0)", + "message": "2021-03-17 15:18:04.166 UTC [154] postgres@accounts LOG: statement: insert into pgbench_tellers(tid,bid,tbalance) values (8,1,0)", "postgresql.log.database": "accounts", + "postgresql.log.query": "insert into pgbench_tellers(tid,bid,tbalance) values (8,1,0)", "postgresql.log.timestamp": "2021-03-17 15:18:04.166 UTC", "process.pid": 154, "related.user": [ @@ -2303,8 +2347,9 @@ "input.type": "log", "log.level": "LOG", "log.offset": 9175, - "message": "statement: insert into pgbench_tellers(tid,bid,tbalance) values (9,1,0)", + "message": "2021-03-17 15:18:04.166 UTC [154] postgres@accounts LOG: statement: insert into pgbench_tellers(tid,bid,tbalance) values (9,1,0)", "postgresql.log.database": "accounts", + "postgresql.log.query": "insert into pgbench_tellers(tid,bid,tbalance) values (9,1,0)", "postgresql.log.timestamp": "2021-03-17 15:18:04.166 UTC", "process.pid": 154, "related.user": [ @@ -2355,8 +2400,9 @@ "input.type": "log", "log.level": "LOG", "log.offset": 9382, - "message": "statement: insert into pgbench_tellers(tid,bid,tbalance) values (10,1,0)", + "message": "2021-03-17 15:18:04.166 UTC [154] postgres@accounts LOG: statement: insert into pgbench_tellers(tid,bid,tbalance) values (10,1,0)", "postgresql.log.database": "accounts", + "postgresql.log.query": "insert into pgbench_tellers(tid,bid,tbalance) values (10,1,0)", "postgresql.log.timestamp": "2021-03-17 15:18:04.166 UTC", "process.pid": 154, "related.user": [ @@ -2407,8 +2453,9 @@ "input.type": "log", "log.level": "LOG", "log.offset": 9590, - "message": "statement: copy pgbench_accounts from stdin", + "message": "2021-03-17 15:18:04.166 UTC [154] postgres@accounts LOG: statement: copy pgbench_accounts from stdin", "postgresql.log.database": "accounts", + "postgresql.log.query": "copy pgbench_accounts from stdin", "postgresql.log.timestamp": "2021-03-17 15:18:04.166 UTC", "process.pid": 154, "related.user": [ @@ -2459,8 +2506,9 @@ "input.type": "log", "log.level": "LOG", "log.offset": 9771, - "message": "statement: commit", + "message": "2021-03-17 15:18:04.355 UTC [154] postgres@accounts LOG: statement: commit", "postgresql.log.database": "accounts", + "postgresql.log.query": "commit", "postgresql.log.timestamp": "2021-03-17 15:18:04.355 UTC", "process.pid": 154, "related.user": [ @@ -2511,8 +2559,9 @@ "input.type": "log", "log.level": "LOG", "log.offset": 9925, - "message": "statement: vacuum analyze pgbench_branches", + "message": "2021-03-17 15:18:04.366 UTC [154] postgres@accounts LOG: statement: vacuum analyze pgbench_branches", "postgresql.log.database": "accounts", + "postgresql.log.query": "vacuum analyze pgbench_branches", "postgresql.log.timestamp": "2021-03-17 15:18:04.366 UTC", "process.pid": 154, "related.user": [ @@ -2563,8 +2612,9 @@ "input.type": "log", "log.level": "LOG", "log.offset": 10104, - "message": "statement: vacuum analyze pgbench_tellers", + "message": "2021-03-17 15:18:04.383 UTC [154] postgres@accounts LOG: statement: vacuum analyze pgbench_tellers", "postgresql.log.database": "accounts", + "postgresql.log.query": "vacuum analyze pgbench_tellers", "postgresql.log.timestamp": "2021-03-17 15:18:04.383 UTC", "process.pid": 154, "related.user": [ diff --git a/filebeat/module/postgresql/log/test/postgresql-9-log-statement-all.log-expected.json b/filebeat/module/postgresql/log/test/postgresql-9-log-statement-all.log-expected.json index 041afb8d578..43cf31345c3 100644 --- a/filebeat/module/postgresql/log/test/postgresql-9-log-statement-all.log-expected.json +++ b/filebeat/module/postgresql/log/test/postgresql-9-log-statement-all.log-expected.json @@ -15,8 +15,9 @@ "input.type": "log", "log.level": "LOG", "log.offset": 0, - "message": "statement: CREATE DATABASE accounts;", + "message": "2021-03-17 15:10:20.767 UTC [118] postgres@postgres LOG: statement: CREATE DATABASE accounts;", "postgresql.log.database": "postgres", + "postgresql.log.query": "CREATE DATABASE accounts;", "postgresql.log.timestamp": "2021-03-17 15:10:20.767 UTC", "process.pid": 118, "related.user": [ @@ -70,8 +71,9 @@ ], "log.level": "LOG", "log.offset": 174, - "message": "statement: SELECT d.datname as \"Name\",\n\t pg_catalog.pg_get_userbyid(d.datdba) as \"Owner\",\n\t pg_catalog.pg_encoding_to_char(d.encoding) as \"Encoding\",\n\t d.datcollate as \"Collate\",\n\t d.datctype as \"Ctype\",\n\t pg_catalog.array_to_string(d.datacl, E'\\n') AS \"Access privileges\"\n\tFROM pg_catalog.pg_database d\n\tORDER BY 1;", + "message": "2021-03-17 15:10:27.112 UTC [126] postgres@postgres LOG: statement: SELECT d.datname as \"Name\",\n\t pg_catalog.pg_get_userbyid(d.datdba) as \"Owner\",\n\t pg_catalog.pg_encoding_to_char(d.encoding) as \"Encoding\",\n\t d.datcollate as \"Collate\",\n\t d.datctype as \"Ctype\",\n\t pg_catalog.array_to_string(d.datacl, E'\\n') AS \"Access privileges\"\n\tFROM pg_catalog.pg_database d\n\tORDER BY 1;", "postgresql.log.database": "postgres", + "postgresql.log.query": "SELECT d.datname as \"Name\",\n\t pg_catalog.pg_get_userbyid(d.datdba) as \"Owner\",\n\t pg_catalog.pg_encoding_to_char(d.encoding) as \"Encoding\",\n\t d.datcollate as \"Collate\",\n\t d.datctype as \"Ctype\",\n\t pg_catalog.array_to_string(d.datacl, E'\\n') AS \"Access privileges\"\n\tFROM pg_catalog.pg_database d\n\tORDER BY 1;", "postgresql.log.timestamp": "2021-03-17 15:10:27.112 UTC", "process.pid": 126, "related.user": [ @@ -125,8 +127,9 @@ ], "log.level": "LOG", "log.offset": 656, - "message": "statement: SELECT d.datname as \"Name\",\n\t pg_catalog.pg_get_userbyid(d.datdba) as \"Owner\",\n\t pg_catalog.pg_encoding_to_char(d.encoding) as \"Encoding\",\n\t d.datcollate as \"Collate\",\n\t d.datctype as \"Ctype\",\n\t pg_catalog.array_to_string(d.datacl, E'\\n') AS \"Access privileges\"\n\tFROM pg_catalog.pg_database d\n\tORDER BY 1;", + "message": "2021-03-17 15:10:37.302 UTC [135] postgres@postgres LOG: statement: SELECT d.datname as \"Name\",\n\t pg_catalog.pg_get_userbyid(d.datdba) as \"Owner\",\n\t pg_catalog.pg_encoding_to_char(d.encoding) as \"Encoding\",\n\t d.datcollate as \"Collate\",\n\t d.datctype as \"Ctype\",\n\t pg_catalog.array_to_string(d.datacl, E'\\n') AS \"Access privileges\"\n\tFROM pg_catalog.pg_database d\n\tORDER BY 1;", "postgresql.log.database": "postgres", + "postgresql.log.query": "SELECT d.datname as \"Name\",\n\t pg_catalog.pg_get_userbyid(d.datdba) as \"Owner\",\n\t pg_catalog.pg_encoding_to_char(d.encoding) as \"Encoding\",\n\t d.datcollate as \"Collate\",\n\t d.datctype as \"Ctype\",\n\t pg_catalog.array_to_string(d.datacl, E'\\n') AS \"Access privileges\"\n\tFROM pg_catalog.pg_database d\n\tORDER BY 1;", "postgresql.log.timestamp": "2021-03-17 15:10:37.302 UTC", "process.pid": 135, "related.user": [ @@ -177,8 +180,9 @@ "input.type": "log", "log.level": "LOG", "log.offset": 1138, - "message": "statement: drop table if exists pgbench_history", + "message": "2021-03-17 15:10:42.085 UTC [137] postgres@accounts LOG: statement: drop table if exists pgbench_history", "postgresql.log.database": "accounts", + "postgresql.log.query": "drop table if exists pgbench_history", "postgresql.log.timestamp": "2021-03-17 15:10:42.085 UTC", "process.pid": 137, "related.user": [ @@ -229,8 +233,9 @@ "input.type": "log", "log.level": "LOG", "log.offset": 1321, - "message": "statement: create table pgbench_history(tid int,bid int,aid int,delta int,mtime timestamp,filler char(22))", + "message": "2021-03-17 15:10:42.085 UTC [137] postgres@accounts LOG: statement: create table pgbench_history(tid int,bid int,aid int,delta int,mtime timestamp,filler char(22))", "postgresql.log.database": "accounts", + "postgresql.log.query": "create table pgbench_history(tid int,bid int,aid int,delta int,mtime timestamp,filler char(22))", "postgresql.log.timestamp": "2021-03-17 15:10:42.085 UTC", "process.pid": 137, "related.user": [ @@ -281,8 +286,9 @@ "input.type": "log", "log.level": "LOG", "log.offset": 1566, - "message": "statement: drop table if exists pgbench_tellers", + "message": "2021-03-17 15:10:42.089 UTC [137] postgres@accounts LOG: statement: drop table if exists pgbench_tellers", "postgresql.log.database": "accounts", + "postgresql.log.query": "drop table if exists pgbench_tellers", "postgresql.log.timestamp": "2021-03-17 15:10:42.089 UTC", "process.pid": 137, "related.user": [ @@ -333,8 +339,9 @@ "input.type": "log", "log.level": "LOG", "log.offset": 1749, - "message": "statement: create table pgbench_tellers(tid int not null,bid int,tbalance int,filler char(84)) with (fillfactor=100)", + "message": "2021-03-17 15:10:42.089 UTC [137] postgres@accounts LOG: statement: create table pgbench_tellers(tid int not null,bid int,tbalance int,filler char(84)) with (fillfactor=100)", "postgresql.log.database": "accounts", + "postgresql.log.query": "create table pgbench_tellers(tid int not null,bid int,tbalance int,filler char(84)) with (fillfactor=100)", "postgresql.log.timestamp": "2021-03-17 15:10:42.089 UTC", "process.pid": 137, "related.user": [ @@ -385,8 +392,9 @@ "input.type": "log", "log.level": "LOG", "log.offset": 2001, - "message": "statement: drop table if exists pgbench_accounts", + "message": "2021-03-17 15:10:42.095 UTC [137] postgres@accounts LOG: statement: drop table if exists pgbench_accounts", "postgresql.log.database": "accounts", + "postgresql.log.query": "drop table if exists pgbench_accounts", "postgresql.log.timestamp": "2021-03-17 15:10:42.095 UTC", "process.pid": 137, "related.user": [ @@ -437,8 +445,9 @@ "input.type": "log", "log.level": "LOG", "log.offset": 2185, - "message": "statement: create table pgbench_accounts(aid int not null,bid int,abalance int,filler char(84)) with (fillfactor=100)", + "message": "2021-03-17 15:10:42.095 UTC [137] postgres@accounts LOG: statement: create table pgbench_accounts(aid int not null,bid int,abalance int,filler char(84)) with (fillfactor=100)", "postgresql.log.database": "accounts", + "postgresql.log.query": "create table pgbench_accounts(aid int not null,bid int,abalance int,filler char(84)) with (fillfactor=100)", "postgresql.log.timestamp": "2021-03-17 15:10:42.095 UTC", "process.pid": 137, "related.user": [ @@ -489,8 +498,9 @@ "input.type": "log", "log.level": "LOG", "log.offset": 2441, - "message": "statement: drop table if exists pgbench_branches", + "message": "2021-03-17 15:10:42.097 UTC [137] postgres@accounts LOG: statement: drop table if exists pgbench_branches", "postgresql.log.database": "accounts", + "postgresql.log.query": "drop table if exists pgbench_branches", "postgresql.log.timestamp": "2021-03-17 15:10:42.097 UTC", "process.pid": 137, "related.user": [ @@ -541,8 +551,9 @@ "input.type": "log", "log.level": "LOG", "log.offset": 2625, - "message": "statement: create table pgbench_branches(bid int not null,bbalance int,filler char(88)) with (fillfactor=100)", + "message": "2021-03-17 15:10:42.097 UTC [137] postgres@accounts LOG: statement: create table pgbench_branches(bid int not null,bbalance int,filler char(88)) with (fillfactor=100)", "postgresql.log.database": "accounts", + "postgresql.log.query": "create table pgbench_branches(bid int not null,bbalance int,filler char(88)) with (fillfactor=100)", "postgresql.log.timestamp": "2021-03-17 15:10:42.097 UTC", "process.pid": 137, "related.user": [ @@ -593,8 +604,9 @@ "input.type": "log", "log.level": "LOG", "log.offset": 2870, - "message": "statement: begin", + "message": "2021-03-17 15:10:42.099 UTC [137] postgres@accounts LOG: statement: begin", "postgresql.log.database": "accounts", + "postgresql.log.query": "begin", "postgresql.log.timestamp": "2021-03-17 15:10:42.099 UTC", "process.pid": 137, "related.user": [ @@ -645,8 +657,9 @@ "input.type": "log", "log.level": "LOG", "log.offset": 3022, - "message": "statement: insert into pgbench_branches(bid,bbalance) values(1,0)", + "message": "2021-03-17 15:10:42.100 UTC [137] postgres@accounts LOG: statement: insert into pgbench_branches(bid,bbalance) values(1,0)", "postgresql.log.database": "accounts", + "postgresql.log.query": "insert into pgbench_branches(bid,bbalance) values(1,0)", "postgresql.log.timestamp": "2021-03-17 15:10:42.100 UTC", "process.pid": 137, "related.user": [ @@ -697,8 +710,9 @@ "input.type": "log", "log.level": "LOG", "log.offset": 3223, - "message": "statement: insert into pgbench_tellers(tid,bid,tbalance) values (1,1,0)", + "message": "2021-03-17 15:10:42.100 UTC [137] postgres@accounts LOG: statement: insert into pgbench_tellers(tid,bid,tbalance) values (1,1,0)", "postgresql.log.database": "accounts", + "postgresql.log.query": "insert into pgbench_tellers(tid,bid,tbalance) values (1,1,0)", "postgresql.log.timestamp": "2021-03-17 15:10:42.100 UTC", "process.pid": 137, "related.user": [ @@ -749,8 +763,9 @@ "input.type": "log", "log.level": "LOG", "log.offset": 3430, - "message": "statement: insert into pgbench_tellers(tid,bid,tbalance) values (2,1,0)", + "message": "2021-03-17 15:10:42.101 UTC [137] postgres@accounts LOG: statement: insert into pgbench_tellers(tid,bid,tbalance) values (2,1,0)", "postgresql.log.database": "accounts", + "postgresql.log.query": "insert into pgbench_tellers(tid,bid,tbalance) values (2,1,0)", "postgresql.log.timestamp": "2021-03-17 15:10:42.101 UTC", "process.pid": 137, "related.user": [ @@ -801,8 +816,9 @@ "input.type": "log", "log.level": "LOG", "log.offset": 3637, - "message": "statement: insert into pgbench_tellers(tid,bid,tbalance) values (3,1,0)", + "message": "2021-03-17 15:10:42.101 UTC [137] postgres@accounts LOG: statement: insert into pgbench_tellers(tid,bid,tbalance) values (3,1,0)", "postgresql.log.database": "accounts", + "postgresql.log.query": "insert into pgbench_tellers(tid,bid,tbalance) values (3,1,0)", "postgresql.log.timestamp": "2021-03-17 15:10:42.101 UTC", "process.pid": 137, "related.user": [ @@ -853,8 +869,9 @@ "input.type": "log", "log.level": "LOG", "log.offset": 3844, - "message": "statement: insert into pgbench_tellers(tid,bid,tbalance) values (4,1,0)", + "message": "2021-03-17 15:10:42.101 UTC [137] postgres@accounts LOG: statement: insert into pgbench_tellers(tid,bid,tbalance) values (4,1,0)", "postgresql.log.database": "accounts", + "postgresql.log.query": "insert into pgbench_tellers(tid,bid,tbalance) values (4,1,0)", "postgresql.log.timestamp": "2021-03-17 15:10:42.101 UTC", "process.pid": 137, "related.user": [ @@ -905,8 +922,9 @@ "input.type": "log", "log.level": "LOG", "log.offset": 4051, - "message": "statement: insert into pgbench_tellers(tid,bid,tbalance) values (5,1,0)", + "message": "2021-03-17 15:10:42.101 UTC [137] postgres@accounts LOG: statement: insert into pgbench_tellers(tid,bid,tbalance) values (5,1,0)", "postgresql.log.database": "accounts", + "postgresql.log.query": "insert into pgbench_tellers(tid,bid,tbalance) values (5,1,0)", "postgresql.log.timestamp": "2021-03-17 15:10:42.101 UTC", "process.pid": 137, "related.user": [ @@ -957,8 +975,9 @@ "input.type": "log", "log.level": "LOG", "log.offset": 4258, - "message": "statement: insert into pgbench_tellers(tid,bid,tbalance) values (6,1,0)", + "message": "2021-03-17 15:10:42.101 UTC [137] postgres@accounts LOG: statement: insert into pgbench_tellers(tid,bid,tbalance) values (6,1,0)", "postgresql.log.database": "accounts", + "postgresql.log.query": "insert into pgbench_tellers(tid,bid,tbalance) values (6,1,0)", "postgresql.log.timestamp": "2021-03-17 15:10:42.101 UTC", "process.pid": 137, "related.user": [ @@ -1009,8 +1028,9 @@ "input.type": "log", "log.level": "LOG", "log.offset": 4465, - "message": "statement: insert into pgbench_tellers(tid,bid,tbalance) values (7,1,0)", + "message": "2021-03-17 15:10:42.101 UTC [137] postgres@accounts LOG: statement: insert into pgbench_tellers(tid,bid,tbalance) values (7,1,0)", "postgresql.log.database": "accounts", + "postgresql.log.query": "insert into pgbench_tellers(tid,bid,tbalance) values (7,1,0)", "postgresql.log.timestamp": "2021-03-17 15:10:42.101 UTC", "process.pid": 137, "related.user": [ @@ -1061,8 +1081,9 @@ "input.type": "log", "log.level": "LOG", "log.offset": 4672, - "message": "statement: insert into pgbench_tellers(tid,bid,tbalance) values (8,1,0)", + "message": "2021-03-17 15:10:42.101 UTC [137] postgres@accounts LOG: statement: insert into pgbench_tellers(tid,bid,tbalance) values (8,1,0)", "postgresql.log.database": "accounts", + "postgresql.log.query": "insert into pgbench_tellers(tid,bid,tbalance) values (8,1,0)", "postgresql.log.timestamp": "2021-03-17 15:10:42.101 UTC", "process.pid": 137, "related.user": [ @@ -1113,8 +1134,9 @@ "input.type": "log", "log.level": "LOG", "log.offset": 4879, - "message": "statement: insert into pgbench_tellers(tid,bid,tbalance) values (9,1,0)", + "message": "2021-03-17 15:10:42.102 UTC [137] postgres@accounts LOG: statement: insert into pgbench_tellers(tid,bid,tbalance) values (9,1,0)", "postgresql.log.database": "accounts", + "postgresql.log.query": "insert into pgbench_tellers(tid,bid,tbalance) values (9,1,0)", "postgresql.log.timestamp": "2021-03-17 15:10:42.102 UTC", "process.pid": 137, "related.user": [ @@ -1165,8 +1187,9 @@ "input.type": "log", "log.level": "LOG", "log.offset": 5086, - "message": "statement: insert into pgbench_tellers(tid,bid,tbalance) values (10,1,0)", + "message": "2021-03-17 15:10:42.102 UTC [137] postgres@accounts LOG: statement: insert into pgbench_tellers(tid,bid,tbalance) values (10,1,0)", "postgresql.log.database": "accounts", + "postgresql.log.query": "insert into pgbench_tellers(tid,bid,tbalance) values (10,1,0)", "postgresql.log.timestamp": "2021-03-17 15:10:42.102 UTC", "process.pid": 137, "related.user": [ @@ -1217,8 +1240,9 @@ "input.type": "log", "log.level": "LOG", "log.offset": 5294, - "message": "statement: commit", + "message": "2021-03-17 15:10:42.102 UTC [137] postgres@accounts LOG: statement: commit", "postgresql.log.database": "accounts", + "postgresql.log.query": "commit", "postgresql.log.timestamp": "2021-03-17 15:10:42.102 UTC", "process.pid": 137, "related.user": [ @@ -1269,8 +1293,9 @@ "input.type": "log", "log.level": "LOG", "log.offset": 5447, - "message": "statement: begin", + "message": "2021-03-17 15:10:42.103 UTC [137] postgres@accounts LOG: statement: begin", "postgresql.log.database": "accounts", + "postgresql.log.query": "begin", "postgresql.log.timestamp": "2021-03-17 15:10:42.103 UTC", "process.pid": 137, "related.user": [ @@ -1321,8 +1346,9 @@ "input.type": "log", "log.level": "LOG", "log.offset": 5599, - "message": "statement: truncate pgbench_accounts", + "message": "2021-03-17 15:10:42.103 UTC [137] postgres@accounts LOG: statement: truncate pgbench_accounts", "postgresql.log.database": "accounts", + "postgresql.log.query": "truncate pgbench_accounts", "postgresql.log.timestamp": "2021-03-17 15:10:42.103 UTC", "process.pid": 137, "related.user": [ @@ -1373,8 +1399,9 @@ "input.type": "log", "log.level": "LOG", "log.offset": 5771, - "message": "statement: copy pgbench_accounts from stdin", + "message": "2021-03-17 15:10:42.103 UTC [137] postgres@accounts LOG: statement: copy pgbench_accounts from stdin", "postgresql.log.database": "accounts", + "postgresql.log.query": "copy pgbench_accounts from stdin", "postgresql.log.timestamp": "2021-03-17 15:10:42.103 UTC", "process.pid": 137, "related.user": [ @@ -1425,8 +1452,9 @@ "input.type": "log", "log.level": "LOG", "log.offset": 5952, - "message": "statement: commit", + "message": "2021-03-17 15:10:42.296 UTC [137] postgres@accounts LOG: statement: commit", "postgresql.log.database": "accounts", + "postgresql.log.query": "commit", "postgresql.log.timestamp": "2021-03-17 15:10:42.296 UTC", "process.pid": 137, "related.user": [ @@ -1477,8 +1505,9 @@ "input.type": "log", "log.level": "LOG", "log.offset": 6105, - "message": "statement: vacuum analyze pgbench_branches", + "message": "2021-03-17 15:10:42.297 UTC [137] postgres@accounts LOG: statement: vacuum analyze pgbench_branches", "postgresql.log.database": "accounts", + "postgresql.log.query": "vacuum analyze pgbench_branches", "postgresql.log.timestamp": "2021-03-17 15:10:42.297 UTC", "process.pid": 137, "related.user": [ @@ -1529,8 +1558,9 @@ "input.type": "log", "log.level": "LOG", "log.offset": 6284, - "message": "statement: vacuum analyze pgbench_tellers", + "message": "2021-03-17 15:10:42.314 UTC [137] postgres@accounts LOG: statement: vacuum analyze pgbench_tellers", "postgresql.log.database": "accounts", + "postgresql.log.query": "vacuum analyze pgbench_tellers", "postgresql.log.timestamp": "2021-03-17 15:10:42.314 UTC", "process.pid": 137, "related.user": [ @@ -1581,8 +1611,9 @@ "input.type": "log", "log.level": "LOG", "log.offset": 6461, - "message": "statement: vacuum analyze pgbench_accounts", + "message": "2021-03-17 15:10:42.317 UTC [137] postgres@accounts LOG: statement: vacuum analyze pgbench_accounts", "postgresql.log.database": "accounts", + "postgresql.log.query": "vacuum analyze pgbench_accounts", "postgresql.log.timestamp": "2021-03-17 15:10:42.317 UTC", "process.pid": 137, "related.user": [ @@ -1633,8 +1664,9 @@ "input.type": "log", "log.level": "LOG", "log.offset": 6640, - "message": "statement: vacuum analyze pgbench_history", + "message": "2021-03-17 15:10:42.406 UTC [137] postgres@accounts LOG: statement: vacuum analyze pgbench_history", "postgresql.log.database": "accounts", + "postgresql.log.query": "vacuum analyze pgbench_history", "postgresql.log.timestamp": "2021-03-17 15:10:42.406 UTC", "process.pid": 137, "related.user": [ @@ -1685,8 +1717,9 @@ "input.type": "log", "log.level": "LOG", "log.offset": 6817, - "message": "statement: alter table pgbench_branches add primary key (bid)", + "message": "2021-03-17 15:10:42.406 UTC [137] postgres@accounts LOG: statement: alter table pgbench_branches add primary key (bid)", "postgresql.log.database": "accounts", + "postgresql.log.query": "alter table pgbench_branches add primary key (bid)", "postgresql.log.timestamp": "2021-03-17 15:10:42.406 UTC", "process.pid": 137, "related.user": [ @@ -1737,8 +1770,9 @@ "input.type": "log", "log.level": "LOG", "log.offset": 7014, - "message": "statement: alter table pgbench_tellers add primary key (tid)", + "message": "2021-03-17 15:10:42.409 UTC [137] postgres@accounts LOG: statement: alter table pgbench_tellers add primary key (tid)", "postgresql.log.database": "accounts", + "postgresql.log.query": "alter table pgbench_tellers add primary key (tid)", "postgresql.log.timestamp": "2021-03-17 15:10:42.409 UTC", "process.pid": 137, "related.user": [ @@ -1789,8 +1823,9 @@ "input.type": "log", "log.level": "LOG", "log.offset": 7210, - "message": "statement: alter table pgbench_accounts add primary key (aid)", + "message": "2021-03-17 15:10:42.411 UTC [137] postgres@accounts LOG: statement: alter table pgbench_accounts add primary key (aid)", "postgresql.log.database": "accounts", + "postgresql.log.query": "alter table pgbench_accounts add primary key (aid)", "postgresql.log.timestamp": "2021-03-17 15:10:42.411 UTC", "process.pid": 137, "related.user": [ @@ -1841,8 +1876,9 @@ "input.type": "log", "log.level": "LOG", "log.offset": 7408, - "message": "statement: drop table if exists pgbench_history", + "message": "2021-03-17 15:10:44.222 UTC [139] postgres@accounts LOG: statement: drop table if exists pgbench_history", "postgresql.log.database": "accounts", + "postgresql.log.query": "drop table if exists pgbench_history", "postgresql.log.timestamp": "2021-03-17 15:10:44.222 UTC", "process.pid": 139, "related.user": [ @@ -1893,8 +1929,9 @@ "input.type": "log", "log.level": "LOG", "log.offset": 7591, - "message": "statement: create table pgbench_history(tid int,bid int,aid int,delta int,mtime timestamp,filler char(22))", + "message": "2021-03-17 15:10:44.228 UTC [139] postgres@accounts LOG: statement: create table pgbench_history(tid int,bid int,aid int,delta int,mtime timestamp,filler char(22))", "postgresql.log.database": "accounts", + "postgresql.log.query": "create table pgbench_history(tid int,bid int,aid int,delta int,mtime timestamp,filler char(22))", "postgresql.log.timestamp": "2021-03-17 15:10:44.228 UTC", "process.pid": 139, "related.user": [ @@ -1945,8 +1982,9 @@ "input.type": "log", "log.level": "LOG", "log.offset": 7836, - "message": "statement: drop table if exists pgbench_tellers", + "message": "2021-03-17 15:10:44.232 UTC [139] postgres@accounts LOG: statement: drop table if exists pgbench_tellers", "postgresql.log.database": "accounts", + "postgresql.log.query": "drop table if exists pgbench_tellers", "postgresql.log.timestamp": "2021-03-17 15:10:44.232 UTC", "process.pid": 139, "related.user": [ @@ -1997,8 +2035,9 @@ "input.type": "log", "log.level": "LOG", "log.offset": 8019, - "message": "statement: create table pgbench_tellers(tid int not null,bid int,tbalance int,filler char(84)) with (fillfactor=100)", + "message": "2021-03-17 15:10:44.236 UTC [139] postgres@accounts LOG: statement: create table pgbench_tellers(tid int not null,bid int,tbalance int,filler char(84)) with (fillfactor=100)", "postgresql.log.database": "accounts", + "postgresql.log.query": "create table pgbench_tellers(tid int not null,bid int,tbalance int,filler char(84)) with (fillfactor=100)", "postgresql.log.timestamp": "2021-03-17 15:10:44.236 UTC", "process.pid": 139, "related.user": [ @@ -2049,8 +2088,9 @@ "input.type": "log", "log.level": "LOG", "log.offset": 8271, - "message": "statement: drop table if exists pgbench_accounts", + "message": "2021-03-17 15:10:44.238 UTC [139] postgres@accounts LOG: statement: drop table if exists pgbench_accounts", "postgresql.log.database": "accounts", + "postgresql.log.query": "drop table if exists pgbench_accounts", "postgresql.log.timestamp": "2021-03-17 15:10:44.238 UTC", "process.pid": 139, "related.user": [ @@ -2101,8 +2141,9 @@ "input.type": "log", "log.level": "LOG", "log.offset": 8455, - "message": "statement: create table pgbench_accounts(aid int not null,bid int,abalance int,filler char(84)) with (fillfactor=100)", + "message": "2021-03-17 15:10:44.248 UTC [139] postgres@accounts LOG: statement: create table pgbench_accounts(aid int not null,bid int,abalance int,filler char(84)) with (fillfactor=100)", "postgresql.log.database": "accounts", + "postgresql.log.query": "create table pgbench_accounts(aid int not null,bid int,abalance int,filler char(84)) with (fillfactor=100)", "postgresql.log.timestamp": "2021-03-17 15:10:44.248 UTC", "process.pid": 139, "related.user": [ @@ -2153,8 +2194,9 @@ "input.type": "log", "log.level": "LOG", "log.offset": 8711, - "message": "statement: drop table if exists pgbench_branches", + "message": "2021-03-17 15:10:44.255 UTC [139] postgres@accounts LOG: statement: drop table if exists pgbench_branches", "postgresql.log.database": "accounts", + "postgresql.log.query": "drop table if exists pgbench_branches", "postgresql.log.timestamp": "2021-03-17 15:10:44.255 UTC", "process.pid": 139, "related.user": [ @@ -2205,8 +2247,9 @@ "input.type": "log", "log.level": "LOG", "log.offset": 8895, - "message": "statement: create table pgbench_branches(bid int not null,bbalance int,filler char(88)) with (fillfactor=100)", + "message": "2021-03-17 15:10:44.263 UTC [139] postgres@accounts LOG: statement: create table pgbench_branches(bid int not null,bbalance int,filler char(88)) with (fillfactor=100)", "postgresql.log.database": "accounts", + "postgresql.log.query": "create table pgbench_branches(bid int not null,bbalance int,filler char(88)) with (fillfactor=100)", "postgresql.log.timestamp": "2021-03-17 15:10:44.263 UTC", "process.pid": 139, "related.user": [ @@ -2257,8 +2300,9 @@ "input.type": "log", "log.level": "LOG", "log.offset": 9140, - "message": "statement: begin", + "message": "2021-03-17 15:10:44.265 UTC [139] postgres@accounts LOG: statement: begin", "postgresql.log.database": "accounts", + "postgresql.log.query": "begin", "postgresql.log.timestamp": "2021-03-17 15:10:44.265 UTC", "process.pid": 139, "related.user": [ @@ -2309,8 +2353,9 @@ "input.type": "log", "log.level": "LOG", "log.offset": 9292, - "message": "statement: insert into pgbench_branches(bid,bbalance) values(1,0)", + "message": "2021-03-17 15:10:44.265 UTC [139] postgres@accounts LOG: statement: insert into pgbench_branches(bid,bbalance) values(1,0)", "postgresql.log.database": "accounts", + "postgresql.log.query": "insert into pgbench_branches(bid,bbalance) values(1,0)", "postgresql.log.timestamp": "2021-03-17 15:10:44.265 UTC", "process.pid": 139, "related.user": [ @@ -2361,8 +2406,9 @@ "input.type": "log", "log.level": "LOG", "log.offset": 9493, - "message": "statement: insert into pgbench_tellers(tid,bid,tbalance) values (1,1,0)", + "message": "2021-03-17 15:10:44.266 UTC [139] postgres@accounts LOG: statement: insert into pgbench_tellers(tid,bid,tbalance) values (1,1,0)", "postgresql.log.database": "accounts", + "postgresql.log.query": "insert into pgbench_tellers(tid,bid,tbalance) values (1,1,0)", "postgresql.log.timestamp": "2021-03-17 15:10:44.266 UTC", "process.pid": 139, "related.user": [ @@ -2413,8 +2459,9 @@ "input.type": "log", "log.level": "LOG", "log.offset": 9700, - "message": "statement: insert into pgbench_tellers(tid,bid,tbalance) values (2,1,0)", + "message": "2021-03-17 15:10:44.266 UTC [139] postgres@accounts LOG: statement: insert into pgbench_tellers(tid,bid,tbalance) values (2,1,0)", "postgresql.log.database": "accounts", + "postgresql.log.query": "insert into pgbench_tellers(tid,bid,tbalance) values (2,1,0)", "postgresql.log.timestamp": "2021-03-17 15:10:44.266 UTC", "process.pid": 139, "related.user": [ @@ -2465,8 +2512,9 @@ "input.type": "log", "log.level": "LOG", "log.offset": 9907, - "message": "statement: insert into pgbench_tellers(tid,bid,tbalance) values (3,1,0)", + "message": "2021-03-17 15:10:44.266 UTC [139] postgres@accounts LOG: statement: insert into pgbench_tellers(tid,bid,tbalance) values (3,1,0)", "postgresql.log.database": "accounts", + "postgresql.log.query": "insert into pgbench_tellers(tid,bid,tbalance) values (3,1,0)", "postgresql.log.timestamp": "2021-03-17 15:10:44.266 UTC", "process.pid": 139, "related.user": [ @@ -2517,8 +2565,9 @@ "input.type": "log", "log.level": "LOG", "log.offset": 10114, - "message": "statement: insert into pgbench_tellers(tid,bid,tbalance) values (4,1,0)", + "message": "2021-03-17 15:10:44.266 UTC [139] postgres@accounts LOG: statement: insert into pgbench_tellers(tid,bid,tbalance) values (4,1,0)", "postgresql.log.database": "accounts", + "postgresql.log.query": "insert into pgbench_tellers(tid,bid,tbalance) values (4,1,0)", "postgresql.log.timestamp": "2021-03-17 15:10:44.266 UTC", "process.pid": 139, "related.user": [ @@ -2569,8 +2618,9 @@ "input.type": "log", "log.level": "LOG", "log.offset": 10321, - "message": "statement: insert into pgbench_tellers(tid,bid,tbalance) values (5,1,0)", + "message": "2021-03-17 15:10:44.266 UTC [139] postgres@accounts LOG: statement: insert into pgbench_tellers(tid,bid,tbalance) values (5,1,0)", "postgresql.log.database": "accounts", + "postgresql.log.query": "insert into pgbench_tellers(tid,bid,tbalance) values (5,1,0)", "postgresql.log.timestamp": "2021-03-17 15:10:44.266 UTC", "process.pid": 139, "related.user": [ From 4508c427289c4afca26e48c0f4c94f1faa871897 Mon Sep 17 00:00:00 2001 From: Jaime Soriano Pastor Date: Wed, 17 Mar 2021 16:51:31 +0100 Subject: [PATCH 3/7] Parse statements wit durations and no statements --- .../postgresql/log/ingest/pipeline-log.yml | 2 +- ...sql-13-log-statement-all.log-expected.json | 150 ++++++++++++------ ...esql-9-log-statement-all.log-expected.json | 150 ++++++++++++------ 3 files changed, 201 insertions(+), 101 deletions(-) diff --git a/filebeat/module/postgresql/log/ingest/pipeline-log.yml b/filebeat/module/postgresql/log/ingest/pipeline-log.yml index c0bb329c800..250d346b814 100644 --- a/filebeat/module/postgresql/log/ingest/pipeline-log.yml +++ b/filebeat/module/postgresql/log/ingest/pipeline-log.yml @@ -4,7 +4,7 @@ processors: field: raw_message ignore_missing: true patterns: - - '^(\[%{NUMBER:process.pid:long}(-%{BASE16FLOAT:postgresql.log.session_line_number:long})?\] ((\[%{USERNAME:user.name}\]@\[%{POSTGRESQL_DB_NAME:postgresql.log.database}\]|%{USERNAME:user.name}@%{POSTGRESQL_DB_NAME:postgresql.log.database}) )?)?%{WORD:log.level}: (?:%{POSTGRESQL_ERROR:postgresql.log.sql_state_code}|%{SPACE})(duration: %{NUMBER:temp.duration:float} ms %{POSTGRESQL_QUERY_STEP}: %{GREEDYDATA:postgresql.log.query}|statement: %{GREEDYDATA:postgresql.log.query}|: %{GREEDYDATA:message}|%{GREEDYDATA:message})' + - '^(\[%{NUMBER:process.pid:long}(-%{BASE16FLOAT:postgresql.log.session_line_number:long})?\] ((\[%{USERNAME:user.name}\]@\[%{POSTGRESQL_DB_NAME:postgresql.log.database}\]|%{USERNAME:user.name}@%{POSTGRESQL_DB_NAME:postgresql.log.database}) )?)?%{WORD:log.level}: (?:%{POSTGRESQL_ERROR:postgresql.log.sql_state_code}|%{SPACE})(duration: %{NUMBER:temp.duration:float} ms( %{POSTGRESQL_QUERY_STEP}: %{GREEDYDATA:postgresql.log.query})?|statement: %{GREEDYDATA:postgresql.log.query}|: %{GREEDYDATA:message}|%{GREEDYDATA:message})' pattern_definitions: GREEDYDATA: |- (.| diff --git a/filebeat/module/postgresql/log/test/postgresql-13-log-statement-all.log-expected.json b/filebeat/module/postgresql/log/test/postgresql-13-log-statement-all.log-expected.json index 9f107f845db..537b6690903 100644 --- a/filebeat/module/postgresql/log/test/postgresql-13-log-statement-all.log-expected.json +++ b/filebeat/module/postgresql/log/test/postgresql-13-log-statement-all.log-expected.json @@ -32,6 +32,7 @@ "database" ], "event.dataset": "postgresql.log", + "event.duration": 430394016, "event.kind": "event", "event.module": "postgresql", "event.timezone": "UTC", @@ -42,7 +43,7 @@ "input.type": "log", "log.level": "LOG", "log.offset": 95, - "message": "duration: 430.394 ms", + "message": "2021-03-17 15:18:00.631 UTC [149] postgres@postgres LOG: duration: 430.394 ms", "postgresql.log.database": "postgres", "postgresql.log.timestamp": "2021-03-17 15:18:00.631 UTC", "process.pid": 149, @@ -85,6 +86,7 @@ "database" ], "event.dataset": "postgresql.log", + "event.duration": 559000, "event.kind": "event", "event.module": "postgresql", "event.timezone": "UTC", @@ -95,7 +97,7 @@ "input.type": "log", "log.level": "LOG", "log.offset": 333, - "message": "duration: 0.559 ms", + "message": "2021-03-17 15:18:02.732 UTC [151] postgres@accounts LOG: duration: 0.559 ms", "postgresql.log.database": "accounts", "postgresql.log.timestamp": "2021-03-17 15:18:02.732 UTC", "process.pid": 151, @@ -138,6 +140,7 @@ "database" ], "event.dataset": "postgresql.log", + "event.duration": 4812000, "event.kind": "event", "event.module": "postgresql", "event.timezone": "UTC", @@ -148,7 +151,7 @@ "input.type": "log", "log.level": "LOG", "log.offset": 578, - "message": "duration: 4.812 ms", + "message": "2021-03-17 15:18:02.737 UTC [151] postgres@accounts LOG: duration: 4.812 ms", "postgresql.log.database": "accounts", "postgresql.log.timestamp": "2021-03-17 15:18:02.737 UTC", "process.pid": 151, @@ -191,6 +194,7 @@ "database" ], "event.dataset": "postgresql.log", + "event.duration": 1900000, "event.kind": "event", "event.module": "postgresql", "event.timezone": "UTC", @@ -201,7 +205,7 @@ "input.type": "log", "log.level": "LOG", "log.offset": 830, - "message": "duration: 1.900 ms", + "message": "2021-03-17 15:18:02.740 UTC [151] postgres@accounts LOG: duration: 1.900 ms", "postgresql.log.database": "accounts", "postgresql.log.timestamp": "2021-03-17 15:18:02.740 UTC", "process.pid": 151, @@ -244,6 +248,7 @@ "database" ], "event.dataset": "postgresql.log", + "event.duration": 1444000, "event.kind": "event", "event.module": "postgresql", "event.timezone": "UTC", @@ -254,7 +259,7 @@ "input.type": "log", "log.level": "LOG", "log.offset": 1086, - "message": "duration: 1.444 ms", + "message": "2021-03-17 15:18:02.741 UTC [151] postgres@accounts LOG: duration: 1.444 ms", "postgresql.log.database": "accounts", "postgresql.log.timestamp": "2021-03-17 15:18:02.741 UTC", "process.pid": 151, @@ -297,6 +302,7 @@ "database" ], "event.dataset": "postgresql.log", + "event.duration": 1336000, "event.kind": "event", "event.module": "postgresql", "event.timezone": "UTC", @@ -307,7 +313,7 @@ "input.type": "log", "log.level": "LOG", "log.offset": 1331, - "message": "duration: 1.336 ms", + "message": "2021-03-17 15:18:02.743 UTC [151] postgres@accounts LOG: duration: 1.336 ms", "postgresql.log.database": "accounts", "postgresql.log.timestamp": "2021-03-17 15:18:02.743 UTC", "process.pid": 151, @@ -350,6 +356,7 @@ "database" ], "event.dataset": "postgresql.log", + "event.duration": 68000, "event.kind": "event", "event.module": "postgresql", "event.timezone": "UTC", @@ -360,7 +367,7 @@ "input.type": "log", "log.level": "LOG", "log.offset": 1483, - "message": "duration: 0.068 ms", + "message": "2021-03-17 15:18:02.743 UTC [151] postgres@accounts LOG: duration: 0.068 ms", "postgresql.log.database": "accounts", "postgresql.log.timestamp": "2021-03-17 15:18:02.743 UTC", "process.pid": 151, @@ -403,6 +410,7 @@ "database" ], "event.dataset": "postgresql.log", + "event.duration": 656000, "event.kind": "event", "event.module": "postgresql", "event.timezone": "UTC", @@ -413,7 +421,7 @@ "input.type": "log", "log.level": "LOG", "log.offset": 1713, - "message": "duration: 0.656 ms", + "message": "2021-03-17 15:18:02.744 UTC [151] postgres@accounts LOG: duration: 0.656 ms", "postgresql.log.database": "accounts", "postgresql.log.timestamp": "2021-03-17 15:18:02.744 UTC", "process.pid": 151, @@ -456,6 +464,7 @@ "database" ], "event.dataset": "postgresql.log", + "event.duration": 538000, "event.kind": "event", "event.module": "postgresql", "event.timezone": "UTC", @@ -466,7 +475,7 @@ "input.type": "log", "log.level": "LOG", "log.offset": 1914, - "message": "duration: 0.538 ms", + "message": "2021-03-17 15:18:02.744 UTC [151] postgres@accounts LOG: duration: 0.538 ms", "postgresql.log.database": "accounts", "postgresql.log.timestamp": "2021-03-17 15:18:02.744 UTC", "process.pid": 151, @@ -509,6 +518,7 @@ "database" ], "event.dataset": "postgresql.log", + "event.duration": 304000, "event.kind": "event", "event.module": "postgresql", "event.timezone": "UTC", @@ -519,7 +529,7 @@ "input.type": "log", "log.level": "LOG", "log.offset": 2121, - "message": "duration: 0.304 ms", + "message": "2021-03-17 15:18:02.745 UTC [151] postgres@accounts LOG: duration: 0.304 ms", "postgresql.log.database": "accounts", "postgresql.log.timestamp": "2021-03-17 15:18:02.745 UTC", "process.pid": 151, @@ -562,6 +572,7 @@ "database" ], "event.dataset": "postgresql.log", + "event.duration": 1510000, "event.kind": "event", "event.module": "postgresql", "event.timezone": "UTC", @@ -572,7 +583,7 @@ "input.type": "log", "log.level": "LOG", "log.offset": 2328, - "message": "duration: 1.510 ms", + "message": "2021-03-17 15:18:02.746 UTC [151] postgres@accounts LOG: duration: 1.510 ms", "postgresql.log.database": "accounts", "postgresql.log.timestamp": "2021-03-17 15:18:02.746 UTC", "process.pid": 151, @@ -615,6 +626,7 @@ "database" ], "event.dataset": "postgresql.log", + "event.duration": 94000, "event.kind": "event", "event.module": "postgresql", "event.timezone": "UTC", @@ -625,7 +637,7 @@ "input.type": "log", "log.level": "LOG", "log.offset": 2535, - "message": "duration: 0.094 ms", + "message": "2021-03-17 15:18:02.746 UTC [151] postgres@accounts LOG: duration: 0.094 ms", "postgresql.log.database": "accounts", "postgresql.log.timestamp": "2021-03-17 15:18:02.746 UTC", "process.pid": 151, @@ -668,6 +680,7 @@ "database" ], "event.dataset": "postgresql.log", + "event.duration": 56000, "event.kind": "event", "event.module": "postgresql", "event.timezone": "UTC", @@ -678,7 +691,7 @@ "input.type": "log", "log.level": "LOG", "log.offset": 2742, - "message": "duration: 0.056 ms", + "message": "2021-03-17 15:18:02.746 UTC [151] postgres@accounts LOG: duration: 0.056 ms", "postgresql.log.database": "accounts", "postgresql.log.timestamp": "2021-03-17 15:18:02.746 UTC", "process.pid": 151, @@ -721,6 +734,7 @@ "database" ], "event.dataset": "postgresql.log", + "event.duration": 52000, "event.kind": "event", "event.module": "postgresql", "event.timezone": "UTC", @@ -731,7 +745,7 @@ "input.type": "log", "log.level": "LOG", "log.offset": 2949, - "message": "duration: 0.052 ms", + "message": "2021-03-17 15:18:02.746 UTC [151] postgres@accounts LOG: duration: 0.052 ms", "postgresql.log.database": "accounts", "postgresql.log.timestamp": "2021-03-17 15:18:02.746 UTC", "process.pid": 151, @@ -774,6 +788,7 @@ "database" ], "event.dataset": "postgresql.log", + "event.duration": 51000, "event.kind": "event", "event.module": "postgresql", "event.timezone": "UTC", @@ -784,7 +799,7 @@ "input.type": "log", "log.level": "LOG", "log.offset": 3156, - "message": "duration: 0.051 ms", + "message": "2021-03-17 15:18:02.747 UTC [151] postgres@accounts LOG: duration: 0.051 ms", "postgresql.log.database": "accounts", "postgresql.log.timestamp": "2021-03-17 15:18:02.747 UTC", "process.pid": 151, @@ -827,6 +842,7 @@ "database" ], "event.dataset": "postgresql.log", + "event.duration": 51000, "event.kind": "event", "event.module": "postgresql", "event.timezone": "UTC", @@ -837,7 +853,7 @@ "input.type": "log", "log.level": "LOG", "log.offset": 3363, - "message": "duration: 0.051 ms", + "message": "2021-03-17 15:18:02.747 UTC [151] postgres@accounts LOG: duration: 0.051 ms", "postgresql.log.database": "accounts", "postgresql.log.timestamp": "2021-03-17 15:18:02.747 UTC", "process.pid": 151, @@ -880,6 +896,7 @@ "database" ], "event.dataset": "postgresql.log", + "event.duration": 50000, "event.kind": "event", "event.module": "postgresql", "event.timezone": "UTC", @@ -890,7 +907,7 @@ "input.type": "log", "log.level": "LOG", "log.offset": 3570, - "message": "duration: 0.050 ms", + "message": "2021-03-17 15:18:02.747 UTC [151] postgres@accounts LOG: duration: 0.050 ms", "postgresql.log.database": "accounts", "postgresql.log.timestamp": "2021-03-17 15:18:02.747 UTC", "process.pid": 151, @@ -933,6 +950,7 @@ "database" ], "event.dataset": "postgresql.log", + "event.duration": 52000, "event.kind": "event", "event.module": "postgresql", "event.timezone": "UTC", @@ -943,7 +961,7 @@ "input.type": "log", "log.level": "LOG", "log.offset": 3777, - "message": "duration: 0.052 ms", + "message": "2021-03-17 15:18:02.747 UTC [151] postgres@accounts LOG: duration: 0.052 ms", "postgresql.log.database": "accounts", "postgresql.log.timestamp": "2021-03-17 15:18:02.747 UTC", "process.pid": 151, @@ -986,6 +1004,7 @@ "database" ], "event.dataset": "postgresql.log", + "event.duration": 52000, "event.kind": "event", "event.module": "postgresql", "event.timezone": "UTC", @@ -996,7 +1015,7 @@ "input.type": "log", "log.level": "LOG", "log.offset": 3985, - "message": "duration: 0.052 ms", + "message": "2021-03-17 15:18:02.747 UTC [151] postgres@accounts LOG: duration: 0.052 ms", "postgresql.log.database": "accounts", "postgresql.log.timestamp": "2021-03-17 15:18:02.747 UTC", "process.pid": 151, @@ -1039,6 +1058,7 @@ "database" ], "event.dataset": "postgresql.log", + "event.duration": 239763008, "event.kind": "event", "event.module": "postgresql", "event.timezone": "UTC", @@ -1049,7 +1069,7 @@ "input.type": "log", "log.level": "LOG", "log.offset": 4164, - "message": "duration: 239.763 ms", + "message": "2021-03-17 15:18:02.987 UTC [151] postgres@accounts LOG: duration: 239.763 ms", "postgresql.log.database": "accounts", "postgresql.log.timestamp": "2021-03-17 15:18:02.987 UTC", "process.pid": 151, @@ -1092,6 +1112,7 @@ "database" ], "event.dataset": "postgresql.log", + "event.duration": 67302000, "event.kind": "event", "event.module": "postgresql", "event.timezone": "UTC", @@ -1102,7 +1123,7 @@ "input.type": "log", "log.level": "LOG", "log.offset": 4319, - "message": "duration: 67.302 ms", + "message": "2021-03-17 15:18:03.054 UTC [151] postgres@accounts LOG: duration: 67.302 ms", "postgresql.log.database": "accounts", "postgresql.log.timestamp": "2021-03-17 15:18:03.054 UTC", "process.pid": 151, @@ -1145,6 +1166,7 @@ "database" ], "event.dataset": "postgresql.log", + "event.duration": 15246000, "event.kind": "event", "event.module": "postgresql", "event.timezone": "UTC", @@ -1155,7 +1177,7 @@ "input.type": "log", "log.level": "LOG", "log.offset": 4498, - "message": "duration: 15.246 ms", + "message": "2021-03-17 15:18:03.073 UTC [151] postgres@accounts LOG: duration: 15.246 ms", "postgresql.log.database": "accounts", "postgresql.log.timestamp": "2021-03-17 15:18:03.073 UTC", "process.pid": 151, @@ -1198,6 +1220,7 @@ "database" ], "event.dataset": "postgresql.log", + "event.duration": 3531000, "event.kind": "event", "event.module": "postgresql", "event.timezone": "UTC", @@ -1208,7 +1231,7 @@ "input.type": "log", "log.level": "LOG", "log.offset": 4676, - "message": "duration: 3.531 ms", + "message": "2021-03-17 15:18:03.076 UTC [151] postgres@accounts LOG: duration: 3.531 ms", "postgresql.log.database": "accounts", "postgresql.log.timestamp": "2021-03-17 15:18:03.076 UTC", "process.pid": 151, @@ -1251,6 +1274,7 @@ "database" ], "event.dataset": "postgresql.log", + "event.duration": 80735000, "event.kind": "event", "event.module": "postgresql", "event.timezone": "UTC", @@ -1261,7 +1285,7 @@ "input.type": "log", "log.level": "LOG", "log.offset": 4854, - "message": "duration: 80.735 ms", + "message": "2021-03-17 15:18:03.157 UTC [151] postgres@accounts LOG: duration: 80.735 ms", "postgresql.log.database": "accounts", "postgresql.log.timestamp": "2021-03-17 15:18:03.157 UTC", "process.pid": 151, @@ -1304,6 +1328,7 @@ "database" ], "event.dataset": "postgresql.log", + "event.duration": 893000, "event.kind": "event", "event.module": "postgresql", "event.timezone": "UTC", @@ -1314,7 +1339,7 @@ "input.type": "log", "log.level": "LOG", "log.offset": 5032, - "message": "duration: 0.893 ms", + "message": "2021-03-17 15:18:03.159 UTC [151] postgres@accounts LOG: duration: 0.893 ms", "postgresql.log.database": "accounts", "postgresql.log.timestamp": "2021-03-17 15:18:03.159 UTC", "process.pid": 151, @@ -1357,6 +1382,7 @@ "database" ], "event.dataset": "postgresql.log", + "event.duration": 5266000, "event.kind": "event", "event.module": "postgresql", "event.timezone": "UTC", @@ -1367,7 +1393,7 @@ "input.type": "log", "log.level": "LOG", "log.offset": 5229, - "message": "duration: 5.266 ms", + "message": "2021-03-17 15:18:03.165 UTC [151] postgres@accounts LOG: duration: 5.266 ms", "postgresql.log.database": "accounts", "postgresql.log.timestamp": "2021-03-17 15:18:03.165 UTC", "process.pid": 151, @@ -1410,6 +1436,7 @@ "database" ], "event.dataset": "postgresql.log", + "event.duration": 2807000, "event.kind": "event", "event.module": "postgresql", "event.timezone": "UTC", @@ -1420,7 +1447,7 @@ "input.type": "log", "log.level": "LOG", "log.offset": 5425, - "message": "duration: 2.807 ms", + "message": "2021-03-17 15:18:03.168 UTC [151] postgres@accounts LOG: duration: 2.807 ms", "postgresql.log.database": "accounts", "postgresql.log.timestamp": "2021-03-17 15:18:03.168 UTC", "process.pid": 151, @@ -1463,6 +1490,7 @@ "database" ], "event.dataset": "postgresql.log", + "event.duration": 81593000, "event.kind": "event", "event.module": "postgresql", "event.timezone": "UTC", @@ -1473,7 +1501,7 @@ "input.type": "log", "log.level": "LOG", "log.offset": 5622, - "message": "duration: 81.593 ms", + "message": "2021-03-17 15:18:03.249 UTC [151] postgres@accounts LOG: duration: 81.593 ms", "postgresql.log.database": "accounts", "postgresql.log.timestamp": "2021-03-17 15:18:03.249 UTC", "process.pid": 151, @@ -1516,6 +1544,7 @@ "database" ], "event.dataset": "postgresql.log", + "event.duration": 20521000, "event.kind": "event", "event.module": "postgresql", "event.timezone": "UTC", @@ -1526,7 +1555,7 @@ "input.type": "log", "log.level": "LOG", "log.offset": 5859, - "message": "duration: 20.521 ms", + "message": "2021-03-17 15:18:04.130 UTC [154] postgres@accounts LOG: duration: 20.521 ms", "postgresql.log.database": "accounts", "postgresql.log.timestamp": "2021-03-17 15:18:04.130 UTC", "process.pid": 154, @@ -1569,6 +1598,7 @@ "database" ], "event.dataset": "postgresql.log", + "event.duration": 11098000, "event.kind": "event", "event.module": "postgresql", "event.timezone": "UTC", @@ -1579,7 +1609,7 @@ "input.type": "log", "log.level": "LOG", "log.offset": 6105, - "message": "duration: 11.098 ms", + "message": "2021-03-17 15:18:04.143 UTC [154] postgres@accounts LOG: duration: 11.098 ms", "postgresql.log.database": "accounts", "postgresql.log.timestamp": "2021-03-17 15:18:04.143 UTC", "process.pid": 154, @@ -1622,6 +1652,7 @@ "database" ], "event.dataset": "postgresql.log", + "event.duration": 8950000, "event.kind": "event", "event.module": "postgresql", "event.timezone": "UTC", @@ -1632,7 +1663,7 @@ "input.type": "log", "log.level": "LOG", "log.offset": 6358, - "message": "duration: 8.950 ms", + "message": "2021-03-17 15:18:04.152 UTC [154] postgres@accounts LOG: duration: 8.950 ms", "postgresql.log.database": "accounts", "postgresql.log.timestamp": "2021-03-17 15:18:04.152 UTC", "process.pid": 154, @@ -1675,6 +1706,7 @@ "database" ], "event.dataset": "postgresql.log", + "event.duration": 4302000, "event.kind": "event", "event.module": "postgresql", "event.timezone": "UTC", @@ -1685,7 +1717,7 @@ "input.type": "log", "log.level": "LOG", "log.offset": 6614, - "message": "duration: 4.302 ms", + "message": "2021-03-17 15:18:04.156 UTC [154] postgres@accounts LOG: duration: 4.302 ms", "postgresql.log.database": "accounts", "postgresql.log.timestamp": "2021-03-17 15:18:04.156 UTC", "process.pid": 154, @@ -1728,6 +1760,7 @@ "database" ], "event.dataset": "postgresql.log", + "event.duration": 6999000, "event.kind": "event", "event.module": "postgresql", "event.timezone": "UTC", @@ -1738,7 +1771,7 @@ "input.type": "log", "log.level": "LOG", "log.offset": 6859, - "message": "duration: 6.999 ms", + "message": "2021-03-17 15:18:04.163 UTC [154] postgres@accounts LOG: duration: 6.999 ms", "postgresql.log.database": "accounts", "postgresql.log.timestamp": "2021-03-17 15:18:04.163 UTC", "process.pid": 154, @@ -1781,6 +1814,7 @@ "database" ], "event.dataset": "postgresql.log", + "event.duration": 75000, "event.kind": "event", "event.module": "postgresql", "event.timezone": "UTC", @@ -1791,7 +1825,7 @@ "input.type": "log", "log.level": "LOG", "log.offset": 7011, - "message": "duration: 0.075 ms", + "message": "2021-03-17 15:18:04.164 UTC [154] postgres@accounts LOG: duration: 0.075 ms", "postgresql.log.database": "accounts", "postgresql.log.timestamp": "2021-03-17 15:18:04.164 UTC", "process.pid": 154, @@ -1834,6 +1868,7 @@ "database" ], "event.dataset": "postgresql.log", + "event.duration": 676000, "event.kind": "event", "event.module": "postgresql", "event.timezone": "UTC", @@ -1844,7 +1879,7 @@ "input.type": "log", "log.level": "LOG", "log.offset": 7241, - "message": "duration: 0.676 ms", + "message": "2021-03-17 15:18:04.164 UTC [154] postgres@accounts LOG: duration: 0.676 ms", "postgresql.log.database": "accounts", "postgresql.log.timestamp": "2021-03-17 15:18:04.164 UTC", "process.pid": 154, @@ -1887,6 +1922,7 @@ "database" ], "event.dataset": "postgresql.log", + "event.duration": 247000, "event.kind": "event", "event.module": "postgresql", "event.timezone": "UTC", @@ -1897,7 +1933,7 @@ "input.type": "log", "log.level": "LOG", "log.offset": 7442, - "message": "duration: 0.247 ms", + "message": "2021-03-17 15:18:04.165 UTC [154] postgres@accounts LOG: duration: 0.247 ms", "postgresql.log.database": "accounts", "postgresql.log.timestamp": "2021-03-17 15:18:04.165 UTC", "process.pid": 154, @@ -1940,6 +1976,7 @@ "database" ], "event.dataset": "postgresql.log", + "event.duration": 164000, "event.kind": "event", "event.module": "postgresql", "event.timezone": "UTC", @@ -1950,7 +1987,7 @@ "input.type": "log", "log.level": "LOG", "log.offset": 7649, - "message": "duration: 0.164 ms", + "message": "2021-03-17 15:18:04.165 UTC [154] postgres@accounts LOG: duration: 0.164 ms", "postgresql.log.database": "accounts", "postgresql.log.timestamp": "2021-03-17 15:18:04.165 UTC", "process.pid": 154, @@ -1993,6 +2030,7 @@ "database" ], "event.dataset": "postgresql.log", + "event.duration": 80000, "event.kind": "event", "event.module": "postgresql", "event.timezone": "UTC", @@ -2003,7 +2041,7 @@ "input.type": "log", "log.level": "LOG", "log.offset": 7856, - "message": "duration: 0.080 ms", + "message": "2021-03-17 15:18:04.165 UTC [154] postgres@accounts LOG: duration: 0.080 ms", "postgresql.log.database": "accounts", "postgresql.log.timestamp": "2021-03-17 15:18:04.165 UTC", "process.pid": 154, @@ -2046,6 +2084,7 @@ "database" ], "event.dataset": "postgresql.log", + "event.duration": 77000, "event.kind": "event", "event.module": "postgresql", "event.timezone": "UTC", @@ -2056,7 +2095,7 @@ "input.type": "log", "log.level": "LOG", "log.offset": 8063, - "message": "duration: 0.077 ms", + "message": "2021-03-17 15:18:04.165 UTC [154] postgres@accounts LOG: duration: 0.077 ms", "postgresql.log.database": "accounts", "postgresql.log.timestamp": "2021-03-17 15:18:04.165 UTC", "process.pid": 154, @@ -2099,6 +2138,7 @@ "database" ], "event.dataset": "postgresql.log", + "event.duration": 75000, "event.kind": "event", "event.module": "postgresql", "event.timezone": "UTC", @@ -2109,7 +2149,7 @@ "input.type": "log", "log.level": "LOG", "log.offset": 8270, - "message": "duration: 0.075 ms", + "message": "2021-03-17 15:18:04.165 UTC [154] postgres@accounts LOG: duration: 0.075 ms", "postgresql.log.database": "accounts", "postgresql.log.timestamp": "2021-03-17 15:18:04.165 UTC", "process.pid": 154, @@ -2152,6 +2192,7 @@ "database" ], "event.dataset": "postgresql.log", + "event.duration": 74000, "event.kind": "event", "event.module": "postgresql", "event.timezone": "UTC", @@ -2162,7 +2203,7 @@ "input.type": "log", "log.level": "LOG", "log.offset": 8477, - "message": "duration: 0.074 ms", + "message": "2021-03-17 15:18:04.165 UTC [154] postgres@accounts LOG: duration: 0.074 ms", "postgresql.log.database": "accounts", "postgresql.log.timestamp": "2021-03-17 15:18:04.165 UTC", "process.pid": 154, @@ -2205,6 +2246,7 @@ "database" ], "event.dataset": "postgresql.log", + "event.duration": 71000, "event.kind": "event", "event.module": "postgresql", "event.timezone": "UTC", @@ -2215,7 +2257,7 @@ "input.type": "log", "log.level": "LOG", "log.offset": 8684, - "message": "duration: 0.071 ms", + "message": "2021-03-17 15:18:04.166 UTC [154] postgres@accounts LOG: duration: 0.071 ms", "postgresql.log.database": "accounts", "postgresql.log.timestamp": "2021-03-17 15:18:04.166 UTC", "process.pid": 154, @@ -2258,6 +2300,7 @@ "database" ], "event.dataset": "postgresql.log", + "event.duration": 71000, "event.kind": "event", "event.module": "postgresql", "event.timezone": "UTC", @@ -2268,7 +2311,7 @@ "input.type": "log", "log.level": "LOG", "log.offset": 8891, - "message": "duration: 0.071 ms", + "message": "2021-03-17 15:18:04.166 UTC [154] postgres@accounts LOG: duration: 0.071 ms", "postgresql.log.database": "accounts", "postgresql.log.timestamp": "2021-03-17 15:18:04.166 UTC", "process.pid": 154, @@ -2311,6 +2354,7 @@ "database" ], "event.dataset": "postgresql.log", + "event.duration": 69000, "event.kind": "event", "event.module": "postgresql", "event.timezone": "UTC", @@ -2321,7 +2365,7 @@ "input.type": "log", "log.level": "LOG", "log.offset": 9098, - "message": "duration: 0.069 ms", + "message": "2021-03-17 15:18:04.166 UTC [154] postgres@accounts LOG: duration: 0.069 ms", "postgresql.log.database": "accounts", "postgresql.log.timestamp": "2021-03-17 15:18:04.166 UTC", "process.pid": 154, @@ -2364,6 +2408,7 @@ "database" ], "event.dataset": "postgresql.log", + "event.duration": 71000, "event.kind": "event", "event.module": "postgresql", "event.timezone": "UTC", @@ -2374,7 +2419,7 @@ "input.type": "log", "log.level": "LOG", "log.offset": 9305, - "message": "duration: 0.071 ms", + "message": "2021-03-17 15:18:04.166 UTC [154] postgres@accounts LOG: duration: 0.071 ms", "postgresql.log.database": "accounts", "postgresql.log.timestamp": "2021-03-17 15:18:04.166 UTC", "process.pid": 154, @@ -2417,6 +2462,7 @@ "database" ], "event.dataset": "postgresql.log", + "event.duration": 72000, "event.kind": "event", "event.module": "postgresql", "event.timezone": "UTC", @@ -2427,7 +2473,7 @@ "input.type": "log", "log.level": "LOG", "log.offset": 9513, - "message": "duration: 0.072 ms", + "message": "2021-03-17 15:18:04.166 UTC [154] postgres@accounts LOG: duration: 0.072 ms", "postgresql.log.database": "accounts", "postgresql.log.timestamp": "2021-03-17 15:18:04.166 UTC", "process.pid": 154, @@ -2470,6 +2516,7 @@ "database" ], "event.dataset": "postgresql.log", + "event.duration": 188620000, "event.kind": "event", "event.module": "postgresql", "event.timezone": "UTC", @@ -2480,7 +2527,7 @@ "input.type": "log", "log.level": "LOG", "log.offset": 9692, - "message": "duration: 188.620 ms", + "message": "2021-03-17 15:18:04.355 UTC [154] postgres@accounts LOG: duration: 188.620 ms", "postgresql.log.database": "accounts", "postgresql.log.timestamp": "2021-03-17 15:18:04.355 UTC", "process.pid": 154, @@ -2523,6 +2570,7 @@ "database" ], "event.dataset": "postgresql.log", + "event.duration": 11135000, "event.kind": "event", "event.module": "postgresql", "event.timezone": "UTC", @@ -2533,7 +2581,7 @@ "input.type": "log", "log.level": "LOG", "log.offset": 9847, - "message": "duration: 11.135 ms", + "message": "2021-03-17 15:18:04.366 UTC [154] postgres@accounts LOG: duration: 11.135 ms", "postgresql.log.database": "accounts", "postgresql.log.timestamp": "2021-03-17 15:18:04.366 UTC", "process.pid": 154, @@ -2576,6 +2624,7 @@ "database" ], "event.dataset": "postgresql.log", + "event.duration": 16594000, "event.kind": "event", "event.module": "postgresql", "event.timezone": "UTC", @@ -2586,7 +2635,7 @@ "input.type": "log", "log.level": "LOG", "log.offset": 10026, - "message": "duration: 16.594 ms", + "message": "2021-03-17 15:18:04.383 UTC [154] postgres@accounts LOG: duration: 16.594 ms", "postgresql.log.database": "accounts", "postgresql.log.timestamp": "2021-03-17 15:18:04.383 UTC", "process.pid": 154, @@ -2629,6 +2678,7 @@ "database" ], "event.dataset": "postgresql.log", + "event.duration": 3410000, "event.kind": "event", "event.module": "postgresql", "event.timezone": "UTC", @@ -2639,7 +2689,7 @@ "input.type": "log", "log.level": "LOG", "log.offset": 10204, - "message": "duration: 3.410 ms", + "message": "2021-03-17 15:18:04.386 UTC [154] postgres@accounts LOG: duration: 3.410 ms", "postgresql.log.database": "accounts", "postgresql.log.timestamp": "2021-03-17 15:18:04.386 UTC", "process.pid": 154, diff --git a/filebeat/module/postgresql/log/test/postgresql-9-log-statement-all.log-expected.json b/filebeat/module/postgresql/log/test/postgresql-9-log-statement-all.log-expected.json index 43cf31345c3..b5254bdf0ca 100644 --- a/filebeat/module/postgresql/log/test/postgresql-9-log-statement-all.log-expected.json +++ b/filebeat/module/postgresql/log/test/postgresql-9-log-statement-all.log-expected.json @@ -32,6 +32,7 @@ "database" ], "event.dataset": "postgresql.log", + "event.duration": 719435968, "event.kind": "event", "event.module": "postgresql", "event.timezone": "UTC", @@ -42,7 +43,7 @@ "input.type": "log", "log.level": "LOG", "log.offset": 95, - "message": "duration: 719.436 ms", + "message": "2021-03-17 15:10:21.486 UTC [118] postgres@postgres LOG: duration: 719.436 ms", "postgresql.log.database": "postgres", "postgresql.log.timestamp": "2021-03-17 15:10:21.486 UTC", "process.pid": 118, @@ -88,6 +89,7 @@ "database" ], "event.dataset": "postgresql.log", + "event.duration": 2710000, "event.kind": "event", "event.module": "postgresql", "event.timezone": "UTC", @@ -98,7 +100,7 @@ "input.type": "log", "log.level": "LOG", "log.offset": 579, - "message": "duration: 2.710 ms", + "message": "2021-03-17 15:10:27.115 UTC [126] postgres@postgres LOG: duration: 2.710 ms", "postgresql.log.database": "postgres", "postgresql.log.timestamp": "2021-03-17 15:10:27.115 UTC", "process.pid": 126, @@ -144,6 +146,7 @@ "database" ], "event.dataset": "postgresql.log", + "event.duration": 1111000, "event.kind": "event", "event.module": "postgresql", "event.timezone": "UTC", @@ -154,7 +157,7 @@ "input.type": "log", "log.level": "LOG", "log.offset": 1061, - "message": "duration: 1.111 ms", + "message": "2021-03-17 15:10:37.303 UTC [135] postgres@postgres LOG: duration: 1.111 ms", "postgresql.log.database": "postgres", "postgresql.log.timestamp": "2021-03-17 15:10:37.303 UTC", "process.pid": 135, @@ -197,6 +200,7 @@ "database" ], "event.dataset": "postgresql.log", + "event.duration": 648000, "event.kind": "event", "event.module": "postgresql", "event.timezone": "UTC", @@ -207,7 +211,7 @@ "input.type": "log", "log.level": "LOG", "log.offset": 1244, - "message": "duration: 0.648 ms", + "message": "2021-03-17 15:10:42.085 UTC [137] postgres@accounts LOG: duration: 0.648 ms", "postgresql.log.database": "accounts", "postgresql.log.timestamp": "2021-03-17 15:10:42.085 UTC", "process.pid": 137, @@ -250,6 +254,7 @@ "database" ], "event.dataset": "postgresql.log", + "event.duration": 3140000, "event.kind": "event", "event.module": "postgresql", "event.timezone": "UTC", @@ -260,7 +265,7 @@ "input.type": "log", "log.level": "LOG", "log.offset": 1489, - "message": "duration: 3.140 ms", + "message": "2021-03-17 15:10:42.088 UTC [137] postgres@accounts LOG: duration: 3.140 ms", "postgresql.log.database": "accounts", "postgresql.log.timestamp": "2021-03-17 15:10:42.088 UTC", "process.pid": 137, @@ -303,6 +308,7 @@ "database" ], "event.dataset": "postgresql.log", + "event.duration": 229000, "event.kind": "event", "event.module": "postgresql", "event.timezone": "UTC", @@ -313,7 +319,7 @@ "input.type": "log", "log.level": "LOG", "log.offset": 1672, - "message": "duration: 0.229 ms", + "message": "2021-03-17 15:10:42.089 UTC [137] postgres@accounts LOG: duration: 0.229 ms", "postgresql.log.database": "accounts", "postgresql.log.timestamp": "2021-03-17 15:10:42.089 UTC", "process.pid": 137, @@ -356,6 +362,7 @@ "database" ], "event.dataset": "postgresql.log", + "event.duration": 3339000, "event.kind": "event", "event.module": "postgresql", "event.timezone": "UTC", @@ -366,7 +373,7 @@ "input.type": "log", "log.level": "LOG", "log.offset": 1924, - "message": "duration: 3.339 ms", + "message": "2021-03-17 15:10:42.092 UTC [137] postgres@accounts LOG: duration: 3.339 ms", "postgresql.log.database": "accounts", "postgresql.log.timestamp": "2021-03-17 15:10:42.092 UTC", "process.pid": 137, @@ -409,6 +416,7 @@ "database" ], "event.dataset": "postgresql.log", + "event.duration": 229000, "event.kind": "event", "event.module": "postgresql", "event.timezone": "UTC", @@ -419,7 +427,7 @@ "input.type": "log", "log.level": "LOG", "log.offset": 2108, - "message": "duration: 0.229 ms", + "message": "2021-03-17 15:10:42.095 UTC [137] postgres@accounts LOG: duration: 0.229 ms", "postgresql.log.database": "accounts", "postgresql.log.timestamp": "2021-03-17 15:10:42.095 UTC", "process.pid": 137, @@ -462,6 +470,7 @@ "database" ], "event.dataset": "postgresql.log", + "event.duration": 1494000, "event.kind": "event", "event.module": "postgresql", "event.timezone": "UTC", @@ -472,7 +481,7 @@ "input.type": "log", "log.level": "LOG", "log.offset": 2364, - "message": "duration: 1.494 ms", + "message": "2021-03-17 15:10:42.096 UTC [137] postgres@accounts LOG: duration: 1.494 ms", "postgresql.log.database": "accounts", "postgresql.log.timestamp": "2021-03-17 15:10:42.096 UTC", "process.pid": 137, @@ -515,6 +524,7 @@ "database" ], "event.dataset": "postgresql.log", + "event.duration": 166000, "event.kind": "event", "event.module": "postgresql", "event.timezone": "UTC", @@ -525,7 +535,7 @@ "input.type": "log", "log.level": "LOG", "log.offset": 2548, - "message": "duration: 0.166 ms", + "message": "2021-03-17 15:10:42.097 UTC [137] postgres@accounts LOG: duration: 0.166 ms", "postgresql.log.database": "accounts", "postgresql.log.timestamp": "2021-03-17 15:10:42.097 UTC", "process.pid": 137, @@ -568,6 +578,7 @@ "database" ], "event.dataset": "postgresql.log", + "event.duration": 1914000, "event.kind": "event", "event.module": "postgresql", "event.timezone": "UTC", @@ -578,7 +589,7 @@ "input.type": "log", "log.level": "LOG", "log.offset": 2793, - "message": "duration: 1.914 ms", + "message": "2021-03-17 15:10:42.099 UTC [137] postgres@accounts LOG: duration: 1.914 ms", "postgresql.log.database": "accounts", "postgresql.log.timestamp": "2021-03-17 15:10:42.099 UTC", "process.pid": 137, @@ -621,6 +632,7 @@ "database" ], "event.dataset": "postgresql.log", + "event.duration": 559000, "event.kind": "event", "event.module": "postgresql", "event.timezone": "UTC", @@ -631,7 +643,7 @@ "input.type": "log", "log.level": "LOG", "log.offset": 2945, - "message": "duration: 0.559 ms", + "message": "2021-03-17 15:10:42.100 UTC [137] postgres@accounts LOG: duration: 0.559 ms", "postgresql.log.database": "accounts", "postgresql.log.timestamp": "2021-03-17 15:10:42.100 UTC", "process.pid": 137, @@ -674,6 +686,7 @@ "database" ], "event.dataset": "postgresql.log", + "event.duration": 399000, "event.kind": "event", "event.module": "postgresql", "event.timezone": "UTC", @@ -684,7 +697,7 @@ "input.type": "log", "log.level": "LOG", "log.offset": 3146, - "message": "duration: 0.399 ms", + "message": "2021-03-17 15:10:42.100 UTC [137] postgres@accounts LOG: duration: 0.399 ms", "postgresql.log.database": "accounts", "postgresql.log.timestamp": "2021-03-17 15:10:42.100 UTC", "process.pid": 137, @@ -727,6 +740,7 @@ "database" ], "event.dataset": "postgresql.log", + "event.duration": 281000, "event.kind": "event", "event.module": "postgresql", "event.timezone": "UTC", @@ -737,7 +751,7 @@ "input.type": "log", "log.level": "LOG", "log.offset": 3353, - "message": "duration: 0.281 ms", + "message": "2021-03-17 15:10:42.101 UTC [137] postgres@accounts LOG: duration: 0.281 ms", "postgresql.log.database": "accounts", "postgresql.log.timestamp": "2021-03-17 15:10:42.101 UTC", "process.pid": 137, @@ -780,6 +794,7 @@ "database" ], "event.dataset": "postgresql.log", + "event.duration": 90000, "event.kind": "event", "event.module": "postgresql", "event.timezone": "UTC", @@ -790,7 +805,7 @@ "input.type": "log", "log.level": "LOG", "log.offset": 3560, - "message": "duration: 0.090 ms", + "message": "2021-03-17 15:10:42.101 UTC [137] postgres@accounts LOG: duration: 0.090 ms", "postgresql.log.database": "accounts", "postgresql.log.timestamp": "2021-03-17 15:10:42.101 UTC", "process.pid": 137, @@ -833,6 +848,7 @@ "database" ], "event.dataset": "postgresql.log", + "event.duration": 77000, "event.kind": "event", "event.module": "postgresql", "event.timezone": "UTC", @@ -843,7 +859,7 @@ "input.type": "log", "log.level": "LOG", "log.offset": 3767, - "message": "duration: 0.077 ms", + "message": "2021-03-17 15:10:42.101 UTC [137] postgres@accounts LOG: duration: 0.077 ms", "postgresql.log.database": "accounts", "postgresql.log.timestamp": "2021-03-17 15:10:42.101 UTC", "process.pid": 137, @@ -886,6 +902,7 @@ "database" ], "event.dataset": "postgresql.log", + "event.duration": 52000, "event.kind": "event", "event.module": "postgresql", "event.timezone": "UTC", @@ -896,7 +913,7 @@ "input.type": "log", "log.level": "LOG", "log.offset": 3974, - "message": "duration: 0.052 ms", + "message": "2021-03-17 15:10:42.101 UTC [137] postgres@accounts LOG: duration: 0.052 ms", "postgresql.log.database": "accounts", "postgresql.log.timestamp": "2021-03-17 15:10:42.101 UTC", "process.pid": 137, @@ -939,6 +956,7 @@ "database" ], "event.dataset": "postgresql.log", + "event.duration": 90000, "event.kind": "event", "event.module": "postgresql", "event.timezone": "UTC", @@ -949,7 +967,7 @@ "input.type": "log", "log.level": "LOG", "log.offset": 4181, - "message": "duration: 0.090 ms", + "message": "2021-03-17 15:10:42.101 UTC [137] postgres@accounts LOG: duration: 0.090 ms", "postgresql.log.database": "accounts", "postgresql.log.timestamp": "2021-03-17 15:10:42.101 UTC", "process.pid": 137, @@ -992,6 +1010,7 @@ "database" ], "event.dataset": "postgresql.log", + "event.duration": 75000, "event.kind": "event", "event.module": "postgresql", "event.timezone": "UTC", @@ -1002,7 +1021,7 @@ "input.type": "log", "log.level": "LOG", "log.offset": 4388, - "message": "duration: 0.075 ms", + "message": "2021-03-17 15:10:42.101 UTC [137] postgres@accounts LOG: duration: 0.075 ms", "postgresql.log.database": "accounts", "postgresql.log.timestamp": "2021-03-17 15:10:42.101 UTC", "process.pid": 137, @@ -1045,6 +1064,7 @@ "database" ], "event.dataset": "postgresql.log", + "event.duration": 59000, "event.kind": "event", "event.module": "postgresql", "event.timezone": "UTC", @@ -1055,7 +1075,7 @@ "input.type": "log", "log.level": "LOG", "log.offset": 4595, - "message": "duration: 0.059 ms", + "message": "2021-03-17 15:10:42.101 UTC [137] postgres@accounts LOG: duration: 0.059 ms", "postgresql.log.database": "accounts", "postgresql.log.timestamp": "2021-03-17 15:10:42.101 UTC", "process.pid": 137, @@ -1098,6 +1118,7 @@ "database" ], "event.dataset": "postgresql.log", + "event.duration": 72000, "event.kind": "event", "event.module": "postgresql", "event.timezone": "UTC", @@ -1108,7 +1129,7 @@ "input.type": "log", "log.level": "LOG", "log.offset": 4802, - "message": "duration: 0.072 ms", + "message": "2021-03-17 15:10:42.101 UTC [137] postgres@accounts LOG: duration: 0.072 ms", "postgresql.log.database": "accounts", "postgresql.log.timestamp": "2021-03-17 15:10:42.101 UTC", "process.pid": 137, @@ -1151,6 +1172,7 @@ "database" ], "event.dataset": "postgresql.log", + "event.duration": 77000, "event.kind": "event", "event.module": "postgresql", "event.timezone": "UTC", @@ -1161,7 +1183,7 @@ "input.type": "log", "log.level": "LOG", "log.offset": 5009, - "message": "duration: 0.077 ms", + "message": "2021-03-17 15:10:42.102 UTC [137] postgres@accounts LOG: duration: 0.077 ms", "postgresql.log.database": "accounts", "postgresql.log.timestamp": "2021-03-17 15:10:42.102 UTC", "process.pid": 137, @@ -1204,6 +1226,7 @@ "database" ], "event.dataset": "postgresql.log", + "event.duration": 73000, "event.kind": "event", "event.module": "postgresql", "event.timezone": "UTC", @@ -1214,7 +1237,7 @@ "input.type": "log", "log.level": "LOG", "log.offset": 5217, - "message": "duration: 0.073 ms", + "message": "2021-03-17 15:10:42.102 UTC [137] postgres@accounts LOG: duration: 0.073 ms", "postgresql.log.database": "accounts", "postgresql.log.timestamp": "2021-03-17 15:10:42.102 UTC", "process.pid": 137, @@ -1257,6 +1280,7 @@ "database" ], "event.dataset": "postgresql.log", + "event.duration": 879000, "event.kind": "event", "event.module": "postgresql", "event.timezone": "UTC", @@ -1267,7 +1291,7 @@ "input.type": "log", "log.level": "LOG", "log.offset": 5370, - "message": "duration: 0.879 ms", + "message": "2021-03-17 15:10:42.103 UTC [137] postgres@accounts LOG: duration: 0.879 ms", "postgresql.log.database": "accounts", "postgresql.log.timestamp": "2021-03-17 15:10:42.103 UTC", "process.pid": 137, @@ -1310,6 +1334,7 @@ "database" ], "event.dataset": "postgresql.log", + "event.duration": 62000, "event.kind": "event", "event.module": "postgresql", "event.timezone": "UTC", @@ -1320,7 +1345,7 @@ "input.type": "log", "log.level": "LOG", "log.offset": 5522, - "message": "duration: 0.062 ms", + "message": "2021-03-17 15:10:42.103 UTC [137] postgres@accounts LOG: duration: 0.062 ms", "postgresql.log.database": "accounts", "postgresql.log.timestamp": "2021-03-17 15:10:42.103 UTC", "process.pid": 137, @@ -1363,6 +1388,7 @@ "database" ], "event.dataset": "postgresql.log", + "event.duration": 363000, "event.kind": "event", "event.module": "postgresql", "event.timezone": "UTC", @@ -1373,7 +1399,7 @@ "input.type": "log", "log.level": "LOG", "log.offset": 5694, - "message": "duration: 0.363 ms", + "message": "2021-03-17 15:10:42.103 UTC [137] postgres@accounts LOG: duration: 0.363 ms", "postgresql.log.database": "accounts", "postgresql.log.timestamp": "2021-03-17 15:10:42.103 UTC", "process.pid": 137, @@ -1416,6 +1442,7 @@ "database" ], "event.dataset": "postgresql.log", + "event.duration": 192094000, "event.kind": "event", "event.module": "postgresql", "event.timezone": "UTC", @@ -1426,7 +1453,7 @@ "input.type": "log", "log.level": "LOG", "log.offset": 5873, - "message": "duration: 192.094 ms", + "message": "2021-03-17 15:10:42.295 UTC [137] postgres@accounts LOG: duration: 192.094 ms", "postgresql.log.database": "accounts", "postgresql.log.timestamp": "2021-03-17 15:10:42.295 UTC", "process.pid": 137, @@ -1469,6 +1496,7 @@ "database" ], "event.dataset": "postgresql.log", + "event.duration": 1318000, "event.kind": "event", "event.module": "postgresql", "event.timezone": "UTC", @@ -1479,7 +1507,7 @@ "input.type": "log", "log.level": "LOG", "log.offset": 6028, - "message": "duration: 1.318 ms", + "message": "2021-03-17 15:10:42.297 UTC [137] postgres@accounts LOG: duration: 1.318 ms", "postgresql.log.database": "accounts", "postgresql.log.timestamp": "2021-03-17 15:10:42.297 UTC", "process.pid": 137, @@ -1522,6 +1550,7 @@ "database" ], "event.dataset": "postgresql.log", + "event.duration": 17051000, "event.kind": "event", "event.module": "postgresql", "event.timezone": "UTC", @@ -1532,7 +1561,7 @@ "input.type": "log", "log.level": "LOG", "log.offset": 6206, - "message": "duration: 17.051 ms", + "message": "2021-03-17 15:10:42.314 UTC [137] postgres@accounts LOG: duration: 17.051 ms", "postgresql.log.database": "accounts", "postgresql.log.timestamp": "2021-03-17 15:10:42.314 UTC", "process.pid": 137, @@ -1575,6 +1604,7 @@ "database" ], "event.dataset": "postgresql.log", + "event.duration": 2798000, "event.kind": "event", "event.module": "postgresql", "event.timezone": "UTC", @@ -1585,7 +1615,7 @@ "input.type": "log", "log.level": "LOG", "log.offset": 6384, - "message": "duration: 2.798 ms", + "message": "2021-03-17 15:10:42.317 UTC [137] postgres@accounts LOG: duration: 2.798 ms", "postgresql.log.database": "accounts", "postgresql.log.timestamp": "2021-03-17 15:10:42.317 UTC", "process.pid": 137, @@ -1628,6 +1658,7 @@ "database" ], "event.dataset": "postgresql.log", + "event.duration": 88800000, "event.kind": "event", "event.module": "postgresql", "event.timezone": "UTC", @@ -1638,7 +1669,7 @@ "input.type": "log", "log.level": "LOG", "log.offset": 6562, - "message": "duration: 88.800 ms", + "message": "2021-03-17 15:10:42.406 UTC [137] postgres@accounts LOG: duration: 88.800 ms", "postgresql.log.database": "accounts", "postgresql.log.timestamp": "2021-03-17 15:10:42.406 UTC", "process.pid": 137, @@ -1681,6 +1712,7 @@ "database" ], "event.dataset": "postgresql.log", + "event.duration": 442000, "event.kind": "event", "event.module": "postgresql", "event.timezone": "UTC", @@ -1691,7 +1723,7 @@ "input.type": "log", "log.level": "LOG", "log.offset": 6740, - "message": "duration: 0.442 ms", + "message": "2021-03-17 15:10:42.406 UTC [137] postgres@accounts LOG: duration: 0.442 ms", "postgresql.log.database": "accounts", "postgresql.log.timestamp": "2021-03-17 15:10:42.406 UTC", "process.pid": 137, @@ -1734,6 +1766,7 @@ "database" ], "event.dataset": "postgresql.log", + "event.duration": 2602000, "event.kind": "event", "event.module": "postgresql", "event.timezone": "UTC", @@ -1744,7 +1777,7 @@ "input.type": "log", "log.level": "LOG", "log.offset": 6937, - "message": "duration: 2.602 ms", + "message": "2021-03-17 15:10:42.409 UTC [137] postgres@accounts LOG: duration: 2.602 ms", "postgresql.log.database": "accounts", "postgresql.log.timestamp": "2021-03-17 15:10:42.409 UTC", "process.pid": 137, @@ -1787,6 +1820,7 @@ "database" ], "event.dataset": "postgresql.log", + "event.duration": 2433000, "event.kind": "event", "event.module": "postgresql", "event.timezone": "UTC", @@ -1797,7 +1831,7 @@ "input.type": "log", "log.level": "LOG", "log.offset": 7133, - "message": "duration: 2.433 ms", + "message": "2021-03-17 15:10:42.411 UTC [137] postgres@accounts LOG: duration: 2.433 ms", "postgresql.log.database": "accounts", "postgresql.log.timestamp": "2021-03-17 15:10:42.411 UTC", "process.pid": 137, @@ -1840,6 +1874,7 @@ "database" ], "event.dataset": "postgresql.log", + "event.duration": 42396000, "event.kind": "event", "event.module": "postgresql", "event.timezone": "UTC", @@ -1850,7 +1885,7 @@ "input.type": "log", "log.level": "LOG", "log.offset": 7330, - "message": "duration: 42.396 ms", + "message": "2021-03-17 15:10:42.454 UTC [137] postgres@accounts LOG: duration: 42.396 ms", "postgresql.log.database": "accounts", "postgresql.log.timestamp": "2021-03-17 15:10:42.454 UTC", "process.pid": 137, @@ -1893,6 +1928,7 @@ "database" ], "event.dataset": "postgresql.log", + "event.duration": 4849000, "event.kind": "event", "event.module": "postgresql", "event.timezone": "UTC", @@ -1903,7 +1939,7 @@ "input.type": "log", "log.level": "LOG", "log.offset": 7514, - "message": "duration: 4.849 ms", + "message": "2021-03-17 15:10:44.226 UTC [139] postgres@accounts LOG: duration: 4.849 ms", "postgresql.log.database": "accounts", "postgresql.log.timestamp": "2021-03-17 15:10:44.226 UTC", "process.pid": 139, @@ -1946,6 +1982,7 @@ "database" ], "event.dataset": "postgresql.log", + "event.duration": 3311000, "event.kind": "event", "event.module": "postgresql", "event.timezone": "UTC", @@ -1956,7 +1993,7 @@ "input.type": "log", "log.level": "LOG", "log.offset": 7759, - "message": "duration: 3.311 ms", + "message": "2021-03-17 15:10:44.231 UTC [139] postgres@accounts LOG: duration: 3.311 ms", "postgresql.log.database": "accounts", "postgresql.log.timestamp": "2021-03-17 15:10:44.231 UTC", "process.pid": 139, @@ -1999,6 +2036,7 @@ "database" ], "event.dataset": "postgresql.log", + "event.duration": 3302000, "event.kind": "event", "event.module": "postgresql", "event.timezone": "UTC", @@ -2009,7 +2047,7 @@ "input.type": "log", "log.level": "LOG", "log.offset": 7942, - "message": "duration: 3.302 ms", + "message": "2021-03-17 15:10:44.235 UTC [139] postgres@accounts LOG: duration: 3.302 ms", "postgresql.log.database": "accounts", "postgresql.log.timestamp": "2021-03-17 15:10:44.235 UTC", "process.pid": 139, @@ -2052,6 +2090,7 @@ "database" ], "event.dataset": "postgresql.log", + "event.duration": 2279000, "event.kind": "event", "event.module": "postgresql", "event.timezone": "UTC", @@ -2062,7 +2101,7 @@ "input.type": "log", "log.level": "LOG", "log.offset": 8194, - "message": "duration: 2.279 ms", + "message": "2021-03-17 15:10:44.238 UTC [139] postgres@accounts LOG: duration: 2.279 ms", "postgresql.log.database": "accounts", "postgresql.log.timestamp": "2021-03-17 15:10:44.238 UTC", "process.pid": 139, @@ -2105,6 +2144,7 @@ "database" ], "event.dataset": "postgresql.log", + "event.duration": 7119000, "event.kind": "event", "event.module": "postgresql", "event.timezone": "UTC", @@ -2115,7 +2155,7 @@ "input.type": "log", "log.level": "LOG", "log.offset": 8378, - "message": "duration: 7.119 ms", + "message": "2021-03-17 15:10:44.245 UTC [139] postgres@accounts LOG: duration: 7.119 ms", "postgresql.log.database": "accounts", "postgresql.log.timestamp": "2021-03-17 15:10:44.245 UTC", "process.pid": 139, @@ -2158,6 +2198,7 @@ "database" ], "event.dataset": "postgresql.log", + "event.duration": 2267000, "event.kind": "event", "event.module": "postgresql", "event.timezone": "UTC", @@ -2168,7 +2209,7 @@ "input.type": "log", "log.level": "LOG", "log.offset": 8634, - "message": "duration: 2.267 ms", + "message": "2021-03-17 15:10:44.250 UTC [139] postgres@accounts LOG: duration: 2.267 ms", "postgresql.log.database": "accounts", "postgresql.log.timestamp": "2021-03-17 15:10:44.250 UTC", "process.pid": 139, @@ -2211,6 +2252,7 @@ "database" ], "event.dataset": "postgresql.log", + "event.duration": 4857000, "event.kind": "event", "event.module": "postgresql", "event.timezone": "UTC", @@ -2221,7 +2263,7 @@ "input.type": "log", "log.level": "LOG", "log.offset": 8818, - "message": "duration: 4.857 ms", + "message": "2021-03-17 15:10:44.260 UTC [139] postgres@accounts LOG: duration: 4.857 ms", "postgresql.log.database": "accounts", "postgresql.log.timestamp": "2021-03-17 15:10:44.260 UTC", "process.pid": 139, @@ -2264,6 +2306,7 @@ "database" ], "event.dataset": "postgresql.log", + "event.duration": 2494000, "event.kind": "event", "event.module": "postgresql", "event.timezone": "UTC", @@ -2274,7 +2317,7 @@ "input.type": "log", "log.level": "LOG", "log.offset": 9063, - "message": "duration: 2.494 ms", + "message": "2021-03-17 15:10:44.265 UTC [139] postgres@accounts LOG: duration: 2.494 ms", "postgresql.log.database": "accounts", "postgresql.log.timestamp": "2021-03-17 15:10:44.265 UTC", "process.pid": 139, @@ -2317,6 +2360,7 @@ "database" ], "event.dataset": "postgresql.log", + "event.duration": 81000, "event.kind": "event", "event.module": "postgresql", "event.timezone": "UTC", @@ -2327,7 +2371,7 @@ "input.type": "log", "log.level": "LOG", "log.offset": 9215, - "message": "duration: 0.081 ms", + "message": "2021-03-17 15:10:44.265 UTC [139] postgres@accounts LOG: duration: 0.081 ms", "postgresql.log.database": "accounts", "postgresql.log.timestamp": "2021-03-17 15:10:44.265 UTC", "process.pid": 139, @@ -2370,6 +2414,7 @@ "database" ], "event.dataset": "postgresql.log", + "event.duration": 319000, "event.kind": "event", "event.module": "postgresql", "event.timezone": "UTC", @@ -2380,7 +2425,7 @@ "input.type": "log", "log.level": "LOG", "log.offset": 9416, - "message": "duration: 0.319 ms", + "message": "2021-03-17 15:10:44.266 UTC [139] postgres@accounts LOG: duration: 0.319 ms", "postgresql.log.database": "accounts", "postgresql.log.timestamp": "2021-03-17 15:10:44.266 UTC", "process.pid": 139, @@ -2423,6 +2468,7 @@ "database" ], "event.dataset": "postgresql.log", + "event.duration": 189000, "event.kind": "event", "event.module": "postgresql", "event.timezone": "UTC", @@ -2433,7 +2479,7 @@ "input.type": "log", "log.level": "LOG", "log.offset": 9623, - "message": "duration: 0.189 ms", + "message": "2021-03-17 15:10:44.266 UTC [139] postgres@accounts LOG: duration: 0.189 ms", "postgresql.log.database": "accounts", "postgresql.log.timestamp": "2021-03-17 15:10:44.266 UTC", "process.pid": 139, @@ -2476,6 +2522,7 @@ "database" ], "event.dataset": "postgresql.log", + "event.duration": 71000, "event.kind": "event", "event.module": "postgresql", "event.timezone": "UTC", @@ -2486,7 +2533,7 @@ "input.type": "log", "log.level": "LOG", "log.offset": 9830, - "message": "duration: 0.071 ms", + "message": "2021-03-17 15:10:44.266 UTC [139] postgres@accounts LOG: duration: 0.071 ms", "postgresql.log.database": "accounts", "postgresql.log.timestamp": "2021-03-17 15:10:44.266 UTC", "process.pid": 139, @@ -2529,6 +2576,7 @@ "database" ], "event.dataset": "postgresql.log", + "event.duration": 75000, "event.kind": "event", "event.module": "postgresql", "event.timezone": "UTC", @@ -2539,7 +2587,7 @@ "input.type": "log", "log.level": "LOG", "log.offset": 10037, - "message": "duration: 0.075 ms", + "message": "2021-03-17 15:10:44.266 UTC [139] postgres@accounts LOG: duration: 0.075 ms", "postgresql.log.database": "accounts", "postgresql.log.timestamp": "2021-03-17 15:10:44.266 UTC", "process.pid": 139, @@ -2582,6 +2630,7 @@ "database" ], "event.dataset": "postgresql.log", + "event.duration": 87000, "event.kind": "event", "event.module": "postgresql", "event.timezone": "UTC", @@ -2592,7 +2641,7 @@ "input.type": "log", "log.level": "LOG", "log.offset": 10244, - "message": "duration: 0.087 ms", + "message": "2021-03-17 15:10:44.266 UTC [139] postgres@accounts LOG: duration: 0.087 ms", "postgresql.log.database": "accounts", "postgresql.log.timestamp": "2021-03-17 15:10:44.266 UTC", "process.pid": 139, @@ -2635,6 +2684,7 @@ "database" ], "event.dataset": "postgresql.log", + "event.duration": 109000, "event.kind": "event", "event.module": "postgresql", "event.timezone": "UTC", @@ -2645,7 +2695,7 @@ "input.type": "log", "log.level": "LOG", "log.offset": 10451, - "message": "duration: 0.109 ms", + "message": "2021-03-17 15:10:44.266 UTC [139] postgres@accounts LOG: duration: 0.109 ms", "postgresql.log.database": "accounts", "postgresql.log.timestamp": "2021-03-17 15:10:44.266 UTC", "process.pid": 139, From 823d6444c6d3d0d2f5fe0dc4d39cd56b8819f4ff Mon Sep 17 00:00:00 2001 From: Jaime Soriano Pastor Date: Wed, 17 Mar 2021 17:34:19 +0100 Subject: [PATCH 4/7] Update dashboards --- .../Filebeat-Postgresql-overview.json | 811 +++++++++++------- .../Filebeat-Postgresql-slowlogs.json | 710 ++++++++------- 2 files changed, 906 insertions(+), 615 deletions(-) diff --git a/filebeat/module/postgresql/_meta/kibana/7/dashboard/Filebeat-Postgresql-overview.json b/filebeat/module/postgresql/_meta/kibana/7/dashboard/Filebeat-Postgresql-overview.json index ad349eece92..b43d4afef5c 100644 --- a/filebeat/module/postgresql/_meta/kibana/7/dashboard/Filebeat-Postgresql-overview.json +++ b/filebeat/module/postgresql/_meta/kibana/7/dashboard/Filebeat-Postgresql-overview.json @@ -1,331 +1,496 @@ { - "objects": [ + "objects": [ + { + "attributes": { + "description": "Overview dashboard for the Filebeat PostgreSQL module", + "hits": 0, + "kibanaSavedObjectMeta": { + "searchSourceJSON": { + "filter": [], + "highlightAll": true, + "query": { + "language": "kuery", + "query": "" + }, + "version": true + } + }, + "optionsJSON": { + "darkTheme": false + }, + "panelsJSON": [ + { + "embeddableConfig": { + "vis": { + "params": { + "sort": { + "columnIndex": null, + "direction": null + } + } + } + }, + "gridData": { + "h": 12, + "i": "1", + "w": 12, + "x": 0, + "y": 0 + }, + "panelIndex": "1", + "panelRefName": "panel_0", + "version": "7.3.0" + }, + { + "embeddableConfig": { + "columns": [ + "user.name", + "postgresql.log.database", + "log.level", + "message", + "postgresql.log.query" + ], + "sort": [ + "@timestamp", + "desc" + ] + }, + "gridData": { + "h": 24, + "i": "2", + "w": 48, + "x": 0, + "y": 12 + }, + "panelIndex": "2", + "panelRefName": "panel_1", + "version": "7.3.0" + }, + { + "embeddableConfig": {}, + "gridData": { + "h": 12, + "i": "3", + "w": 36, + "x": 12, + "y": 0 + }, + "panelIndex": "3", + "panelRefName": "panel_2", + "version": "7.3.0" + } + ], + "timeRestore": false, + "title": "[Filebeat PostgreSQL] Overview ECS", + "version": 1 + }, + "id": "158be870-87f4-11e7-ad9c-db80de0bf8d3-ecs", + "migrationVersion": { + "dashboard": "7.9.3" + }, + "namespaces": [ + "default" + ], + "references": [ + { + "id": "PostgreSQL Log Level Count-ecs", + "name": "panel_0", + "type": "visualization" + }, + { + "id": "PostgreSQL All Logs-ecs", + "name": "panel_1", + "type": "search" + }, + { + "id": "3dbd5370-87f3-11e7-ad9c-db80de0bf8d3-ecs", + "name": "panel_2", + "type": "visualization" + } + ], + "type": "dashboard", + "updated_at": "2021-03-17T16:06:10.364Z", + "version": "WzIxLDFd" + }, + { + "attributes": { + "description": "", + "kibanaSavedObjectMeta": { + "searchSourceJSON": { + "filter": [ + { + "$state": { + "store": "appState" + }, + "meta": { + "alias": null, + "disabled": false, + "indexRefName": "kibanaSavedObjectMeta.searchSourceJSON.filter[0].meta.index", + "key": "event.dataset", + "negate": false, + "params": { + "query": "postgresql.log" + }, + "type": "phrase" + }, + "query": { + "match_phrase": { + "event.dataset": "postgresql.log" + } + } + } + ], + "query": { + "language": "kuery", + "query": "" + } + } + }, + "savedSearchRefName": "search_0", + "title": "Log Level Count [Filebeat PostgreSQL] ECS", + "uiStateJSON": { + "vis": { + "params": { + "sort": { + "columnIndex": null, + "direction": null + } + } + } + }, + "version": 1, + "visState": { + "aggs": [ + { + "enabled": true, + "id": "1", + "params": {}, + "schema": "metric", + "type": "count" + }, + { + "enabled": true, + "id": "2", + "params": { + "field": "log.level", + "missingBucket": false, + "missingBucketLabel": "Missing", + "order": "desc", + "orderBy": "1", + "otherBucket": false, + "otherBucketLabel": "Other", + "size": 12 + }, + "schema": "bucket", + "type": "terms" + } + ], + "params": { + "perPage": 10, + "percentageCol": "", + "showMetricsAtAllLevels": false, + "showPartialRows": false, + "showTotal": false, + "sort": { + "columnIndex": null, + "direction": null + }, + "totalFunc": "sum" + }, + "title": "Log Level Count [Filebeat PostgreSQL] ECS", + "type": "table" + } + }, + "id": "PostgreSQL Log Level Count-ecs", + "migrationVersion": { + "visualization": "7.10.0" + }, + "namespaces": [ + "default" + ], + "references": [ + { + "id": "filebeat-*", + "name": "kibanaSavedObjectMeta.searchSourceJSON.filter[0].meta.index", + "type": "index-pattern" + }, { - "attributes": { - "description": "", - "kibanaSavedObjectMeta": { - "searchSourceJSON": { - "filter": [] - } - }, - "savedSearchId": "PostgreSQL All Logs-ecs", - "title": "Log Level Count [Filebeat PostgreSQL] ECS", - "uiStateJSON": { - "vis": { - "params": { - "sort": { - "columnIndex": null, - "direction": null - } - } - } - }, - "version": 1, - "visState": { - "aggs": [ - { - "enabled": true, - "id": "1", - "params": {}, - "schema": "metric", - "type": "count" - }, - { - "enabled": true, - "id": "2", - "params": { - "field": "log.level", - "order": "desc", - "orderBy": "1", - "size": 12 - }, - "schema": "bucket", - "type": "terms" - } - ], - "params": { - "perPage": 10, - "showMeticsAtAllLevels": false, - "showPartialRows": false, - "showTotal": false, - "sort": { - "columnIndex": null, - "direction": null - }, - "totalFunc": "sum" - }, - "title": "Log Level Count [Filebeat PostgreSQL] ECS", - "type": "table" + "id": "PostgreSQL All Logs-ecs", + "name": "search_0", + "type": "search" + } + ], + "type": "visualization", + "updated_at": "2021-03-17T16:31:15.326Z", + "version": "WzI5OSwxXQ==" + }, + { + "attributes": { + "columns": [ + "user.name", + "postgresql.log.database", + "log.level", + "message", + "postgresql.log.query" + ], + "description": "", + "hits": 0, + "kibanaSavedObjectMeta": { + "searchSourceJSON": { + "filter": [ + { + "$state": { + "store": "appState" + }, + "meta": { + "alias": null, + "disabled": false, + "indexRefName": "kibanaSavedObjectMeta.searchSourceJSON.filter[0].meta.index", + "key": "event.dataset", + "negate": false, + "params": { + "query": "postgresql.log" + }, + "type": "phrase" + }, + "query": { + "match_phrase": { + "event.dataset": "postgresql.log" + } } - }, - "id": "PostgreSQL Log Level Count-ecs", - "type": "visualization", - "version": 2 - }, + } + ], + "highlightAll": true, + "indexRefName": "kibanaSavedObjectMeta.searchSourceJSON.index", + "query": { + "language": "kuery", + "query": "" + }, + "version": true + } + }, + "sort": [ + [ + "@timestamp", + "desc" + ] + ], + "title": "All Logs [Filebeat PostgreSQL] ECS", + "version": 1 + }, + "id": "PostgreSQL All Logs-ecs", + "migrationVersion": { + "search": "7.9.3" + }, + "namespaces": [ + "default" + ], + "references": [ { - "attributes": { - "columns": [ - "user.name", - "postgresql.log.database", - "log.level", - "message", - "postgresql.log.query" - ], - "description": "", - "hits": 0, - "kibanaSavedObjectMeta": { - "searchSourceJSON": { - "filter": [ - { - "$state": { - "store": "appState" - }, - "meta": { - "alias": null, - "disabled": false, - "index": "filebeat-*", - "key": "event.module", - "negate": false, - "params": { - "query": "postgresql", - "type": "phrase" - }, - "type": "phrase", - "value": "postgresql" - }, - "query": { - "match": { - "event.module": { - "query": "postgresql", - "type": "phrase" - } - } - } - } - ], - "highlightAll": true, - "index": "filebeat-*", - "query": { - "language": "kuery", - "query": "" - }, - "version": true - } - }, - "sort": [ - "@timestamp", - "desc" - ], - "title": "All Logs [Filebeat PostgreSQL] ECS", - "version": 1 - }, - "id": "PostgreSQL All Logs-ecs", - "type": "search", - "version": 1 - }, + "id": "filebeat-*", + "name": "kibanaSavedObjectMeta.searchSourceJSON.index", + "type": "index-pattern" + }, { - "attributes": { - "description": "", - "kibanaSavedObjectMeta": { - "searchSourceJSON": { - "filter": [] - } - }, - "savedSearchId": "PostgreSQL All Logs-ecs", - "title": "Logs by level over time [Filebeat PostgreSQL] ECS", - "uiStateJSON": {}, - "version": 1, - "visState": { - "aggs": [ - { - "enabled": true, - "id": "1", - "params": {}, - "schema": "metric", - "type": "count" - }, - { - "enabled": true, - "id": "2", - "params": { - "customInterval": "2h", - "extended_bounds": {}, - "field": "@timestamp", - "interval": "auto", - "min_doc_count": 1 - }, - "schema": "segment", - "type": "date_histogram" - }, - { - "enabled": true, - "id": "3", - "params": { - "field": "log.level", - "order": "desc", - "orderBy": "1", - "size": 5 - }, - "schema": "group", - "type": "terms" - } - ], - "params": { - "addLegend": true, - "addTimeMarker": false, - "addTooltip": true, - "categoryAxes": [ - { - "id": "CategoryAxis-1", - "labels": { - "show": true, - "truncate": 100 - }, - "position": "bottom", - "scale": { - "type": "linear" - }, - "show": true, - "style": {}, - "title": { - "text": "@timestamp per month" - }, - "type": "category" - } - ], - "grid": { - "categoryLines": false, - "style": { - "color": "#eee" - } - }, - "legendPosition": "right", - "seriesParams": [ - { - "data": { - "id": "1", - "label": "Count" - }, - "drawLinesBetweenPoints": true, - "mode": "stacked", - "show": "true", - "showCircles": true, - "type": "histogram", - "valueAxis": "ValueAxis-1" - } - ], - "times": [], - "type": "histogram", - "valueAxes": [ - { - "id": "ValueAxis-1", - "labels": { - "filter": false, - "rotate": 0, - "show": true, - "truncate": 100 - }, - "name": "LeftAxis-1", - "position": "left", - "scale": { - "mode": "normal", - "type": "linear" - }, - "show": true, - "style": {}, - "title": { - "text": "Count" - }, - "type": "value" - } - ] - }, - "title": "Logs by level over time [Filebeat PostgreSQL] ECS", - "type": "histogram" + "id": "filebeat-*", + "name": "kibanaSavedObjectMeta.searchSourceJSON.filter[0].meta.index", + "type": "index-pattern" + } + ], + "type": "search", + "updated_at": "2021-03-17T16:32:17.646Z", + "version": "WzMxMSwxXQ==" + }, + { + "attributes": { + "description": "", + "kibanaSavedObjectMeta": { + "searchSourceJSON": { + "filter": [ + { + "$state": { + "store": "appState" + }, + "meta": { + "alias": null, + "disabled": false, + "indexRefName": "kibanaSavedObjectMeta.searchSourceJSON.filter[0].meta.index", + "key": "event.dataset", + "negate": false, + "params": { + "query": "postgresql.log" + }, + "type": "phrase" + }, + "query": { + "match_phrase": { + "event.dataset": "postgresql.log" + } } - }, - "id": "3dbd5370-87f3-11e7-ad9c-db80de0bf8d3-ecs", - "type": "visualization", - "version": 1 - }, + } + ], + "query": { + "language": "kuery", + "query": "" + } + } + }, + "savedSearchRefName": "search_0", + "title": "Logs by level over time [Filebeat PostgreSQL] ECS", + "uiStateJSON": {}, + "version": 1, + "visState": { + "aggs": [ + { + "enabled": true, + "id": "1", + "params": {}, + "schema": "metric", + "type": "count" + }, + { + "enabled": true, + "id": "2", + "params": { + "drop_partials": false, + "extended_bounds": {}, + "field": "@timestamp", + "interval": "auto", + "min_doc_count": 1, + "scaleMetricValues": false, + "timeRange": { + "from": "now-15m", + "to": "now" + }, + "useNormalizedEsInterval": true + }, + "schema": "segment", + "type": "date_histogram" + }, + { + "enabled": true, + "id": "3", + "params": { + "field": "log.level", + "missingBucket": false, + "missingBucketLabel": "Missing", + "order": "desc", + "orderBy": "1", + "otherBucket": false, + "otherBucketLabel": "Other", + "size": 5 + }, + "schema": "group", + "type": "terms" + } + ], + "params": { + "addLegend": true, + "addTimeMarker": false, + "addTooltip": true, + "categoryAxes": [ + { + "id": "CategoryAxis-1", + "labels": { + "show": true, + "truncate": 100 + }, + "position": "bottom", + "scale": { + "type": "linear" + }, + "show": true, + "style": {}, + "title": { + "text": "@timestamp per month" + }, + "type": "category" + } + ], + "grid": { + "categoryLines": false, + "style": { + "color": "#eee" + } + }, + "labels": { + "show": false + }, + "legendPosition": "right", + "seriesParams": [ + { + "data": { + "id": "1", + "label": "Count" + }, + "drawLinesBetweenPoints": true, + "mode": "stacked", + "show": "true", + "showCircles": true, + "type": "histogram", + "valueAxis": "ValueAxis-1" + } + ], + "thresholdLine": { + "color": "#E7664C", + "show": false, + "style": "full", + "value": 10, + "width": 1 + }, + "times": [], + "type": "histogram", + "valueAxes": [ + { + "id": "ValueAxis-1", + "labels": { + "filter": false, + "rotate": 0, + "show": true, + "truncate": 100 + }, + "name": "LeftAxis-1", + "position": "left", + "scale": { + "mode": "normal", + "type": "linear" + }, + "show": true, + "style": {}, + "title": { + "text": "Count" + }, + "type": "value" + } + ] + }, + "title": "Logs by level over time [Filebeat PostgreSQL] ECS", + "type": "histogram" + } + }, + "id": "3dbd5370-87f3-11e7-ad9c-db80de0bf8d3-ecs", + "migrationVersion": { + "visualization": "7.10.0" + }, + "namespaces": [ + "default" + ], + "references": [ + { + "id": "filebeat-*", + "name": "kibanaSavedObjectMeta.searchSourceJSON.filter[0].meta.index", + "type": "index-pattern" + }, { - "attributes": { - "description": "Overview dashboard for the Filebeat PostgreSQL module", - "hits": 0, - "kibanaSavedObjectMeta": { - "searchSourceJSON": { - "filter": [], - "highlightAll": true, - "query": { - "language": "kuery", - "query": "" - }, - "version": true - } - }, - "optionsJSON": { - "darkTheme": false - }, - "panelsJSON": [ - { - "col": 1, - "id": "PostgreSQL Log Level Count-ecs", - "panelIndex": 1, - "row": 1, - "size_x": 3, - "size_y": 3, - "type": "visualization" - }, - { - "col": 1, - "columns": [ - "user.name", - "postgresql.log.database", - "log.level", - "message", - "postgresql.log.query" - ], - "id": "PostgreSQL All Logs-ecs", - "panelIndex": 2, - "row": 4, - "size_x": 12, - "size_y": 6, - "sort": [ - "@timestamp", - "desc" - ], - "type": "search" - }, - { - "col": 4, - "id": "3dbd5370-87f3-11e7-ad9c-db80de0bf8d3-ecs", - "panelIndex": 3, - "row": 1, - "size_x": 9, - "size_y": 3, - "type": "visualization" - } - ], - "timeRestore": false, - "title": "[Filebeat PostgreSQL] Overview ECS", - "uiStateJSON": { - "P-1": { - "vis": { - "params": { - "sort": { - "columnIndex": null, - "direction": null - } - } - } - } - }, - "version": 1 - }, - "id": "158be870-87f4-11e7-ad9c-db80de0bf8d3-ecs", - "type": "dashboard", - "version": 1 + "id": "PostgreSQL All Logs-ecs", + "name": "search_0", + "type": "search" } - ], - "version": "6.0.0-beta1-SNAPSHOT" -} \ No newline at end of file + ], + "type": "visualization", + "updated_at": "2021-03-17T16:31:38.064Z", + "version": "WzMwNSwxXQ==" + } + ], + "version": "7.10.0" +} diff --git a/filebeat/module/postgresql/_meta/kibana/7/dashboard/Filebeat-Postgresql-slowlogs.json b/filebeat/module/postgresql/_meta/kibana/7/dashboard/Filebeat-Postgresql-slowlogs.json index d5203c91d0d..0e06097a5a3 100644 --- a/filebeat/module/postgresql/_meta/kibana/7/dashboard/Filebeat-Postgresql-slowlogs.json +++ b/filebeat/module/postgresql/_meta/kibana/7/dashboard/Filebeat-Postgresql-slowlogs.json @@ -1,300 +1,426 @@ { - "objects": [ + "objects": [ + { + "attributes": { + "description": "Dashboard for analyzing the query durations of the Filebeat PostgreSQL module", + "hits": 0, + "kibanaSavedObjectMeta": { + "searchSourceJSON": { + "filter": [], + "highlightAll": true, + "query": { + "language": "kuery", + "query": "" + }, + "version": true + } + }, + "optionsJSON": { + "darkTheme": false + }, + "panelsJSON": [ + { + "embeddableConfig": {}, + "gridData": { + "h": 12, + "i": "1", + "w": 24, + "x": 0, + "y": 0 + }, + "panelIndex": "1", + "panelRefName": "panel_0", + "version": "7.10.0" + }, + { + "embeddableConfig": { + "columns": [ + "user.name", + "postgresql.log.database", + "event.duration", + "postgresql.log.query" + ], + "sort": [ + "@timestamp", + "desc" + ] + }, + "gridData": { + "h": 12, + "i": "2", + "w": 24, + "x": 24, + "y": 0 + }, + "panelIndex": "2", + "panelRefName": "panel_1", + "version": "7.10.0" + }, + { + "embeddableConfig": { + "columns": [ + "user.name", + "postgresql.log.database", + "event.duration", + "postgresql.log.query" + ], + "sort": [ + "@timestamp", + "desc" + ] + }, + "gridData": { + "h": 20, + "i": "3", + "w": 48, + "x": 0, + "y": 12 + }, + "panelIndex": "3", + "panelRefName": "panel_2", + "version": "7.10.0" + } + ], + "timeRestore": false, + "title": "[Filebeat PostgreSQL] Query Duration Overview ECS", + "version": 1 + }, + "id": "e4c5f230-87f3-11e7-ad9c-db80de0bf8d3-ecs", + "migrationVersion": { + "dashboard": "7.9.3" + }, + "namespaces": [ + "default" + ], + "references": [ { - "attributes": { - "description": "", - "kibanaSavedObjectMeta": { - "searchSourceJSON": { - "filter": [], - "query": { - "language": "kuery", - "query": "" - } - } - }, - "savedSearchId": "PostgreSQL Query Durations-ecs", - "title": "Query count and cumulated duration [Filebeat PostgreSQL] ECS", - "uiStateJSON": { - "vis": { - "colors": { - "Number of queries": "#0A437C", - "Sum of query duration": "#6ED0E0" - }, - "legendOpen": true - } - }, - "version": 1, - "visState": { - "aggs": [ - { - "enabled": true, - "id": "3", - "params": { - "customInterval": "2h", - "extended_bounds": {}, - "field": "@timestamp", - "interval": "auto", - "min_doc_count": 1 - }, - "schema": "segment", - "type": "date_histogram" - }, - { - "enabled": true, - "id": "4", - "params": { - "customLabel": "Number of queries" - }, - "schema": "metric", - "type": "count" - }, - { - "enabled": true, - "id": "2", - "params": { - "customLabel": "Sum of query duration", - "field": "event.duration" - }, - "schema": "metric", - "type": "sum" - } - ], - "params": { - "addLegend": true, - "addTimeMarker": false, - "addTooltip": true, - "categoryAxes": [ - { - "id": "CategoryAxis-1", - "labels": { - "show": true, - "truncate": 100 - }, - "position": "bottom", - "scale": { - "type": "linear" - }, - "show": true, - "style": {}, - "title": { - "text": "@timestamp per 3 hours" - }, - "type": "category" - } - ], - "grid": { - "categoryLines": false, - "style": { - "color": "#eee" - } - }, - "legendPosition": "right", - "seriesParams": [ - { - "data": { - "id": "4", - "label": "Number of queries" - }, - "drawLinesBetweenPoints": true, - "interpolate": "linear", - "lineWidth": 2, - "mode": "normal", - "show": true, - "showCircles": true, - "type": "histogram", - "valueAxis": "ValueAxis-1" - }, - { - "data": { - "id": "2", - "label": "Sum of query duration" - }, - "drawLinesBetweenPoints": true, - "interpolate": "linear", - "lineWidth": 2, - "mode": "normal", - "show": true, - "showCircles": true, - "type": "histogram", - "valueAxis": "ValueAxis-1" - } - ], - "times": [], - "type": "histogram", - "valueAxes": [ - { - "id": "ValueAxis-1", - "labels": { - "filter": false, - "rotate": 0, - "show": true, - "truncate": 100 - }, - "name": "LeftAxis-1", - "position": "left", - "scale": { - "mode": "normal", - "type": "linear" - }, - "show": true, - "style": {}, - "title": { - "text": "" - }, - "type": "value" - } - ] - }, - "title": "Query count and cumulated duration [Filebeat PostgreSQL] ECS", - "type": "histogram" + "id": "PostgreSQL Query Count and Duration-ecs", + "name": "panel_0", + "type": "visualization" + }, + { + "id": "Slow PostgreSQL Queries-ecs", + "name": "panel_1", + "type": "search" + }, + { + "id": "PostgreSQL Query Durations-ecs", + "name": "panel_2", + "type": "search" + } + ], + "type": "dashboard", + "updated_at": "2021-03-17T16:18:35.298Z", + "version": "WzI1NywxXQ==" + }, + { + "attributes": { + "description": "", + "kibanaSavedObjectMeta": { + "searchSourceJSON": { + "filter": [ + { + "$state": { + "store": "appState" + }, + "meta": { + "alias": null, + "disabled": false, + "indexRefName": "kibanaSavedObjectMeta.searchSourceJSON.filter[0].meta.index", + "key": "event.dataset", + "negate": false, + "params": { + "query": "postgresql.log" + }, + "type": "phrase" + }, + "query": { + "match_phrase": { + "event.dataset": "postgresql.log" + } } - }, - "id": "PostgreSQL Query Count and Duration-ecs", - "type": "visualization", - "version": 1 - }, + } + ], + "query": { + "language": "kuery", + "query": "" + } + } + }, + "savedSearchRefName": "search_0", + "title": "Query count and cumulated duration [Filebeat PostgreSQL] ECS", + "uiStateJSON": { + "vis": { + "colors": { + "Number of queries": "#0A437C", + "Sum of query duration": "#6ED0E0" + }, + "legendOpen": true + } + }, + "version": 1, + "visState": { + "aggs": [ + { + "enabled": true, + "id": "3", + "params": { + "drop_partials": false, + "extended_bounds": {}, + "field": "@timestamp", + "interval": "auto", + "min_doc_count": 1, + "scaleMetricValues": false, + "timeRange": { + "from": "now-15m", + "to": "now" + }, + "useNormalizedEsInterval": true + }, + "schema": "segment", + "type": "date_histogram" + }, + { + "enabled": true, + "id": "4", + "params": { + "customLabel": "Number of queries" + }, + "schema": "metric", + "type": "count" + }, + { + "enabled": true, + "id": "2", + "params": { + "customLabel": "Sum of query duration", + "field": "event.duration" + }, + "schema": "metric", + "type": "sum" + } + ], + "params": { + "addLegend": true, + "addTimeMarker": false, + "addTooltip": true, + "categoryAxes": [ + { + "id": "CategoryAxis-1", + "labels": { + "show": true, + "truncate": 100 + }, + "position": "bottom", + "scale": { + "type": "linear" + }, + "show": true, + "style": {}, + "title": { + "text": "@timestamp per 3 hours" + }, + "type": "category" + } + ], + "grid": { + "categoryLines": false, + "style": { + "color": "#eee" + } + }, + "labels": { + "show": false + }, + "legendPosition": "right", + "seriesParams": [ + { + "data": { + "id": "4", + "label": "Number of queries" + }, + "drawLinesBetweenPoints": true, + "interpolate": "linear", + "lineWidth": 2, + "mode": "normal", + "show": true, + "showCircles": true, + "type": "histogram", + "valueAxis": "ValueAxis-1" + }, + { + "data": { + "id": "2", + "label": "Sum of query duration" + }, + "drawLinesBetweenPoints": true, + "interpolate": "linear", + "lineWidth": 2, + "mode": "normal", + "show": true, + "showCircles": true, + "type": "histogram", + "valueAxis": "ValueAxis-1" + } + ], + "thresholdLine": { + "color": "#E7664C", + "show": false, + "style": "full", + "value": 10, + "width": 1 + }, + "times": [], + "type": "histogram", + "valueAxes": [ + { + "id": "ValueAxis-1", + "labels": { + "filter": false, + "rotate": 0, + "show": true, + "truncate": 100 + }, + "name": "LeftAxis-1", + "position": "left", + "scale": { + "mode": "normal", + "type": "linear" + }, + "show": true, + "style": {}, + "title": { + "text": "" + }, + "type": "value" + } + ] + }, + "title": "Query count and cumulated duration [Filebeat PostgreSQL] ECS", + "type": "histogram" + } + }, + "id": "PostgreSQL Query Count and Duration-ecs", + "migrationVersion": { + "visualization": "7.10.0" + }, + "namespaces": [ + "default" + ], + "references": [ { - "attributes": { - "columns": [ - "user.name", - "postgresql.log.database", - "event.duration", - "postgresql.log.query" - ], - "description": "", - "hits": 0, - "kibanaSavedObjectMeta": { - "searchSourceJSON": { - "filter": [], - "highlightAll": true, - "index": "filebeat-*", - "query": { - "language": "kuery", - "query": "event.duration>30000000" - }, - "version": true - } - }, - "sort": [ - "@timestamp", - "desc" - ], - "title": "Slow Queries [Filebeat PostgreSQL] ECS", - "version": 1 - }, - "id": "Slow PostgreSQL Queries-ecs", - "type": "search", - "version": 1 - }, + "id": "filebeat-*", + "name": "kibanaSavedObjectMeta.searchSourceJSON.filter[0].meta.index", + "type": "index-pattern" + }, { - "attributes": { - "columns": [ - "user.name", - "postgresql.log.database", - "event.duration", - "postgresql.log.query" - ], - "description": "", - "hits": 0, - "kibanaSavedObjectMeta": { - "searchSourceJSON": { - "filter": [], - "highlightAll": true, - "index": "filebeat-*", - "query": { - "language": "kuery", - "query": "event.duration:*" - }, - "version": true - } - }, - "sort": [ - "@timestamp", - "desc" - ], - "title": "Query Durations [Filebeat PostgreSQL] ECS", - "version": 1 - }, - "id": "PostgreSQL Query Durations-ecs", - "type": "search", - "version": 1 - }, + "id": "PostgreSQL Query Durations-ecs", + "name": "search_0", + "type": "search" + } + ], + "type": "visualization", + "updated_at": "2021-03-17T16:24:41.475Z", + "version": "WzI3MSwxXQ==" + }, + { + "attributes": { + "columns": [ + "user.name", + "postgresql.log.database", + "event.duration", + "postgresql.log.query" + ], + "description": "", + "hits": 0, + "kibanaSavedObjectMeta": { + "searchSourceJSON": { + "filter": [], + "highlightAll": true, + "indexRefName": "kibanaSavedObjectMeta.searchSourceJSON.index", + "query": { + "language": "kuery", + "query": "event.dataset:\"postgresql.log\" AND event.duration\u003e30000000" + }, + "version": true + } + }, + "sort": [ + [ + "@timestamp", + "desc" + ] + ], + "title": "Slow Queries [Filebeat PostgreSQL] ECS", + "version": 1 + }, + "id": "Slow PostgreSQL Queries-ecs", + "migrationVersion": { + "search": "7.9.3" + }, + "namespaces": [ + "default" + ], + "references": [ + { + "id": "filebeat-*", + "name": "kibanaSavedObjectMeta.searchSourceJSON.index", + "type": "index-pattern" + } + ], + "type": "search", + "updated_at": "2021-03-17T16:25:43.870Z", + "version": "WzI4NSwxXQ==" + }, + { + "attributes": { + "columns": [ + "user.name", + "postgresql.log.database", + "event.duration", + "postgresql.log.query" + ], + "description": "", + "hits": 0, + "kibanaSavedObjectMeta": { + "searchSourceJSON": { + "filter": [], + "highlightAll": true, + "indexRefName": "kibanaSavedObjectMeta.searchSourceJSON.index", + "query": { + "language": "kuery", + "query": "event.dataset:\"postgresql.log\" AND event.duration:*" + }, + "version": true + } + }, + "sort": [ + [ + "@timestamp", + "desc" + ] + ], + "title": "Query Durations [Filebeat PostgreSQL] ECS", + "version": 1 + }, + "id": "PostgreSQL Query Durations-ecs", + "migrationVersion": { + "search": "7.9.3" + }, + "namespaces": [ + "default" + ], + "references": [ { - "attributes": { - "description": "Dashboard for analyzing the query durations of the Filebeat PostgreSQL module", - "hits": 0, - "kibanaSavedObjectMeta": { - "searchSourceJSON": { - "filter": [], - "highlightAll": true, - "query": { - "language": "kuery", - "query": "postgresql.log.query:*" - }, - "version": true - } - }, - "optionsJSON": { - "darkTheme": false - }, - "panelsJSON": [ - { - "col": 1, - "id": "PostgreSQL Query Count and Duration-ecs", - "panelIndex": 1, - "row": 1, - "size_x": 6, - "size_y": 3, - "type": "visualization" - }, - { - "col": 7, - "columns": [ - "user.name", - "postgresql.log.database", - "event.duration", - "postgresql.log.query" - ], - "id": "Slow PostgreSQL Queries-ecs", - "panelIndex": 2, - "row": 1, - "size_x": 6, - "size_y": 3, - "sort": [ - "@timestamp", - "desc" - ], - "type": "search" - }, - { - "col": 1, - "columns": [ - "user.name", - "postgresql.log.database", - "event.duration", - "postgresql.log.query" - ], - "id": "PostgreSQL Query Durations-ecs", - "panelIndex": 3, - "row": 4, - "size_x": 12, - "size_y": 5, - "sort": [ - "@timestamp", - "desc" - ], - "type": "search" - } - ], - "timeRestore": false, - "title": "[Filebeat PostgreSQL] Query Duration Overview ECS", - "uiStateJSON": {}, - "version": 1 - }, - "id": "e4c5f230-87f3-11e7-ad9c-db80de0bf8d3-ecs", - "type": "dashboard", - "version": 1 + "id": "filebeat-*", + "name": "kibanaSavedObjectMeta.searchSourceJSON.index", + "type": "index-pattern" } - ], - "version": "6.0.0-beta1-SNAPSHOT" + ], + "type": "search", + "updated_at": "2021-03-17T16:23:19.900Z", + "version": "WzI2NCwxXQ==" + } + ], + "version": "7.10.0" } From 4b163cebc498e4fa7524490d6e5c45ab7aff3157 Mon Sep 17 00:00:00 2001 From: Jaime Soriano Pastor Date: Wed, 17 Mar 2021 17:37:35 +0100 Subject: [PATCH 5/7] Add changelog --- CHANGELOG.next.asciidoc | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.next.asciidoc b/CHANGELOG.next.asciidoc index 44ddadada89..23e350b067f 100644 --- a/CHANGELOG.next.asciidoc +++ b/CHANGELOG.next.asciidoc @@ -881,6 +881,7 @@ https://github.com/elastic/beats/compare/v7.0.0-alpha2...master[Check the HEAD d - Upgrade okta to ecs 1.8.0 and move js processor to ingest pipeline {issue}23118[23118] {pull}23929[23929] - Update zoom module to ECS 1.8. {pull}23904[23904] {issue}23118[23118] - Support X-Forwarder-For in IIS logs. {pull}19142[192142] +- Improve support of log_statement in PostgreSQL module. {pull}[] *Heartbeat* From c652a8b42c16874d6422cf5d4f92d03e09cc968c Mon Sep 17 00:00:00 2001 From: Jaime Soriano Pastor Date: Wed, 17 Mar 2021 17:51:26 +0100 Subject: [PATCH 6/7] Fix changelog --- CHANGELOG.next.asciidoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.next.asciidoc b/CHANGELOG.next.asciidoc index 23e350b067f..a5ae1cdf2de 100644 --- a/CHANGELOG.next.asciidoc +++ b/CHANGELOG.next.asciidoc @@ -881,7 +881,7 @@ https://github.com/elastic/beats/compare/v7.0.0-alpha2...master[Check the HEAD d - Upgrade okta to ecs 1.8.0 and move js processor to ingest pipeline {issue}23118[23118] {pull}23929[23929] - Update zoom module to ECS 1.8. {pull}23904[23904] {issue}23118[23118] - Support X-Forwarder-For in IIS logs. {pull}19142[192142] -- Improve support of log_statement in PostgreSQL module. {pull}[] +- Improve support of some logging options in PostgreSQL module. {pull}24607[24607] *Heartbeat* From 6ea58670b54b2c674d4aa8c5c1b32edff29861a6 Mon Sep 17 00:00:00 2001 From: Jaime Soriano Pastor Date: Wed, 24 Mar 2021 19:32:17 +0100 Subject: [PATCH 7/7] Improve changelog entry --- CHANGELOG.next.asciidoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.next.asciidoc b/CHANGELOG.next.asciidoc index 6b2af9e416e..0cd7fc69cb5 100644 --- a/CHANGELOG.next.asciidoc +++ b/CHANGELOG.next.asciidoc @@ -798,7 +798,7 @@ https://github.com/elastic/beats/compare/v7.0.0-alpha2...master[Check the HEAD d - Mark m365 defender, defender atp, okta and google workspace modules as GA {pull}23113[23113] - Added `alternative_host` option to google pubsub input {pull}23215[23215] - Support X-Forwarder-For in IIS logs. {pull}19142[192142] -- Improve support of some logging options in PostgreSQL module. {pull}24607[24607] +- Add support for logs generated by servers configured with `log_statement` and `log_duration` in PostgreSQL module. {pull}24607[24607] - Updating field mappings for Cisco AMP module, fixing certain fields. {pull}24661[24661] - Added NTP fileset to Zeek module {pull}24224[24224]