Skip to content

Commit 3e76802

Browse files
committed
fix: fixed Statements plugin datatypes
1 parent d030b48 commit 3e76802

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

mamonsu/plugins/pgsql/statements.py

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,29 +34,28 @@ class Statements(Plugin):
3434
# zbx_key, sql, desc, unit, delta, (Graph, color, side)
3535
Items = [
3636
("stat[read_bytes]",
37-
"sum(shared_blks_read+local_blks_read+temp_blks_read)*8*1024",
37+
"(sum(shared_blks_read+local_blks_read+temp_blks_read)*8*1024)::bigint",
3838
"Read bytes/s", Plugin.UNITS.bytes_per_second, Plugin.DELTA.speed_per_second,
3939
("PostgreSQL Statements: Bytes", "87C2B9", 0)),
4040
("stat[write_bytes]",
41-
"sum(shared_blks_written+local_blks_written"
42-
"+temp_blks_written)*8*1024",
41+
"(sum(shared_blks_written+local_blks_written+temp_blks_written)*8*1024)::bigint",
4342
"Write bytes/s", Plugin.UNITS.bytes_per_second, Plugin.DELTA.speed_per_second,
4443
("PostgreSQL Statements: Bytes", "793F5D", 0)),
4544
("stat[dirty_bytes]",
46-
"sum(shared_blks_dirtied+local_blks_dirtied)*8*1024",
45+
"(sum(shared_blks_dirtied+local_blks_dirtied)*8*1024)::bigint",
4746
"Dirty bytes/s", Plugin.UNITS.bytes_per_second, Plugin.DELTA.speed_per_second,
4847
("PostgreSQL Statements: Bytes", "9C8A4E", 0)),
4948

5049
("stat[read_time]",
51-
"sum(blk_read_time)/float4(100)",
50+
"(sum(blk_read_time)/float4(100))::bigint",
5251
"Read IO Time", Plugin.UNITS.s, Plugin.DELTA.speed_per_second,
5352
("PostgreSQL Statements: Spent Time", "87C2B9", 0)),
5453
("stat[write_time]",
55-
"sum(blk_write_time)/float4(100)",
54+
"(sum(blk_write_time)/float4(100))::bigint",
5655
"Write IO Time", Plugin.UNITS.s, Plugin.DELTA.speed_per_second,
5756
("PostgreSQL Statements: Spent Time", "793F5D", 0)),
5857
["stat[other_time]",
59-
"sum({0}-blk_read_time-blk_write_time)/float4(100)",
58+
"(sum({0}-blk_read_time-blk_write_time)/float4(100))::bigint",
6059
"Other (mostly CPU) Time", Plugin.UNITS.s, Plugin.DELTA.speed_per_second,
6160
("PostgreSQL Statements: Spent Time", "9C8A4E", 0)]]
6261

0 commit comments

Comments
 (0)