Skip to content

Commit

Permalink
Merge pull request #1516 from bersace/bgwriter
Browse files Browse the repository at this point in the history
Accept bgwriter probe
  • Loading branch information
bersace authored Oct 16, 2024
2 parents 12fcbc5 + 9ea166b commit e238fbe
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
8 changes: 1 addition & 7 deletions agent/temboardagent/plugins/monitoring/probes.py
Original file line number Diff line number Diff line change
Expand Up @@ -498,13 +498,6 @@ class probe_blocks(SqlProbe):
delta_key = "dbname"


class probe_checkpointer(SqlProbe):
level = "instance"
min_version = 170000
sql = """select * from pg_stat_checkpointer"""
delta_columns = ["num_timed", "num_requested", "buffers_written"]


class probe_bgwriter(SqlProbe):
level = "instance"
min_version = 80300
Expand All @@ -514,6 +507,7 @@ def check(self, version):
self.sql = """select * from pg_stat_bgwriter"""
else:
self.sql = QUERIES["monitoring-bgwriter"]
return True

delta_columns = [
"checkpoints_timed",
Expand Down
3 changes: 2 additions & 1 deletion agent/temboardagent/queries/monitoring-bgwriter.sql
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ SELECT cp.num_timed AS checkpoints_timed,
bg.maxwritten_clean,
backends.buffers_backend,
backends.buffers_backend_fsync,
bg.buffers_alloc
bg.buffers_alloc,
bg.stats_reset
FROM pg_stat_bgwriter AS bg,
pg_stat_checkpointer AS cp,
backends;

0 comments on commit e238fbe

Please sign in to comment.