File tree Expand file tree Collapse file tree
metricbeat/module/postgresql/statement Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11{
22 "@timestamp" : " 2017-10-12T08:05:34.853Z" ,
3- "agent" : {
4- "hostname" : " host.example.com" ,
5- "name" : " host.example.com"
6- },
73 "event" : {
84 "dataset" : " postgresql.statement" ,
95 "duration" : 115000 ,
106 "module" : " postgresql"
117 },
128 "metricset" : {
13- "name" : " statement"
9+ "name" : " statement" ,
10+ "period" : 10000
1411 },
1512 "postgresql" : {
1613 "statement" : {
1916 },
2017 "query" : {
2118 "calls" : 2 ,
22- "id" : " 1592910677" ,
19+ "id" : 1592910677 ,
2320 "memory" : {
2421 "local" : {
2522 "dirtied" : 0 ,
4239 "text" : " SELECT * FROM pg_stat_statements" ,
4340 "time" : {
4441 "max" : {
45- "ms" : 0.388
42+ "ms" : 0.161
4643 },
4744 "mean" : {
48- "ms" : 0.235
45+ "ms" : 0.1595
4946 },
5047 "min" : {
51- "ms" : 0.082
48+ "ms" : 0.158
5249 },
5350 "stddev" : {
54- "ms" : 0.153
51+ "ms" : 0.0015000000000000013
5552 },
5653 "total" : {
57- "ms" : 0.47000000000000003
54+ "ms" : 0.319
5855 }
5956 }
6057 },
6461 }
6562 },
6663 "service" : {
67- "address" : " 172.26.0 .2:5432" ,
64+ "address" : " 192.168.144 .2:5432" ,
6865 "type" : " postgresql"
6966 }
7067}
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ import (
2222 c "github.com/elastic/beats/v7/libbeat/common/schema/mapstrstr"
2323)
2424
25- // Based on: https://www.postgresql.org/docs/9.2/static/monitoring-stats .html#PG-STAT-ACTIVITY-VIEW
25+ // Based on: https://www.postgresql.org/docs/9.6/pgstatstatements .html
2626var schema = s.Schema {
2727 "user" : s.Object {
2828 "id" : c .Int ("userid" ),
@@ -31,7 +31,7 @@ var schema = s.Schema{
3131 "oid" : c .Int ("dbid" ),
3232 },
3333 "query" : s.Object {
34- "id" : c .Str ("queryid" ),
34+ "id" : c .Int ("queryid" ),
3535 "text" : c .Str ("query" ),
3636 "calls" : c .Int ("calls" ),
3737 "rows" : c .Int ("rows" ),
You can’t perform that action at this time.
0 commit comments