From 2a3144638dd4b88adf9824ccf2d3e5855a3d071d Mon Sep 17 00:00:00 2001 From: cuprumtan Date: Mon, 1 Aug 2022 15:58:22 +0300 Subject: [PATCH 001/106] fix: fixed Replication lags evaluation --- mamonsu/plugins/pgsql/driver/pool.py | 2 +- mamonsu/plugins/pgsql/replication.py | 10 +++++----- mamonsu/tools/bootstrap/sql.py | 2 +- mamonsu/tools/bootstrap/start.py | 10 +++++----- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/mamonsu/plugins/pgsql/driver/pool.py b/mamonsu/plugins/pgsql/driver/pool.py index 1192a6e..88f5ec7 100644 --- a/mamonsu/plugins/pgsql/driver/pool.py +++ b/mamonsu/plugins/pgsql/driver/pool.py @@ -65,7 +65,7 @@ class Pool(object): """ SELECT application_name, {0} - (pg_{1}_{2}_diff(pg_current_{1}_{2}(), replay_lsn))::int AS total_lag + coalesce((pg_{1}_{2}_diff(pg_current_{1}_{2}(), replay_lsn))::int, 0) AS total_lag FROM pg_stat_replication; """, """ diff --git a/mamonsu/plugins/pgsql/replication.py b/mamonsu/plugins/pgsql/replication.py index 7fb3145..414c024 100644 --- a/mamonsu/plugins/pgsql/replication.py +++ b/mamonsu/plugins/pgsql/replication.py @@ -51,11 +51,11 @@ def run(self, zbx): Pooler.run_sql_type("replication_lag_master_query") if Pooler.server_version_greater("10.0") and (Pooler.is_superuser() or Pooler.is_bootstraped()): result_lags = Pooler.run_sql_type("wal_lag_lsn", - args=[" (pg_wal_lsn_diff(pg_current_wal_lsn(), sent_lsn))::int AS send_lag, " - "(pg_wal_lsn_diff(sent_lsn, flush_lsn))::int AS receive_lag, " - "(pg_wal_lsn_diff(sent_lsn, write_lsn))::int AS write_lag, " - "(pg_wal_lsn_diff(write_lsn, flush_lsn))::int AS flush_lag, " - "(pg_wal_lsn_diff(flush_lsn, replay_lsn))::int AS replay_lag, " if not Pooler.is_bootstraped() else + args=[" coalesce((pg_wal_lsn_diff(pg_current_wal_lsn(), sent_lsn))::int, 0) AS send_lag, " + "coalesce((pg_wal_lsn_diff(sent_lsn, flush_lsn))::int, 0) AS receive_lag, " + "coalesce((pg_wal_lsn_diff(sent_lsn, write_lsn))::int, 0) AS write_lag, " + "coalesce((pg_wal_lsn_diff(write_lsn, flush_lsn))::int, 0) AS flush_lag, " + "coalesce((pg_wal_lsn_diff(flush_lsn, replay_lsn))::int, 0) AS replay_lag, " if not Pooler.is_bootstraped() else " send_lag, receive_lag, write_lag, flush_lag, replay_lag, ", "wal", "lsn"]) if result_lags: diff --git a/mamonsu/tools/bootstrap/sql.py b/mamonsu/tools/bootstrap/sql.py index 8b791ab..ecbc3dd 100644 --- a/mamonsu/tools/bootstrap/sql.py +++ b/mamonsu/tools/bootstrap/sql.py @@ -185,7 +185,7 @@ RETURNS TABLE(application_name TEXT, {8} total_lag INTEGER) AS $$ SELECT application_name, {6} - (pg_{7}_diff(pg_current_{7}(), replay_{9}))::int AS total_lag + coalesce((pg_{7}_diff(pg_current_{7}(), replay_{9}))::int, 0) AS total_lag FROM pg_stat_replication $$ LANGUAGE SQL SECURITY DEFINER; """ diff --git a/mamonsu/tools/bootstrap/start.py b/mamonsu/tools/bootstrap/start.py index b9de67c..62aae9f 100644 --- a/mamonsu/tools/bootstrap/start.py +++ b/mamonsu/tools/bootstrap/start.py @@ -166,11 +166,11 @@ def fill_query_params(queries): 'wal_lsn' if Pooler.server_version_greater('10.0') else 'xlog_location', 'waiting' if Pooler.server_version_less('9.6.0') else 'case when wait_event_type is null then false ' ' else true end as waiting', - '(pg_wal_lsn_diff(pg_current_wal_lsn(), sent_lsn))::int AS send_lag, ' - '(pg_wal_lsn_diff(sent_lsn, flush_lsn))::int AS receive_lag, ' - '(pg_wal_lsn_diff(sent_lsn, write_lsn))::int AS write_lag, ' - '(pg_wal_lsn_diff(write_lsn, flush_lsn))::int AS flush_lag, ' - '(pg_wal_lsn_diff(flush_lsn, replay_lsn))::int AS replay_lag,' if Pooler.server_version_greater('10.0') else '', + 'coalesce((pg_wal_lsn_diff(pg_current_wal_lsn(), sent_lsn))::int, 0) AS send_lag, ' + 'coalesce((pg_wal_lsn_diff(sent_lsn, flush_lsn))::int, 0) AS receive_lag, ' + 'coalesce((pg_wal_lsn_diff(sent_lsn, write_lsn))::int, 0) AS write_lag, ' + 'coalesce((pg_wal_lsn_diff(write_lsn, flush_lsn))::int, 0) AS flush_lag, ' + 'coalesce((pg_wal_lsn_diff(flush_lsn, replay_lsn))::int, 0) AS replay_lag,' if Pooler.server_version_greater('10.0') else '', 'wal_lsn' if Pooler.server_version_greater('10.0') else 'xlog_location', 'send_lag INTEGER, receive_lag INTEGER, write_lag INTEGER, flush_lag INTEGER, replay_lag INTEGER,' if Pooler.server_version_greater('10.0') else '', From 81d99239f80273b70104afebfacbcb5f23a06a5e Mon Sep 17 00:00:00 2001 From: cuprumtan Date: Wed, 3 Aug 2022 11:49:21 +0300 Subject: [PATCH 002/106] fix: fixed dashboard syntax to be in line with zabbix updates --- mamonsu/tools/zabbix_cli/dashboard.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/mamonsu/tools/zabbix_cli/dashboard.py b/mamonsu/tools/zabbix_cli/dashboard.py index e0ef397..fab440c 100644 --- a/mamonsu/tools/zabbix_cli/dashboard.py +++ b/mamonsu/tools/zabbix_cli/dashboard.py @@ -32,11 +32,7 @@ def generate_dashboard(template, uuid): {42} {1} - - - Templates - - + {42} From dffe096406c4951c311b84c90786aeb25547ee29 Mon Sep 17 00:00:00 2001 From: cuprumtan Date: Tue, 16 Aug 2022 10:30:56 +0300 Subject: [PATCH 003/106] doc: update information about keys during the installation --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index b8104ec..2421bb1 100644 --- a/README.md +++ b/README.md @@ -182,7 +182,7 @@ A pre-built _mamonsu_ packages is provided in official Postgres Pro repository: **For Debian, Ubuntu, Astra:** ```shell -$ wget https://repo.postgrespro.ru/mamonsu/keys/apt-repo-add.sh +$ wget https://repo.postgrespro.ru/mamonsu/keys/pgpro-repo-add.sh $ sudo chmod 700 ./apt-repo-add.sh $ sudo ./apt-repo-add.sh $ apt-get install mamonsu @@ -190,7 +190,7 @@ $ apt-get install mamonsu **For RPM-based distros such as Centos, RHEL, Oraclelinux, SLES, AltLinux, AltLinux-spt:** Install rpm from repository adding name of the specific distro such as: ```shell -$ rpm -i https://repo.postgrespro.ru/mamonsu/keys/centos.rpm +$ rpm -i https://repo.postgrespro.ru/mamonsu/keys/pgpro-repo-add.sh ``` Install package - for RH-like: From 06de3514c0fb781203b7e4e7223f5873eedaf1cb Mon Sep 17 00:00:00 2001 From: cuprumtan Date: Tue, 16 Aug 2022 10:35:36 +0300 Subject: [PATCH 004/106] doc: removed information about building docker image --- README.md | 4 ---- 1 file changed, 4 deletions(-) diff --git a/README.md b/README.md index 2421bb1..47c647c 100644 --- a/README.md +++ b/README.md @@ -152,10 +152,6 @@ $ git clone ... && cd mamonsu && make deb && dpkg -i mamonsu*.deb $ yum install make rpm-build python3-devel python3-setuptools $ git clone ... && cd mamonsu && make rpm && rpm -i mamonsu*.rpm ``` -**Build repository, *./packaging/repo/gnupg* and *./packaging/repo/rpmmacros* must be provided by caller:** -```shell -$ make -j2 build/all && make -j1 repo/all -``` **Build win32 exe:** ```shell $ git clone ... && cd mamonsu && py setup_win32.py py2exe From 7ded443234f2a0b2d52effc1cf4c132c73362171 Mon Sep 17 00:00:00 2001 From: cuprumtan Date: Tue, 16 Aug 2022 10:56:29 +0300 Subject: [PATCH 005/106] doc: updated example templates --- .../conf/old_templates/template_2.4.0.xml | 30 ----------------- .../old_templates/template_2.4.0_agent.xml | 30 ----------------- .../old_templates/template_2.4.1-2.4.3.xml | 30 ----------------- .../template_2.4.1-2.4.3_agent.xml | 30 ----------------- .../old_templates/template_2.4.4-2.4.5.xml | 30 ----------------- .../template_2.4.4-2.4.5_agent.xml | 30 ----------------- .../conf/old_templates/template_2.6.2.xml | 30 ----------------- .../old_templates/template_2.6.2_agent.xml | 30 ----------------- .../conf/old_templates/template_2.7.1.xml | 30 ----------------- .../old_templates/template_2.7.1_agent.xml | 30 ----------------- .../old_templates/template_3.5.1_agent.xml | 32 +++++++++++++++++++ .../old_templates/template_3.5.1_linux.xml | 32 +++++++++++++++++++ packaging/conf/template_agent.xml | 10 +++--- packaging/conf/template_linux.xml | 10 +++--- 14 files changed, 74 insertions(+), 310 deletions(-) delete mode 100644 packaging/conf/old_templates/template_2.4.0.xml delete mode 100644 packaging/conf/old_templates/template_2.4.0_agent.xml delete mode 100644 packaging/conf/old_templates/template_2.4.1-2.4.3.xml delete mode 100644 packaging/conf/old_templates/template_2.4.1-2.4.3_agent.xml delete mode 100644 packaging/conf/old_templates/template_2.4.4-2.4.5.xml delete mode 100644 packaging/conf/old_templates/template_2.4.4-2.4.5_agent.xml delete mode 100644 packaging/conf/old_templates/template_2.6.2.xml delete mode 100644 packaging/conf/old_templates/template_2.6.2_agent.xml delete mode 100644 packaging/conf/old_templates/template_2.7.1.xml delete mode 100644 packaging/conf/old_templates/template_2.7.1_agent.xml create mode 100644 packaging/conf/old_templates/template_3.5.1_agent.xml create mode 100644 packaging/conf/old_templates/template_3.5.1_linux.xml diff --git a/packaging/conf/old_templates/template_2.4.0.xml b/packaging/conf/old_templates/template_2.4.0.xml deleted file mode 100644 index 55a0282..0000000 --- a/packaging/conf/old_templates/template_2.4.0.xml +++ /dev/null @@ -1,30 +0,0 @@ - - -2.0 - - - Templates - - - - - - {PostgresPro-Linux2:pgsql.archive_command[count_files_to_archive].last()}>2PostgreSQL count files in ./archive_status on {HOSTNAME} more than 2030{PostgresPro-Linux2:pgsql.checkpoint[count_wal].last()}>12PostgreSQL required checkpoints occurs to frequently on {HOSTNAME}030 {PostgresPro-Linux2:pgsql.connections[total].last()}/{PostgresPro-Linux2:pgsql.connections[max_connections].last()}*100 >90PostgreSQL many connections on {HOSTNAME} (total connections more than 90% max connections)030{PostgresPro-Linux2:mamonsu.plugin.errors[].strlen()}>1Mamonsu plugin errors on {HOSTNAME}. {ITEM.LASTVALUE}030{PostgresPro-Linux2:mamonsu.plugin.keepalive[].nodata(180)}=1Mamonsu nodata from {HOSTNAME}030{PostgresPro-Linux2:mamonsu.memory.rss[max].last()}>41943040Mamonsu agent memory usage alert on {HOSTNAME}: {ITEM.LASTVALUE} bytes030{PostgresPro-Linux2:pgsql.oldest[xid_age].last()}>18000000PostgreSQL oldest xid is too big on {HOSTNAME}030{PostgresPro-Linux2:pgsql.oldest[query_time].last()}>18000PostgreSQL query running is too old on {HOSTNAME}030{PostgresPro-Linux2:pgsql.uptime[].last()}<600PostgreSQL service was restarted on {HOSTNAME} (uptime={ITEM.LASTVALUE})030{PostgresPro-Linux2:pgsql.cache[hit].last()}<80PostgreSQL cache hit ratio too low on {HOSTNAME} ({ITEM.LASTVALUE})030{PostgresPro-Linux2:system.processes[forkrate].min(5m)}>500Process fork-rate to frequently on {HOSTNAME}030{PostgresPro-Linux2:system.up_time[].last()}<300System was restarted on {HOSTNAME} (up_time={ITEM.LASTVALUE})030{PostgresPro-Linux2:pgsql.replication_lag[sec].last()}>300PostgreSQL streaming lag to high on {HOSTNAME} (value={ITEM.LASTVALUE})030 - PostgreSQL archive command archive_status 9002000.0100.0110100.00.0000000FF0000020PostgresPro-Linux2pgsql.archive_command[count_files_to_archive]1000FF00120PostgresPro-Linux2pgsql.archive_command[size_files_to_archive]PostgreSQL archive command trying_to_archive 9002000.0100.0110100.00.000000000F000020PostgresPro-Linux2pgsql.archive_command[archived_files]10FF0000120PostgresPro-Linux2pgsql.archive_command[failed_trying_to_archive]PostgreSQL bgwriter9002000.0100.0110100.00.0000000CCCC00120PostgresPro-Linux2pgsql.bgwriter[buffers_checkpoint]100000CC120PostgresPro-Linux2pgsql.bgwriter[buffers_clean]20777777020PostgresPro-Linux2pgsql.bgwriter[maxwritten_clean]30CC0000120PostgresPro-Linux2pgsql.bgwriter[buffers_backend]40CC00CC020PostgresPro-Linux2pgsql.bgwriter[buffers_backend_fsync]5000CC00120PostgresPro-Linux2pgsql.bgwriter[buffers_alloc]PostgreSQL cfs compression: current ratio9002000.0100.0110100.00.000000000CC00020PostgresPro-Linux2pgsql.cfs.activity[current_compress_ratio]PostgreSQL cfs compression: compressed files9002000.0100.0110100.00.000000000CC00020PostgresPro-Linux2pgsql.cfs.activity[compressed_files]PostgreSQL cfs compression: written bytes9002000.0100.0110100.00.000000000CC00020PostgresPro-Linux2pgsql.cfs.activity[written_bytes]PostgreSQL cfs compression: total ratio9002000.0100.0110100.00.000000000CC00020PostgresPro-Linux2pgsql.cfs.activity[total_compress_ratio]PostgreSQL checkpoints9002000.0100.0110100.00.000000000CC00020PostgresPro-Linux2pgsql.checkpoint[count_timed]10CC0000020PostgresPro-Linux2pgsql.checkpoint[count_wal]200000CC120PostgresPro-Linux2pgsql.checkpoint[write_time]30000000120PostgresPro-Linux2pgsql.checkpoint[checkpoint_sync_time]PostgreSQL connections9002000.0100.0110100.00.000000000BB00020PostgresPro-Linux2pgsql.connections[active]100000BB020PostgresPro-Linux2pgsql.connections[idle]20CC00CC020PostgresPro-Linux2pgsql.connections[idle_in_transaction]30CCCCCC020PostgresPro-Linux2pgsql.connections[idle_in_transaction_aborted]40CCCC00020PostgresPro-Linux2pgsql.connections[fastpath_function_call]5000CCCC020PostgresPro-Linux2pgsql.connections[disabled]60EEEEEE020PostgresPro-Linux2pgsql.connections[total]70BB0000020PostgresPro-Linux2pgsql.connections[waiting]8000BB00020PostgresPro-Linux2pgsql.connections[max_connections]Block devices: read/write operations9002000.0100.0110100.00.0000000CC0000020PostgresPro-Linux2system.disk.all_read[]100000CC020PostgresPro-Linux2system.disk.all_write[]Block devices: read/write bytes9002000.0100.0110100.00.0000000CC0000020PostgresPro-Linux2system.disk.all_read_b[]100000CC020PostgresPro-Linux2system.disk.all_write_b[]PostgreSQL instance: rate9002000.0100.0110100.00.00000000000CC120PostgresPro-Linux2pgsql.transactions[total]1000CC00020PostgresPro-Linux2pgsql.blocks[hit]20CC0000020PostgresPro-Linux2pgsql.blocks[read]PostgreSQL instance: events9002000.0100.0110100.00.00000000000CC020PostgresPro-Linux2pgsql.events[conflicts]10000000020PostgresPro-Linux2pgsql.events[deadlocks]20CC0000020PostgresPro-Linux2pgsql.events[xact_rollback]PostgreSQL instance: temp files9002000.0100.0110100.00.0000000CC0000020PostgresPro-Linux2pgsql.temp[bytes]100000CC120PostgresPro-Linux2pgsql.temp[files]PostgreSQL instance: tuples9002000.0100.0110100.00.0000000000000020PostgresPro-Linux2pgsql.tuples[deleted]100000CC020PostgresPro-Linux2pgsql.tuples[fetched]2000CC00020PostgresPro-Linux2pgsql.tuples[inserted]30CC00CC120PostgresPro-Linux2pgsql.tuples[returned]40CC0000020PostgresPro-Linux2pgsql.tuples[updated]System load average9002000.0100.0110100.00.000000000CC00020PostgresPro-Linux2system.la[1]Memory overview9004000.0100.0111100.00.0000000CC0000020PostgresPro-Linux2system.memory[apps]1000CC00020PostgresPro-Linux2system.memory[buffers]200000CC020PostgresPro-Linux2system.memory[swap]30CC00CC020PostgresPro-Linux2system.memory[cached]40000000020PostgresPro-Linux2system.memory[unused]50CCCC00020PostgresPro-Linux2system.memory[slab]60777777020PostgresPro-Linux2system.memory[swap_cache]70770000020PostgresPro-Linux2system.memory[page_tables]80000077020PostgresPro-Linux2system.memory[vmalloc_used]90007700020PostgresPro-Linux2system.memory[committed]100DF0000020PostgresPro-Linux2system.memory[mapped]11000DF00020PostgresPro-Linux2system.memory[active]1200000DF020PostgresPro-Linux2system.memory[inactive]PostgreSQL oldest query running time9002000.0100.0110100.00.000000000CC00020PostgresPro-Linux2pgsql.oldest[query_time]PostgreSQL age of oldest xid9002000.0100.0110100.00.000000000CC00020PostgresPro-Linux2pgsql.oldest[xid_age]System: count of opened files9002000.0100.0110100.00.000000000CC00020PostgresPro-Linux2system.open_files[]PostgreSQL: shared buffer9002000.0100.0110100.00.00000000000CC020PostgresPro-Linux2pgsql.buffers[size]10CC0000020PostgresPro-Linux2pgsql.buffers[twice_used]2000CC00020PostgresPro-Linux2pgsql.buffers[dirty]PostgreSQL uptime9002000.0100.0110100.00.000000000CC00020PostgresPro-Linux2pgsql.cache[hit]10DF0101120PostgresPro-Linux2pgsql.uptime[]PostgreSQL locks sampling9002000.0100.0110100.00.00000000000CC020PostgresPro-Linux2pgsql.pg_locks[accessshare]1000CC00020PostgresPro-Linux2pgsql.pg_locks[rowshare]20CC0000020PostgresPro-Linux2pgsql.pg_locks[rowexclusive]30CC00CC020PostgresPro-Linux2pgsql.pg_locks[shareupdateexclusive]40777777020PostgresPro-Linux2pgsql.pg_locks[share]50CCCCCC020PostgresPro-Linux2pgsql.pg_locks[sharerowexclusive]60CCCC00020PostgresPro-Linux2pgsql.pg_locks[exclusive]7000CCCC020PostgresPro-Linux2pgsql.pg_locks[accessexclusive]PostgreSQL statements: bytes9002000.0100.0110100.00.0000000BBBB00020PostgresPro-Linux2pgsql.stat[read_bytes]1000CC00020PostgresPro-Linux2pgsql.stat[write_bytes]200000CC020PostgresPro-Linux2pgsql.stat[dirty_bytes]PostgreSQL statements: spend time9002000.0100.0111100.00.000000000CC00020PostgresPro-Linux2pgsql.stat[read_time]100000CC020PostgresPro-Linux2pgsql.stat[write_time]20BBBB00020PostgresPro-Linux2pgsql.stat[other_time]Processes overview9002000.0100.0110100.00.0000000CC0000020PostgresPro-Linux2system.processes[running]1000CC00020PostgresPro-Linux2system.processes[blocked]200000CC120PostgresPro-Linux2system.processes[forkrate]CPU time spent9002000.0100.0111100.00.00000000000CC020PostgresPro-Linux2system.cpu[user]10CC00CC020PostgresPro-Linux2system.cpu[nice]20CC0000020PostgresPro-Linux2system.cpu[system]3000CC00020PostgresPro-Linux2system.cpu[idle]40CCCC00020PostgresPro-Linux2system.cpu[iowait]50777777020PostgresPro-Linux2system.cpu[irq]60000077020PostgresPro-Linux2system.cpu[softirq]System up_time9002000.0100.0110100.00.000000000CC00020PostgresPro-Linux2system.up_time[]PostgreSQL write-ahead log generation speed9002000.0100.0110100.00.0000000CC0000020PostgresPro-Linux2pgsql.wal.write[]PostgreSQL replication lag in second9002000.0100.0110100.00.0000000CC0000020PostgresPro-Linux2pgsql.replication_lag[sec]PostgreSQL count of xlog files9002000.0100.0110100.00.0000000CC0000020PostgresPro-Linux2pgsql.wal.count[] - \ No newline at end of file diff --git a/packaging/conf/old_templates/template_2.4.0_agent.xml b/packaging/conf/old_templates/template_2.4.0_agent.xml deleted file mode 100644 index b90f656..0000000 --- a/packaging/conf/old_templates/template_2.4.0_agent.xml +++ /dev/null @@ -1,30 +0,0 @@ - - -2.0 - - - Templates - - - - - - {PostgresPro-Linux2:pgsql.archive_command.count_files_to_archive[{$PG_CONNINFO},{$PG_PATH}].last()}>2PostgreSQL count files in ./archive_status on {HOSTNAME} more than 2030{PostgresPro-Linux2:pgsql.checkpoint.count_wal[{$PG_CONNINFO},{$PG_PATH}].last()}>12PostgreSQL required checkpoints occurs to frequently on {HOSTNAME}030 {PostgresPro-Linux2:pgsql.connections.total[{$PG_CONNINFO},{$PG_PATH}].last()}/{PostgresPro-Linux2:pgsql.connections.max_connections[{$PG_CONNINFO},{$PG_PATH}].last()}*100 >90PostgreSQL many connections on {HOSTNAME} (total connections more than 90% max connections)030{PostgresPro-Linux2:mamonsu.plugin.keepalive.nodata(180)}=1Mamonsu nodata from {HOSTNAME}030{PostgresPro-Linux2:pgsql.oldest.xid_age[{$PG_CONNINFO},{$PG_PATH}].last()}>18000000PostgreSQL oldest xid is too big on {HOSTNAME}030{PostgresPro-Linux2:pgsql.oldest.query_time[{$PG_CONNINFO},{$PG_PATH}].last()}>18000PostgreSQL query running is too old on {HOSTNAME}030{PostgresPro-Linux2:pgsql.uptime[{$PG_CONNINFO},{$PG_PATH}].last()}<600PostgreSQL service was restarted on {HOSTNAME} (uptime={ITEM.LASTVALUE})030{PostgresPro-Linux2:pgsql.cache.hit[{$PG_CONNINFO},{$PG_PATH}].last()}<80PostgreSQL cache hit ratio too low on {HOSTNAME} ({ITEM.LASTVALUE})030{PostgresPro-Linux2:system.processes.forkrate.min(5m)}>500Process fork-rate to frequently on {HOSTNAME}030{PostgresPro-Linux2:system.up_time.last()}<300System was restarted on {HOSTNAME} (up_time={ITEM.LASTVALUE})030{PostgresPro-Linux2:pgsql.replication_lag.sec[{$PG_CONNINFO},{$PG_PATH}].last()}>300PostgreSQL streaming lag to high on {HOSTNAME} (value={ITEM.LASTVALUE})030 - PostgreSQL archive command archive_status 9002000.0100.0110100.00.0000000FF0000020PostgresPro-Linux2pgsql.archive_command.count_files_to_archive[{$PG_CONNINFO},{$PG_PATH}]1000FF00120PostgresPro-Linux2pgsql.archive_command.size_files_to_archive[{$PG_CONNINFO},{$PG_PATH}]PostgreSQL archive command trying_to_archive 9002000.0100.0110100.00.000000000F000020PostgresPro-Linux2pgsql.archive_command.archived_files[{$PG_CONNINFO},{$PG_PATH}]10FF0000120PostgresPro-Linux2pgsql.archive_command.failed_trying_to_archive[{$PG_CONNINFO},{$PG_PATH}]PostgreSQL bgwriter9002000.0100.0110100.00.0000000CCCC00120PostgresPro-Linux2pgsql.bgwriter.buffers_checkpoint[{$PG_CONNINFO},{$PG_PATH}]100000CC120PostgresPro-Linux2pgsql.bgwriter.buffers_clean[{$PG_CONNINFO},{$PG_PATH}]20777777020PostgresPro-Linux2pgsql.bgwriter.maxwritten_clean[{$PG_CONNINFO},{$PG_PATH}]30CC0000120PostgresPro-Linux2pgsql.bgwriter.buffers_backend[{$PG_CONNINFO},{$PG_PATH}]40CC00CC020PostgresPro-Linux2pgsql.bgwriter.buffers_backend_fsync[{$PG_CONNINFO},{$PG_PATH}]5000CC00120PostgresPro-Linux2pgsql.bgwriter.buffers_alloc[{$PG_CONNINFO},{$PG_PATH}]PostgreSQL checkpoints9002000.0100.0110100.00.000000000CC00020PostgresPro-Linux2pgsql.checkpoint.count_timed[{$PG_CONNINFO},{$PG_PATH}]10CC0000020PostgresPro-Linux2pgsql.checkpoint.count_wal[{$PG_CONNINFO},{$PG_PATH}]200000CC120PostgresPro-Linux2pgsql.checkpoint.write_time[{$PG_CONNINFO},{$PG_PATH}]30000000120PostgresPro-Linux2pgsql.checkpoint.checkpoint_sync_time[{$PG_CONNINFO},{$PG_PATH}]PostgreSQL connections9002000.0100.0110100.00.000000000BB00020PostgresPro-Linux2pgsql.connections.active[{$PG_CONNINFO},{$PG_PATH}]100000BB020PostgresPro-Linux2pgsql.connections.idle[{$PG_CONNINFO},{$PG_PATH}]20CC00CC020PostgresPro-Linux2pgsql.connections.idle_in_transaction[{$PG_CONNINFO},{$PG_PATH}]30CCCCCC020PostgresPro-Linux2pgsql.connections.idle_in_transaction_aborted[{$PG_CONNINFO},{$PG_PATH}]40CCCC00020PostgresPro-Linux2pgsql.connections.fastpath_function_call[{$PG_CONNINFO},{$PG_PATH}]5000CCCC020PostgresPro-Linux2pgsql.connections.disabled[{$PG_CONNINFO},{$PG_PATH}]60EEEEEE020PostgresPro-Linux2pgsql.connections.total[{$PG_CONNINFO},{$PG_PATH}]70BB0000020PostgresPro-Linux2pgsql.connections.waiting[{$PG_CONNINFO},{$PG_PATH}]8000BB00020PostgresPro-Linux2pgsql.connections.max_connections[{$PG_CONNINFO},{$PG_PATH}]Block devices: read/write operations9002000.0100.0110100.00.0000000CC0000020PostgresPro-Linux2system.disk.all_read100000CC020PostgresPro-Linux2system.disk.all_writeBlock devices: read/write bytes9002000.0100.0110100.00.0000000CC0000020PostgresPro-Linux2system.disk.all_read_b100000CC020PostgresPro-Linux2system.disk.all_write_bPostgreSQL instance: rate9002000.0100.0110100.00.00000000000CC120PostgresPro-Linux2pgsql.transactions.total[{$PG_CONNINFO},{$PG_PATH}]1000CC00020PostgresPro-Linux2pgsql.blocks.hit[{$PG_CONNINFO},{$PG_PATH}]20CC0000020PostgresPro-Linux2pgsql.blocks.read[{$PG_CONNINFO},{$PG_PATH}]PostgreSQL instance: events9002000.0100.0110100.00.00000000000CC020PostgresPro-Linux2pgsql.events.conflicts[{$PG_CONNINFO},{$PG_PATH}]10000000020PostgresPro-Linux2pgsql.events.deadlocks[{$PG_CONNINFO},{$PG_PATH}]20CC0000020PostgresPro-Linux2pgsql.events.xact_rollback[{$PG_CONNINFO},{$PG_PATH}]PostgreSQL instance: temp files9002000.0100.0110100.00.0000000CC0000020PostgresPro-Linux2pgsql.temp.bytes[{$PG_CONNINFO},{$PG_PATH}]100000CC120PostgresPro-Linux2pgsql.temp.files[{$PG_CONNINFO},{$PG_PATH}]PostgreSQL instance: tuples9002000.0100.0110100.00.0000000000000020PostgresPro-Linux2pgsql.tuples.deleted[{$PG_CONNINFO},{$PG_PATH}]100000CC020PostgresPro-Linux2pgsql.tuples.fetched[{$PG_CONNINFO},{$PG_PATH}]2000CC00020PostgresPro-Linux2pgsql.tuples.inserted[{$PG_CONNINFO},{$PG_PATH}]30CC00CC120PostgresPro-Linux2pgsql.tuples.returned[{$PG_CONNINFO},{$PG_PATH}]40CC0000020PostgresPro-Linux2pgsql.tuples.updated[{$PG_CONNINFO},{$PG_PATH}]System load average9002000.0100.0110100.00.000000000CC00020PostgresPro-Linux2system.la.1Memory overview9004000.0100.0111100.00.0000000CC0000020PostgresPro-Linux2system.memory.apps1000CC00020PostgresPro-Linux2system.memory.buffers200000CC020PostgresPro-Linux2system.memory.swap30CC00CC020PostgresPro-Linux2system.memory.cached40000000020PostgresPro-Linux2system.memory.unused50CCCC00020PostgresPro-Linux2system.memory.slab60777777020PostgresPro-Linux2system.memory.swap_cache70770000020PostgresPro-Linux2system.memory.page_tables80000077020PostgresPro-Linux2system.memory.vmalloc_used90007700020PostgresPro-Linux2system.memory.committed100DF0000020PostgresPro-Linux2system.memory.mapped11000DF00020PostgresPro-Linux2system.memory.active1200000DF020PostgresPro-Linux2system.memory.inactivePostgreSQL oldest query running time9002000.0100.0110100.00.000000000CC00020PostgresPro-Linux2pgsql.oldest.query_time[{$PG_CONNINFO},{$PG_PATH}]PostgreSQL age of oldest xid9002000.0100.0110100.00.000000000CC00020PostgresPro-Linux2pgsql.oldest.xid_age[{$PG_CONNINFO},{$PG_PATH}]System: count of opened files9002000.0100.0110100.00.000000000CC00020PostgresPro-Linux2system.open_filesPostgreSQL: shared buffer9002000.0100.0110100.00.00000000000CC020PostgresPro-Linux2pgsql.buffers.size[{$PG_CONNINFO},{$PG_PATH}]10CC0000020PostgresPro-Linux2pgsql.buffers.twice_used[{$PG_CONNINFO},{$PG_PATH}]2000CC00020PostgresPro-Linux2pgsql.buffers.dirty[{$PG_CONNINFO},{$PG_PATH}]PostgreSQL uptime9002000.0100.0110100.00.000000000CC00020PostgresPro-Linux2pgsql.cache.hit[{$PG_CONNINFO},{$PG_PATH}]10DF0101120PostgresPro-Linux2pgsql.uptime[{$PG_CONNINFO},{$PG_PATH}]PostgreSQL locks sampling9002000.0100.0110100.00.00000000000CC020PostgresPro-Linux2pgsql.pg_locks.accessshare[{$PG_CONNINFO},{$PG_PATH}]1000CC00020PostgresPro-Linux2pgsql.pg_locks.rowshare[{$PG_CONNINFO},{$PG_PATH}]20CC0000020PostgresPro-Linux2pgsql.pg_locks.rowexclusive[{$PG_CONNINFO},{$PG_PATH}]30CC00CC020PostgresPro-Linux2pgsql.pg_locks.shareupdateexclusive[{$PG_CONNINFO},{$PG_PATH}]40777777020PostgresPro-Linux2pgsql.pg_locks.share[{$PG_CONNINFO},{$PG_PATH}]50CCCCCC020PostgresPro-Linux2pgsql.pg_locks.sharerowexclusive[{$PG_CONNINFO},{$PG_PATH}]60CCCC00020PostgresPro-Linux2pgsql.pg_locks.exclusive[{$PG_CONNINFO},{$PG_PATH}]7000CCCC020PostgresPro-Linux2pgsql.pg_locks.accessexclusive[{$PG_CONNINFO},{$PG_PATH}]PostgreSQL statements: bytes9002000.0100.0110100.00.0000000BBBB00020PostgresPro-Linux2pgsql.stat.read_bytes[{$PG_CONNINFO},{$PG_PATH}]1000CC00020PostgresPro-Linux2pgsql.stat.write_bytes[{$PG_CONNINFO},{$PG_PATH}]200000CC020PostgresPro-Linux2pgsql.stat.dirty_bytes[{$PG_CONNINFO},{$PG_PATH}]PostgreSQL statements: spend time9002000.0100.0111100.00.000000000CC00020PostgresPro-Linux2pgsql.stat.read_time[{$PG_CONNINFO},{$PG_PATH}]100000CC020PostgresPro-Linux2pgsql.stat.write_time[{$PG_CONNINFO},{$PG_PATH}]20BBBB00020PostgresPro-Linux2pgsql.stat.other_time[{$PG_CONNINFO},{$PG_PATH}]Processes overview9002000.0100.0110100.00.0000000CC0000020PostgresPro-Linux2system.processes.running1000CC00020PostgresPro-Linux2system.processes.blocked200000CC120PostgresPro-Linux2system.processes.forkrateCPU time spent9002000.0100.0111100.00.00000000000CC020PostgresPro-Linux2system.cpu.user10CC00CC020PostgresPro-Linux2system.cpu.nice20CC0000020PostgresPro-Linux2system.cpu.system3000CC00020PostgresPro-Linux2system.cpu.idle40CCCC00020PostgresPro-Linux2system.cpu.iowait50777777020PostgresPro-Linux2system.cpu.irq60000077020PostgresPro-Linux2system.cpu.softirqSystem up_time9002000.0100.0110100.00.000000000CC00020PostgresPro-Linux2system.up_timePostgreSQL write-ahead log generation speed9002000.0100.0110100.00.0000000CC0000020PostgresPro-Linux2pgsql.wal.write[{$PG_CONNINFO},{$PG_PATH}]PostgreSQL replication lag in second9002000.0100.0110100.00.0000000CC0000020PostgresPro-Linux2pgsql.replication_lag.sec[{$PG_CONNINFO},{$PG_PATH}]PostgreSQL count of xlog files9002000.0100.0110100.00.0000000CC0000020PostgresPro-Linux2pgsql.wal.count[{$PG_CONNINFO},{$PG_PATH}] - \ No newline at end of file diff --git a/packaging/conf/old_templates/template_2.4.1-2.4.3.xml b/packaging/conf/old_templates/template_2.4.1-2.4.3.xml deleted file mode 100644 index afb8943..0000000 --- a/packaging/conf/old_templates/template_2.4.1-2.4.3.xml +++ /dev/null @@ -1,30 +0,0 @@ - - -2.0 - - - Templates - - - - - - {PostgresPro-Linux2:pgsql.archive_command[count_files_to_archive].last()}>2PostgreSQL count files in ./archive_status on {HOSTNAME} more than 2030{PostgresPro-Linux2:pgsql.checkpoint[count_wal].last()}>12PostgreSQL required checkpoints occurs to frequently on {HOSTNAME}030 {PostgresPro-Linux2:pgsql.connections[total].last()}/{PostgresPro-Linux2:pgsql.connections[max_connections].last()}*100 >90PostgreSQL many connections on {HOSTNAME} (total connections more than 90% max connections)030{PostgresPro-Linux2:mamonsu.plugin.errors[].strlen()}>1Mamonsu plugin errors on {HOSTNAME}. {ITEM.LASTVALUE}030{PostgresPro-Linux2:mamonsu.plugin.keepalive[].nodata(180)}=1Mamonsu nodata from {HOSTNAME}030{PostgresPro-Linux2:mamonsu.memory.rss[max].last()}>41943040Mamonsu agent memory usage alert on {HOSTNAME}: {ITEM.LASTVALUE} bytes030{PostgresPro-Linux2:pgsql.oldest[xid_age].last()}>18000000PostgreSQL oldest xid is too big on {HOSTNAME}030{PostgresPro-Linux2:pgsql.oldest[query_time].last()}>18000PostgreSQL query running is too old on {HOSTNAME}030{PostgresPro-Linux2:pgsql.uptime[].last()}<600PostgreSQL service was restarted on {HOSTNAME} (uptime={ITEM.LASTVALUE})030{PostgresPro-Linux2:pgsql.cache[hit].last()}<80PostgreSQL cache hit ratio too low on {HOSTNAME} ({ITEM.LASTVALUE})030{PostgresPro-Linux2:pgsql.ping[].nodata(180)}=1PostgreSQL no ping from PostgreSQL for 3 minutes {HOSTNAME} 030{PostgresPro-Linux2:system.processes[forkrate].min(5m)}>500Process fork-rate to frequently on {HOSTNAME}030{PostgresPro-Linux2:system.up_time[].last()}<300System was restarted on {HOSTNAME} (up_time={ITEM.LASTVALUE})030{PostgresPro-Linux2:pgsql.replication_lag[sec].last()}>300PostgreSQL streaming lag to high on {HOSTNAME} (value={ITEM.LASTVALUE})030 - PostgreSQL archive command archive_status 9002000.0100.0110100.00.0000000FF0000020PostgresPro-Linux2pgsql.archive_command[count_files_to_archive]1000FF00120PostgresPro-Linux2pgsql.archive_command[size_files_to_archive]PostgreSQL archive command trying_to_archive 9002000.0100.0110100.00.000000000F000020PostgresPro-Linux2pgsql.archive_command[archived_files]10FF0000120PostgresPro-Linux2pgsql.archive_command[failed_trying_to_archive]PostgreSQL bgwriter9002000.0100.0110100.00.0000000CCCC00120PostgresPro-Linux2pgsql.bgwriter[buffers_checkpoint]100000CC120PostgresPro-Linux2pgsql.bgwriter[buffers_clean]20777777020PostgresPro-Linux2pgsql.bgwriter[maxwritten_clean]30CC0000120PostgresPro-Linux2pgsql.bgwriter[buffers_backend]40CC00CC020PostgresPro-Linux2pgsql.bgwriter[buffers_backend_fsync]5000CC00120PostgresPro-Linux2pgsql.bgwriter[buffers_alloc]PostgreSQL cfs compression: current ratio9002000.0100.0110100.00.000000000CC00020PostgresPro-Linux2pgsql.cfs.activity[current_compress_ratio]PostgreSQL cfs compression: compressed files9002000.0100.0110100.00.000000000CC00020PostgresPro-Linux2pgsql.cfs.activity[compressed_files]PostgreSQL cfs compression: written bytes9002000.0100.0110100.00.000000000CC00020PostgresPro-Linux2pgsql.cfs.activity[written_bytes]PostgreSQL cfs compression: total ratio9002000.0100.0110100.00.000000000CC00020PostgresPro-Linux2pgsql.cfs.activity[total_compress_ratio]PostgreSQL checkpoints9002000.0100.0110100.00.000000000CC00020PostgresPro-Linux2pgsql.checkpoint[count_timed]10CC0000020PostgresPro-Linux2pgsql.checkpoint[count_wal]200000CC120PostgresPro-Linux2pgsql.checkpoint[write_time]30000000120PostgresPro-Linux2pgsql.checkpoint[checkpoint_sync_time]PostgreSQL connections9002000.0100.0110100.00.000000000BB00020PostgresPro-Linux2pgsql.connections[active]100000BB020PostgresPro-Linux2pgsql.connections[idle]20CC00CC020PostgresPro-Linux2pgsql.connections[idle_in_transaction]30CCCCCC020PostgresPro-Linux2pgsql.connections[idle_in_transaction_aborted]40CCCC00020PostgresPro-Linux2pgsql.connections[fastpath_function_call]5000CCCC020PostgresPro-Linux2pgsql.connections[disabled]60EEEEEE020PostgresPro-Linux2pgsql.connections[total]70BB0000020PostgresPro-Linux2pgsql.connections[waiting]8000BB00020PostgresPro-Linux2pgsql.connections[max_connections]Block devices: read/write operations9002000.0100.0110100.00.0000000CC0000020PostgresPro-Linux2system.disk.all_read[]100000CC020PostgresPro-Linux2system.disk.all_write[]Block devices: read/write bytes9002000.0100.0110100.00.0000000CC0000020PostgresPro-Linux2system.disk.all_read_b[]100000CC020PostgresPro-Linux2system.disk.all_write_b[]PostgreSQL instance: rate9002000.0100.0110100.00.00000000000CC120PostgresPro-Linux2pgsql.transactions[total]1000CC00020PostgresPro-Linux2pgsql.blocks[hit]20CC0000020PostgresPro-Linux2pgsql.blocks[read]PostgreSQL instance: events9002000.0100.0110100.00.00000000000CC020PostgresPro-Linux2pgsql.events[conflicts]10000000020PostgresPro-Linux2pgsql.events[deadlocks]20CC0000020PostgresPro-Linux2pgsql.events[xact_rollback]PostgreSQL instance: temp files9002000.0100.0110100.00.0000000CC0000020PostgresPro-Linux2pgsql.temp[bytes]100000CC120PostgresPro-Linux2pgsql.temp[files]PostgreSQL instance: tuples9002000.0100.0110100.00.0000000000000020PostgresPro-Linux2pgsql.tuples[deleted]100000CC020PostgresPro-Linux2pgsql.tuples[fetched]2000CC00020PostgresPro-Linux2pgsql.tuples[inserted]30CC00CC120PostgresPro-Linux2pgsql.tuples[returned]40CC0000020PostgresPro-Linux2pgsql.tuples[updated]System load average9002000.0100.0110100.00.000000000CC00020PostgresPro-Linux2system.la[1]Memory overview9004000.0100.0111100.00.0000000CC0000020PostgresPro-Linux2system.memory[apps]1000CC00020PostgresPro-Linux2system.memory[buffers]200000CC020PostgresPro-Linux2system.memory[swap]30CC00CC020PostgresPro-Linux2system.memory[cached]40000000020PostgresPro-Linux2system.memory[unused]50CCCC00020PostgresPro-Linux2system.memory[slab]60777777020PostgresPro-Linux2system.memory[swap_cache]70770000020PostgresPro-Linux2system.memory[page_tables]80000077020PostgresPro-Linux2system.memory[vmalloc_used]90007700020PostgresPro-Linux2system.memory[committed]100DF0000020PostgresPro-Linux2system.memory[mapped]11000DF00020PostgresPro-Linux2system.memory[active]1200000DF020PostgresPro-Linux2system.memory[inactive]PostgreSQL oldest query running time9002000.0100.0110100.00.000000000CC00020PostgresPro-Linux2pgsql.oldest[query_time]PostgreSQL age of oldest xid9002000.0100.0110100.00.000000000CC00020PostgresPro-Linux2pgsql.oldest[xid_age]System: count of opened files9002000.0100.0110100.00.000000000CC00020PostgresPro-Linux2system.open_files[]PostgreSQL: shared buffer9002000.0100.0110100.00.00000000000CC020PostgresPro-Linux2pgsql.buffers[size]10CC0000020PostgresPro-Linux2pgsql.buffers[twice_used]2000CC00020PostgresPro-Linux2pgsql.buffers[dirty]PostgreSQL uptime9002000.0100.0110100.00.000000000CC00020PostgresPro-Linux2pgsql.cache[hit]10DF0101120PostgresPro-Linux2pgsql.uptime[]PostgreSQL locks sampling9002000.0100.0110100.00.00000000000CC020PostgresPro-Linux2pgsql.pg_locks[accessshare]1000CC00020PostgresPro-Linux2pgsql.pg_locks[rowshare]20CC0000020PostgresPro-Linux2pgsql.pg_locks[rowexclusive]30CC00CC020PostgresPro-Linux2pgsql.pg_locks[shareupdateexclusive]40777777020PostgresPro-Linux2pgsql.pg_locks[share]50CCCCCC020PostgresPro-Linux2pgsql.pg_locks[sharerowexclusive]60CCCC00020PostgresPro-Linux2pgsql.pg_locks[exclusive]7000CCCC020PostgresPro-Linux2pgsql.pg_locks[accessexclusive]PostgreSQL statements: bytes9002000.0100.0110100.00.0000000BBBB00020PostgresPro-Linux2pgsql.stat[read_bytes]1000CC00020PostgresPro-Linux2pgsql.stat[write_bytes]200000CC020PostgresPro-Linux2pgsql.stat[dirty_bytes]PostgreSQL statements: spend time9002000.0100.0111100.00.000000000CC00020PostgresPro-Linux2pgsql.stat[read_time]100000CC020PostgresPro-Linux2pgsql.stat[write_time]20BBBB00020PostgresPro-Linux2pgsql.stat[other_time]Processes overview9002000.0100.0110100.00.0000000CC0000020PostgresPro-Linux2system.processes[running]1000CC00020PostgresPro-Linux2system.processes[blocked]200000CC120PostgresPro-Linux2system.processes[forkrate]CPU time spent9002000.0100.0111100.00.00000000000CC020PostgresPro-Linux2system.cpu[user]10CC00CC020PostgresPro-Linux2system.cpu[nice]20CC0000020PostgresPro-Linux2system.cpu[system]3000CC00020PostgresPro-Linux2system.cpu[idle]40CCCC00020PostgresPro-Linux2system.cpu[iowait]50777777020PostgresPro-Linux2system.cpu[irq]60000077020PostgresPro-Linux2system.cpu[softirq]System up_time9002000.0100.0110100.00.000000000CC00020PostgresPro-Linux2system.up_time[]PostgreSQL write-ahead log generation speed9002000.0100.0110100.00.0000000CC0000020PostgresPro-Linux2pgsql.wal.write[]PostgreSQL replication lag in second9002000.0100.0110100.00.0000000CC0000020PostgresPro-Linux2pgsql.replication_lag[sec]PostgreSQL count of xlog files9002000.0100.0110100.00.0000000CC0000020PostgresPro-Linux2pgsql.wal.count[] - \ No newline at end of file diff --git a/packaging/conf/old_templates/template_2.4.1-2.4.3_agent.xml b/packaging/conf/old_templates/template_2.4.1-2.4.3_agent.xml deleted file mode 100644 index 3298563..0000000 --- a/packaging/conf/old_templates/template_2.4.1-2.4.3_agent.xml +++ /dev/null @@ -1,30 +0,0 @@ - - -2.0 - - - Templates - - - - - - {PostgresPro-Linux2:pgsql.archive_command.count_files_to_archive[{$PG_CONNINFO},{$PG_PATH}].last()}>2PostgreSQL count files in ./archive_status on {HOSTNAME} more than 2030{PostgresPro-Linux2:pgsql.checkpoint.count_wal[{$PG_CONNINFO},{$PG_PATH}].last()}>12PostgreSQL required checkpoints occurs to frequently on {HOSTNAME}030 {PostgresPro-Linux2:pgsql.connections.total[{$PG_CONNINFO},{$PG_PATH}].last()}/{PostgresPro-Linux2:pgsql.connections.max_connections[{$PG_CONNINFO},{$PG_PATH}].last()}*100 >90PostgreSQL many connections on {HOSTNAME} (total connections more than 90% max connections)030{PostgresPro-Linux2:mamonsu.plugin.keepalive.nodata(180)}=1Mamonsu nodata from {HOSTNAME}030{PostgresPro-Linux2:pgsql.oldest.xid_age[{$PG_CONNINFO},{$PG_PATH}].last()}>18000000PostgreSQL oldest xid is too big on {HOSTNAME}030{PostgresPro-Linux2:pgsql.oldest.query_time[{$PG_CONNINFO},{$PG_PATH}].last()}>18000PostgreSQL query running is too old on {HOSTNAME}030{PostgresPro-Linux2:pgsql.uptime[{$PG_CONNINFO},{$PG_PATH}].last()}<600PostgreSQL service was restarted on {HOSTNAME} (uptime={ITEM.LASTVALUE})030{PostgresPro-Linux2:pgsql.cache.hit[{$PG_CONNINFO},{$PG_PATH}].last()}<80PostgreSQL cache hit ratio too low on {HOSTNAME} ({ITEM.LASTVALUE})030{PostgresPro-Linux2:pgsql.ping[{$PG_CONNINFO},{$PG_PATH}].nodata(180)}=1PostgreSQL no ping from PostgreSQL for 3 minutes {HOSTNAME} 030{PostgresPro-Linux2:system.processes.forkrate.min(5m)}>500Process fork-rate to frequently on {HOSTNAME}030{PostgresPro-Linux2:system.up_time.last()}<300System was restarted on {HOSTNAME} (up_time={ITEM.LASTVALUE})030{PostgresPro-Linux2:pgsql.replication_lag.sec[{$PG_CONNINFO},{$PG_PATH}].last()}>300PostgreSQL streaming lag to high on {HOSTNAME} (value={ITEM.LASTVALUE})030 - PostgreSQL archive command archive_status 9002000.0100.0110100.00.0000000FF0000020PostgresPro-Linux2pgsql.archive_command.count_files_to_archive[{$PG_CONNINFO},{$PG_PATH}]1000FF00120PostgresPro-Linux2pgsql.archive_command.size_files_to_archive[{$PG_CONNINFO},{$PG_PATH}]PostgreSQL archive command trying_to_archive 9002000.0100.0110100.00.000000000F000020PostgresPro-Linux2pgsql.archive_command.archived_files[{$PG_CONNINFO},{$PG_PATH}]10FF0000120PostgresPro-Linux2pgsql.archive_command.failed_trying_to_archive[{$PG_CONNINFO},{$PG_PATH}]PostgreSQL bgwriter9002000.0100.0110100.00.0000000CCCC00120PostgresPro-Linux2pgsql.bgwriter.buffers_checkpoint[{$PG_CONNINFO},{$PG_PATH}]100000CC120PostgresPro-Linux2pgsql.bgwriter.buffers_clean[{$PG_CONNINFO},{$PG_PATH}]20777777020PostgresPro-Linux2pgsql.bgwriter.maxwritten_clean[{$PG_CONNINFO},{$PG_PATH}]30CC0000120PostgresPro-Linux2pgsql.bgwriter.buffers_backend[{$PG_CONNINFO},{$PG_PATH}]40CC00CC020PostgresPro-Linux2pgsql.bgwriter.buffers_backend_fsync[{$PG_CONNINFO},{$PG_PATH}]5000CC00120PostgresPro-Linux2pgsql.bgwriter.buffers_alloc[{$PG_CONNINFO},{$PG_PATH}]PostgreSQL checkpoints9002000.0100.0110100.00.000000000CC00020PostgresPro-Linux2pgsql.checkpoint.count_timed[{$PG_CONNINFO},{$PG_PATH}]10CC0000020PostgresPro-Linux2pgsql.checkpoint.count_wal[{$PG_CONNINFO},{$PG_PATH}]200000CC120PostgresPro-Linux2pgsql.checkpoint.write_time[{$PG_CONNINFO},{$PG_PATH}]30000000120PostgresPro-Linux2pgsql.checkpoint.checkpoint_sync_time[{$PG_CONNINFO},{$PG_PATH}]PostgreSQL connections9002000.0100.0110100.00.000000000BB00020PostgresPro-Linux2pgsql.connections.active[{$PG_CONNINFO},{$PG_PATH}]100000BB020PostgresPro-Linux2pgsql.connections.idle[{$PG_CONNINFO},{$PG_PATH}]20CC00CC020PostgresPro-Linux2pgsql.connections.idle_in_transaction[{$PG_CONNINFO},{$PG_PATH}]30CCCCCC020PostgresPro-Linux2pgsql.connections.idle_in_transaction_aborted[{$PG_CONNINFO},{$PG_PATH}]40CCCC00020PostgresPro-Linux2pgsql.connections.fastpath_function_call[{$PG_CONNINFO},{$PG_PATH}]5000CCCC020PostgresPro-Linux2pgsql.connections.disabled[{$PG_CONNINFO},{$PG_PATH}]60EEEEEE020PostgresPro-Linux2pgsql.connections.total[{$PG_CONNINFO},{$PG_PATH}]70BB0000020PostgresPro-Linux2pgsql.connections.waiting[{$PG_CONNINFO},{$PG_PATH}]8000BB00020PostgresPro-Linux2pgsql.connections.max_connections[{$PG_CONNINFO},{$PG_PATH}]Block devices: read/write operations9002000.0100.0110100.00.0000000CC0000020PostgresPro-Linux2system.disk.all_read100000CC020PostgresPro-Linux2system.disk.all_writeBlock devices: read/write bytes9002000.0100.0110100.00.0000000CC0000020PostgresPro-Linux2system.disk.all_read_b100000CC020PostgresPro-Linux2system.disk.all_write_bPostgreSQL instance: rate9002000.0100.0110100.00.00000000000CC120PostgresPro-Linux2pgsql.transactions.total[{$PG_CONNINFO},{$PG_PATH}]1000CC00020PostgresPro-Linux2pgsql.blocks.hit[{$PG_CONNINFO},{$PG_PATH}]20CC0000020PostgresPro-Linux2pgsql.blocks.read[{$PG_CONNINFO},{$PG_PATH}]PostgreSQL instance: events9002000.0100.0110100.00.00000000000CC020PostgresPro-Linux2pgsql.events.conflicts[{$PG_CONNINFO},{$PG_PATH}]10000000020PostgresPro-Linux2pgsql.events.deadlocks[{$PG_CONNINFO},{$PG_PATH}]20CC0000020PostgresPro-Linux2pgsql.events.xact_rollback[{$PG_CONNINFO},{$PG_PATH}]PostgreSQL instance: temp files9002000.0100.0110100.00.0000000CC0000020PostgresPro-Linux2pgsql.temp.bytes[{$PG_CONNINFO},{$PG_PATH}]100000CC120PostgresPro-Linux2pgsql.temp.files[{$PG_CONNINFO},{$PG_PATH}]PostgreSQL instance: tuples9002000.0100.0110100.00.0000000000000020PostgresPro-Linux2pgsql.tuples.deleted[{$PG_CONNINFO},{$PG_PATH}]100000CC020PostgresPro-Linux2pgsql.tuples.fetched[{$PG_CONNINFO},{$PG_PATH}]2000CC00020PostgresPro-Linux2pgsql.tuples.inserted[{$PG_CONNINFO},{$PG_PATH}]30CC00CC120PostgresPro-Linux2pgsql.tuples.returned[{$PG_CONNINFO},{$PG_PATH}]40CC0000020PostgresPro-Linux2pgsql.tuples.updated[{$PG_CONNINFO},{$PG_PATH}]System load average9002000.0100.0110100.00.000000000CC00020PostgresPro-Linux2system.la.1Memory overview9004000.0100.0111100.00.0000000CC0000020PostgresPro-Linux2system.memory.apps1000CC00020PostgresPro-Linux2system.memory.buffers200000CC020PostgresPro-Linux2system.memory.swap30CC00CC020PostgresPro-Linux2system.memory.cached40000000020PostgresPro-Linux2system.memory.unused50CCCC00020PostgresPro-Linux2system.memory.slab60777777020PostgresPro-Linux2system.memory.swap_cache70770000020PostgresPro-Linux2system.memory.page_tables80000077020PostgresPro-Linux2system.memory.vmalloc_used90007700020PostgresPro-Linux2system.memory.committed100DF0000020PostgresPro-Linux2system.memory.mapped11000DF00020PostgresPro-Linux2system.memory.active1200000DF020PostgresPro-Linux2system.memory.inactivePostgreSQL oldest query running time9002000.0100.0110100.00.000000000CC00020PostgresPro-Linux2pgsql.oldest.query_time[{$PG_CONNINFO},{$PG_PATH}]PostgreSQL age of oldest xid9002000.0100.0110100.00.000000000CC00020PostgresPro-Linux2pgsql.oldest.xid_age[{$PG_CONNINFO},{$PG_PATH}]System: count of opened files9002000.0100.0110100.00.000000000CC00020PostgresPro-Linux2system.open_filesPostgreSQL: shared buffer9002000.0100.0110100.00.00000000000CC020PostgresPro-Linux2pgsql.buffers.size[{$PG_CONNINFO},{$PG_PATH}]10CC0000020PostgresPro-Linux2pgsql.buffers.twice_used[{$PG_CONNINFO},{$PG_PATH}]2000CC00020PostgresPro-Linux2pgsql.buffers.dirty[{$PG_CONNINFO},{$PG_PATH}]PostgreSQL uptime9002000.0100.0110100.00.000000000CC00020PostgresPro-Linux2pgsql.cache.hit[{$PG_CONNINFO},{$PG_PATH}]10DF0101120PostgresPro-Linux2pgsql.uptime[{$PG_CONNINFO},{$PG_PATH}]PostgreSQL locks sampling9002000.0100.0110100.00.00000000000CC020PostgresPro-Linux2pgsql.pg_locks.accessshare[{$PG_CONNINFO},{$PG_PATH}]1000CC00020PostgresPro-Linux2pgsql.pg_locks.rowshare[{$PG_CONNINFO},{$PG_PATH}]20CC0000020PostgresPro-Linux2pgsql.pg_locks.rowexclusive[{$PG_CONNINFO},{$PG_PATH}]30CC00CC020PostgresPro-Linux2pgsql.pg_locks.shareupdateexclusive[{$PG_CONNINFO},{$PG_PATH}]40777777020PostgresPro-Linux2pgsql.pg_locks.share[{$PG_CONNINFO},{$PG_PATH}]50CCCCCC020PostgresPro-Linux2pgsql.pg_locks.sharerowexclusive[{$PG_CONNINFO},{$PG_PATH}]60CCCC00020PostgresPro-Linux2pgsql.pg_locks.exclusive[{$PG_CONNINFO},{$PG_PATH}]7000CCCC020PostgresPro-Linux2pgsql.pg_locks.accessexclusive[{$PG_CONNINFO},{$PG_PATH}]PostgreSQL statements: bytes9002000.0100.0110100.00.0000000BBBB00020PostgresPro-Linux2pgsql.stat.read_bytes[{$PG_CONNINFO},{$PG_PATH}]1000CC00020PostgresPro-Linux2pgsql.stat.write_bytes[{$PG_CONNINFO},{$PG_PATH}]200000CC020PostgresPro-Linux2pgsql.stat.dirty_bytes[{$PG_CONNINFO},{$PG_PATH}]PostgreSQL statements: spend time9002000.0100.0111100.00.000000000CC00020PostgresPro-Linux2pgsql.stat.read_time[{$PG_CONNINFO},{$PG_PATH}]100000CC020PostgresPro-Linux2pgsql.stat.write_time[{$PG_CONNINFO},{$PG_PATH}]20BBBB00020PostgresPro-Linux2pgsql.stat.other_time[{$PG_CONNINFO},{$PG_PATH}]Processes overview9002000.0100.0110100.00.0000000CC0000020PostgresPro-Linux2system.processes.running1000CC00020PostgresPro-Linux2system.processes.blocked200000CC120PostgresPro-Linux2system.processes.forkrateCPU time spent9002000.0100.0111100.00.00000000000CC020PostgresPro-Linux2system.cpu.user10CC00CC020PostgresPro-Linux2system.cpu.nice20CC0000020PostgresPro-Linux2system.cpu.system3000CC00020PostgresPro-Linux2system.cpu.idle40CCCC00020PostgresPro-Linux2system.cpu.iowait50777777020PostgresPro-Linux2system.cpu.irq60000077020PostgresPro-Linux2system.cpu.softirqSystem up_time9002000.0100.0110100.00.000000000CC00020PostgresPro-Linux2system.up_timePostgreSQL write-ahead log generation speed9002000.0100.0110100.00.0000000CC0000020PostgresPro-Linux2pgsql.wal.write[{$PG_CONNINFO},{$PG_PATH}]PostgreSQL replication lag in second9002000.0100.0110100.00.0000000CC0000020PostgresPro-Linux2pgsql.replication_lag.sec[{$PG_CONNINFO},{$PG_PATH}]PostgreSQL count of xlog files9002000.0100.0110100.00.0000000CC0000020PostgresPro-Linux2pgsql.wal.count[{$PG_CONNINFO},{$PG_PATH}] - \ No newline at end of file diff --git a/packaging/conf/old_templates/template_2.4.4-2.4.5.xml b/packaging/conf/old_templates/template_2.4.4-2.4.5.xml deleted file mode 100644 index 826c632..0000000 --- a/packaging/conf/old_templates/template_2.4.4-2.4.5.xml +++ /dev/null @@ -1,30 +0,0 @@ - - -2.0 - - - Templates - - - - - - {PostgresPro-Linux:pgsql.archive_command[count_files_to_archive].last()}>2PostgreSQL count files in ./archive_status on {HOSTNAME} more than 2030{PostgresPro-Linux:pgsql.checkpoint[count_wal].last()}>12PostgreSQL required checkpoints occurs to frequently on {HOSTNAME}030 {PostgresPro-Linux:pgsql.connections[total].last()}/{PostgresPro-Linux:pgsql.connections[max_connections].last()}*100 >90PostgreSQL many connections on {HOSTNAME} (total connections more than 90% max connections)030{PostgresPro-Linux:mamonsu.plugin.errors[].strlen()}>1Mamonsu plugin errors on {HOSTNAME}. {ITEM.LASTVALUE}030{PostgresPro-Linux:mamonsu.plugin.keepalive[].nodata(180)}=1Mamonsu nodata from {HOSTNAME}030{PostgresPro-Linux:mamonsu.memory.rss[max].last()}>41943040Mamonsu agent memory usage alert on {HOSTNAME}: {ITEM.LASTVALUE} bytes030{PostgresPro-Linux:pgsql.oldest[xid_age].last()}>18000000PostgreSQL oldest xid is too big on {HOSTNAME}030{PostgresPro-Linux:pgsql.oldest[transaction_time].last()}>18000PostgreSQL query running is too old on {HOSTNAME}030{PostgresPro-Linux:pgsql.uptime[].last()}<600PostgreSQL service was restarted on {HOSTNAME} (uptime={ITEM.LASTVALUE})030{PostgresPro-Linux:pgsql.cache[hit].last()}<80PostgreSQL cache hit ratio too low on {HOSTNAME} ({ITEM.LASTVALUE})030{PostgresPro-Linux:pgsql.ping[].nodata(180)}=1PostgreSQL no ping from PostgreSQL for 3 minutes {HOSTNAME} 030{PostgresPro-Linux:system.processes[forkrate].min(5m)}>500Process fork-rate to frequently on {HOSTNAME}030{PostgresPro-Linux:system.up_time[].last()}<300System was restarted on {HOSTNAME} (up_time={ITEM.LASTVALUE})030{PostgresPro-Linux:pgsql.replication_lag[sec].last()}>300PostgreSQL streaming lag too high on {HOSTNAME} (value={ITEM.LASTVALUE})030 - PostgreSQL archive command archive_status 9002000.0100.0110100.00.0000000FF0000020PostgresPro-Linuxpgsql.archive_command[count_files_to_archive]1000FF00120PostgresPro-Linuxpgsql.archive_command[size_files_to_archive]PostgreSQL archive command trying_to_archive 9002000.0100.0110100.00.000000000F000020PostgresPro-Linuxpgsql.archive_command[archived_files]10FF0000120PostgresPro-Linuxpgsql.archive_command[failed_trying_to_archive]PostgreSQL bgwriter9002000.0100.0110100.00.0000000CCCC00120PostgresPro-Linuxpgsql.bgwriter[buffers_checkpoint]100000CC120PostgresPro-Linuxpgsql.bgwriter[buffers_clean]20777777020PostgresPro-Linuxpgsql.bgwriter[maxwritten_clean]30CC0000120PostgresPro-Linuxpgsql.bgwriter[buffers_backend]40CC00CC020PostgresPro-Linuxpgsql.bgwriter[buffers_backend_fsync]5000CC00120PostgresPro-Linuxpgsql.bgwriter[buffers_alloc]PostgreSQL cfs compression: current ratio9002000.0100.0110100.00.000000000CC00020PostgresPro-Linuxpgsql.cfs.activity[current_compress_ratio]PostgreSQL cfs compression: compressed files9002000.0100.0110100.00.000000000CC00020PostgresPro-Linuxpgsql.cfs.activity[compressed_files]PostgreSQL cfs compression: written bytes9002000.0100.0110100.00.000000000CC00020PostgresPro-Linuxpgsql.cfs.activity[written_bytes]PostgreSQL cfs compression: total ratio9002000.0100.0110100.00.000000000CC00020PostgresPro-Linuxpgsql.cfs.activity[total_compress_ratio]PostgreSQL checkpoints9002000.0100.0110100.00.000000000CC00020PostgresPro-Linuxpgsql.checkpoint[count_timed]10CC0000020PostgresPro-Linuxpgsql.checkpoint[count_wal]200000CC120PostgresPro-Linuxpgsql.checkpoint[write_time]30000000120PostgresPro-Linuxpgsql.checkpoint[checkpoint_sync_time]PostgreSQL connections9002000.0100.0110100.00.000000000BB00020PostgresPro-Linuxpgsql.connections[active]100000BB020PostgresPro-Linuxpgsql.connections[idle]20CC00CC020PostgresPro-Linuxpgsql.connections[idle_in_transaction]30CCCCCC020PostgresPro-Linuxpgsql.connections[idle_in_transaction_aborted]40CCCC00020PostgresPro-Linuxpgsql.connections[fastpath_function_call]5000CCCC020PostgresPro-Linuxpgsql.connections[disabled]60EEEEEE020PostgresPro-Linuxpgsql.connections[total]70BB0000020PostgresPro-Linuxpgsql.connections[waiting]8000BB00020PostgresPro-Linuxpgsql.connections[max_connections]Block devices: read/write operations9002000.0100.0110100.00.0000000CC0000020PostgresPro-Linuxsystem.disk.all_read[]100000CC020PostgresPro-Linuxsystem.disk.all_write[]Block devices: read/write bytes9002000.0100.0110100.00.0000000CC0000020PostgresPro-Linuxsystem.disk.all_read_b[]100000CC020PostgresPro-Linuxsystem.disk.all_write_b[]PostgreSQL instance: rate9002000.0100.0110100.00.00000000000CC120PostgresPro-Linuxpgsql.transactions[total]1000CC00020PostgresPro-Linuxpgsql.blocks[hit]20CC0000020PostgresPro-Linuxpgsql.blocks[read]PostgreSQL instance: events9002000.0100.0110100.00.00000000000CC020PostgresPro-Linuxpgsql.events[conflicts]10000000020PostgresPro-Linuxpgsql.events[deadlocks]20CC0000020PostgresPro-Linuxpgsql.events[xact_rollback]3000FF00020PostgresPro-Linuxpgsql.events[checksum_failures]PostgreSQL instance: temp files9002000.0100.0110100.00.0000000CC0000020PostgresPro-Linuxpgsql.temp[bytes]100000CC120PostgresPro-Linuxpgsql.temp[files]PostgreSQL instance: tuples9002000.0100.0110100.00.0000000000000020PostgresPro-Linuxpgsql.tuples[deleted]100000CC020PostgresPro-Linuxpgsql.tuples[fetched]2000CC00020PostgresPro-Linuxpgsql.tuples[inserted]30CC00CC120PostgresPro-Linuxpgsql.tuples[returned]40CC0000020PostgresPro-Linuxpgsql.tuples[updated]System load average9002000.0100.0110100.00.000000000CC00020PostgresPro-Linuxsystem.la[1]Memory overview9004000.0100.0111100.00.0000000CC0000020PostgresPro-Linuxsystem.memory[apps]1000CC00020PostgresPro-Linuxsystem.memory[buffers]200000CC020PostgresPro-Linuxsystem.memory[swap]30CC00CC020PostgresPro-Linuxsystem.memory[cached]40000000020PostgresPro-Linuxsystem.memory[unused]50CCCC00020PostgresPro-Linuxsystem.memory[slab]60777777020PostgresPro-Linuxsystem.memory[swap_cache]70770000020PostgresPro-Linuxsystem.memory[page_tables]80000077020PostgresPro-Linuxsystem.memory[vmalloc_used]90007700020PostgresPro-Linuxsystem.memory[committed]100DF0000020PostgresPro-Linuxsystem.memory[mapped]11000DF00020PostgresPro-Linuxsystem.memory[active]1200000DF020PostgresPro-Linuxsystem.memory[inactive]PostgreSQL oldest transaction running time9002000.0100.0110100.00.000000000CC00020PostgresPro-Linuxpgsql.oldest[transaction_time]PostgreSQL age of oldest xid9002000.0100.0110100.00.000000000CC00020PostgresPro-Linuxpgsql.oldest[xid_age]System: count of opened files9002000.0100.0110100.00.000000000CC00020PostgresPro-Linuxsystem.open_files[]PostgreSQL: shared buffer9002000.0100.0110100.00.00000000000CC020PostgresPro-Linuxpgsql.buffers[size]10CC0000020PostgresPro-Linuxpgsql.buffers[twice_used]2000CC00020PostgresPro-Linuxpgsql.buffers[dirty]PostgreSQL uptime9002000.0100.0110100.00.000000000CC00020PostgresPro-Linuxpgsql.cache[hit]10DF0101120PostgresPro-Linuxpgsql.uptime[]PostgreSQL locks sampling9002000.0100.0110100.00.00000000000CC020PostgresPro-Linuxpgsql.pg_locks[accessshare]1000CC00020PostgresPro-Linuxpgsql.pg_locks[rowshare]20CC0000020PostgresPro-Linuxpgsql.pg_locks[rowexclusive]30CC00CC020PostgresPro-Linuxpgsql.pg_locks[shareupdateexclusive]40777777020PostgresPro-Linuxpgsql.pg_locks[share]50CCCCCC020PostgresPro-Linuxpgsql.pg_locks[sharerowexclusive]60CCCC00020PostgresPro-Linuxpgsql.pg_locks[exclusive]7000CCCC020PostgresPro-Linuxpgsql.pg_locks[accessexclusive]PostgreSQL statements: bytes9002000.0100.0110100.00.0000000BBBB00020PostgresPro-Linuxpgsql.stat[read_bytes]1000CC00020PostgresPro-Linuxpgsql.stat[write_bytes]200000CC020PostgresPro-Linuxpgsql.stat[dirty_bytes]PostgreSQL statements: spend time9002000.0100.0111100.00.000000000CC00020PostgresPro-Linuxpgsql.stat[read_time]100000CC020PostgresPro-Linuxpgsql.stat[write_time]20BBBB00020PostgresPro-Linuxpgsql.stat[other_time]PostgreSQL waits: Locks by type9002000.0100.0111100.00.00000000000CC020PostgresPro-Linuxpgsql.all_lock[lwlock]1000CC00020PostgresPro-Linuxpgsql.all_lock[hwlock]20CC0000020PostgresPro-Linuxpgsql.all_lock[buffer]PostgreSQL waits: Heavyweight locks9002000.0100.0111100.00.0000000CC0000020PostgresPro-Linuxpgsql.hwlock[relation]1000CC00020PostgresPro-Linuxpgsql.hwlock[extend]200000CC020PostgresPro-Linuxpgsql.hwlock[page]30CC00CC020PostgresPro-Linuxpgsql.hwlock[tuple]40000000020PostgresPro-Linuxpgsql.hwlock[transactionid]50CCCC00020PostgresPro-Linuxpgsql.hwlock[virtualxid]60777777020PostgresPro-Linuxpgsql.hwlock[speculative_token]70770000020PostgresPro-Linuxpgsql.hwlock[object]80000077020PostgresPro-Linuxpgsql.hwlock[userlock]90007700020PostgresPro-Linuxpgsql.hwlock[advisory]PostgreSQL waits: Lightweight locks9002000.0100.0111100.00.0000000BBBB00020PostgresPro-Linuxpgsql.lwlock[xid]10CC0000020PostgresPro-Linuxpgsql.lwlock[wal]2000CC00020PostgresPro-Linuxpgsql.lwlock[clog]30FFFFCC020PostgresPro-Linuxpgsql.lwlock[replication]400000CC020PostgresPro-Linuxpgsql.lwlock[buffer]50007700020PostgresPro-Linuxpgsql.lwlock[other]Processes overview9002000.0100.0110100.00.0000000CC0000020PostgresPro-Linuxsystem.processes[running]1000CC00020PostgresPro-Linuxsystem.processes[blocked]200000CC120PostgresPro-Linuxsystem.processes[forkrate]CPU time spent9002000.0100.0111100.00.00000000000CC020PostgresPro-Linuxsystem.cpu[user]10CC00CC020PostgresPro-Linuxsystem.cpu[nice]20CC0000020PostgresPro-Linuxsystem.cpu[system]3000CC00020PostgresPro-Linuxsystem.cpu[idle]40CCCC00020PostgresPro-Linuxsystem.cpu[iowait]50777777020PostgresPro-Linuxsystem.cpu[irq]60000077020PostgresPro-Linuxsystem.cpu[softirq]System up_time9002000.0100.0110100.00.000000000CC00020PostgresPro-Linuxsystem.up_time[]PostgreSQL write-ahead log generation speed9002000.0100.0110100.00.0000000CC0000020PostgresPro-Linuxpgsql.wal.write[]PostgreSQL replication lag in second9002000.0100.0110100.00.0000000CC0000020PostgresPro-Linuxpgsql.replication_lag[sec]PostgreSQL count of xlog files9002000.0100.0110100.00.0000000CC0000020PostgresPro-Linuxpgsql.wal.count[] - \ No newline at end of file diff --git a/packaging/conf/old_templates/template_2.4.4-2.4.5_agent.xml b/packaging/conf/old_templates/template_2.4.4-2.4.5_agent.xml deleted file mode 100644 index 8b879fe..0000000 --- a/packaging/conf/old_templates/template_2.4.4-2.4.5_agent.xml +++ /dev/null @@ -1,30 +0,0 @@ - - -2.0 - - - Templates - - - - - - {PostgresPro-Linux:pgsql.archive_command.count_files_to_archive[{$PG_CONNINFO},{$PG_PATH}].last()}>2PostgreSQL count files in ./archive_status on {HOSTNAME} more than 2030{PostgresPro-Linux:pgsql.checkpoint.count_wal[{$PG_CONNINFO},{$PG_PATH}].last()}>12PostgreSQL required checkpoints occurs to frequently on {HOSTNAME}030 {PostgresPro-Linux:pgsql.connections.total[{$PG_CONNINFO},{$PG_PATH}].last()}/{PostgresPro-Linux:pgsql.connections.max_connections[{$PG_CONNINFO},{$PG_PATH}].last()}*100 >90PostgreSQL many connections on {HOSTNAME} (total connections more than 90% max connections)030{PostgresPro-Linux:mamonsu.plugin.keepalive.nodata(180)}=1Mamonsu nodata from {HOSTNAME}030{PostgresPro-Linux:pgsql.oldest.xid_age[{$PG_CONNINFO},{$PG_PATH}].last()}>18000000PostgreSQL oldest xid is too big on {HOSTNAME}030{PostgresPro-Linux:pgsql.oldest.transaction_time[{$PG_CONNINFO},{$PG_PATH}].last()}>18000PostgreSQL query running is too old on {HOSTNAME}030{PostgresPro-Linux:pgsql.uptime[{$PG_CONNINFO},{$PG_PATH}].last()}<600PostgreSQL service was restarted on {HOSTNAME} (uptime={ITEM.LASTVALUE})030{PostgresPro-Linux:pgsql.cache.hit[{$PG_CONNINFO},{$PG_PATH}].last()}<80PostgreSQL cache hit ratio too low on {HOSTNAME} ({ITEM.LASTVALUE})030{PostgresPro-Linux:pgsql.ping[{$PG_CONNINFO},{$PG_PATH}].nodata(180)}=1PostgreSQL no ping from PostgreSQL for 3 minutes {HOSTNAME} 030{PostgresPro-Linux:system.processes.forkrate.min(5m)}>500Process fork-rate to frequently on {HOSTNAME}030{PostgresPro-Linux:system.up_time.last()}<300System was restarted on {HOSTNAME} (up_time={ITEM.LASTVALUE})030{PostgresPro-Linux:pgsql.replication_lag.sec[{$PG_CONNINFO},{$PG_PATH}].last()}>300PostgreSQL streaming lag too high on {HOSTNAME} (value={ITEM.LASTVALUE})030 - PostgreSQL archive command archive_status 9002000.0100.0110100.00.0000000FF0000020PostgresPro-Linuxpgsql.archive_command.count_files_to_archive[{$PG_CONNINFO},{$PG_PATH}]1000FF00120PostgresPro-Linuxpgsql.archive_command.size_files_to_archive[{$PG_CONNINFO},{$PG_PATH}]PostgreSQL archive command trying_to_archive 9002000.0100.0110100.00.000000000F000020PostgresPro-Linuxpgsql.archive_command.archived_files[{$PG_CONNINFO},{$PG_PATH}]10FF0000120PostgresPro-Linuxpgsql.archive_command.failed_trying_to_archive[{$PG_CONNINFO},{$PG_PATH}]PostgreSQL bgwriter9002000.0100.0110100.00.0000000CCCC00120PostgresPro-Linuxpgsql.bgwriter.buffers_checkpoint[{$PG_CONNINFO},{$PG_PATH}]100000CC120PostgresPro-Linuxpgsql.bgwriter.buffers_clean[{$PG_CONNINFO},{$PG_PATH}]20777777020PostgresPro-Linuxpgsql.bgwriter.maxwritten_clean[{$PG_CONNINFO},{$PG_PATH}]30CC0000120PostgresPro-Linuxpgsql.bgwriter.buffers_backend[{$PG_CONNINFO},{$PG_PATH}]40CC00CC020PostgresPro-Linuxpgsql.bgwriter.buffers_backend_fsync[{$PG_CONNINFO},{$PG_PATH}]5000CC00120PostgresPro-Linuxpgsql.bgwriter.buffers_alloc[{$PG_CONNINFO},{$PG_PATH}]PostgreSQL checkpoints9002000.0100.0110100.00.000000000CC00020PostgresPro-Linuxpgsql.checkpoint.count_timed[{$PG_CONNINFO},{$PG_PATH}]10CC0000020PostgresPro-Linuxpgsql.checkpoint.count_wal[{$PG_CONNINFO},{$PG_PATH}]200000CC120PostgresPro-Linuxpgsql.checkpoint.write_time[{$PG_CONNINFO},{$PG_PATH}]30000000120PostgresPro-Linuxpgsql.checkpoint.checkpoint_sync_time[{$PG_CONNINFO},{$PG_PATH}]PostgreSQL connections9002000.0100.0110100.00.000000000BB00020PostgresPro-Linuxpgsql.connections.active[{$PG_CONNINFO},{$PG_PATH}]100000BB020PostgresPro-Linuxpgsql.connections.idle[{$PG_CONNINFO},{$PG_PATH}]20CC00CC020PostgresPro-Linuxpgsql.connections.idle_in_transaction[{$PG_CONNINFO},{$PG_PATH}]30CCCCCC020PostgresPro-Linuxpgsql.connections.idle_in_transaction_aborted[{$PG_CONNINFO},{$PG_PATH}]40CCCC00020PostgresPro-Linuxpgsql.connections.fastpath_function_call[{$PG_CONNINFO},{$PG_PATH}]5000CCCC020PostgresPro-Linuxpgsql.connections.disabled[{$PG_CONNINFO},{$PG_PATH}]60EEEEEE020PostgresPro-Linuxpgsql.connections.total[{$PG_CONNINFO},{$PG_PATH}]70BB0000020PostgresPro-Linuxpgsql.connections.waiting[{$PG_CONNINFO},{$PG_PATH}]8000BB00020PostgresPro-Linuxpgsql.connections.max_connections[{$PG_CONNINFO},{$PG_PATH}]Block devices: read/write operations9002000.0100.0110100.00.0000000CC0000020PostgresPro-Linuxsystem.disk.all_read100000CC020PostgresPro-Linuxsystem.disk.all_writeBlock devices: read/write bytes9002000.0100.0110100.00.0000000CC0000020PostgresPro-Linuxsystem.disk.all_read_b100000CC020PostgresPro-Linuxsystem.disk.all_write_bPostgreSQL instance: rate9002000.0100.0110100.00.00000000000CC120PostgresPro-Linuxpgsql.transactions.total[{$PG_CONNINFO},{$PG_PATH}]1000CC00020PostgresPro-Linuxpgsql.blocks.hit[{$PG_CONNINFO},{$PG_PATH}]20CC0000020PostgresPro-Linuxpgsql.blocks.read[{$PG_CONNINFO},{$PG_PATH}]PostgreSQL instance: events9002000.0100.0110100.00.00000000000CC020PostgresPro-Linuxpgsql.events.conflicts[{$PG_CONNINFO},{$PG_PATH}]10000000020PostgresPro-Linuxpgsql.events.deadlocks[{$PG_CONNINFO},{$PG_PATH}]20CC0000020PostgresPro-Linuxpgsql.events.xact_rollback[{$PG_CONNINFO},{$PG_PATH}]3000FF00020PostgresPro-Linuxpgsql.events.checksum_failures[{$PG_CONNINFO},{$PG_PATH}]PostgreSQL instance: temp files9002000.0100.0110100.00.0000000CC0000020PostgresPro-Linuxpgsql.temp.bytes[{$PG_CONNINFO},{$PG_PATH}]100000CC120PostgresPro-Linuxpgsql.temp.files[{$PG_CONNINFO},{$PG_PATH}]PostgreSQL instance: tuples9002000.0100.0110100.00.0000000000000020PostgresPro-Linuxpgsql.tuples.deleted[{$PG_CONNINFO},{$PG_PATH}]100000CC020PostgresPro-Linuxpgsql.tuples.fetched[{$PG_CONNINFO},{$PG_PATH}]2000CC00020PostgresPro-Linuxpgsql.tuples.inserted[{$PG_CONNINFO},{$PG_PATH}]30CC00CC120PostgresPro-Linuxpgsql.tuples.returned[{$PG_CONNINFO},{$PG_PATH}]40CC0000020PostgresPro-Linuxpgsql.tuples.updated[{$PG_CONNINFO},{$PG_PATH}]System load average9002000.0100.0110100.00.000000000CC00020PostgresPro-Linuxsystem.la.1Memory overview9004000.0100.0111100.00.0000000CC0000020PostgresPro-Linuxsystem.memory.apps1000CC00020PostgresPro-Linuxsystem.memory.buffers200000CC020PostgresPro-Linuxsystem.memory.swap30CC00CC020PostgresPro-Linuxsystem.memory.cached40000000020PostgresPro-Linuxsystem.memory.unused50CCCC00020PostgresPro-Linuxsystem.memory.slab60777777020PostgresPro-Linuxsystem.memory.swap_cache70770000020PostgresPro-Linuxsystem.memory.page_tables80000077020PostgresPro-Linuxsystem.memory.vmalloc_used90007700020PostgresPro-Linuxsystem.memory.committed100DF0000020PostgresPro-Linuxsystem.memory.mapped11000DF00020PostgresPro-Linuxsystem.memory.active1200000DF020PostgresPro-Linuxsystem.memory.inactivePostgreSQL oldest transaction running time9002000.0100.0110100.00.000000000CC00020PostgresPro-Linuxpgsql.oldest.transaction_time[{$PG_CONNINFO},{$PG_PATH}]PostgreSQL age of oldest xid9002000.0100.0110100.00.000000000CC00020PostgresPro-Linuxpgsql.oldest.xid_age[{$PG_CONNINFO},{$PG_PATH}]System: count of opened files9002000.0100.0110100.00.000000000CC00020PostgresPro-Linuxsystem.open_filesPostgreSQL: shared buffer9002000.0100.0110100.00.00000000000CC020PostgresPro-Linuxpgsql.buffers.size[{$PG_CONNINFO},{$PG_PATH}]10CC0000020PostgresPro-Linuxpgsql.buffers.twice_used[{$PG_CONNINFO},{$PG_PATH}]2000CC00020PostgresPro-Linuxpgsql.buffers.dirty[{$PG_CONNINFO},{$PG_PATH}]PostgreSQL uptime9002000.0100.0110100.00.000000000CC00020PostgresPro-Linuxpgsql.cache.hit[{$PG_CONNINFO},{$PG_PATH}]10DF0101120PostgresPro-Linuxpgsql.uptime[{$PG_CONNINFO},{$PG_PATH}]PostgreSQL locks sampling9002000.0100.0110100.00.00000000000CC020PostgresPro-Linuxpgsql.pg_locks.accessshare[{$PG_CONNINFO},{$PG_PATH}]1000CC00020PostgresPro-Linuxpgsql.pg_locks.rowshare[{$PG_CONNINFO},{$PG_PATH}]20CC0000020PostgresPro-Linuxpgsql.pg_locks.rowexclusive[{$PG_CONNINFO},{$PG_PATH}]30CC00CC020PostgresPro-Linuxpgsql.pg_locks.shareupdateexclusive[{$PG_CONNINFO},{$PG_PATH}]40777777020PostgresPro-Linuxpgsql.pg_locks.share[{$PG_CONNINFO},{$PG_PATH}]50CCCCCC020PostgresPro-Linuxpgsql.pg_locks.sharerowexclusive[{$PG_CONNINFO},{$PG_PATH}]60CCCC00020PostgresPro-Linuxpgsql.pg_locks.exclusive[{$PG_CONNINFO},{$PG_PATH}]7000CCCC020PostgresPro-Linuxpgsql.pg_locks.accessexclusive[{$PG_CONNINFO},{$PG_PATH}]PostgreSQL statements: bytes9002000.0100.0110100.00.0000000BBBB00020PostgresPro-Linuxpgsql.stat.read_bytes[{$PG_CONNINFO},{$PG_PATH}]1000CC00020PostgresPro-Linuxpgsql.stat.write_bytes[{$PG_CONNINFO},{$PG_PATH}]200000CC020PostgresPro-Linuxpgsql.stat.dirty_bytes[{$PG_CONNINFO},{$PG_PATH}]PostgreSQL statements: spend time9002000.0100.0111100.00.000000000CC00020PostgresPro-Linuxpgsql.stat.read_time[{$PG_CONNINFO},{$PG_PATH}]100000CC020PostgresPro-Linuxpgsql.stat.write_time[{$PG_CONNINFO},{$PG_PATH}]20BBBB00020PostgresPro-Linuxpgsql.stat.other_time[{$PG_CONNINFO},{$PG_PATH}]Processes overview9002000.0100.0110100.00.0000000CC0000020PostgresPro-Linuxsystem.processes.running1000CC00020PostgresPro-Linuxsystem.processes.blocked200000CC120PostgresPro-Linuxsystem.processes.forkrateCPU time spent9002000.0100.0111100.00.00000000000CC020PostgresPro-Linuxsystem.cpu.user10CC00CC020PostgresPro-Linuxsystem.cpu.nice20CC0000020PostgresPro-Linuxsystem.cpu.system3000CC00020PostgresPro-Linuxsystem.cpu.idle40CCCC00020PostgresPro-Linuxsystem.cpu.iowait50777777020PostgresPro-Linuxsystem.cpu.irq60000077020PostgresPro-Linuxsystem.cpu.softirqSystem up_time9002000.0100.0110100.00.000000000CC00020PostgresPro-Linuxsystem.up_timePostgreSQL write-ahead log generation speed9002000.0100.0110100.00.0000000CC0000020PostgresPro-Linuxpgsql.wal.write[{$PG_CONNINFO},{$PG_PATH}]PostgreSQL replication lag in second9002000.0100.0110100.00.0000000CC0000020PostgresPro-Linuxpgsql.replication_lag.sec[{$PG_CONNINFO},{$PG_PATH}]PostgreSQL count of xlog files9002000.0100.0110100.00.0000000CC0000020PostgresPro-Linuxpgsql.wal.count[{$PG_CONNINFO},{$PG_PATH}] - \ No newline at end of file diff --git a/packaging/conf/old_templates/template_2.6.2.xml b/packaging/conf/old_templates/template_2.6.2.xml deleted file mode 100644 index c4fe01e..0000000 --- a/packaging/conf/old_templates/template_2.6.2.xml +++ /dev/null @@ -1,30 +0,0 @@ - - -2.0 - - - Templates - - - - - - {PostgresPro-Linux:pgsql.archive_command[count_files_to_archive].last()}>2PostgreSQL count files in ./archive_status on {HOSTNAME} more than 2030{PostgresPro-Linux:pgsql.checkpoint[count_wal].last()}>12PostgreSQL required checkpoints occurs to frequently on {HOSTNAME}030 {PostgresPro-Linux:pgsql.connections[total].last()}/{PostgresPro-Linux:pgsql.connections[max_connections].last()}*100 >90PostgreSQL many connections on {HOSTNAME} (total connections more than 90% max connections)030{PostgresPro-Linux:mamonsu.plugin.errors[].strlen()}>1Mamonsu plugin errors on {HOSTNAME}. {ITEM.LASTVALUE}030{PostgresPro-Linux:mamonsu.plugin.keepalive[].nodata(180)}=1Mamonsu nodata from {HOSTNAME}030{PostgresPro-Linux:mamonsu.memory.rss[max].last()}>41943040Mamonsu agent memory usage alert on {HOSTNAME}: {ITEM.LASTVALUE} bytes030{PostgresPro-Linux:pgsql.oldest[xid_age].last()}>18000000PostgreSQL oldest xid is too big on {HOSTNAME}030{PostgresPro-Linux:pgsql.oldest[transaction_time].last()}>18000PostgreSQL query running is too old on {HOSTNAME}030{PostgresPro-Linux:pgsql.uptime[].last()}<600PostgreSQL service was restarted on {HOSTNAME} (uptime={ITEM.LASTVALUE})030{PostgresPro-Linux:pgsql.cache[hit].last()}<80PostgreSQL cache hit ratio too low on {HOSTNAME} ({ITEM.LASTVALUE})030{PostgresPro-Linux:pgsql.ping[].nodata(180)}=1PostgreSQL no ping from PostgreSQL for 3 minutes {HOSTNAME} 030{PostgresPro-Linux:pgsql.prepared.oldest.last()}>3PostgreSQL prepared transaction running is too old on {HOSTNAME}030{PostgresPro-Linux:system.processes[forkrate].min(5m)}>500Process fork-rate to frequently on {HOSTNAME}030{PostgresPro-Linux:system.up_time[].last()}<300System was restarted on {HOSTNAME} (up_time={ITEM.LASTVALUE})030{PostgresPro-Linux:pgsql.replication_lag[sec].last()}>300PostgreSQL streaming lag too high on {HOSTNAME} (value={ITEM.LASTVALUE})030 - PostgreSQL archive command archive_status 9002000.0100.0110100.00.0000000FF0000020PostgresPro-Linuxpgsql.archive_command[count_files_to_archive]1000FF00120PostgresPro-Linuxpgsql.archive_command[size_files_to_archive]PostgreSQL archive command trying_to_archive 9002000.0100.0110100.00.000000000F000020PostgresPro-Linuxpgsql.archive_command[archived_files]10FF0000120PostgresPro-Linuxpgsql.archive_command[failed_trying_to_archive]PostgreSQL bgwriter9002000.0100.0110100.00.0000000CCCC00120PostgresPro-Linuxpgsql.bgwriter[buffers_checkpoint]100000CC120PostgresPro-Linuxpgsql.bgwriter[buffers_clean]20777777020PostgresPro-Linuxpgsql.bgwriter[maxwritten_clean]30CC0000120PostgresPro-Linuxpgsql.bgwriter[buffers_backend]40CC00CC020PostgresPro-Linuxpgsql.bgwriter[buffers_backend_fsync]5000CC00120PostgresPro-Linuxpgsql.bgwriter[buffers_alloc]PostgreSQL cfs compression: current ratio9002000.0100.0110100.00.000000000CC00020PostgresPro-Linuxpgsql.cfs.activity[current_compress_ratio]PostgreSQL cfs compression: compressed files9002000.0100.0110100.00.000000000CC00020PostgresPro-Linuxpgsql.cfs.activity[compressed_files]PostgreSQL cfs compression: written bytes9002000.0100.0110100.00.000000000CC00020PostgresPro-Linuxpgsql.cfs.activity[written_bytes]PostgreSQL cfs compression: total ratio9002000.0100.0110100.00.000000000CC00020PostgresPro-Linuxpgsql.cfs.activity[total_compress_ratio]PostgreSQL checkpoints9002000.0100.0110100.00.000000000CC00020PostgresPro-Linuxpgsql.checkpoint[count_timed]10CC0000020PostgresPro-Linuxpgsql.checkpoint[count_wal]200000CC120PostgresPro-Linuxpgsql.checkpoint[write_time]30000000120PostgresPro-Linuxpgsql.checkpoint[checkpoint_sync_time]PostgreSQL connections9002000.0100.0110100.00.000000000BB00020PostgresPro-Linuxpgsql.connections[active]100000BB020PostgresPro-Linuxpgsql.connections[idle]20CC00CC020PostgresPro-Linuxpgsql.connections[idle_in_transaction]30CCCCCC020PostgresPro-Linuxpgsql.connections[idle_in_transaction_aborted]40CCCC00020PostgresPro-Linuxpgsql.connections[fastpath_function_call]5000CCCC020PostgresPro-Linuxpgsql.connections[disabled]60EEEEEE020PostgresPro-Linuxpgsql.connections[total]70BB0000020PostgresPro-Linuxpgsql.connections[waiting]8000BB00020PostgresPro-Linuxpgsql.connections[max_connections]Block devices: read/write operations9002000.0100.0110100.00.0000000CC0000020PostgresPro-Linuxsystem.disk.all_read[]100000CC020PostgresPro-Linuxsystem.disk.all_write[]Block devices: read/write bytes9002000.0100.0110100.00.0000000CC0000020PostgresPro-Linuxsystem.disk.all_read_b[]100000CC020PostgresPro-Linuxsystem.disk.all_write_b[]PostgreSQL instance: rate9002000.0100.0110100.00.00000000000CC120PostgresPro-Linuxpgsql.transactions[total]1000CC00020PostgresPro-Linuxpgsql.blocks[hit]20CC0000020PostgresPro-Linuxpgsql.blocks[read]PostgreSQL instance: events9002000.0100.0110100.00.00000000000CC020PostgresPro-Linuxpgsql.events[conflicts]10000000020PostgresPro-Linuxpgsql.events[deadlocks]20CC0000020PostgresPro-Linuxpgsql.events[xact_rollback]3000FF00020PostgresPro-Linuxpgsql.events[checksum_failures]PostgreSQL instance: temp files9002000.0100.0110100.00.0000000CC0000020PostgresPro-Linuxpgsql.temp[bytes]100000CC120PostgresPro-Linuxpgsql.temp[files]PostgreSQL instance: tuples9002000.0100.0110100.00.0000000000000020PostgresPro-Linuxpgsql.tuples[deleted]100000CC020PostgresPro-Linuxpgsql.tuples[fetched]2000CC00020PostgresPro-Linuxpgsql.tuples[inserted]30CC00CC120PostgresPro-Linuxpgsql.tuples[returned]40CC0000020PostgresPro-Linuxpgsql.tuples[updated]System load average9002000.0100.0110100.00.000000000CC00020PostgresPro-Linuxsystem.la[1]Memory overview9004000.0100.0111100.00.0000000CC0000020PostgresPro-Linuxsystem.memory[apps]1000CC00020PostgresPro-Linuxsystem.memory[buffers]200000CC020PostgresPro-Linuxsystem.memory[swap]30CC00CC020PostgresPro-Linuxsystem.memory[cached]40000000020PostgresPro-Linuxsystem.memory[unused]50CCCC00020PostgresPro-Linuxsystem.memory[slab]60777777020PostgresPro-Linuxsystem.memory[swap_cache]70770000020PostgresPro-Linuxsystem.memory[page_tables]80000077020PostgresPro-Linuxsystem.memory[vmalloc_used]90007700020PostgresPro-Linuxsystem.memory[committed]100DF0000020PostgresPro-Linuxsystem.memory[mapped]11000DF00020PostgresPro-Linuxsystem.memory[active]1200000DF020PostgresPro-Linuxsystem.memory[inactive]PostgreSQL oldest transaction running time9002000.0100.0110100.00.000000000CC00020PostgresPro-Linuxpgsql.oldest[transaction_time]PostgreSQL age of oldest xid9002000.0100.0110100.00.000000000CC00020PostgresPro-Linuxpgsql.oldest[xid_age]System: count of opened files9002000.0100.0110100.00.000000000CC00020PostgresPro-Linuxsystem.open_files[]PostgreSQL: shared buffer9002000.0100.0110100.00.00000000000CC020PostgresPro-Linuxpgsql.buffers[size]10CC0000020PostgresPro-Linuxpgsql.buffers[twice_used]2000CC00020PostgresPro-Linuxpgsql.buffers[dirty]PostgreSQL uptime9002000.0100.0110100.00.000000000CC00020PostgresPro-Linuxpgsql.cache[hit]10DF0101120PostgresPro-Linuxpgsql.uptime[]PostgreSQL locks sampling9002000.0100.0110100.00.00000000000CC020PostgresPro-Linuxpgsql.pg_locks[accessshare]1000CC00020PostgresPro-Linuxpgsql.pg_locks[rowshare]20CC0000020PostgresPro-Linuxpgsql.pg_locks[rowexclusive]30CC00CC020PostgresPro-Linuxpgsql.pg_locks[shareupdateexclusive]40777777020PostgresPro-Linuxpgsql.pg_locks[share]50CCCCCC020PostgresPro-Linuxpgsql.pg_locks[sharerowexclusive]60CCCC00020PostgresPro-Linuxpgsql.pg_locks[exclusive]7000CCCC020PostgresPro-Linuxpgsql.pg_locks[accessexclusive]PostgreSQL statements: bytes9002000.0100.0110100.00.0000000BBBB00020PostgresPro-Linuxpgsql.stat[read_bytes]1000CC00020PostgresPro-Linuxpgsql.stat[write_bytes]200000CC020PostgresPro-Linuxpgsql.stat[dirty_bytes]PostgreSQL statements: spend time9002000.0100.0111100.00.000000000CC00020PostgresPro-Linuxpgsql.stat[read_time]100000CC020PostgresPro-Linuxpgsql.stat[write_time]20BBBB00020PostgresPro-Linuxpgsql.stat[other_time]PostgreSQL waits: Locks by type9002000.0100.0111100.00.00000000000CC020PostgresPro-Linuxpgsql.all_lock[lwlock]1000CC00020PostgresPro-Linuxpgsql.all_lock[hwlock]20CC0000020PostgresPro-Linuxpgsql.all_lock[buffer]PostgreSQL waits: Heavyweight locks9002000.0100.0111100.00.0000000CC0000020PostgresPro-Linuxpgsql.hwlock[relation]1000CC00020PostgresPro-Linuxpgsql.hwlock[extend]200000CC020PostgresPro-Linuxpgsql.hwlock[page]30CC00CC020PostgresPro-Linuxpgsql.hwlock[tuple]40000000020PostgresPro-Linuxpgsql.hwlock[transactionid]50CCCC00020PostgresPro-Linuxpgsql.hwlock[virtualxid]60777777020PostgresPro-Linuxpgsql.hwlock[speculative_token]70770000020PostgresPro-Linuxpgsql.hwlock[object]80000077020PostgresPro-Linuxpgsql.hwlock[userlock]90007700020PostgresPro-Linuxpgsql.hwlock[advisory]PostgreSQL waits: Lightweight locks9002000.0100.0111100.00.0000000BBBB00020PostgresPro-Linuxpgsql.lwlock[xid]10CC0000020PostgresPro-Linuxpgsql.lwlock[wal]2000CC00020PostgresPro-Linuxpgsql.lwlock[clog]30FFFFCC020PostgresPro-Linuxpgsql.lwlock[replication]400000CC020PostgresPro-Linuxpgsql.lwlock[buffer]50007700020PostgresPro-Linuxpgsql.lwlock[other]PostgreSQL prepared transaction9002000.0100.0110100.00.000000000BB00020PostgresPro-Linuxpgsql.prepared.count100000BB120PostgresPro-Linuxpgsql.prepared.oldestProcesses overview9002000.0100.0110100.00.0000000CC0000020PostgresPro-Linuxsystem.processes[running]1000CC00020PostgresPro-Linuxsystem.processes[blocked]200000CC120PostgresPro-Linuxsystem.processes[forkrate]CPU time spent9002000.0100.0111100.00.00000000000CC020PostgresPro-Linuxsystem.cpu[user]10CC00CC020PostgresPro-Linuxsystem.cpu[nice]20CC0000020PostgresPro-Linuxsystem.cpu[system]3000CC00020PostgresPro-Linuxsystem.cpu[idle]40CCCC00020PostgresPro-Linuxsystem.cpu[iowait]50777777020PostgresPro-Linuxsystem.cpu[irq]60000077020PostgresPro-Linuxsystem.cpu[softirq]System up_time9002000.0100.0110100.00.000000000CC00020PostgresPro-Linuxsystem.up_time[]PostgreSQL write-ahead log generation speed9002000.0100.0110100.00.0000000CC0000020PostgresPro-Linuxpgsql.wal.write[]PostgreSQL replication lag in second9002000.0100.0110100.00.0000000CC0000020PostgresPro-Linuxpgsql.replication_lag[sec]PostgreSQL count of xlog files9002000.0100.0110100.00.0000000CC0000020PostgresPro-Linuxpgsql.wal.count[] - \ No newline at end of file diff --git a/packaging/conf/old_templates/template_2.6.2_agent.xml b/packaging/conf/old_templates/template_2.6.2_agent.xml deleted file mode 100644 index fbe54ff..0000000 --- a/packaging/conf/old_templates/template_2.6.2_agent.xml +++ /dev/null @@ -1,30 +0,0 @@ - - -2.0 - - - Templates - - - - - - {PostgresPro-Linux:pgsql.archive_command.count_files_to_archive[{$PG_CONNINFO},{$PG_PATH}].last()}>2PostgreSQL count files in ./archive_status on {HOSTNAME} more than 2030{PostgresPro-Linux:pgsql.checkpoint.count_wal[{$PG_CONNINFO},{$PG_PATH}].last()}>12PostgreSQL required checkpoints occurs to frequently on {HOSTNAME}030 {PostgresPro-Linux:pgsql.connections.total[{$PG_CONNINFO},{$PG_PATH}].last()}/{PostgresPro-Linux:pgsql.connections.max_connections[{$PG_CONNINFO},{$PG_PATH}].last()}*100 >90PostgreSQL many connections on {HOSTNAME} (total connections more than 90% max connections)030{PostgresPro-Linux:mamonsu.plugin.keepalive.nodata(180)}=1Mamonsu nodata from {HOSTNAME}030{PostgresPro-Linux:pgsql.oldest.xid_age[{$PG_CONNINFO},{$PG_PATH}].last()}>18000000PostgreSQL oldest xid is too big on {HOSTNAME}030{PostgresPro-Linux:pgsql.oldest.transaction_time[{$PG_CONNINFO},{$PG_PATH}].last()}>18000PostgreSQL query running is too old on {HOSTNAME}030{PostgresPro-Linux:pgsql.uptime[{$PG_CONNINFO},{$PG_PATH}].last()}<600PostgreSQL service was restarted on {HOSTNAME} (uptime={ITEM.LASTVALUE})030{PostgresPro-Linux:pgsql.cache.hit[{$PG_CONNINFO},{$PG_PATH}].last()}<80PostgreSQL cache hit ratio too low on {HOSTNAME} ({ITEM.LASTVALUE})030{PostgresPro-Linux:pgsql.ping[{$PG_CONNINFO},{$PG_PATH}].nodata(180)}=1PostgreSQL no ping from PostgreSQL for 3 minutes {HOSTNAME} 030{PostgresPro-Linux:pgsql.prepared.oldest.last()}>3PostgreSQL prepared transaction running is too old on {HOSTNAME}030{PostgresPro-Linux:system.processes.forkrate.min(5m)}>500Process fork-rate to frequently on {HOSTNAME}030{PostgresPro-Linux:system.up_time.last()}<300System was restarted on {HOSTNAME} (up_time={ITEM.LASTVALUE})030{PostgresPro-Linux:pgsql.replication_lag.sec[{$PG_CONNINFO},{$PG_PATH}].last()}>300PostgreSQL streaming lag too high on {HOSTNAME} (value={ITEM.LASTVALUE})030 - PostgreSQL archive command archive_status 9002000.0100.0110100.00.0000000FF0000020PostgresPro-Linuxpgsql.archive_command.count_files_to_archive[{$PG_CONNINFO},{$PG_PATH}]1000FF00120PostgresPro-Linuxpgsql.archive_command.size_files_to_archive[{$PG_CONNINFO},{$PG_PATH}]PostgreSQL archive command trying_to_archive 9002000.0100.0110100.00.000000000F000020PostgresPro-Linuxpgsql.archive_command.archived_files[{$PG_CONNINFO},{$PG_PATH}]10FF0000120PostgresPro-Linuxpgsql.archive_command.failed_trying_to_archive[{$PG_CONNINFO},{$PG_PATH}]PostgreSQL bgwriter9002000.0100.0110100.00.0000000CCCC00120PostgresPro-Linuxpgsql.bgwriter.buffers_checkpoint[{$PG_CONNINFO},{$PG_PATH}]100000CC120PostgresPro-Linuxpgsql.bgwriter.buffers_clean[{$PG_CONNINFO},{$PG_PATH}]20777777020PostgresPro-Linuxpgsql.bgwriter.maxwritten_clean[{$PG_CONNINFO},{$PG_PATH}]30CC0000120PostgresPro-Linuxpgsql.bgwriter.buffers_backend[{$PG_CONNINFO},{$PG_PATH}]40CC00CC020PostgresPro-Linuxpgsql.bgwriter.buffers_backend_fsync[{$PG_CONNINFO},{$PG_PATH}]5000CC00120PostgresPro-Linuxpgsql.bgwriter.buffers_alloc[{$PG_CONNINFO},{$PG_PATH}]PostgreSQL checkpoints9002000.0100.0110100.00.000000000CC00020PostgresPro-Linuxpgsql.checkpoint.count_timed[{$PG_CONNINFO},{$PG_PATH}]10CC0000020PostgresPro-Linuxpgsql.checkpoint.count_wal[{$PG_CONNINFO},{$PG_PATH}]200000CC120PostgresPro-Linuxpgsql.checkpoint.write_time[{$PG_CONNINFO},{$PG_PATH}]30000000120PostgresPro-Linuxpgsql.checkpoint.checkpoint_sync_time[{$PG_CONNINFO},{$PG_PATH}]PostgreSQL connections9002000.0100.0110100.00.000000000BB00020PostgresPro-Linuxpgsql.connections.active[{$PG_CONNINFO},{$PG_PATH}]100000BB020PostgresPro-Linuxpgsql.connections.idle[{$PG_CONNINFO},{$PG_PATH}]20CC00CC020PostgresPro-Linuxpgsql.connections.idle_in_transaction[{$PG_CONNINFO},{$PG_PATH}]30CCCCCC020PostgresPro-Linuxpgsql.connections.idle_in_transaction_aborted[{$PG_CONNINFO},{$PG_PATH}]40CCCC00020PostgresPro-Linuxpgsql.connections.fastpath_function_call[{$PG_CONNINFO},{$PG_PATH}]5000CCCC020PostgresPro-Linuxpgsql.connections.disabled[{$PG_CONNINFO},{$PG_PATH}]60EEEEEE020PostgresPro-Linuxpgsql.connections.total[{$PG_CONNINFO},{$PG_PATH}]70BB0000020PostgresPro-Linuxpgsql.connections.waiting[{$PG_CONNINFO},{$PG_PATH}]8000BB00020PostgresPro-Linuxpgsql.connections.max_connections[{$PG_CONNINFO},{$PG_PATH}]Block devices: read/write operations9002000.0100.0110100.00.0000000CC0000020PostgresPro-Linuxsystem.disk.all_read100000CC020PostgresPro-Linuxsystem.disk.all_writeBlock devices: read/write bytes9002000.0100.0110100.00.0000000CC0000020PostgresPro-Linuxsystem.disk.all_read_b100000CC020PostgresPro-Linuxsystem.disk.all_write_bPostgreSQL instance: rate9002000.0100.0110100.00.00000000000CC120PostgresPro-Linuxpgsql.transactions.total[{$PG_CONNINFO},{$PG_PATH}]1000CC00020PostgresPro-Linuxpgsql.blocks.hit[{$PG_CONNINFO},{$PG_PATH}]20CC0000020PostgresPro-Linuxpgsql.blocks.read[{$PG_CONNINFO},{$PG_PATH}]PostgreSQL instance: events9002000.0100.0110100.00.00000000000CC020PostgresPro-Linuxpgsql.events.conflicts[{$PG_CONNINFO},{$PG_PATH}]10000000020PostgresPro-Linuxpgsql.events.deadlocks[{$PG_CONNINFO},{$PG_PATH}]20CC0000020PostgresPro-Linuxpgsql.events.xact_rollback[{$PG_CONNINFO},{$PG_PATH}]3000FF00020PostgresPro-Linuxpgsql.events.checksum_failures[{$PG_CONNINFO},{$PG_PATH}]PostgreSQL instance: temp files9002000.0100.0110100.00.0000000CC0000020PostgresPro-Linuxpgsql.temp.bytes[{$PG_CONNINFO},{$PG_PATH}]100000CC120PostgresPro-Linuxpgsql.temp.files[{$PG_CONNINFO},{$PG_PATH}]PostgreSQL instance: tuples9002000.0100.0110100.00.0000000000000020PostgresPro-Linuxpgsql.tuples.deleted[{$PG_CONNINFO},{$PG_PATH}]100000CC020PostgresPro-Linuxpgsql.tuples.fetched[{$PG_CONNINFO},{$PG_PATH}]2000CC00020PostgresPro-Linuxpgsql.tuples.inserted[{$PG_CONNINFO},{$PG_PATH}]30CC00CC120PostgresPro-Linuxpgsql.tuples.returned[{$PG_CONNINFO},{$PG_PATH}]40CC0000020PostgresPro-Linuxpgsql.tuples.updated[{$PG_CONNINFO},{$PG_PATH}]System load average9002000.0100.0110100.00.000000000CC00020PostgresPro-Linuxsystem.la.1Memory overview9004000.0100.0111100.00.0000000CC0000020PostgresPro-Linuxsystem.memory.apps1000CC00020PostgresPro-Linuxsystem.memory.buffers200000CC020PostgresPro-Linuxsystem.memory.swap30CC00CC020PostgresPro-Linuxsystem.memory.cached40000000020PostgresPro-Linuxsystem.memory.unused50CCCC00020PostgresPro-Linuxsystem.memory.slab60777777020PostgresPro-Linuxsystem.memory.swap_cache70770000020PostgresPro-Linuxsystem.memory.page_tables80000077020PostgresPro-Linuxsystem.memory.vmalloc_used90007700020PostgresPro-Linuxsystem.memory.committed100DF0000020PostgresPro-Linuxsystem.memory.mapped11000DF00020PostgresPro-Linuxsystem.memory.active1200000DF020PostgresPro-Linuxsystem.memory.inactivePostgreSQL oldest transaction running time9002000.0100.0110100.00.000000000CC00020PostgresPro-Linuxpgsql.oldest.transaction_time[{$PG_CONNINFO},{$PG_PATH}]PostgreSQL age of oldest xid9002000.0100.0110100.00.000000000CC00020PostgresPro-Linuxpgsql.oldest.xid_age[{$PG_CONNINFO},{$PG_PATH}]System: count of opened files9002000.0100.0110100.00.000000000CC00020PostgresPro-Linuxsystem.open_filesPostgreSQL: shared buffer9002000.0100.0110100.00.00000000000CC020PostgresPro-Linuxpgsql.buffers.size[{$PG_CONNINFO},{$PG_PATH}]10CC0000020PostgresPro-Linuxpgsql.buffers.twice_used[{$PG_CONNINFO},{$PG_PATH}]2000CC00020PostgresPro-Linuxpgsql.buffers.dirty[{$PG_CONNINFO},{$PG_PATH}]PostgreSQL uptime9002000.0100.0110100.00.000000000CC00020PostgresPro-Linuxpgsql.cache.hit[{$PG_CONNINFO},{$PG_PATH}]10DF0101120PostgresPro-Linuxpgsql.uptime[{$PG_CONNINFO},{$PG_PATH}]PostgreSQL locks sampling9002000.0100.0110100.00.00000000000CC020PostgresPro-Linuxpgsql.pg_locks.accessshare[{$PG_CONNINFO},{$PG_PATH}]1000CC00020PostgresPro-Linuxpgsql.pg_locks.rowshare[{$PG_CONNINFO},{$PG_PATH}]20CC0000020PostgresPro-Linuxpgsql.pg_locks.rowexclusive[{$PG_CONNINFO},{$PG_PATH}]30CC00CC020PostgresPro-Linuxpgsql.pg_locks.shareupdateexclusive[{$PG_CONNINFO},{$PG_PATH}]40777777020PostgresPro-Linuxpgsql.pg_locks.share[{$PG_CONNINFO},{$PG_PATH}]50CCCCCC020PostgresPro-Linuxpgsql.pg_locks.sharerowexclusive[{$PG_CONNINFO},{$PG_PATH}]60CCCC00020PostgresPro-Linuxpgsql.pg_locks.exclusive[{$PG_CONNINFO},{$PG_PATH}]7000CCCC020PostgresPro-Linuxpgsql.pg_locks.accessexclusive[{$PG_CONNINFO},{$PG_PATH}]PostgreSQL statements: bytes9002000.0100.0110100.00.0000000BBBB00020PostgresPro-Linuxpgsql.stat.read_bytes[{$PG_CONNINFO},{$PG_PATH}]1000CC00020PostgresPro-Linuxpgsql.stat.write_bytes[{$PG_CONNINFO},{$PG_PATH}]200000CC020PostgresPro-Linuxpgsql.stat.dirty_bytes[{$PG_CONNINFO},{$PG_PATH}]PostgreSQL statements: spend time9002000.0100.0111100.00.000000000CC00020PostgresPro-Linuxpgsql.stat.read_time[{$PG_CONNINFO},{$PG_PATH}]100000CC020PostgresPro-Linuxpgsql.stat.write_time[{$PG_CONNINFO},{$PG_PATH}]20BBBB00020PostgresPro-Linuxpgsql.stat.other_time[{$PG_CONNINFO},{$PG_PATH}]PostgreSQL prepared transaction9002000.0100.0110100.00.000000000BB00020PostgresPro-Linuxpgsql.prepared.count100000BB120PostgresPro-Linuxpgsql.prepared.oldestProcesses overview9002000.0100.0110100.00.0000000CC0000020PostgresPro-Linuxsystem.processes.running1000CC00020PostgresPro-Linuxsystem.processes.blocked200000CC120PostgresPro-Linuxsystem.processes.forkrateCPU time spent9002000.0100.0111100.00.00000000000CC020PostgresPro-Linuxsystem.cpu.user10CC00CC020PostgresPro-Linuxsystem.cpu.nice20CC0000020PostgresPro-Linuxsystem.cpu.system3000CC00020PostgresPro-Linuxsystem.cpu.idle40CCCC00020PostgresPro-Linuxsystem.cpu.iowait50777777020PostgresPro-Linuxsystem.cpu.irq60000077020PostgresPro-Linuxsystem.cpu.softirqSystem up_time9002000.0100.0110100.00.000000000CC00020PostgresPro-Linuxsystem.up_timePostgreSQL write-ahead log generation speed9002000.0100.0110100.00.0000000CC0000020PostgresPro-Linuxpgsql.wal.write[{$PG_CONNINFO},{$PG_PATH}]PostgreSQL replication lag in second9002000.0100.0110100.00.0000000CC0000020PostgresPro-Linuxpgsql.replication_lag.sec[{$PG_CONNINFO},{$PG_PATH}]PostgreSQL count of xlog files9002000.0100.0110100.00.0000000CC0000020PostgresPro-Linuxpgsql.wal.count[{$PG_CONNINFO},{$PG_PATH}] - \ No newline at end of file diff --git a/packaging/conf/old_templates/template_2.7.1.xml b/packaging/conf/old_templates/template_2.7.1.xml deleted file mode 100644 index 73daff6..0000000 --- a/packaging/conf/old_templates/template_2.7.1.xml +++ /dev/null @@ -1,30 +0,0 @@ - - -2.0 - - - Templates - - - - - - {PostgresPro-Linux:pgsql.archive_command[count_files_to_archive].last()}>2PostgreSQL count files in ./archive_status on {HOSTNAME} more than 2030{PostgresPro-Linux:pgsql.checkpoint[count_wal].last()}>12PostgreSQL required checkpoints occurs to frequently on {HOSTNAME}030 {PostgresPro-Linux:pgsql.connections[total].last()}/{PostgresPro-Linux:pgsql.connections[max_connections].last()}*100 >90PostgreSQL many connections on {HOSTNAME} (total connections more than 90% max connections)030{PostgresPro-Linux:mamonsu.plugin.errors[].strlen()}>1Mamonsu plugin errors on {HOSTNAME}. {ITEM.LASTVALUE}030{PostgresPro-Linux:mamonsu.plugin.keepalive[].nodata(180)}=1Mamonsu nodata from {HOSTNAME}030{PostgresPro-Linux:mamonsu.memory.rss[max].last()}>41943040Mamonsu agent memory usage alert on {HOSTNAME}: {ITEM.LASTVALUE} bytes030{PostgresPro-Linux:pgsql.memory_leak_diagnostic.msg_text[].strlen()}>1PostgreSQL: number of pids which private anonymous memory exceeds private_anon_mem_threshold on {HOSTNAME}. {ITEM.LASTVALUE}030{PostgresPro-Linux:pgsql.oldest[xid_age].last()}>18000000PostgreSQL oldest xid is too big on {HOSTNAME}030{PostgresPro-Linux:pgsql.oldest[transaction_time].last()}>18000PostgreSQL query running is too old on {HOSTNAME}030{PostgresPro-Linux:pgsql.uptime[].last()}<600PostgreSQL service was restarted on {HOSTNAME} (uptime={ITEM.LASTVALUE})030{PostgresPro-Linux:pgsql.cache[hit].last()}<80PostgreSQL cache hit ratio too low on {HOSTNAME} ({ITEM.LASTVALUE})030{PostgresPro-Linux:pgsql.ping[].nodata(180)}=1PostgreSQL no ping from PostgreSQL for 3 minutes {HOSTNAME} 030{PostgresPro-Linux:pgsql.prepared.oldest.last()}>60PostgreSQL prepared transaction is too old on {HOSTNAME}030{PostgresPro-Linux:system.processes[forkrate].min(5m)}>500Process fork-rate to frequently on {HOSTNAME}030{PostgresPro-Linux:system.up_time[].last()}<300System was restarted on {HOSTNAME} (up_time={ITEM.LASTVALUE})030{PostgresPro-Linux:pgsql.replication_lag[sec].last()}>300PostgreSQL streaming lag too high on {HOSTNAME} (value={ITEM.LASTVALUE})030{PostgresPro-Linux:pgsql.replication.non_active_slots[].last()}#0PostgreSQL number of non-active replication slots on {HOSTNAME} (value={ITEM.LASTVALUE})030 - PostgreSQL archive command archive_status 9002000.0100.0110100.00.0000000FF0000020PostgresPro-Linuxpgsql.archive_command[count_files_to_archive]1000FF00120PostgresPro-Linuxpgsql.archive_command[size_files_to_archive]PostgreSQL archive command trying_to_archive 9002000.0100.0110100.00.000000000F000020PostgresPro-Linuxpgsql.archive_command[archived_files]10FF0000120PostgresPro-Linuxpgsql.archive_command[failed_trying_to_archive]PostgreSQL bgwriter9002000.0100.0110100.00.0000000CCCC00120PostgresPro-Linuxpgsql.bgwriter[buffers_checkpoint]100000CC120PostgresPro-Linuxpgsql.bgwriter[buffers_clean]20777777020PostgresPro-Linuxpgsql.bgwriter[maxwritten_clean]30CC0000120PostgresPro-Linuxpgsql.bgwriter[buffers_backend]40CC00CC020PostgresPro-Linuxpgsql.bgwriter[buffers_backend_fsync]5000CC00120PostgresPro-Linuxpgsql.bgwriter[buffers_alloc]PostgreSQL cfs compression: current ratio9002000.0100.0110100.00.000000000CC00020PostgresPro-Linuxpgsql.cfs.activity[current_compress_ratio]PostgreSQL cfs compression: compressed files9002000.0100.0110100.00.000000000CC00020PostgresPro-Linuxpgsql.cfs.activity[compressed_files]PostgreSQL cfs compression: written bytes9002000.0100.0110100.00.000000000CC00020PostgresPro-Linuxpgsql.cfs.activity[written_bytes]PostgreSQL cfs compression: total ratio9002000.0100.0110100.00.000000000CC00020PostgresPro-Linuxpgsql.cfs.activity[total_compress_ratio]PostgreSQL checkpoints9002000.0100.0110100.00.000000000CC00020PostgresPro-Linuxpgsql.checkpoint[count_timed]10CC0000020PostgresPro-Linuxpgsql.checkpoint[count_wal]200000CC120PostgresPro-Linuxpgsql.checkpoint[write_time]30000000120PostgresPro-Linuxpgsql.checkpoint[checkpoint_sync_time]PostgreSQL connections9002000.0100.0110100.00.000000000BB00020PostgresPro-Linuxpgsql.connections[active]100000BB020PostgresPro-Linuxpgsql.connections[idle]20CC00CC020PostgresPro-Linuxpgsql.connections[idle_in_transaction]30CCCCCC020PostgresPro-Linuxpgsql.connections[idle_in_transaction_aborted]40CCCC00020PostgresPro-Linuxpgsql.connections[fastpath_function_call]5000CCCC020PostgresPro-Linuxpgsql.connections[disabled]60EEEEEE020PostgresPro-Linuxpgsql.connections[total]70BB0000020PostgresPro-Linuxpgsql.connections[waiting]8000BB00020PostgresPro-Linuxpgsql.connections[max_connections]Block devices: read/write operations9002000.0100.0110100.00.0000000CC0000020PostgresPro-Linuxsystem.disk.all_read[]100000CC020PostgresPro-Linuxsystem.disk.all_write[]Block devices: read/write bytes9002000.0100.0110100.00.0000000CC0000020PostgresPro-Linuxsystem.disk.all_read_b[]100000CC020PostgresPro-Linuxsystem.disk.all_write_b[]PostgreSQL instance: rate9002000.0100.0110100.00.00000000000CC120PostgresPro-Linuxpgsql.transactions[total]1000CC00020PostgresPro-Linuxpgsql.blocks[hit]20CC0000020PostgresPro-Linuxpgsql.blocks[read]PostgreSQL instance: events9002000.0100.0110100.00.00000000000CC020PostgresPro-Linuxpgsql.events[conflicts]10000000020PostgresPro-Linuxpgsql.events[deadlocks]20CC0000020PostgresPro-Linuxpgsql.events[xact_rollback]3000FF00020PostgresPro-Linuxpgsql.events[checksum_failures]PostgreSQL instance: temp files9002000.0100.0110100.00.0000000CC0000020PostgresPro-Linuxpgsql.temp[bytes]100000CC120PostgresPro-Linuxpgsql.temp[files]PostgreSQL instance: tuples9002000.0100.0110100.00.0000000000000020PostgresPro-Linuxpgsql.tuples[deleted]100000CC020PostgresPro-Linuxpgsql.tuples[fetched]2000CC00020PostgresPro-Linuxpgsql.tuples[inserted]30CC00CC120PostgresPro-Linuxpgsql.tuples[returned]40CC0000020PostgresPro-Linuxpgsql.tuples[updated]System load average9002000.0100.0110100.00.000000000CC00020PostgresPro-Linuxsystem.la[1]Memory overview9004000.0100.0111100.00.0000000CC0000020PostgresPro-Linuxsystem.memory[apps]1000CC00020PostgresPro-Linuxsystem.memory[buffers]200000CC020PostgresPro-Linuxsystem.memory[swap]30CC00CC020PostgresPro-Linuxsystem.memory[cached]40000000020PostgresPro-Linuxsystem.memory[unused]50CCCC00020PostgresPro-Linuxsystem.memory[slab]60777777020PostgresPro-Linuxsystem.memory[swap_cache]70770000020PostgresPro-Linuxsystem.memory[page_tables]80000077020PostgresPro-Linuxsystem.memory[vmalloc_used]90007700020PostgresPro-Linuxsystem.memory[committed]100DF0000020PostgresPro-Linuxsystem.memory[mapped]11000DF00020PostgresPro-Linuxsystem.memory[active]1200000DF020PostgresPro-Linuxsystem.memory[inactive]PostgreSQL: number of pids which private anonymous memory exceeds private_anon_mem_threshold9002000.0100.0110100.00.0000000FF0000020PostgresPro-Linuxpgsql.memory_leak_diagnostic.count_diff[]PostgreSQL oldest transaction running time9002000.0100.0110100.00.000000000CC00020PostgresPro-Linuxpgsql.oldest[transaction_time]PostgreSQL age of oldest xid9002000.0100.0110100.00.000000000CC00020PostgresPro-Linuxpgsql.oldest[xid_age]PostgreSQL number of parallel queries being executed now9002000.0100.0110100.00.00000000000CC020PostgresPro-Linuxpgsql.parallel[queries]System: count of opened files9002000.0100.0110100.00.000000000CC00020PostgresPro-Linuxsystem.open_files[]PostgreSQL: shared buffer9002000.0100.0110100.00.00000000000CC020PostgresPro-Linuxpgsql.buffers[size]10CC0000020PostgresPro-Linuxpgsql.buffers[twice_used]2000CC00020PostgresPro-Linuxpgsql.buffers[dirty]PostgreSQL uptime9002000.0100.0110100.00.000000000CC00020PostgresPro-Linuxpgsql.cache[hit]10DF0101120PostgresPro-Linuxpgsql.uptime[]PostgreSQL locks sampling9002000.0100.0110100.00.00000000000CC020PostgresPro-Linuxpgsql.pg_locks[accessshare]1000CC00020PostgresPro-Linuxpgsql.pg_locks[rowshare]20CC0000020PostgresPro-Linuxpgsql.pg_locks[rowexclusive]30CC00CC020PostgresPro-Linuxpgsql.pg_locks[shareupdateexclusive]40777777020PostgresPro-Linuxpgsql.pg_locks[share]50CCCCCC020PostgresPro-Linuxpgsql.pg_locks[sharerowexclusive]60CCCC00020PostgresPro-Linuxpgsql.pg_locks[exclusive]7000CCCC020PostgresPro-Linuxpgsql.pg_locks[accessexclusive]PostgreSQL statements: bytes9002000.0100.0110100.00.0000000BBBB00020PostgresPro-Linuxpgsql.stat[read_bytes]1000CC00020PostgresPro-Linuxpgsql.stat[write_bytes]200000CC020PostgresPro-Linuxpgsql.stat[dirty_bytes]PostgreSQL statements: spend time9002000.0100.0111100.00.000000000CC00020PostgresPro-Linuxpgsql.stat[read_time]100000CC020PostgresPro-Linuxpgsql.stat[write_time]20BBBB00020PostgresPro-Linuxpgsql.stat[other_time]PostgreSQL statements: wal statistics9002000.0100.0110100.00.0000000BCC000020PostgresPro-Linuxpgsql.stat[wal_bytes]10CC6600020PostgresPro-Linuxpgsql.stat[wal_records]2000CCCC020PostgresPro-Linuxpgsql.stat[wal_fpi]PostgreSQL waits: Locks by type9002000.0100.0111100.00.00000000000CC020PostgresPro-Linuxpgsql.all_lock[lwlock]1000CC00020PostgresPro-Linuxpgsql.all_lock[hwlock]20CC0000020PostgresPro-Linuxpgsql.all_lock[buffer]PostgreSQL waits: Heavyweight locks9002000.0100.0111100.00.0000000CC0000020PostgresPro-Linuxpgsql.hwlock[relation]1000CC00020PostgresPro-Linuxpgsql.hwlock[extend]200000CC020PostgresPro-Linuxpgsql.hwlock[page]30CC00CC020PostgresPro-Linuxpgsql.hwlock[tuple]40000000020PostgresPro-Linuxpgsql.hwlock[transactionid]50CCCC00020PostgresPro-Linuxpgsql.hwlock[virtualxid]60777777020PostgresPro-Linuxpgsql.hwlock[speculative_token]70770000020PostgresPro-Linuxpgsql.hwlock[object]80000077020PostgresPro-Linuxpgsql.hwlock[userlock]90007700020PostgresPro-Linuxpgsql.hwlock[advisory]PostgreSQL waits: Lightweight locks9002000.0100.0111100.00.0000000BBBB00020PostgresPro-Linuxpgsql.lwlock[xid]10CC0000020PostgresPro-Linuxpgsql.lwlock[wal]2000CC00020PostgresPro-Linuxpgsql.lwlock[clog]30FFFFCC020PostgresPro-Linuxpgsql.lwlock[replication]400000CC020PostgresPro-Linuxpgsql.lwlock[buffer]50007700020PostgresPro-Linuxpgsql.lwlock[other]PostgreSQL prepared transaction9002000.0100.0110100.00.000000000BB00020PostgresPro-Linuxpgsql.prepared.count100000BB120PostgresPro-Linuxpgsql.prepared.oldestProcesses overview9002000.0100.0110100.00.0000000CC0000020PostgresPro-Linuxsystem.processes[running]1000CC00020PostgresPro-Linuxsystem.processes[blocked]200000CC120PostgresPro-Linuxsystem.processes[forkrate]CPU time spent9002000.0100.0111100.00.00000000000CC020PostgresPro-Linuxsystem.cpu[user]10CC00CC020PostgresPro-Linuxsystem.cpu[nice]20CC0000020PostgresPro-Linuxsystem.cpu[system]3000CC00020PostgresPro-Linuxsystem.cpu[idle]40CCCC00020PostgresPro-Linuxsystem.cpu[iowait]50777777020PostgresPro-Linuxsystem.cpu[irq]60000077020PostgresPro-Linuxsystem.cpu[softirq]System up_time9002000.0100.0110100.00.000000000CC00020PostgresPro-Linuxsystem.up_time[]PostgreSQL write-ahead log generation speed9002000.0100.0110100.00.0000000CC0000020PostgresPro-Linuxpgsql.wal.write[]PostgreSQL replication lag in second9002000.0100.0110100.00.0000000CC0000020PostgresPro-Linuxpgsql.replication_lag[sec]PostgreSQL count of xlog files9002000.0100.0110100.00.0000000CC0000020PostgresPro-Linuxpgsql.wal.count[] - \ No newline at end of file diff --git a/packaging/conf/old_templates/template_2.7.1_agent.xml b/packaging/conf/old_templates/template_2.7.1_agent.xml deleted file mode 100644 index 86e29a4..0000000 --- a/packaging/conf/old_templates/template_2.7.1_agent.xml +++ /dev/null @@ -1,30 +0,0 @@ - - -2.0 - - - Templates - - - - - - {PostgresPro-Linux:pgsql.archive_command.count_files_to_archive[{$PG_CONNINFO},{$PG_PATH}].last()}>2PostgreSQL count files in ./archive_status on {HOSTNAME} more than 2030{PostgresPro-Linux:pgsql.checkpoint.count_wal[{$PG_CONNINFO},{$PG_PATH}].last()}>12PostgreSQL required checkpoints occurs to frequently on {HOSTNAME}030 {PostgresPro-Linux:pgsql.connections.total[{$PG_CONNINFO},{$PG_PATH}].last()}/{PostgresPro-Linux:pgsql.connections.max_connections[{$PG_CONNINFO},{$PG_PATH}].last()}*100 >90PostgreSQL many connections on {HOSTNAME} (total connections more than 90% max connections)030{PostgresPro-Linux:mamonsu.plugin.keepalive.nodata(180)}=1Mamonsu nodata from {HOSTNAME}030{PostgresPro-Linux:pgsql.memory_leak_diagnostic.msg_text[].strlen()}>1PostgreSQL: number of pids which private anonymous memory exceeds private_anon_mem_threshold on {HOSTNAME}. {ITEM.LASTVALUE}030{PostgresPro-Linux:pgsql.oldest.xid_age[{$PG_CONNINFO},{$PG_PATH}].last()}>18000000PostgreSQL oldest xid is too big on {HOSTNAME}030{PostgresPro-Linux:pgsql.oldest.transaction_time[{$PG_CONNINFO},{$PG_PATH}].last()}>18000PostgreSQL query running is too old on {HOSTNAME}030{PostgresPro-Linux:pgsql.uptime[{$PG_CONNINFO},{$PG_PATH}].last()}<600PostgreSQL service was restarted on {HOSTNAME} (uptime={ITEM.LASTVALUE})030{PostgresPro-Linux:pgsql.cache.hit[{$PG_CONNINFO},{$PG_PATH}].last()}<80PostgreSQL cache hit ratio too low on {HOSTNAME} ({ITEM.LASTVALUE})030{PostgresPro-Linux:pgsql.ping[{$PG_CONNINFO},{$PG_PATH}].nodata(180)}=1PostgreSQL no ping from PostgreSQL for 3 minutes {HOSTNAME} 030{PostgresPro-Linux:pgsql.prepared.oldest.last()}>60PostgreSQL prepared transaction is too old on {HOSTNAME}030{PostgresPro-Linux:system.processes.forkrate.min(5m)}>500Process fork-rate to frequently on {HOSTNAME}030{PostgresPro-Linux:system.up_time.last()}<300System was restarted on {HOSTNAME} (up_time={ITEM.LASTVALUE})030{PostgresPro-Linux:pgsql.replication_lag.sec[{$PG_CONNINFO},{$PG_PATH}].last()}>300PostgreSQL streaming lag too high on {HOSTNAME} (value={ITEM.LASTVALUE})030{PostgresPro-Linux:pgsql.replication.non_active_slots[{$PG_CONNINFO},{$PG_PATH}].last()}#0PostgreSQL number of non-active replication slots on {HOSTNAME} (value={ITEM.LASTVALUE})030 - PostgreSQL archive command archive_status 9002000.0100.0110100.00.0000000FF0000020PostgresPro-Linuxpgsql.archive_command.count_files_to_archive[{$PG_CONNINFO},{$PG_PATH}]1000FF00120PostgresPro-Linuxpgsql.archive_command.size_files_to_archive[{$PG_CONNINFO},{$PG_PATH}]PostgreSQL archive command trying_to_archive 9002000.0100.0110100.00.000000000F000020PostgresPro-Linuxpgsql.archive_command.archived_files[{$PG_CONNINFO},{$PG_PATH}]10FF0000120PostgresPro-Linuxpgsql.archive_command.failed_trying_to_archive[{$PG_CONNINFO},{$PG_PATH}]PostgreSQL bgwriter9002000.0100.0110100.00.0000000CCCC00120PostgresPro-Linuxpgsql.bgwriter.buffers_checkpoint[{$PG_CONNINFO},{$PG_PATH}]100000CC120PostgresPro-Linuxpgsql.bgwriter.buffers_clean[{$PG_CONNINFO},{$PG_PATH}]20777777020PostgresPro-Linuxpgsql.bgwriter.maxwritten_clean[{$PG_CONNINFO},{$PG_PATH}]30CC0000120PostgresPro-Linuxpgsql.bgwriter.buffers_backend[{$PG_CONNINFO},{$PG_PATH}]40CC00CC020PostgresPro-Linuxpgsql.bgwriter.buffers_backend_fsync[{$PG_CONNINFO},{$PG_PATH}]5000CC00120PostgresPro-Linuxpgsql.bgwriter.buffers_alloc[{$PG_CONNINFO},{$PG_PATH}]PostgreSQL checkpoints9002000.0100.0110100.00.000000000CC00020PostgresPro-Linuxpgsql.checkpoint.count_timed[{$PG_CONNINFO},{$PG_PATH}]10CC0000020PostgresPro-Linuxpgsql.checkpoint.count_wal[{$PG_CONNINFO},{$PG_PATH}]200000CC120PostgresPro-Linuxpgsql.checkpoint.write_time[{$PG_CONNINFO},{$PG_PATH}]30000000120PostgresPro-Linuxpgsql.checkpoint.checkpoint_sync_time[{$PG_CONNINFO},{$PG_PATH}]PostgreSQL connections9002000.0100.0110100.00.000000000BB00020PostgresPro-Linuxpgsql.connections.active[{$PG_CONNINFO},{$PG_PATH}]100000BB020PostgresPro-Linuxpgsql.connections.idle[{$PG_CONNINFO},{$PG_PATH}]20CC00CC020PostgresPro-Linuxpgsql.connections.idle_in_transaction[{$PG_CONNINFO},{$PG_PATH}]30CCCCCC020PostgresPro-Linuxpgsql.connections.idle_in_transaction_aborted[{$PG_CONNINFO},{$PG_PATH}]40CCCC00020PostgresPro-Linuxpgsql.connections.fastpath_function_call[{$PG_CONNINFO},{$PG_PATH}]5000CCCC020PostgresPro-Linuxpgsql.connections.disabled[{$PG_CONNINFO},{$PG_PATH}]60EEEEEE020PostgresPro-Linuxpgsql.connections.total[{$PG_CONNINFO},{$PG_PATH}]70BB0000020PostgresPro-Linuxpgsql.connections.waiting[{$PG_CONNINFO},{$PG_PATH}]8000BB00020PostgresPro-Linuxpgsql.connections.max_connections[{$PG_CONNINFO},{$PG_PATH}]Block devices: read/write operations9002000.0100.0110100.00.0000000CC0000020PostgresPro-Linuxsystem.disk.all_read100000CC020PostgresPro-Linuxsystem.disk.all_writeBlock devices: read/write bytes9002000.0100.0110100.00.0000000CC0000020PostgresPro-Linuxsystem.disk.all_read_b100000CC020PostgresPro-Linuxsystem.disk.all_write_bPostgreSQL instance: rate9002000.0100.0110100.00.00000000000CC120PostgresPro-Linuxpgsql.transactions.total[{$PG_CONNINFO},{$PG_PATH}]1000CC00020PostgresPro-Linuxpgsql.blocks.hit[{$PG_CONNINFO},{$PG_PATH}]20CC0000020PostgresPro-Linuxpgsql.blocks.read[{$PG_CONNINFO},{$PG_PATH}]PostgreSQL instance: events9002000.0100.0110100.00.00000000000CC020PostgresPro-Linuxpgsql.events.conflicts[{$PG_CONNINFO},{$PG_PATH}]10000000020PostgresPro-Linuxpgsql.events.deadlocks[{$PG_CONNINFO},{$PG_PATH}]20CC0000020PostgresPro-Linuxpgsql.events.xact_rollback[{$PG_CONNINFO},{$PG_PATH}]3000FF00020PostgresPro-Linuxpgsql.events.checksum_failures[{$PG_CONNINFO},{$PG_PATH}]PostgreSQL instance: temp files9002000.0100.0110100.00.0000000CC0000020PostgresPro-Linuxpgsql.temp.bytes[{$PG_CONNINFO},{$PG_PATH}]100000CC120PostgresPro-Linuxpgsql.temp.files[{$PG_CONNINFO},{$PG_PATH}]PostgreSQL instance: tuples9002000.0100.0110100.00.0000000000000020PostgresPro-Linuxpgsql.tuples.deleted[{$PG_CONNINFO},{$PG_PATH}]100000CC020PostgresPro-Linuxpgsql.tuples.fetched[{$PG_CONNINFO},{$PG_PATH}]2000CC00020PostgresPro-Linuxpgsql.tuples.inserted[{$PG_CONNINFO},{$PG_PATH}]30CC00CC120PostgresPro-Linuxpgsql.tuples.returned[{$PG_CONNINFO},{$PG_PATH}]40CC0000020PostgresPro-Linuxpgsql.tuples.updated[{$PG_CONNINFO},{$PG_PATH}]System load average9002000.0100.0110100.00.000000000CC00020PostgresPro-Linuxsystem.la.1Memory overview9004000.0100.0111100.00.0000000CC0000020PostgresPro-Linuxsystem.memory.apps1000CC00020PostgresPro-Linuxsystem.memory.buffers200000CC020PostgresPro-Linuxsystem.memory.swap30CC00CC020PostgresPro-Linuxsystem.memory.cached40000000020PostgresPro-Linuxsystem.memory.unused50CCCC00020PostgresPro-Linuxsystem.memory.slab60777777020PostgresPro-Linuxsystem.memory.swap_cache70770000020PostgresPro-Linuxsystem.memory.page_tables80000077020PostgresPro-Linuxsystem.memory.vmalloc_used90007700020PostgresPro-Linuxsystem.memory.committed100DF0000020PostgresPro-Linuxsystem.memory.mapped11000DF00020PostgresPro-Linuxsystem.memory.active1200000DF020PostgresPro-Linuxsystem.memory.inactivePostgreSQL: number of pids which private anonymous memory exceeds private_anon_mem_threshold9002000.0100.0110100.00.0000000FF0000020PostgresPro-Linuxpgsql.memory_leak_diagnostic.count_diff[]PostgreSQL oldest transaction running time9002000.0100.0110100.00.000000000CC00020PostgresPro-Linuxpgsql.oldest.transaction_time[{$PG_CONNINFO},{$PG_PATH}]PostgreSQL age of oldest xid9002000.0100.0110100.00.000000000CC00020PostgresPro-Linuxpgsql.oldest.xid_age[{$PG_CONNINFO},{$PG_PATH}]PostgreSQL number of parallel queries being executed now9002000.0100.0110100.00.00000000000CC020PostgresPro-Linuxpgsql.parallel.queries[{$PG_CONNINFO},{$PG_PATH}]System: count of opened files9002000.0100.0110100.00.000000000CC00020PostgresPro-Linuxsystem.open_filesPostgreSQL: shared buffer9002000.0100.0110100.00.00000000000CC020PostgresPro-Linuxpgsql.buffers.size[{$PG_CONNINFO},{$PG_PATH}]10CC0000020PostgresPro-Linuxpgsql.buffers.twice_used[{$PG_CONNINFO},{$PG_PATH}]2000CC00020PostgresPro-Linuxpgsql.buffers.dirty[{$PG_CONNINFO},{$PG_PATH}]PostgreSQL uptime9002000.0100.0110100.00.000000000CC00020PostgresPro-Linuxpgsql.cache.hit[{$PG_CONNINFO},{$PG_PATH}]10DF0101120PostgresPro-Linuxpgsql.uptime[{$PG_CONNINFO},{$PG_PATH}]PostgreSQL locks sampling9002000.0100.0110100.00.00000000000CC020PostgresPro-Linuxpgsql.pg_locks.accessshare[{$PG_CONNINFO},{$PG_PATH}]1000CC00020PostgresPro-Linuxpgsql.pg_locks.rowshare[{$PG_CONNINFO},{$PG_PATH}]20CC0000020PostgresPro-Linuxpgsql.pg_locks.rowexclusive[{$PG_CONNINFO},{$PG_PATH}]30CC00CC020PostgresPro-Linuxpgsql.pg_locks.shareupdateexclusive[{$PG_CONNINFO},{$PG_PATH}]40777777020PostgresPro-Linuxpgsql.pg_locks.share[{$PG_CONNINFO},{$PG_PATH}]50CCCCCC020PostgresPro-Linuxpgsql.pg_locks.sharerowexclusive[{$PG_CONNINFO},{$PG_PATH}]60CCCC00020PostgresPro-Linuxpgsql.pg_locks.exclusive[{$PG_CONNINFO},{$PG_PATH}]7000CCCC020PostgresPro-Linuxpgsql.pg_locks.accessexclusive[{$PG_CONNINFO},{$PG_PATH}]PostgreSQL statements: bytes9002000.0100.0110100.00.0000000BBBB00020PostgresPro-Linuxpgsql.stat.read_bytes[{$PG_CONNINFO},{$PG_PATH}]1000CC00020PostgresPro-Linuxpgsql.stat.write_bytes[{$PG_CONNINFO},{$PG_PATH}]200000CC020PostgresPro-Linuxpgsql.stat.dirty_bytes[{$PG_CONNINFO},{$PG_PATH}]PostgreSQL statements: spend time9002000.0100.0111100.00.000000000CC00020PostgresPro-Linuxpgsql.stat.read_time[{$PG_CONNINFO},{$PG_PATH}]100000CC020PostgresPro-Linuxpgsql.stat.write_time[{$PG_CONNINFO},{$PG_PATH}]20BBBB00020PostgresPro-Linuxpgsql.stat.other_time[{$PG_CONNINFO},{$PG_PATH}]PostgreSQL statements: wal statistics9002000.0100.0110100.00.0000000BCC000020PostgresPro-Linuxpgsql.stat.wal_bytes[{$PG_CONNINFO},{$PG_PATH}]10CC6600020PostgresPro-Linuxpgsql.stat.wal_records[{$PG_CONNINFO},{$PG_PATH}]2000CCCC020PostgresPro-Linuxpgsql.stat.wal_fpi[{$PG_CONNINFO},{$PG_PATH}]PostgreSQL prepared transaction9002000.0100.0110100.00.000000000BB00020PostgresPro-Linuxpgsql.prepared.count100000BB120PostgresPro-Linuxpgsql.prepared.oldestProcesses overview9002000.0100.0110100.00.0000000CC0000020PostgresPro-Linuxsystem.processes.running1000CC00020PostgresPro-Linuxsystem.processes.blocked200000CC120PostgresPro-Linuxsystem.processes.forkrateCPU time spent9002000.0100.0111100.00.00000000000CC020PostgresPro-Linuxsystem.cpu.user10CC00CC020PostgresPro-Linuxsystem.cpu.nice20CC0000020PostgresPro-Linuxsystem.cpu.system3000CC00020PostgresPro-Linuxsystem.cpu.idle40CCCC00020PostgresPro-Linuxsystem.cpu.iowait50777777020PostgresPro-Linuxsystem.cpu.irq60000077020PostgresPro-Linuxsystem.cpu.softirqSystem up_time9002000.0100.0110100.00.000000000CC00020PostgresPro-Linuxsystem.up_timePostgreSQL write-ahead log generation speed9002000.0100.0110100.00.0000000CC0000020PostgresPro-Linuxpgsql.wal.write[{$PG_CONNINFO},{$PG_PATH}]PostgreSQL replication lag in second9002000.0100.0110100.00.0000000CC0000020PostgresPro-Linuxpgsql.replication_lag.sec[{$PG_CONNINFO},{$PG_PATH}]PostgreSQL count of xlog files9002000.0100.0110100.00.0000000CC0000020PostgresPro-Linuxpgsql.wal.count[{$PG_CONNINFO},{$PG_PATH}] - \ No newline at end of file diff --git a/packaging/conf/old_templates/template_3.5.1_agent.xml b/packaging/conf/old_templates/template_3.5.1_agent.xml new file mode 100644 index 0000000..81d0fad --- /dev/null +++ b/packaging/conf/old_templates/template_3.5.1_agent.xml @@ -0,0 +1,32 @@ + + + 3.0 + + + Templates + + + + + + {Mamonsu PostgreSQL Linux:pgsql.archive_command.count_files_to_archive[{$PG_CONNINFO},{$PG_PATH}].last()}>2PostgreSQL Archiver: count files need to archive on {HOSTNAME} more than 2030{Mamonsu PostgreSQL Linux:pgsql.checkpoint.count_wal[{$PG_CONNINFO},{$PG_PATH}].last()}>12PostgreSQL Checkpoints: required checkpoints occurs too frequently on {HOSTNAME}030 {Mamonsu PostgreSQL Linux:pgsql.connections.total[{$PG_CONNINFO},{$PG_PATH}].last()}/{Mamonsu PostgreSQL Linux:pgsql.connections.max_connections[{$PG_CONNINFO},{$PG_PATH}].last()}*100 >90PostgreSQL Connections: too many connections on {HOSTNAME} (total connections more than 90% of max_connections)030{Mamonsu PostgreSQL Linux:mamonsu.plugin.keepalive.nodata(180)}=1Mamonsu nodata from {HOSTNAME}030{Mamonsu PostgreSQL Linux:pgsql.server_mode.change()}>0PostgreSQL Instance: server mode has been changed on {HOSTNAME} to {ITEM.LASTVALUE}030{Mamonsu PostgreSQL Linux:pgsql.memory_leak_diagnostic.msg_text[].strlen()}>1PostgreSQL Memory Leak: Number of Pids Which Private Anonymous Memory Exceeds private_anon_mem_threshold on {HOSTNAME}. {ITEM.LASTVALUE}030{Mamonsu PostgreSQL Linux:pgsql.oldest.xid_age[{$PG_CONNINFO},{$PG_PATH}].last()}>18000000PostgreSQL Transactions: the oldest XID is too big on {HOSTNAME}030{Mamonsu PostgreSQL Linux:pgsql.oldest.transaction_time[{$PG_CONNINFO},{$PG_PATH}].last()}>18000PostgreSQL Transactions: running transaction is too old on {HOSTNAME}030{Mamonsu PostgreSQL Linux:pgsql.uptime[{$PG_CONNINFO},{$PG_PATH}].change()}>600PostgreSQL Health: service has been restarted on {HOSTNAME} (uptime={ITEM.LASTVALUE})030{Mamonsu PostgreSQL Linux:pgsql.cache.hit[{$PG_CONNINFO},{$PG_PATH}].last()}<80PostgreSQL Health: cache hit ratio too low on {HOSTNAME} ({ITEM.LASTVALUE})030{Mamonsu PostgreSQL Linux:pgsql.ping[{$PG_CONNINFO},{$PG_PATH}].nodata(180)}=1PostgreSQL Health: no ping from PostgreSQL for 3 minutes on {HOSTNAME}030{Mamonsu PostgreSQL Linux:pgsql.prepared.oldest.last()}>60PostgreSQL Prepared Transactions: prepared transaction is too old on {HOSTNAME}030{Mamonsu PostgreSQL Linux:system.processes.forkrate.min(5m)}>500Process fork-rate too frequently on {HOSTNAME}030{Mamonsu PostgreSQL Linux:pgsql.replication_lag.sec[{$PG_CONNINFO},{$PG_PATH}].last()}>300PostgreSQL streaming lag too high on {HOSTNAME} (value={ITEM.LASTVALUE})030{Mamonsu PostgreSQL Linux:pgsql.replication.non_active_slots[{$PG_CONNINFO},{$PG_PATH}].last()}>0PostgreSQL number of non-active replication slots on {HOSTNAME} (value={ITEM.LASTVALUE})030{Mamonsu PostgreSQL Linux:system.uptime.last()}<300System was restarted on {HOSTNAME} (uptime={ITEM.LASTVALUE})030 + PostgreSQL Archiver: Archive Status9002000.0100.0110100.00.0000002006AAE020Mamonsu PostgreSQL Linuxpgsql.archive_command.count_files_to_archive[{$PG_CONNINFO},{$PG_PATH}]1200CC00020Mamonsu PostgreSQL Linuxpgsql.archive_command.archived_files[{$PG_CONNINFO},{$PG_PATH}]22FF5656020Mamonsu PostgreSQL Linuxpgsql.archive_command.failed_trying_to_archive[{$PG_CONNINFO},{$PG_PATH}]PostgreSQL bgwriter: Buffers9002000.0100.0110100.00.0000002006AAE020Mamonsu PostgreSQL Linuxpgsql.bgwriter.buffers_checkpoint[{$PG_CONNINFO},{$PG_PATH}]1200CC00020Mamonsu PostgreSQL Linuxpgsql.bgwriter.buffers_clean[{$PG_CONNINFO},{$PG_PATH}]229C8A4E020Mamonsu PostgreSQL Linuxpgsql.bgwriter.buffers_backend[{$PG_CONNINFO},{$PG_PATH}]32FF5656020Mamonsu PostgreSQL Linuxpgsql.bgwriter.buffers_alloc[{$PG_CONNINFO},{$PG_PATH}]PostgreSQL bgwriter: Events9002000.0100.0110100.00.0000002FF5656020Mamonsu PostgreSQL Linuxpgsql.bgwriter.maxwritten_clean[{$PG_CONNINFO},{$PG_PATH}]1200CC00020Mamonsu PostgreSQL Linuxpgsql.bgwriter.buffers_backend_fsync[{$PG_CONNINFO},{$PG_PATH}]PostgreSQL Checkpoints: Count (in hour)9002000.0100.0110100.00.000000200CC00020Mamonsu PostgreSQL Linuxpgsql.checkpoint.count_timed[{$PG_CONNINFO},{$PG_PATH}]12FF5656020Mamonsu PostgreSQL Linuxpgsql.checkpoint.count_wal[{$PG_CONNINFO},{$PG_PATH}]PostgreSQL Checkpoints: Write/Sync9002000.0100.0110100.00.000000200CC00020Mamonsu PostgreSQL Linuxpgsql.checkpoint.write_time[{$PG_CONNINFO},{$PG_PATH}]12FF5656020Mamonsu PostgreSQL Linuxpgsql.checkpoint.checkpoint_sync_time[{$PG_CONNINFO},{$PG_PATH}]PostgreSQL Connections: Overview9002000.0100.0111100.00.000000200CC00020Mamonsu PostgreSQL Linuxpgsql.connections.active[{$PG_CONNINFO},{$PG_PATH}]12A39B98020Mamonsu PostgreSQL Linuxpgsql.connections.idle[{$PG_CONNINFO},{$PG_PATH}]229C8A4E020Mamonsu PostgreSQL Linuxpgsql.connections.idle_in_transaction[{$PG_CONNINFO},{$PG_PATH}]32F6CB93020Mamonsu PostgreSQL Linuxpgsql.connections.idle_in_transaction_aborted[{$PG_CONNINFO},{$PG_PATH}]4200B0B8020Mamonsu PostgreSQL Linuxpgsql.connections.fastpath_function_call[{$PG_CONNINFO},{$PG_PATH}]523B415A020Mamonsu PostgreSQL Linuxpgsql.connections.disabled[{$PG_CONNINFO},{$PG_PATH}]62FF5656020Mamonsu PostgreSQL Linuxpgsql.connections.total[{$PG_CONNINFO},{$PG_PATH}]72006AAE020Mamonsu PostgreSQL Linuxpgsql.connections.waiting[{$PG_CONNINFO},{$PG_PATH}]8287C2B9020Mamonsu PostgreSQL Linuxpgsql.connections.other[{$PG_CONNINFO},{$PG_PATH}]PostgreSQL Autovacuum: Count of Autovacuum Workers9002000.0100.0110100.00.000000287C2B9020Mamonsu PostgreSQL Linuxpgsql.autovacumm.count[{$PG_CONNINFO},{$PG_PATH}]System: Block Devices Read/Write Operations9002000.0100.0110100.00.000000200CC00020Mamonsu PostgreSQL Linuxsystem.disk.all_read12FF5656020Mamonsu PostgreSQL Linuxsystem.disk.all_writeSystem: Block Devices Read/Write Bytes9002000.0100.0110100.00.000000200CC00020Mamonsu PostgreSQL Linuxsystem.disk.all_read_b12FF5656020Mamonsu PostgreSQL Linuxsystem.disk.all_write_bPostgreSQL Instance: Blocks Rate9002000.0100.0110100.00.000000287C2B9020Mamonsu PostgreSQL Linuxpgsql.blocks.hit[{$PG_CONNINFO},{$PG_PATH}]12793F5D020Mamonsu PostgreSQL Linuxpgsql.blocks.read[{$PG_CONNINFO},{$PG_PATH}]PostgreSQL Instance: Transactions Rate9002000.0100.0110100.00.000000200CC00020Mamonsu PostgreSQL Linuxpgsql.transactions.committed[{$PG_CONNINFO},{$PG_PATH}]12FF5656020Mamonsu PostgreSQL Linuxpgsql.events.xact_rollback[{$PG_CONNINFO},{$PG_PATH}]PostgreSQL Instance: Events9002000.0100.0110100.00.000000200CC00020Mamonsu PostgreSQL Linuxpgsql.events.conflicts[{$PG_CONNINFO},{$PG_PATH}]12FF5656020Mamonsu PostgreSQL Linuxpgsql.events.deadlocks[{$PG_CONNINFO},{$PG_PATH}]22006AAE020Mamonsu PostgreSQL Linuxpgsql.events.checksum_failures[{$PG_CONNINFO},{$PG_PATH}]PostgreSQL Instance: Temp Files9002000.0100.0110100.00.000000200B0B8020Mamonsu PostgreSQL Linuxpgsql.temp.bytes[{$PG_CONNINFO},{$PG_PATH}]12006AAE120Mamonsu PostgreSQL Linuxpgsql.temp.files[{$PG_CONNINFO},{$PG_PATH}]PostgreSQL Instance: Tuples9002000.0100.0110100.00.0000002FF5656020Mamonsu PostgreSQL Linuxpgsql.tuples.deleted[{$PG_CONNINFO},{$PG_PATH}]12006AAE020Mamonsu PostgreSQL Linuxpgsql.tuples.fetched[{$PG_CONNINFO},{$PG_PATH}]2200CC00020Mamonsu PostgreSQL Linuxpgsql.tuples.inserted[{$PG_CONNINFO},{$PG_PATH}]32001219120Mamonsu PostgreSQL Linuxpgsql.tuples.returned[{$PG_CONNINFO},{$PG_PATH}]429C8A4E020Mamonsu PostgreSQL Linuxpgsql.tuples.updated[{$PG_CONNINFO},{$PG_PATH}]System: Server Memory Detailed Overview9004000.0100.0111100.00.0000000BAEB6B020Mamonsu PostgreSQL Linuxsystem.memory.active1000CC00020Mamonsu PostgreSQL Linuxsystem.memory.available2000B0B8020Mamonsu PostgreSQL Linuxsystem.memory.buffers3052768F020Mamonsu PostgreSQL Linuxsystem.memory.cached409C8A4E020Mamonsu PostgreSQL Linuxsystem.memory.committed50A39B98020Mamonsu PostgreSQL Linuxsystem.memory.inactive609F1E28020Mamonsu PostgreSQL Linuxsystem.memory.mapped70793F5D020Mamonsu PostgreSQL Linuxsystem.memory.page_tables80F6CB93020Mamonsu PostgreSQL Linuxsystem.memory.slab90006AAE020Mamonsu PostgreSQL Linuxsystem.memory.swap10087C2B9020Mamonsu PostgreSQL Linuxsystem.memory.swap_cache1103B415A020Mamonsu PostgreSQL Linuxsystem.memory.unused120001219020Mamonsu PostgreSQL Linuxsystem.memory.used130CF6518020Mamonsu PostgreSQL Linuxsystem.memory.vmalloc_usedSystem: Server Free/Used Memory Overview9004000.0100.0110100.00.0000001001219020Mamonsu PostgreSQL Linuxsystem.memory.used1152768F020Mamonsu PostgreSQL Linuxsystem.memory.cached2100CC00020Mamonsu PostgreSQL Linuxsystem.memory.available34FF5656020Mamonsu PostgreSQL Linuxsystem.memory.totalPostgreSQL pg_buffercache: Shared Buffer9002000.0100.0110100.00.000000200CC00020Mamonsu PostgreSQL Linuxpgsql.buffers.size[{$PG_CONNINFO},{$PG_PATH}]12006AAE020Mamonsu PostgreSQL Linuxpgsql.buffers.twice_used[{$PG_CONNINFO},{$PG_PATH}]22FF5656020Mamonsu PostgreSQL Linuxpgsql.buffers.dirty[{$PG_CONNINFO},{$PG_PATH}]PostgreSQL: Locks Sampling9002000.0100.0110100.00.000000200CC00020Mamonsu PostgreSQL Linuxpgsql.pg_locks.accessshare[{$PG_CONNINFO},{$PG_PATH}]123B415A020Mamonsu PostgreSQL Linuxpgsql.pg_locks.rowshare[{$PG_CONNINFO},{$PG_PATH}]22FF5656020Mamonsu PostgreSQL Linuxpgsql.pg_locks.rowexclusive[{$PG_CONNINFO},{$PG_PATH}]32F6CB93020Mamonsu PostgreSQL Linuxpgsql.pg_locks.shareupdateexclusive[{$PG_CONNINFO},{$PG_PATH}]42006AAE020Mamonsu PostgreSQL Linuxpgsql.pg_locks.share[{$PG_CONNINFO},{$PG_PATH}]5200B0B8020Mamonsu PostgreSQL Linuxpgsql.pg_locks.sharerowexclusive[{$PG_CONNINFO},{$PG_PATH}]629C8A4E020Mamonsu PostgreSQL Linuxpgsql.pg_locks.exclusive[{$PG_CONNINFO},{$PG_PATH}]72793F5D020Mamonsu PostgreSQL Linuxpgsql.pg_locks.accessexclusive[{$PG_CONNINFO},{$PG_PATH}]PostgreSQL Prepared Transactions: Overview9002000.0100.0110100.00.0000002A39B98020Mamonsu PostgreSQL Linuxpgsql.prepared.count129C8A4E120Mamonsu PostgreSQL Linuxpgsql.prepared.oldestSystem: Processes Overview9002000.0100.0110100.00.000000200CC00020Mamonsu PostgreSQL Linuxsystem.processes.running12FF5656020Mamonsu PostgreSQL Linuxsystem.processes.blocked22006AAE120Mamonsu PostgreSQL Linuxsystem.processes.forkrateSystem: CPU Time Spent9002000.0100.0111100.00.000000200CC00020Mamonsu PostgreSQL Linuxsystem.cpu.user12793F5D020Mamonsu PostgreSQL Linuxsystem.cpu.nice229C8A4E020Mamonsu PostgreSQL Linuxsystem.cpu.system32A39B98020Mamonsu PostgreSQL Linuxsystem.cpu.idle42006AAE020Mamonsu PostgreSQL Linuxsystem.cpu.iowait52FF5656020Mamonsu PostgreSQL Linuxsystem.cpu.irq62F6CB93020Mamonsu PostgreSQL Linuxsystem.cpu.softirqPostgreSQL Statements: Bytes9002000.0100.0110100.00.000000287C2B9020Mamonsu PostgreSQL Linuxpgsql.stat.read_bytes[{$PG_CONNINFO},{$PG_PATH}]12793F5D020Mamonsu PostgreSQL Linuxpgsql.stat.write_bytes[{$PG_CONNINFO},{$PG_PATH}]229C8A4E020Mamonsu PostgreSQL Linuxpgsql.stat.dirty_bytes[{$PG_CONNINFO},{$PG_PATH}]PostgreSQL Statements: Spent Time9002000.0100.0111100.00.000000287C2B9020Mamonsu PostgreSQL Linuxpgsql.stat.read_time[{$PG_CONNINFO},{$PG_PATH}]12793F5D020Mamonsu PostgreSQL Linuxpgsql.stat.write_time[{$PG_CONNINFO},{$PG_PATH}]229C8A4E020Mamonsu PostgreSQL Linuxpgsql.stat.other_time[{$PG_CONNINFO},{$PG_PATH}]PostgreSQL Statements: WAL Statistics9002000.0100.0110100.00.000000200B0B8020Mamonsu PostgreSQL Linuxpgsql.stat.wal_bytes[{$PG_CONNINFO},{$PG_PATH}]12006AAE020Mamonsu PostgreSQL Linuxpgsql.stat.wal_records[{$PG_CONNINFO},{$PG_PATH}]229C8A4E020Mamonsu PostgreSQL Linuxpgsql.stat.wal_fpi[{$PG_CONNINFO},{$PG_PATH}] + \ No newline at end of file diff --git a/packaging/conf/old_templates/template_3.5.1_linux.xml b/packaging/conf/old_templates/template_3.5.1_linux.xml new file mode 100644 index 0000000..dce07f0 --- /dev/null +++ b/packaging/conf/old_templates/template_3.5.1_linux.xml @@ -0,0 +1,32 @@ + + + 3.0 + + + Templates + + + + + + {Mamonsu PostgreSQL Linux:pgsql.archive_command[count_files_to_archive].last()}>2PostgreSQL Archiver: count files need to archive on {HOSTNAME} more than 2030{Mamonsu PostgreSQL Linux:pgsql.checkpoint[count_wal].last()}>12PostgreSQL Checkpoints: required checkpoints occurs too frequently on {HOSTNAME}030 {Mamonsu PostgreSQL Linux:pgsql.connections[total].last()}/{Mamonsu PostgreSQL Linux:pgsql.connections[max_connections].last()}*100 >90PostgreSQL Connections: too many connections on {HOSTNAME} (total connections more than 90% of max_connections)030{Mamonsu PostgreSQL Linux:mamonsu.plugin.errors[].strlen()}>1Mamonsu plugin errors on {HOSTNAME}. {ITEM.LASTVALUE}030{Mamonsu PostgreSQL Linux:mamonsu.plugin.keepalive[].nodata(180)}=1Mamonsu nodata from {HOSTNAME}030{Mamonsu PostgreSQL Linux:mamonsu.memory.rss[max].last()}>41943040Mamonsu agent memory usage alert on {HOSTNAME}: {ITEM.LASTVALUE} bytes030{Mamonsu PostgreSQL Linux:pgsql.server_mode.change()}>0PostgreSQL Instance: server mode has been changed on {HOSTNAME} to {ITEM.LASTVALUE}030{Mamonsu PostgreSQL Linux:pgsql.memory_leak_diagnostic.msg_text[].strlen()}>1PostgreSQL Memory Leak: Number of Pids Which Private Anonymous Memory Exceeds private_anon_mem_threshold on {HOSTNAME}. {ITEM.LASTVALUE}030{Mamonsu PostgreSQL Linux:pgsql.oldest[xid_age].last()}>18000000PostgreSQL Transactions: the oldest XID is too big on {HOSTNAME}030{Mamonsu PostgreSQL Linux:pgsql.oldest[transaction_time].last()}>18000PostgreSQL Transactions: running transaction is too old on {HOSTNAME}030{Mamonsu PostgreSQL Linux:pgsql.uptime[].change()}>600PostgreSQL Health: service has been restarted on {HOSTNAME} (uptime={ITEM.LASTVALUE})030{Mamonsu PostgreSQL Linux:pgsql.cache[hit].last()}<80PostgreSQL Health: cache hit ratio too low on {HOSTNAME} ({ITEM.LASTVALUE})030{Mamonsu PostgreSQL Linux:pgsql.ping[].nodata(180)}=1PostgreSQL Health: no ping from PostgreSQL for 3 minutes on {HOSTNAME}030{Mamonsu PostgreSQL Linux:pgsql.prepared.oldest.last()}>60PostgreSQL Prepared Transactions: prepared transaction is too old on {HOSTNAME}030{Mamonsu PostgreSQL Linux:system.processes[forkrate].min(5m)}>500Process fork-rate too frequently on {HOSTNAME}030{Mamonsu PostgreSQL Linux:pgsql.replication_lag[sec].last()}>300PostgreSQL streaming lag too high on {HOSTNAME} (value={ITEM.LASTVALUE})030{Mamonsu PostgreSQL Linux:pgsql.replication.non_active_slots[].last()}>0PostgreSQL number of non-active replication slots on {HOSTNAME} (value={ITEM.LASTVALUE})030{Mamonsu PostgreSQL Linux:system.uptime[].last()}<300System was restarted on {HOSTNAME} (uptime={ITEM.LASTVALUE})030 + PostgreSQL Archiver: Archive Status9002000.0100.0110100.00.0000002006AAE020Mamonsu PostgreSQL Linuxpgsql.archive_command[count_files_to_archive]1200CC00020Mamonsu PostgreSQL Linuxpgsql.archive_command[archived_files]22FF5656020Mamonsu PostgreSQL Linuxpgsql.archive_command[failed_trying_to_archive]PostgreSQL bgwriter: Buffers9002000.0100.0110100.00.0000002006AAE020Mamonsu PostgreSQL Linuxpgsql.bgwriter[buffers_checkpoint]1200CC00020Mamonsu PostgreSQL Linuxpgsql.bgwriter[buffers_clean]229C8A4E020Mamonsu PostgreSQL Linuxpgsql.bgwriter[buffers_backend]32FF5656020Mamonsu PostgreSQL Linuxpgsql.bgwriter[buffers_alloc]PostgreSQL bgwriter: Events9002000.0100.0110100.00.0000002FF5656020Mamonsu PostgreSQL Linuxpgsql.bgwriter[maxwritten_clean]1200CC00020Mamonsu PostgreSQL Linuxpgsql.bgwriter[buffers_backend_fsync]PostgreSQL Checkpoints: Count (in hour)9002000.0100.0110100.00.000000200CC00020Mamonsu PostgreSQL Linuxpgsql.checkpoint[count_timed]12FF5656020Mamonsu PostgreSQL Linuxpgsql.checkpoint[count_wal]PostgreSQL Checkpoints: Write/Sync9002000.0100.0110100.00.000000200CC00020Mamonsu PostgreSQL Linuxpgsql.checkpoint[write_time]12FF5656020Mamonsu PostgreSQL Linuxpgsql.checkpoint[checkpoint_sync_time]PostgreSQL Connections: Overview9002000.0100.0111100.00.000000200CC00020Mamonsu PostgreSQL Linuxpgsql.connections[active]12A39B98020Mamonsu PostgreSQL Linuxpgsql.connections[idle]229C8A4E020Mamonsu PostgreSQL Linuxpgsql.connections[idle_in_transaction]32F6CB93020Mamonsu PostgreSQL Linuxpgsql.connections[idle_in_transaction_aborted]4200B0B8020Mamonsu PostgreSQL Linuxpgsql.connections[fastpath_function_call]523B415A020Mamonsu PostgreSQL Linuxpgsql.connections[disabled]62FF5656020Mamonsu PostgreSQL Linuxpgsql.connections[total]72006AAE020Mamonsu PostgreSQL Linuxpgsql.connections[waiting]8287C2B9020Mamonsu PostgreSQL Linuxpgsql.connections[other]PostgreSQL Autovacuum: Count of Autovacuum Workers9002000.0100.0110100.00.000000287C2B9020Mamonsu PostgreSQL Linuxpgsql.autovacumm.count[]System: Block Devices Read/Write Operations9002000.0100.0110100.00.000000200CC00020Mamonsu PostgreSQL Linuxsystem.disk.all_read[]12FF5656020Mamonsu PostgreSQL Linuxsystem.disk.all_write[]System: Block Devices Read/Write Bytes9002000.0100.0110100.00.000000200CC00020Mamonsu PostgreSQL Linuxsystem.disk.all_read_b[]12FF5656020Mamonsu PostgreSQL Linuxsystem.disk.all_write_b[]PostgreSQL Instance: Blocks Rate9002000.0100.0110100.00.000000287C2B9020Mamonsu PostgreSQL Linuxpgsql.blocks[hit]12793F5D020Mamonsu PostgreSQL Linuxpgsql.blocks[read]PostgreSQL Instance: Transactions Rate9002000.0100.0110100.00.000000200CC00020Mamonsu PostgreSQL Linuxpgsql.transactions[committed]12FF5656020Mamonsu PostgreSQL Linuxpgsql.events[xact_rollback]PostgreSQL Instance: Events9002000.0100.0110100.00.000000200CC00020Mamonsu PostgreSQL Linuxpgsql.events[conflicts]12FF5656020Mamonsu PostgreSQL Linuxpgsql.events[deadlocks]22006AAE020Mamonsu PostgreSQL Linuxpgsql.events[checksum_failures]PostgreSQL Instance: Temp Files9002000.0100.0110100.00.000000200B0B8020Mamonsu PostgreSQL Linuxpgsql.temp[bytes]12006AAE120Mamonsu PostgreSQL Linuxpgsql.temp[files]PostgreSQL Instance: Tuples9002000.0100.0110100.00.0000002FF5656020Mamonsu PostgreSQL Linuxpgsql.tuples[deleted]12006AAE020Mamonsu PostgreSQL Linuxpgsql.tuples[fetched]2200CC00020Mamonsu PostgreSQL Linuxpgsql.tuples[inserted]32001219120Mamonsu PostgreSQL Linuxpgsql.tuples[returned]429C8A4E020Mamonsu PostgreSQL Linuxpgsql.tuples[updated]System: Server Memory Detailed Overview9004000.0100.0111100.00.0000000BAEB6B020Mamonsu PostgreSQL Linuxsystem.memory[active]1000CC00020Mamonsu PostgreSQL Linuxsystem.memory[available]2000B0B8020Mamonsu PostgreSQL Linuxsystem.memory[buffers]3052768F020Mamonsu PostgreSQL Linuxsystem.memory[cached]409C8A4E020Mamonsu PostgreSQL Linuxsystem.memory[committed]50A39B98020Mamonsu PostgreSQL Linuxsystem.memory[inactive]609F1E28020Mamonsu PostgreSQL Linuxsystem.memory[mapped]70793F5D020Mamonsu PostgreSQL Linuxsystem.memory[page_tables]80F6CB93020Mamonsu PostgreSQL Linuxsystem.memory[slab]90006AAE020Mamonsu PostgreSQL Linuxsystem.memory[swap]10087C2B9020Mamonsu PostgreSQL Linuxsystem.memory[swap_cache]1103B415A020Mamonsu PostgreSQL Linuxsystem.memory[unused]120001219020Mamonsu PostgreSQL Linuxsystem.memory[used]130CF6518020Mamonsu PostgreSQL Linuxsystem.memory[vmalloc_used]System: Server Free/Used Memory Overview9004000.0100.0110100.00.0000001001219020Mamonsu PostgreSQL Linuxsystem.memory[used]1152768F020Mamonsu PostgreSQL Linuxsystem.memory[cached]2100CC00020Mamonsu PostgreSQL Linuxsystem.memory[available]34FF5656020Mamonsu PostgreSQL Linuxsystem.memory[total]PostgreSQL pg_buffercache: Shared Buffer9002000.0100.0110100.00.000000200CC00020Mamonsu PostgreSQL Linuxpgsql.buffers[size]12006AAE020Mamonsu PostgreSQL Linuxpgsql.buffers[twice_used]22FF5656020Mamonsu PostgreSQL Linuxpgsql.buffers[dirty]PostgreSQL: Locks Sampling9002000.0100.0110100.00.000000200CC00020Mamonsu PostgreSQL Linuxpgsql.pg_locks[accessshare]123B415A020Mamonsu PostgreSQL Linuxpgsql.pg_locks[rowshare]22FF5656020Mamonsu PostgreSQL Linuxpgsql.pg_locks[rowexclusive]32F6CB93020Mamonsu PostgreSQL Linuxpgsql.pg_locks[shareupdateexclusive]42006AAE020Mamonsu PostgreSQL Linuxpgsql.pg_locks[share]5200B0B8020Mamonsu PostgreSQL Linuxpgsql.pg_locks[sharerowexclusive]629C8A4E020Mamonsu PostgreSQL Linuxpgsql.pg_locks[exclusive]72793F5D020Mamonsu PostgreSQL Linuxpgsql.pg_locks[accessexclusive]PostgreSQL Prepared Transactions: Overview9002000.0100.0110100.00.0000002A39B98020Mamonsu PostgreSQL Linuxpgsql.prepared.count129C8A4E120Mamonsu PostgreSQL Linuxpgsql.prepared.oldestSystem: Processes Overview9002000.0100.0110100.00.000000200CC00020Mamonsu PostgreSQL Linuxsystem.processes[running]12FF5656020Mamonsu PostgreSQL Linuxsystem.processes[blocked]22006AAE120Mamonsu PostgreSQL Linuxsystem.processes[forkrate]System: CPU Time Spent9002000.0100.0111100.00.000000200CC00020Mamonsu PostgreSQL Linuxsystem.cpu[user]12793F5D020Mamonsu PostgreSQL Linuxsystem.cpu[nice]229C8A4E020Mamonsu PostgreSQL Linuxsystem.cpu[system]32A39B98020Mamonsu PostgreSQL Linuxsystem.cpu[idle]42006AAE020Mamonsu PostgreSQL Linuxsystem.cpu[iowait]52FF5656020Mamonsu PostgreSQL Linuxsystem.cpu[irq]62F6CB93020Mamonsu PostgreSQL Linuxsystem.cpu[softirq]PostgreSQL Statements: Bytes9002000.0100.0110100.00.000000287C2B9020Mamonsu PostgreSQL Linuxpgsql.stat[read_bytes]12793F5D020Mamonsu PostgreSQL Linuxpgsql.stat[write_bytes]229C8A4E020Mamonsu PostgreSQL Linuxpgsql.stat[dirty_bytes]PostgreSQL Statements: Spent Time9002000.0100.0111100.00.000000287C2B9020Mamonsu PostgreSQL Linuxpgsql.stat[read_time]12793F5D020Mamonsu PostgreSQL Linuxpgsql.stat[write_time]229C8A4E020Mamonsu PostgreSQL Linuxpgsql.stat[other_time]PostgreSQL Statements: WAL Statistics9002000.0100.0110100.00.000000200B0B8020Mamonsu PostgreSQL Linuxpgsql.stat[wal_bytes]12006AAE020Mamonsu PostgreSQL Linuxpgsql.stat[wal_records]229C8A4E020Mamonsu PostgreSQL Linuxpgsql.stat[wal_fpi]PostgreSQL Wait Sampling: Locks by Type9002000.0100.0111100.00.000000287C2B9020Mamonsu PostgreSQL Linuxpgsql.all_lock[lwlock]12793F5D020Mamonsu PostgreSQL Linuxpgsql.all_lock[hwlock]2200B0B8020Mamonsu PostgreSQL Linuxpgsql.all_lock[buffer]329C8A4E020Mamonsu PostgreSQL Linuxpgsql.all_lock[extension]42F6CB93020Mamonsu PostgreSQL Linuxpgsql.all_lock[client]523B415A020Mamonsu PostgreSQL Linuxpgsql.all_lock[other]PostgreSQL Wait Sampling: Heavyweight Locks9002000.0100.0111100.00.000000287C2B9020Mamonsu PostgreSQL Linuxpgsql.hwlock[relation]123B415A020Mamonsu PostgreSQL Linuxpgsql.hwlock[extend]22F6CB93020Mamonsu PostgreSQL Linuxpgsql.hwlock[page]32006AAE020Mamonsu PostgreSQL Linuxpgsql.hwlock[tuple]4200B0B8020Mamonsu PostgreSQL Linuxpgsql.hwlock[transactionid]52793F5D020Mamonsu PostgreSQL Linuxpgsql.hwlock[virtualxid]629C8A4E020Mamonsu PostgreSQL Linuxpgsql.hwlock[speculative_token]72A39B98020Mamonsu PostgreSQL Linuxpgsql.hwlock[object]8252768F020Mamonsu PostgreSQL Linuxpgsql.hwlock[userlock]92FE9430020Mamonsu PostgreSQL Linuxpgsql.hwlock[advisory]PostgreSQL Wait Sampling: Lightweight Locks9002000.0100.0111100.00.0000002793F5D020Mamonsu PostgreSQL Linuxpgsql.lwlock[xid]1200B0B8020Mamonsu PostgreSQL Linuxpgsql.lwlock[autovacuum]2287C2B9020Mamonsu PostgreSQL Linuxpgsql.lwlock[wal]32006AAE020Mamonsu PostgreSQL Linuxpgsql.lwlock[clog]423B415A020Mamonsu PostgreSQL Linuxpgsql.lwlock[replication]529C8A4E020Mamonsu PostgreSQL Linuxpgsql.lwlock[logical_replication]62F6CB93020Mamonsu PostgreSQL Linuxpgsql.lwlock[buffer]72A39B98020Mamonsu PostgreSQL Linuxpgsql.lwlock[other] + \ No newline at end of file diff --git a/packaging/conf/template_agent.xml b/packaging/conf/template_agent.xml index 93fa3ac..81d0fad 100644 --- a/packaging/conf/template_agent.xml +++ b/packaging/conf/template_agent.xml @@ -21,12 +21,12 @@ Mamonsu PostgreSQL Linux - PostgreSQL Archiver: Files in archive_status Need to Archive Count000pgsql.archive_command.count_files_to_archive[{$PG_CONNINFO},{$PG_PATH}]736501530000100Mamonsu PostgreSQL LinuxPostgreSQL Archiver: Files Need to Archive Size000pgsql.archive_command.size_files_to_archive[{$PG_CONNINFO},{$PG_PATH}]73650153b0000100Mamonsu PostgreSQL LinuxPostgreSQL Archiver: Archived Files Count000pgsql.archive_command.archived_files[{$PG_CONNINFO},{$PG_PATH}]736501532000100Mamonsu PostgreSQL LinuxPostgreSQL Archiver: Attempts to Archive Files Count000pgsql.archive_command.failed_trying_to_archive[{$PG_CONNINFO},{$PG_PATH}]736501532000100Mamonsu PostgreSQL LinuxPostgreSQL bgwriter: Buffers Written During Checkpoints000pgsql.bgwriter.buffers_checkpoint[{$PG_CONNINFO},{$PG_PATH}]736501532000100Mamonsu PostgreSQL LinuxPostgreSQL bgwriter: Buffers Written000pgsql.bgwriter.buffers_clean[{$PG_CONNINFO},{$PG_PATH}]736501532000100Mamonsu PostgreSQL LinuxPostgreSQL bgwriter: Number of bgwriter Stopped by Max Write Count000pgsql.bgwriter.maxwritten_clean[{$PG_CONNINFO},{$PG_PATH}]736501532000100Mamonsu PostgreSQL LinuxPostgreSQL bgwriter: Buffers Written Directly by a Backend000pgsql.bgwriter.buffers_backend[{$PG_CONNINFO},{$PG_PATH}]736501532000100Mamonsu PostgreSQL LinuxPostgreSQL bgwriter: Times a Backend Execute Its Own Fsync000pgsql.bgwriter.buffers_backend_fsync[{$PG_CONNINFO},{$PG_PATH}]736501532000100Mamonsu PostgreSQL LinuxPostgreSQL bgwriter: Buffers Allocated000pgsql.bgwriter.buffers_alloc[{$PG_CONNINFO},{$PG_PATH}]736501532000100Mamonsu PostgreSQL LinuxPostgreSQL Checkpoints: by Timeout (in hour)000pgsql.checkpoint.count_timed[{$PG_CONNINFO},{$PG_PATH}]7365030001000100Mamonsu PostgreSQL LinuxPostgreSQL Checkpoints: by WAL (in hour)000pgsql.checkpoint.count_wal[{$PG_CONNINFO},{$PG_PATH}]7365030001000100Mamonsu PostgreSQL LinuxPostgreSQL Checkpoints: Write Time000pgsql.checkpoint.write_time[{$PG_CONNINFO},{$PG_PATH}]736503000ms1000100Mamonsu PostgreSQL LinuxPostgreSQL Checkpoints: Sync Time000pgsql.checkpoint.checkpoint_sync_time[{$PG_CONNINFO},{$PG_PATH}]736503000ms1000100Mamonsu PostgreSQL LinuxPostgreSQL Connections: Number of Total User Connections000pgsql.connections.total[{$PG_CONNINFO},{$PG_PATH}]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Connections: Number of Waiting User Connections000pgsql.connections.waiting[{$PG_CONNINFO},{$PG_PATH}]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Connections: Max Connections000pgsql.connections.max_connections[{$PG_CONNINFO},{$PG_PATH}]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Connections: Number of Active User Connections000pgsql.connections.active[{$PG_CONNINFO},{$PG_PATH}]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Connections: Number of Idle User Connections000pgsql.connections.idle[{$PG_CONNINFO},{$PG_PATH}]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Connections: Number of Idle in Transaction User Connections000pgsql.connections.idle_in_transaction[{$PG_CONNINFO},{$PG_PATH}]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Connections: Number of Idle in Transaction (Aborted) User Connections000pgsql.connections.idle_in_transaction_aborted[{$PG_CONNINFO},{$PG_PATH}]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Connections: Number of Fastpath Function Call User Connections000pgsql.connections.fastpath_function_call[{$PG_CONNINFO},{$PG_PATH}]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Connections: Number of Disabled User Connections000pgsql.connections.disabled[{$PG_CONNINFO},{$PG_PATH}]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Connections: Number of Other Connections000pgsql.connections.other[{$PG_CONNINFO},{$PG_PATH}]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Autovacuum: Count of Autovacuum Workers000pgsql.autovacumm.count[{$PG_CONNINFO},{$PG_PATH}]7365030000000100Mamonsu PostgreSQL LinuxSystem: Block Devices Read Requests000system.disk.all_read736501501000100Mamonsu PostgreSQL LinuxSystem: Block Devices Write Requests000system.disk.all_write736501501000100Mamonsu PostgreSQL LinuxSystem: Block Devices Read byte/s000system.disk.all_read_b736501501000100Mamonsu PostgreSQL LinuxSystem: Block Devices Write byte/s000system.disk.all_write_b736501501000100Mamonsu PostgreSQL LinuxMamonsu: Plugin Keep Alive000mamonsu.plugin.keepalive736506000000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Transactions Committed000pgsql.transactions.committed[{$PG_CONNINFO},{$PG_PATH}]736501501000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Server Mode000pgsql.server_mode736501540000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Blocks Hit000pgsql.blocks.hit[{$PG_CONNINFO},{$PG_PATH}]736501501000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Server Mode000pgsql.server_mode736501540000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Blocks Read000pgsql.blocks.read[{$PG_CONNINFO},{$PG_PATH}]736501501000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Server Mode000pgsql.server_mode736501540000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Conflict Events000pgsql.events.conflicts[{$PG_CONNINFO},{$PG_PATH}]736501502000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Server Mode000pgsql.server_mode736501540000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Deadlock Events000pgsql.events.deadlocks[{$PG_CONNINFO},{$PG_PATH}]736501502000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Server Mode000pgsql.server_mode736501540000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Rollback Events000pgsql.events.xact_rollback[{$PG_CONNINFO},{$PG_PATH}]736501501000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Server Mode000pgsql.server_mode736501540000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Temp Bytes Written000pgsql.temp.bytes[{$PG_CONNINFO},{$PG_PATH}]73650150b2000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Server Mode000pgsql.server_mode736501540000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Temp Files Created000pgsql.temp.files[{$PG_CONNINFO},{$PG_PATH}]736501502000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Server Mode000pgsql.server_mode736501540000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Tuples Deleted000pgsql.tuples.deleted[{$PG_CONNINFO},{$PG_PATH}]736501501000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Server Mode000pgsql.server_mode736501540000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Tuples Fetched000pgsql.tuples.fetched[{$PG_CONNINFO},{$PG_PATH}]736501501000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Server Mode000pgsql.server_mode736501540000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Tuples Inserted000pgsql.tuples.inserted[{$PG_CONNINFO},{$PG_PATH}]736501501000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Server Mode000pgsql.server_mode736501540000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Tuples Returned000pgsql.tuples.returned[{$PG_CONNINFO},{$PG_PATH}]736501501000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Server Mode000pgsql.server_mode736501540000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Tuples Updated000pgsql.tuples.updated[{$PG_CONNINFO},{$PG_PATH}]736501501000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Server Mode000pgsql.server_mode736501540000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: checksum_failures Events000pgsql.events.checksum_failures[{$PG_CONNINFO},{$PG_PATH}]736501502000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Server Mode000pgsql.server_mode736501540000100Mamonsu PostgreSQL LinuxSystem: Load Average Over 1 Minute000system.la.1736501500000100Mamonsu PostgreSQL LinuxSystem: Active - Memory Recently Used000system.memory.active73650153b0000100Mamonsu PostgreSQL LinuxSystem: Available - Free Memory000system.memory.available73650153b0000100Mamonsu PostgreSQL LinuxSystem: Buffers - Block Device Cache and Dirty000system.memory.buffers73650153b0000100Mamonsu PostgreSQL LinuxSystem: Cached - Parked File Data (file content) Cache000system.memory.cached73650153b0000100Mamonsu PostgreSQL LinuxSystem: Committed AS - Total Committed Memory000system.memory.committed73650153b0000100Mamonsu PostgreSQL LinuxSystem: Inactive - Memory Not Currently Used000system.memory.inactive73650153b0000100Mamonsu PostgreSQL LinuxSystem: Mapped - All mmap()ed Pages000system.memory.mapped73650153b0000100Mamonsu PostgreSQL LinuxSystem: PageTables - Map bt Virtual and Physical000system.memory.page_tables73650153b0000100Mamonsu PostgreSQL LinuxSystem: Slab - Kernel Used Memory (inode cache)000system.memory.slab73650153b0000100Mamonsu PostgreSQL LinuxSystem: Swap - Swap Space Used000system.memory.swap73650153b0000100Mamonsu PostgreSQL LinuxSystem: SwapCached - Fetched unmod Yet Swap Pages000system.memory.swap_cache73650153b0000100Mamonsu PostgreSQL LinuxSystem: Total - All Memory000system.memory.total73650153b0000100Mamonsu PostgreSQL LinuxSystem: Unused - Wasted Memory000system.memory.unused73650153b0000100Mamonsu PostgreSQL LinuxSystem: Used - User-Space Applications000system.memory.used73650153b0000100Mamonsu PostgreSQL LinuxSystem: VMallocUsed - vmaloc() Allocated by Kernel000system.memory.vmalloc_used73650153b0000100Mamonsu PostgreSQL LinuxPostgreSQL Memory Leak: Number of Pids Which Private Anonymous Memory Exceeds private_anon_mem_threshold000pgsql.memory_leak_diagnostic.count_diff[]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Memory Leak: Number of Pids Which Private Anonymous Memory Exceeds private_anon_mem_threshold, text of message000pgsql.memory_leak_diagnostic.msg_text[]736501540000100Mamonsu PostgreSQL LinuxPostgreSQL Transactions: Age of the Oldest XID000pgsql.oldest.xid_age[{$PG_CONNINFO},{$PG_PATH}]736501530000100Mamonsu PostgreSQL LinuxPostgreSQL Transactions: the Oldest Transaction Running Time in sec000pgsql.oldest.transaction_time[{$PG_CONNINFO},{$PG_PATH}]73650150s0000100Mamonsu PostgreSQL LinuxPostgreSQL Transactions: Number of Parallel Queries Being Executed Now000pgsql.parallel.queries[{$PG_CONNINFO},{$PG_PATH}]736501530000100Mamonsu PostgreSQL LinuxSystem: Opened Files000system.open_files736501530000100Mamonsu PostgreSQL LinuxPostgreSQL pg_buffercache: Shared Buffer Size000pgsql.buffers.size[{$PG_CONNINFO},{$PG_PATH}]73650150b0000100Mamonsu PostgreSQL LinuxPostgreSQL pg_buffercache: Shared Buffer Twice Used Size000pgsql.buffers.twice_used[{$PG_CONNINFO},{$PG_PATH}]73650150b0000100Mamonsu PostgreSQL LinuxPostgreSQL pg_buffercache: Shared Buffer Dirty Size000pgsql.buffers.dirty[{$PG_CONNINFO},{$PG_PATH}]73650150b0000100Mamonsu PostgreSQL LinuxPostgreSQL Health: Ping000pgsql.ping[{$PG_CONNINFO},{$PG_PATH}]7365050ms0000100Mamonsu PostgreSQL LinuxPostgreSQL Health: Cache Hit Ratio1500pgsql.cache.hit[{$PG_CONNINFO},{$PG_PATH}]73650600%00001last(pgsql.blocks[hit])*100/(last(pgsql.blocks[hit])+last(pgsql.blocks[read]))00Mamonsu PostgreSQL LinuxPostgreSQL Health: Service Uptime000pgsql.uptime[{$PG_CONNINFO},{$PG_PATH}]7365050unixtime0000100Mamonsu PostgreSQL LinuxPostgreSQL Health: Server Version000pgsql.version[{$PG_CONNINFO},{$PG_PATH}]73650540000100Mamonsu PostgreSQL LinuxPostgreSQL Locks: Read Only Queries000pgsql.pg_locks.accessshare[{$PG_CONNINFO},{$PG_PATH}]736501530000100Mamonsu PostgreSQL LinuxPostgreSQL Locks: SELECT FOR SHARE and SELECT FOR UPDATE000pgsql.pg_locks.rowshare[{$PG_CONNINFO},{$PG_PATH}]736501530000100Mamonsu PostgreSQL LinuxPostgreSQL Locks: Write Queries000pgsql.pg_locks.rowexclusive[{$PG_CONNINFO},{$PG_PATH}]736501530000100Mamonsu PostgreSQL LinuxPostgreSQL Locks: VACUUM, ANALYZE, CREATE INDEX CONCURRENTLY000pgsql.pg_locks.shareupdateexclusive[{$PG_CONNINFO},{$PG_PATH}]736501530000100Mamonsu PostgreSQL LinuxPostgreSQL Locks: CREATE INDEX000pgsql.pg_locks.share[{$PG_CONNINFO},{$PG_PATH}]736501530000100Mamonsu PostgreSQL LinuxPostgreSQL Locks: Locks from Application000pgsql.pg_locks.sharerowexclusive[{$PG_CONNINFO},{$PG_PATH}]736501530000100Mamonsu PostgreSQL LinuxPostgreSQL Locks: Locks from Application or Some Operations on System Catalogs000pgsql.pg_locks.exclusive[{$PG_CONNINFO},{$PG_PATH}]736501530000100Mamonsu PostgreSQL LinuxPostgreSQL Locks: ALTER TABLE, DROP TABLE, TRUNCATE, REINDEX, CLUSTER, VACUUM FULL, LOCK TABLE000pgsql.pg_locks.accessexclusive[{$PG_CONNINFO},{$PG_PATH}]736501530000100Mamonsu PostgreSQL LinuxPostgreSQL Prepared Transactions: Number of Prepared Transactions000pgsql.prepared.count736506000000100Mamonsu PostgreSQL LinuxPostgreSQL Prepared Transactions: the Oldest Prepared Transaction Running Time in sec000pgsql.prepared.oldest736501500000100Mamonsu PostgreSQL LinuxSystem: Processes in State Running000system.processes.running736501500000100Mamonsu PostgreSQL LinuxSystem: Processes in State Blocked000system.processes.blocked736501500000100Mamonsu PostgreSQL LinuxSystem: Processes Forkrate000system.processes.forkrate736501501000100Mamonsu PostgreSQL LinuxSystem: CPU Time Spent by Normal Programs and Daemons000system.cpu.user736501501000100Mamonsu PostgreSQL LinuxSystem: CPU Time Spent by nice(1)d Programs000system.cpu.nice736501501000100Mamonsu PostgreSQL LinuxSystem: CPU Time Spent by the Kernel in System Activities000system.cpu.system736501501000100Mamonsu PostgreSQL LinuxSystem: CPU Time Spent Idle000system.cpu.idle736501501000100Mamonsu PostgreSQL LinuxSystem: CPU Time Spent Waiting for I/O Operations000system.cpu.iowait736501501000100Mamonsu PostgreSQL LinuxSystem: CPU Time Spent Handling Interrupts000system.cpu.irq736501501000100Mamonsu PostgreSQL LinuxSystem: CPU Time Spent Handling Batched Interrupts000system.cpu.softirq736501501000100Mamonsu PostgreSQL LinuxPostgreSQL Replication: Streaming Replication Lag000pgsql.replication_lag.sec[{$PG_CONNINFO},{$PG_PATH}]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Replication: Count Non-Active Replication Slots000pgsql.replication.non_active_slots[{$PG_CONNINFO},{$PG_PATH}]736506030000100Mamonsu PostgreSQL LinuxPostgreSQL Statements: Read bytes/s000pgsql.stat.read_bytes[{$PG_CONNINFO},{$PG_PATH}]73650600Bps1000100Mamonsu PostgreSQL LinuxPostgreSQL Statements: Write bytes/s000pgsql.stat.write_bytes[{$PG_CONNINFO},{$PG_PATH}]73650600Bps1000100Mamonsu PostgreSQL LinuxPostgreSQL Statements: Dirty bytes/s000pgsql.stat.dirty_bytes[{$PG_CONNINFO},{$PG_PATH}]73650600Bps1000100Mamonsu PostgreSQL LinuxPostgreSQL Statements: Read IO Time000pgsql.stat.read_time[{$PG_CONNINFO},{$PG_PATH}]73650600s1000100Mamonsu PostgreSQL LinuxPostgreSQL Statements: Write IO Time000pgsql.stat.write_time[{$PG_CONNINFO},{$PG_PATH}]73650600s1000100Mamonsu PostgreSQL LinuxPostgreSQL Statements: Other (mostly CPU) Time000pgsql.stat.other_time[{$PG_CONNINFO},{$PG_PATH}]73650600s1000100Mamonsu PostgreSQL LinuxPostgreSQL Statements: Amount of WAL Files000pgsql.stat.wal_bytes[{$PG_CONNINFO},{$PG_PATH}]73650600Bps1000100Mamonsu PostgreSQL LinuxPostgreSQL Statements: Amount of WAL Records000pgsql.stat.wal_records[{$PG_CONNINFO},{$PG_PATH}]736506001000100Mamonsu PostgreSQL LinuxPostgreSQL Statements: Full Page Writes000pgsql.stat.wal_fpi[{$PG_CONNINFO},{$PG_PATH}]736506001000100Mamonsu PostgreSQL LinuxPostgreSQL Statements: Nnumber of Times pg_stat_statements.max Was Exceeded000pgsql.stat_info.dealloc[{$PG_CONNINFO},{$PG_PATH}]736506001000100Mamonsu PostgreSQL LinuxPostgreSQL Statements: Last Statistics Reset Time000pgsql.stat_info.stats_reset[{$PG_CONNINFO},{$PG_PATH}]73650600unixtime1000100Mamonsu PostgreSQL LinuxSystem: Uptime000system.uptime73650153uptime0000100Mamonsu PostgreSQL LinuxPostgreSQL Wait Sampling: Lightweight Locks000pgsql.all_lock[lwlock]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Wait Sampling: Heavyweight Locks000pgsql.all_lock[hwlock]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Wait Sampling: Buffer Locks000pgsql.all_lock[buffer]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Wait Sampling: Extension Locks000pgsql.all_lock[extension]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Wait Sampling: Client Locks000pgsql.all_lock[client]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Wait Sampling: Other Locks (e.g. IPC, Timeout, IO)000pgsql.all_lock[other]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Wait Sampling LWLocks: XID Access Locks000pgsql.lwlock[xid]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Wait Sampling LWLocks: Autovacuum Locks000pgsql.lwlock[autovacuum]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Wait Sampling LWLocks: WAL Access Locks000pgsql.lwlock[wal]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Wait Sampling LWLocks: CLOG Access Locks000pgsql.lwlock[clog]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Wait Sampling LWLocks: Replication Locks000pgsql.lwlock[replication]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Wait Sampling LWLocks: Logical Replication Locks000pgsql.lwlock[logical_replication]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Wait Sampling LWLocks: Buffer Operations Locks000pgsql.lwlock[buffer]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Wait Sampling LWLocks: Other Operations Lightweight Locks000pgsql.lwlock[other]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Wait Sampling HWLocks: Locks on a Relation000pgsql.hwlock[relation]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Wait Sampling HWLocks: Extend a Relation Locks000pgsql.hwlock[extend]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Wait Sampling HWLocks: Locks on a Page000pgsql.hwlock[page]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Wait Sampling HWLocks: Locks on a Tuple000pgsql.hwlock[tuple]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Wait Sampling HWLocks: Transaction to Finish Locks000pgsql.hwlock[transactionid]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Wait Sampling HWLocks: Virtual XID Locks000pgsql.hwlock[virtualxid]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Wait Sampling HWLocks: Speculative Insertion Locks000pgsql.hwlock[speculative_token]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Wait Sampling HWLocks: Locks on Database Object000pgsql.hwlock[object]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Wait Sampling HWLocks: Userlocks000pgsql.hwlock[userlock]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Wait Sampling HWLocks: Advisory User Locks000pgsql.hwlock[advisory]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL WAL: Write Speed000pgsql.wal.write[{$PG_CONNINFO},{$PG_PATH}]73650150Bps1000100Mamonsu PostgreSQL LinuxPostgreSQL WAL: Count of WAL Files000pgsql.wal.count[{$PG_CONNINFO},{$PG_PATH}]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL WAL: Records Generated000pgsql.wal.records.count[{$PG_CONNINFO},{$PG_PATH}]736506031000100Mamonsu PostgreSQL LinuxPostgreSQL WAL: Full Page Images Generated000pgsql.wal.fpi.count[{$PG_CONNINFO},{$PG_PATH}]736506031000100Mamonsu PostgreSQL LinuxPostgreSQL WAL: Buffers Full000pgsql.wal.buffers_full736506031000100Mamonsu PostgreSQL LinuxPostgreSQL WAL: Write Time (ms)000pgsql.wal.write_time736506031000100Mamonsu PostgreSQL LinuxPostgreSQL WAL: Sync Time (ms)000pgsql.wal.sync_time736506031000100Mamonsu PostgreSQL LinuxPostgreSQL WAL: Sync Duty (%)1500pgsql.wal.sync_duty73650600%00001last(pgsql.wal.sync_time)/10/1500Mamonsu PostgreSQL Linux - PostgreSQL Databases Discovery060000007pgsql.database.discovery[{$PG_CONNINFO},{$PG_PATH}]{#DATABASE}.*8A0PostgreSQL Databases {#DATABASE}: size000pgsql.database.size[{#DATABASE},{$PG_CONNINFO},{$PG_PATH}]736503003b0000100Mamonsu PostgreSQL LinuxPostgreSQL Databases: Max datfrozenxid Age in: {#DATABASE}000pgsql.database.max_age[{#DATABASE},{$PG_CONNINFO},{$PG_PATH}]7365030000000100Mamonsu PostgreSQL LinuxPostgreSQL Databases: Count of Bloating Tables in {#DATABASE}000pgsql.database.bloating_tables[{#DATABASE},{$PG_CONNINFO},{$PG_PATH}]7365030000000100Mamonsu PostgreSQL LinuxPostgreSQL Databases: Count of Invalid Indexes in {#DATABASE}000pgsql.database.invalid_indexes[{#DATABASE},{$PG_CONNINFO},{$PG_PATH}]7365030000000100Mamonsu PostgreSQL Linux{Mamonsu PostgreSQL Linux:pgsql.database.invalid_indexes[{#DATABASE}].last()}>0PostgreSQL Databases: invalid indexes in {#DATABASE} (hostname={HOSTNAME} value={ITEM.LASTVALUE})030PostgreSQL Databases: {#DATABASE} size9002000.0100.0111100.00.00000028B817C020Mamonsu PostgreSQL Linuxpgsql.database.size[{#DATABASE},{$PG_CONNINFO},{$PG_PATH}]PostgreSQL Databases: {#DATABASE} Bloating Overview9002000.0100.0110100.00.00000027EB29B020Mamonsu PostgreSQL Linuxpgsql.database.bloating_tables[{#DATABASE},{$PG_CONNINFO},{$PG_PATH}]12793F5D120Mamonsu PostgreSQL Linuxpgsql.autovacumm.count[{$PG_CONNINFO},{$PG_PATH}]PostgreSQL Databases: {#DATABASE} Max age(datfrozenxid)9002000.0100.0110100.00.00000027EB29B020Mamonsu PostgreSQL Linuxpgsql.database.max_age[{#DATABASE},{$PG_CONNINFO},{$PG_PATH}]12793F5D120Mamonsu PostgreSQL Linuxpgsql.autovacumm.count[{$PG_CONNINFO},{$PG_PATH}]VFS Discovery060000007system.vfs.discovery{#MOUNTPOINT}.*8A0System: Mount Point {#MOUNTPOINT}: Used000system.vfs.used[{#MOUNTPOINT}]73650153b0000100Mamonsu PostgreSQL LinuxSystem: Mount Point {#MOUNTPOINT}: Free000system.vfs.free[{#MOUNTPOINT}]73650153b0000100Mamonsu PostgreSQL LinuxSystem: Mount Point {#MOUNTPOINT}: Free in Percents000system.vfs.percent_free[{#MOUNTPOINT}]73650150%0000100Mamonsu PostgreSQL Linux{Mamonsu PostgreSQL Linux:system.vfs.percent_free[{#MOUNTPOINT}].last()}<10Free disk space less then 10% on mountpoint {#MOUNTPOINT} (hostname={HOSTNAME} value={ITEM.LASTVALUE})030System: Mount Point Overview {#MOUNTPOINT}9002000.0100.0111100.00.0000000E57862020Mamonsu PostgreSQL Linuxsystem.vfs.used[{#MOUNTPOINT}]10578159020Mamonsu PostgreSQL Linuxsystem.vfs.free[{#MOUNTPOINT}]System: Block Devices Discovery060000007system.disk.discovery{#BLOCKDEVICE}.*8A0System: Block Device {#BLOCKDEVICE} Utilization000system.disk.utilization[{#BLOCKDEVICE}]73650150%1000100Mamonsu PostgreSQL LinuxSystem: Block Device {#BLOCKDEVICE} Read Operations000system.disk.read[{#BLOCKDEVICE}]736501501000100Mamonsu PostgreSQL LinuxSystem: Block Device {#BLOCKDEVICE} Write Operations000system.disk.write[{#BLOCKDEVICE}]736501501000100Mamonsu PostgreSQL LinuxSystem: Block Device {#BLOCKDEVICE} Read byte/s000system.disk.read_b[{#BLOCKDEVICE}]73650150b1000100Mamonsu PostgreSQL LinuxSystem: Block Device {#BLOCKDEVICE} Write byte/s000system.disk.write_b[{#BLOCKDEVICE}]73650150b1000100Mamonsu PostgreSQL LinuxSystem: Block Device Overview {#BLOCKDEVICE} operations9002000.0100.0110100.00.00000007EB29B020Mamonsu PostgreSQL Linuxsystem.disk.read[{#BLOCKDEVICE}]10793F5D020Mamonsu PostgreSQL Linuxsystem.disk.write[{#BLOCKDEVICE}]20F6CB93120Mamonsu PostgreSQL Linuxsystem.disk.utilization[{#BLOCKDEVICE}]System: Block Device Overview {#BLOCKDEVICE} byte/s9002000.0100.0110100.00.00000007EB29B020Mamonsu PostgreSQL Linuxsystem.disk.read_b[{#BLOCKDEVICE}]10793F5D020Mamonsu PostgreSQL Linuxsystem.disk.write_b[{#BLOCKDEVICE}]20F6CB93120Mamonsu PostgreSQL Linuxsystem.disk.utilization[{#BLOCKDEVICE}]Net Iface Discovery060000007system.net.discovery{#NETDEVICE}.*8A0System: Network Device {#NETDEVICE} RX bytes/s000system.net.rx_bytes[{#NETDEVICE}]73650150b1000100Mamonsu PostgreSQL LinuxSystem: Network Device {#NETDEVICE} RX errors/s000system.net.rx_errs[{#NETDEVICE}]736501501000100Mamonsu PostgreSQL LinuxSystem: Network Device {#NETDEVICE} RX drops/s000system.net.rx_drop[{#NETDEVICE}]736501501000100Mamonsu PostgreSQL LinuxSystem: Network Device {#NETDEVICE} TX bytes/s000system.net.tx_bytes[{#NETDEVICE}]73650150b1000100Mamonsu PostgreSQL LinuxSystem: Network Device {#NETDEVICE} TX errors/s000system.net.tx_errs[{#NETDEVICE}]736501501000100Mamonsu PostgreSQL LinuxSystem: Network Device {#NETDEVICE} TX drops/s000system.net.tx_drop[{#NETDEVICE}]736501501000100Mamonsu PostgreSQL LinuxSystem: Network Device {#NETDEVICE}9002000.0100.0110100.00.00000007EB29B020Mamonsu PostgreSQL Linuxsystem.net.rx_bytes[{#NETDEVICE}]10793F5D020Mamonsu PostgreSQL Linuxsystem.net.tx_bytes[{#NETDEVICE}]pg_probackup discovery060000007pg_probackup.discovery[]{#BACKUPDIR}.*8A0pg_probackup dir {#BACKUPDIR}: size000pg_probackup.dir.size[{#BACKUPDIR}]736503003b0000100Mamonsu PostgreSQL Linuxpg_probackup dir {#BACKUPDIR}: error000pg_probackup.dir.error[{#BACKUPDIR}]7365030040000100Mamonsu PostgreSQL Linux{Mamonsu PostgreSQL Linux:pg_probackup.dir.error[{#BACKUPDIR}].str(ok)}<>1Error in pg_probackup dir {#BACKUPDIR} (hostname={HOSTNAME} value={ITEM.LASTVALUE})030pg_probackup backup dir: {#BACKUPDIR} size9002000.0100.0111100.00.00000008B817C020Mamonsu PostgreSQL Linuxpg_probackup.dir.size[{#BACKUPDIR}]PostgreSQL Relations Sizes Discovery060000007pgsql.relation.size[{$PG_CONNINFO},{$PG_PATH}]{#RELATIONNAME}.*8A0PostgreSQL Relation Size: {#RELATIONNAME}000pgsql.relation.size[{#RELATIONNAME},{$PG_CONNINFO},{$PG_PATH}]736503003b0000100Mamonsu PostgreSQL LinuxPostgreSQL Relation Size: {#RELATIONNAME}9002000.0100.0111100.00.00000028B817C020Mamonsu PostgreSQL Linuxpgsql.relation.size[{#RELATIONNAME},{$PG_CONNINFO},{$PG_PATH}]PostgreSQL Replication Lag Discovery060000007pgsql.replication.discovery[{$PG_CONNINFO},{$PG_PATH}]{#APPLICATION_NAME}.*8A0PostgreSQL Replication: {#APPLICATION_NAME} Send Lag - Time elapsed sending recent WAL locally000pgsql.replication.send_lag[{#APPLICATION_NAME},{$PG_CONNINFO},{$PG_PATH}]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Replication: {#APPLICATION_NAME} Receive Lag - Time elapsed between receiving recent WAL locally and receiving notification that this standby server has flushed it000pgsql.replication.receive_lag[{#APPLICATION_NAME},{$PG_CONNINFO},{$PG_PATH}]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Replication: {#APPLICATION_NAME} Write Lag - Time elapsed between flushing recent WAL locally and receiving notification that this standby server has written it000pgsql.replication.write_lag[{#APPLICATION_NAME},{$PG_CONNINFO},{$PG_PATH}]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Replication: {#APPLICATION_NAME} Flush Lag - Time elapsed between flushing recent WAL locally and receiving notification that this standby server has written and flushed it000pgsql.replication.flush_lag[{#APPLICATION_NAME},{$PG_CONNINFO},{$PG_PATH}]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Replication: {#APPLICATION_NAME} Replay Lag - Time elapsed between flushing recent WAL locally and receiving notification that this standby server has written, flushed and applied000pgsql.replication.replay_lag[{#APPLICATION_NAME},{$PG_CONNINFO},{$PG_PATH}]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Replication: {#APPLICATION_NAME} Delta of Total Lag000pgsql.replication.total_lag[{#APPLICATION_NAME},{$PG_CONNINFO},{$PG_PATH}]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Replication: Delta of Total Lag for {#APPLICATION_NAME}9002000.0100.0110100.00.00000008B817C020Mamonsu PostgreSQL Linuxpgsql.replication.total_lag[{#APPLICATION_NAME},{$PG_CONNINFO},{$PG_PATH}] - Mamonsu Overview2505001500011010003PostgreSQL Connections: OverviewMamonsu PostgreSQL Linux05001501011010003PostgreSQL pg_buffercache: Shared BufferMamonsu PostgreSQL Linux05001500111010003System: CPU Time SpentMamonsu PostgreSQL Linux05001501111010003System: Server Free/Used Memory OverviewMamonsu PostgreSQL Linux05001500211010003PostgreSQL Autovacuum: Count of Autovacuum WorkersMamonsu PostgreSQL Linux05001501211010003PostgreSQL Instance: TuplesMamonsu PostgreSQL Linux05001500311010003PostgreSQL bgwriter: BuffersMamonsu PostgreSQL Linux05001501311010003PostgreSQL bgwriter: EventsMamonsu PostgreSQL Linux05001500411010003PostgreSQL Checkpoints: Count (in hour)Mamonsu PostgreSQL Linux05001501411010003PostgreSQL Checkpoints: Write/SyncMamonsu PostgreSQL LinuxMamonsu PostgreSQL Instance2515001500011010003pgsql.ping[{$PG_CONNINFO},{$PG_PATH}]Mamonsu PostgreSQL Linux15001501011010003pgsql.uptime[{$PG_CONNINFO},{$PG_PATH}]Mamonsu PostgreSQL Linux15001500111010003pgsql.cache.hit[{$PG_CONNINFO},{$PG_PATH}]Mamonsu PostgreSQL Linux05001501111010003PostgreSQL Instance: EventsMamonsu PostgreSQL Linux15001500211010003pgsql.temp.bytes[{$PG_CONNINFO},{$PG_PATH}]Mamonsu PostgreSQL Linux15001501211010003pgsql.temp.files[{$PG_CONNINFO},{$PG_PATH}]Mamonsu PostgreSQL LinuxMamonsu PostgreSQL WAL2505001500011010003PostgreSQL Archiver: Archive StatusMamonsu PostgreSQL Linux15001501011010003pgsql.wal.write[{$PG_CONNINFO},{$PG_PATH}]Mamonsu PostgreSQL Linux15001500111010003pgsql.archive_command.size_files_to_archive[{$PG_CONNINFO},{$PG_PATH}]Mamonsu PostgreSQL Linux15001501111010003pgsql.archive_command.archived_files[{$PG_CONNINFO},{$PG_PATH}]Mamonsu PostgreSQL LinuxMamonsu PostgreSQL Locks3513301000011010003pgsql.events.deadlocks[{$PG_CONNINFO},{$PG_PATH}]Mamonsu PostgreSQL Linux13301001011010003pgsql.pg_locks.accessshare[{$PG_CONNINFO},{$PG_PATH}]Mamonsu PostgreSQL Linux13301002011010003pgsql.pg_locks.rowshare[{$PG_CONNINFO},{$PG_PATH}]Mamonsu PostgreSQL Linux13301000111010003pgsql.pg_locks.rowexclusive[{$PG_CONNINFO},{$PG_PATH}]Mamonsu PostgreSQL Linux13301001111010003pgsql.pg_locks.shareupdateexclusive[{$PG_CONNINFO},{$PG_PATH}]Mamonsu PostgreSQL Linux13301002111010003pgsql.pg_locks.share[{$PG_CONNINFO},{$PG_PATH}]Mamonsu PostgreSQL Linux13301000211010003pgsql.pg_locks.sharerowexclusive[{$PG_CONNINFO},{$PG_PATH}]Mamonsu PostgreSQL Linux13301001211010003pgsql.pg_locks.exclusive[{$PG_CONNINFO},{$PG_PATH}]Mamonsu PostgreSQL Linux13301002211010003pgsql.pg_locks.accessexclusive[{$PG_CONNINFO},{$PG_PATH}]Mamonsu PostgreSQL LinuxMamonsu PostgreSQL Transactions2515001500011010003pgsql.oldest.xid_age[{$PG_CONNINFO},{$PG_PATH}]Mamonsu PostgreSQL Linux15001501011010003pgsql.oldest.transaction_time[{$PG_CONNINFO},{$PG_PATH}]Mamonsu PostgreSQL Linux15001500111010003pgsql.prepared.countMamonsu PostgreSQL Linux15001501111010003pgsql.prepared.oldestMamonsu PostgreSQL LinuxMamonsu System (Linux)2505001500011010003System: Block Devices Read/Write BytesMamonsu PostgreSQL Linux05001501011010003System: Block Devices Read/Write OperationsMamonsu PostgreSQL Linux05001500111010003System: Processes OverviewMamonsu PostgreSQL Linux + PostgreSQL Archiver: Files in archive_status Need to Archive Count000pgsql.archive_command.count_files_to_archive[{$PG_CONNINFO},{$PG_PATH}]736501530000100Mamonsu PostgreSQL LinuxPostgreSQL Archiver: Files Need to Archive Size000pgsql.archive_command.size_files_to_archive[{$PG_CONNINFO},{$PG_PATH}]73650153b0000100Mamonsu PostgreSQL LinuxPostgreSQL Archiver: Archived Files Count000pgsql.archive_command.archived_files[{$PG_CONNINFO},{$PG_PATH}]736501532000100Mamonsu PostgreSQL LinuxPostgreSQL Archiver: Attempts to Archive Files Count000pgsql.archive_command.failed_trying_to_archive[{$PG_CONNINFO},{$PG_PATH}]736501532000100Mamonsu PostgreSQL LinuxPostgreSQL bgwriter: Buffers Written During Checkpoints000pgsql.bgwriter.buffers_checkpoint[{$PG_CONNINFO},{$PG_PATH}]736501532000100Mamonsu PostgreSQL LinuxPostgreSQL bgwriter: Buffers Written000pgsql.bgwriter.buffers_clean[{$PG_CONNINFO},{$PG_PATH}]736501532000100Mamonsu PostgreSQL LinuxPostgreSQL bgwriter: Number of bgwriter Stopped by Max Write Count000pgsql.bgwriter.maxwritten_clean[{$PG_CONNINFO},{$PG_PATH}]736501532000100Mamonsu PostgreSQL LinuxPostgreSQL bgwriter: Buffers Written Directly by a Backend000pgsql.bgwriter.buffers_backend[{$PG_CONNINFO},{$PG_PATH}]736501532000100Mamonsu PostgreSQL LinuxPostgreSQL bgwriter: Times a Backend Execute Its Own Fsync000pgsql.bgwriter.buffers_backend_fsync[{$PG_CONNINFO},{$PG_PATH}]736501532000100Mamonsu PostgreSQL LinuxPostgreSQL bgwriter: Buffers Allocated000pgsql.bgwriter.buffers_alloc[{$PG_CONNINFO},{$PG_PATH}]736501532000100Mamonsu PostgreSQL LinuxPostgreSQL Checkpoints: by Timeout (in hour)000pgsql.checkpoint.count_timed[{$PG_CONNINFO},{$PG_PATH}]736501501000100Mamonsu PostgreSQL LinuxPostgreSQL Checkpoints: by WAL (in hour)000pgsql.checkpoint.count_wal[{$PG_CONNINFO},{$PG_PATH}]736501501000100Mamonsu PostgreSQL LinuxPostgreSQL Checkpoints: Write Time000pgsql.checkpoint.write_time[{$PG_CONNINFO},{$PG_PATH}]73650150ms1000100Mamonsu PostgreSQL LinuxPostgreSQL Checkpoints: Sync Time000pgsql.checkpoint.checkpoint_sync_time[{$PG_CONNINFO},{$PG_PATH}]73650150ms1000100Mamonsu PostgreSQL LinuxPostgreSQL Connections: Number of Total User Connections000pgsql.connections.total[{$PG_CONNINFO},{$PG_PATH}]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Connections: Number of Waiting User Connections000pgsql.connections.waiting[{$PG_CONNINFO},{$PG_PATH}]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Connections: Max Connections000pgsql.connections.max_connections[{$PG_CONNINFO},{$PG_PATH}]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Connections: Number of Active User Connections000pgsql.connections.active[{$PG_CONNINFO},{$PG_PATH}]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Connections: Number of Idle User Connections000pgsql.connections.idle[{$PG_CONNINFO},{$PG_PATH}]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Connections: Number of Idle in Transaction User Connections000pgsql.connections.idle_in_transaction[{$PG_CONNINFO},{$PG_PATH}]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Connections: Number of Idle in Transaction (Aborted) User Connections000pgsql.connections.idle_in_transaction_aborted[{$PG_CONNINFO},{$PG_PATH}]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Connections: Number of Fastpath Function Call User Connections000pgsql.connections.fastpath_function_call[{$PG_CONNINFO},{$PG_PATH}]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Connections: Number of Disabled User Connections000pgsql.connections.disabled[{$PG_CONNINFO},{$PG_PATH}]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Connections: Number of Other Connections000pgsql.connections.other[{$PG_CONNINFO},{$PG_PATH}]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Autovacuum: Count of Autovacuum Workers000pgsql.autovacumm.count[{$PG_CONNINFO},{$PG_PATH}]736501500000100Mamonsu PostgreSQL LinuxSystem: Block Devices Read Requests000system.disk.all_read736501501000100Mamonsu PostgreSQL LinuxSystem: Block Devices Write Requests000system.disk.all_write736501501000100Mamonsu PostgreSQL LinuxSystem: Block Devices Read byte/s000system.disk.all_read_b736501501000100Mamonsu PostgreSQL LinuxSystem: Block Devices Write byte/s000system.disk.all_write_b736501501000100Mamonsu PostgreSQL LinuxMamonsu: Plugin Keep Alive000mamonsu.plugin.keepalive736506000000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Transactions Committed000pgsql.transactions.committed[{$PG_CONNINFO},{$PG_PATH}]736501501000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Server Mode000pgsql.server_mode736501540000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Rollback Events000pgsql.events.xact_rollback[{$PG_CONNINFO},{$PG_PATH}]736501501000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Server Mode000pgsql.server_mode736501540000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Blocks Hit000pgsql.blocks.hit[{$PG_CONNINFO},{$PG_PATH}]736501501000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Server Mode000pgsql.server_mode736501540000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Blocks Read000pgsql.blocks.read[{$PG_CONNINFO},{$PG_PATH}]736501501000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Server Mode000pgsql.server_mode736501540000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Conflict Events000pgsql.events.conflicts[{$PG_CONNINFO},{$PG_PATH}]736501502000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Server Mode000pgsql.server_mode736501540000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Deadlock Events000pgsql.events.deadlocks[{$PG_CONNINFO},{$PG_PATH}]736501502000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Server Mode000pgsql.server_mode736501540000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Temp Bytes Written000pgsql.temp.bytes[{$PG_CONNINFO},{$PG_PATH}]73650150b2000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Server Mode000pgsql.server_mode736501540000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Temp Files Created000pgsql.temp.files[{$PG_CONNINFO},{$PG_PATH}]736501502000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Server Mode000pgsql.server_mode736501540000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Tuples Deleted000pgsql.tuples.deleted[{$PG_CONNINFO},{$PG_PATH}]736501501000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Server Mode000pgsql.server_mode736501540000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Tuples Fetched000pgsql.tuples.fetched[{$PG_CONNINFO},{$PG_PATH}]736501501000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Server Mode000pgsql.server_mode736501540000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Tuples Inserted000pgsql.tuples.inserted[{$PG_CONNINFO},{$PG_PATH}]736501501000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Server Mode000pgsql.server_mode736501540000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Tuples Returned000pgsql.tuples.returned[{$PG_CONNINFO},{$PG_PATH}]736501501000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Server Mode000pgsql.server_mode736501540000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Tuples Updated000pgsql.tuples.updated[{$PG_CONNINFO},{$PG_PATH}]736501501000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Server Mode000pgsql.server_mode736501540000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: checksum_failures Events000pgsql.events.checksum_failures[{$PG_CONNINFO},{$PG_PATH}]736501502000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Server Mode000pgsql.server_mode736501540000100Mamonsu PostgreSQL LinuxSystem: Load Average Over 1 Minute000system.la.1736501500000100Mamonsu PostgreSQL LinuxSystem: Active - Memory Recently Used000system.memory.active73650153b0000100Mamonsu PostgreSQL LinuxSystem: Available - Free Memory000system.memory.available73650153b0000100Mamonsu PostgreSQL LinuxSystem: Buffers - Block Device Cache and Dirty000system.memory.buffers73650153b0000100Mamonsu PostgreSQL LinuxSystem: Cached - Parked File Data (file content) Cache000system.memory.cached73650153b0000100Mamonsu PostgreSQL LinuxSystem: Committed AS - Total Committed Memory000system.memory.committed73650153b0000100Mamonsu PostgreSQL LinuxSystem: Inactive - Memory Not Currently Used000system.memory.inactive73650153b0000100Mamonsu PostgreSQL LinuxSystem: Mapped - All mmap()ed Pages000system.memory.mapped73650153b0000100Mamonsu PostgreSQL LinuxSystem: PageTables - Map bt Virtual and Physical000system.memory.page_tables73650153b0000100Mamonsu PostgreSQL LinuxSystem: Slab - Kernel Used Memory (inode cache)000system.memory.slab73650153b0000100Mamonsu PostgreSQL LinuxSystem: Swap - Swap Space Used000system.memory.swap73650153b0000100Mamonsu PostgreSQL LinuxSystem: SwapCached - Fetched unmod Yet Swap Pages000system.memory.swap_cache73650153b0000100Mamonsu PostgreSQL LinuxSystem: Total - All Memory000system.memory.total73650153b0000100Mamonsu PostgreSQL LinuxSystem: Unused - Wasted Memory000system.memory.unused73650153b0000100Mamonsu PostgreSQL LinuxSystem: Used - User-Space Applications000system.memory.used73650153b0000100Mamonsu PostgreSQL LinuxSystem: VMallocUsed - vmaloc() Allocated by Kernel000system.memory.vmalloc_used73650153b0000100Mamonsu PostgreSQL LinuxPostgreSQL Memory Leak: Number of Pids Which Private Anonymous Memory Exceeds private_anon_mem_threshold000pgsql.memory_leak_diagnostic.count_diff[]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Memory Leak: Number of Pids Which Private Anonymous Memory Exceeds private_anon_mem_threshold, text of message000pgsql.memory_leak_diagnostic.msg_text[]736501540000100Mamonsu PostgreSQL LinuxPostgreSQL Transactions: Age of the Oldest XID000pgsql.oldest.xid_age[{$PG_CONNINFO},{$PG_PATH}]736501530000100Mamonsu PostgreSQL LinuxPostgreSQL Transactions: the Oldest Transaction Running Time in sec000pgsql.oldest.transaction_time[{$PG_CONNINFO},{$PG_PATH}]73650150s0000100Mamonsu PostgreSQL LinuxPostgreSQL Transactions: Number of Parallel Queries Being Executed Now000pgsql.parallel.queries[{$PG_CONNINFO},{$PG_PATH}]736501530000100Mamonsu PostgreSQL LinuxSystem: Opened Files000system.open_files736501530000100Mamonsu PostgreSQL LinuxPostgreSQL pg_buffercache: Shared Buffer Size000pgsql.buffers.size[{$PG_CONNINFO},{$PG_PATH}]73650150b0000100Mamonsu PostgreSQL LinuxPostgreSQL pg_buffercache: Shared Buffer Twice Used Size000pgsql.buffers.twice_used[{$PG_CONNINFO},{$PG_PATH}]73650150b0000100Mamonsu PostgreSQL LinuxPostgreSQL pg_buffercache: Shared Buffer Dirty Size000pgsql.buffers.dirty[{$PG_CONNINFO},{$PG_PATH}]73650150b0000100Mamonsu PostgreSQL LinuxPostgreSQL Health: Ping000pgsql.ping[{$PG_CONNINFO},{$PG_PATH}]7365050ms0000100Mamonsu PostgreSQL LinuxPostgreSQL Health: Cache Hit Ratio1500pgsql.cache.hit[{$PG_CONNINFO},{$PG_PATH}]73650600%00001last(pgsql.blocks[hit])*100/(last(pgsql.blocks[hit])+last(pgsql.blocks[read]))00Mamonsu PostgreSQL LinuxPostgreSQL Health: Service Uptime000pgsql.uptime[{$PG_CONNINFO},{$PG_PATH}]7365050unixtime0000100Mamonsu PostgreSQL LinuxPostgreSQL Health: Server Version000pgsql.version[{$PG_CONNINFO},{$PG_PATH}]73650540000100Mamonsu PostgreSQL LinuxPostgreSQL Locks: Read Only Queries000pgsql.pg_locks.accessshare[{$PG_CONNINFO},{$PG_PATH}]736501530000100Mamonsu PostgreSQL LinuxPostgreSQL Locks: SELECT FOR SHARE and SELECT FOR UPDATE000pgsql.pg_locks.rowshare[{$PG_CONNINFO},{$PG_PATH}]736501530000100Mamonsu PostgreSQL LinuxPostgreSQL Locks: Write Queries000pgsql.pg_locks.rowexclusive[{$PG_CONNINFO},{$PG_PATH}]736501530000100Mamonsu PostgreSQL LinuxPostgreSQL Locks: VACUUM, ANALYZE, CREATE INDEX CONCURRENTLY000pgsql.pg_locks.shareupdateexclusive[{$PG_CONNINFO},{$PG_PATH}]736501530000100Mamonsu PostgreSQL LinuxPostgreSQL Locks: CREATE INDEX000pgsql.pg_locks.share[{$PG_CONNINFO},{$PG_PATH}]736501530000100Mamonsu PostgreSQL LinuxPostgreSQL Locks: Locks from Application000pgsql.pg_locks.sharerowexclusive[{$PG_CONNINFO},{$PG_PATH}]736501530000100Mamonsu PostgreSQL LinuxPostgreSQL Locks: Locks from Application or Some Operations on System Catalogs000pgsql.pg_locks.exclusive[{$PG_CONNINFO},{$PG_PATH}]736501530000100Mamonsu PostgreSQL LinuxPostgreSQL Locks: ALTER TABLE, DROP TABLE, TRUNCATE, REINDEX, CLUSTER, VACUUM FULL, LOCK TABLE000pgsql.pg_locks.accessexclusive[{$PG_CONNINFO},{$PG_PATH}]736501530000100Mamonsu PostgreSQL LinuxPostgreSQL Prepared Transactions: Number of Prepared Transactions000pgsql.prepared.count736506000000100Mamonsu PostgreSQL LinuxPostgreSQL Prepared Transactions: the Oldest Prepared Transaction Running Time in sec000pgsql.prepared.oldest736501500000100Mamonsu PostgreSQL LinuxSystem: Processes in State Running000system.processes.running736501500000100Mamonsu PostgreSQL LinuxSystem: Processes in State Blocked000system.processes.blocked736501500000100Mamonsu PostgreSQL LinuxSystem: Processes Forkrate000system.processes.forkrate736501501000100Mamonsu PostgreSQL LinuxSystem: CPU Time Spent by Normal Programs and Daemons000system.cpu.user736501501000100Mamonsu PostgreSQL LinuxSystem: CPU Time Spent by nice(1)d Programs000system.cpu.nice736501501000100Mamonsu PostgreSQL LinuxSystem: CPU Time Spent by the Kernel in System Activities000system.cpu.system736501501000100Mamonsu PostgreSQL LinuxSystem: CPU Time Spent Idle000system.cpu.idle736501501000100Mamonsu PostgreSQL LinuxSystem: CPU Time Spent Waiting for I/O Operations000system.cpu.iowait736501501000100Mamonsu PostgreSQL LinuxSystem: CPU Time Spent Handling Interrupts000system.cpu.irq736501501000100Mamonsu PostgreSQL LinuxSystem: CPU Time Spent Handling Batched Interrupts000system.cpu.softirq736501501000100Mamonsu PostgreSQL LinuxPostgreSQL Replication: Streaming Replication Lag000pgsql.replication_lag.sec[{$PG_CONNINFO},{$PG_PATH}]736506000000100Mamonsu PostgreSQL LinuxPostgreSQL Replication: Count Non-Active Replication Slots000pgsql.replication.non_active_slots[{$PG_CONNINFO},{$PG_PATH}]736506030000100Mamonsu PostgreSQL LinuxPostgreSQL Statements: Read bytes/s000pgsql.stat.read_bytes[{$PG_CONNINFO},{$PG_PATH}]73650150Bps1000100Mamonsu PostgreSQL LinuxPostgreSQL Statements: Write bytes/s000pgsql.stat.write_bytes[{$PG_CONNINFO},{$PG_PATH}]73650150Bps1000100Mamonsu PostgreSQL LinuxPostgreSQL Statements: Dirty bytes/s000pgsql.stat.dirty_bytes[{$PG_CONNINFO},{$PG_PATH}]73650150Bps1000100Mamonsu PostgreSQL LinuxPostgreSQL Statements: Read IO Time000pgsql.stat.read_time[{$PG_CONNINFO},{$PG_PATH}]73650150s1000100Mamonsu PostgreSQL LinuxPostgreSQL Statements: Write IO Time000pgsql.stat.write_time[{$PG_CONNINFO},{$PG_PATH}]73650150s1000100Mamonsu PostgreSQL LinuxPostgreSQL Statements: Other (mostly CPU) Time000pgsql.stat.other_time[{$PG_CONNINFO},{$PG_PATH}]73650150s1000100Mamonsu PostgreSQL LinuxPostgreSQL Statements: Amount of WAL Files000pgsql.stat.wal_bytes[{$PG_CONNINFO},{$PG_PATH}]73650150Bps1000100Mamonsu PostgreSQL LinuxPostgreSQL Statements: Amount of WAL Records000pgsql.stat.wal_records[{$PG_CONNINFO},{$PG_PATH}]736501501000100Mamonsu PostgreSQL LinuxPostgreSQL Statements: Full Page Writes000pgsql.stat.wal_fpi[{$PG_CONNINFO},{$PG_PATH}]736501501000100Mamonsu PostgreSQL LinuxPostgreSQL Statements: Nnumber of Times pg_stat_statements.max Was Exceeded000pgsql.stat_info.dealloc[{$PG_CONNINFO},{$PG_PATH}]736501501000100Mamonsu PostgreSQL LinuxPostgreSQL Statements: Last Statistics Reset Time000pgsql.stat_info.stats_reset[{$PG_CONNINFO},{$PG_PATH}]73650150unixtime1000100Mamonsu PostgreSQL LinuxSystem: Uptime000system.uptime73650153uptime0000100Mamonsu PostgreSQL LinuxPostgreSQL WAL: Write Speed000pgsql.wal.write[{$PG_CONNINFO},{$PG_PATH}]73650600Bps1000100Mamonsu PostgreSQL LinuxPostgreSQL WAL: Count of WAL Files000pgsql.wal.count[{$PG_CONNINFO},{$PG_PATH}]736506000000100Mamonsu PostgreSQL LinuxPostgreSQL WAL: Records Generated000pgsql.wal.records.count[{$PG_CONNINFO},{$PG_PATH}]736506001000100Mamonsu PostgreSQL LinuxPostgreSQL WAL: Full Page Images Generated000pgsql.wal.fpi.count[{$PG_CONNINFO},{$PG_PATH}]736506001000100Mamonsu PostgreSQL LinuxPostgreSQL WAL: Buffers Full000pgsql.wal.buffers_full736506001000100Mamonsu PostgreSQL LinuxPostgreSQL WAL: Write Time (ms)000pgsql.wal.write_time736506001000100Mamonsu PostgreSQL LinuxPostgreSQL WAL: Sync Time (ms)000pgsql.wal.sync_time736506001000100Mamonsu PostgreSQL LinuxPostgreSQL WAL: Sync Duty (%)1500pgsql.wal.sync_duty73650600%00001last(pgsql.wal.sync_time)/1000Mamonsu PostgreSQL Linux + PostgreSQL Databases Discovery060000007pgsql.database.discovery[{$PG_CONNINFO},{$PG_PATH}]{#DATABASE}.*8A0PostgreSQL Databases {#DATABASE}: size000pgsql.database.size[{#DATABASE},{$PG_CONNINFO},{$PG_PATH}]73650153b0000100Mamonsu PostgreSQL LinuxPostgreSQL Databases: Max datfrozenxid Age in: {#DATABASE}000pgsql.database.max_age[{#DATABASE},{$PG_CONNINFO},{$PG_PATH}]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Databases: Count of Bloating Tables in {#DATABASE}000pgsql.database.bloating_tables[{#DATABASE},{$PG_CONNINFO},{$PG_PATH}]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Databases: Count of Invalid Indexes in {#DATABASE}000pgsql.database.invalid_indexes[{#DATABASE},{$PG_CONNINFO},{$PG_PATH}]736501500000100Mamonsu PostgreSQL Linux{Mamonsu PostgreSQL Linux:pgsql.database.invalid_indexes[{#DATABASE}].last()}>0PostgreSQL Databases: invalid indexes in {#DATABASE} (hostname={HOSTNAME} value={ITEM.LASTVALUE})030PostgreSQL Databases: {#DATABASE} size9002000.0100.0111100.00.0000002A39B98020Mamonsu PostgreSQL Linuxpgsql.database.size[{#DATABASE},{$PG_CONNINFO},{$PG_PATH}]PostgreSQL Databases: {#DATABASE} Bloating Overview9002000.0100.0110100.00.000000287C2B9020Mamonsu PostgreSQL Linuxpgsql.database.bloating_tables[{#DATABASE},{$PG_CONNINFO},{$PG_PATH}]12793F5D120Mamonsu PostgreSQL Linuxpgsql.autovacumm.count[{$PG_CONNINFO},{$PG_PATH}]PostgreSQL Databases: {#DATABASE} Max age(datfrozenxid)9002000.0100.0110100.00.000000287C2B9020Mamonsu PostgreSQL Linuxpgsql.database.max_age[{#DATABASE},{$PG_CONNINFO},{$PG_PATH}]12793F5D120Mamonsu PostgreSQL Linuxpgsql.autovacumm.count[{$PG_CONNINFO},{$PG_PATH}]VFS Discovery060000007system.vfs.discovery{#MOUNTPOINT}.*8A0System: Mount Point {#MOUNTPOINT} Used000system.vfs.used[{#MOUNTPOINT}]73650153b0000100Mamonsu PostgreSQL LinuxSystem: Mount Point {#MOUNTPOINT} Free000system.vfs.free[{#MOUNTPOINT}]73650153b0000100Mamonsu PostgreSQL LinuxSystem: Mount Point {#MOUNTPOINT} Free in Percents000system.vfs.percent_free[{#MOUNTPOINT}]73650150%0000100Mamonsu PostgreSQL Linux{Mamonsu PostgreSQL Linux:system.vfs.percent_free[{#MOUNTPOINT}].last()}<10Free disk space less than 10% on mountpoint {#MOUNTPOINT} (hostname={HOSTNAME} value={ITEM.LASTVALUE})030System: Mount Point Overview {#MOUNTPOINT}9002000.0100.0111100.00.0000002FF5656020Mamonsu PostgreSQL Linuxsystem.vfs.used[{#MOUNTPOINT}]1200CC00020Mamonsu PostgreSQL Linuxsystem.vfs.free[{#MOUNTPOINT}]System: Block Devices Discovery060000007system.disk.discovery{#BLOCKDEVICE}.*8A0System: Block Device {#BLOCKDEVICE} Utilization000system.disk.utilization[{#BLOCKDEVICE}]73650150%1000100Mamonsu PostgreSQL LinuxSystem: Block Device {#BLOCKDEVICE} Read Operations000system.disk.read[{#BLOCKDEVICE}]736501501000100Mamonsu PostgreSQL LinuxSystem: Block Device {#BLOCKDEVICE} Write Operations000system.disk.write[{#BLOCKDEVICE}]736501501000100Mamonsu PostgreSQL LinuxSystem: Block Device {#BLOCKDEVICE} Read byte/s000system.disk.read_b[{#BLOCKDEVICE}]73650150b1000100Mamonsu PostgreSQL LinuxSystem: Block Device {#BLOCKDEVICE} Write byte/s000system.disk.write_b[{#BLOCKDEVICE}]73650150b1000100Mamonsu PostgreSQL LinuxSystem: Block Device Overview {#BLOCKDEVICE} operations9002000.0100.0110100.00.000000200CC00020Mamonsu PostgreSQL Linuxsystem.disk.read[{#BLOCKDEVICE}]12FF5656020Mamonsu PostgreSQL Linuxsystem.disk.write[{#BLOCKDEVICE}]22006AAE120Mamonsu PostgreSQL Linuxsystem.disk.utilization[{#BLOCKDEVICE}]System: Block Device Overview {#BLOCKDEVICE} byte/s9002000.0100.0110100.00.000000200CC00020Mamonsu PostgreSQL Linuxsystem.disk.read_b[{#BLOCKDEVICE}]12FF5656020Mamonsu PostgreSQL Linuxsystem.disk.write_b[{#BLOCKDEVICE}]22006AAE120Mamonsu PostgreSQL Linuxsystem.disk.utilization[{#BLOCKDEVICE}]Net Iface Discovery060000007system.net.discovery{#NETDEVICE}.*8A0System: Network Device {#NETDEVICE} RX bytes/s000system.net.rx_bytes[{#NETDEVICE}]73650150b1000100Mamonsu PostgreSQL LinuxSystem: Network Device {#NETDEVICE} RX errors/s000system.net.rx_errs[{#NETDEVICE}]736501501000100Mamonsu PostgreSQL LinuxSystem: Network Device {#NETDEVICE} RX drops/s000system.net.rx_drop[{#NETDEVICE}]736501501000100Mamonsu PostgreSQL LinuxSystem: Network Device {#NETDEVICE} TX bytes/s000system.net.tx_bytes[{#NETDEVICE}]73650150b1000100Mamonsu PostgreSQL LinuxSystem: Network Device {#NETDEVICE} TX errors/s000system.net.tx_errs[{#NETDEVICE}]736501501000100Mamonsu PostgreSQL LinuxSystem: Network Device {#NETDEVICE} TX drops/s000system.net.tx_drop[{#NETDEVICE}]736501501000100Mamonsu PostgreSQL LinuxSystem: Network Device {#NETDEVICE}9002000.0100.0110100.00.000000287C2B9020Mamonsu PostgreSQL Linuxsystem.net.rx_bytes[{#NETDEVICE}]12793F5D020Mamonsu PostgreSQL Linuxsystem.net.tx_bytes[{#NETDEVICE}]pg_probackup discovery060000007pg_probackup.discovery[]{#BACKUPDIR}.*8A0pg_probackup dir {#BACKUPDIR}: size000pg_probackup.dir.size[{#BACKUPDIR}]736503003b0000100Mamonsu PostgreSQL Linuxpg_probackup dir {#BACKUPDIR}: error000pg_probackup.dir.error[{#BACKUPDIR}]7365030040000100Mamonsu PostgreSQL Linux{Mamonsu PostgreSQL Linux:pg_probackup.dir.error[{#BACKUPDIR}].str(ok)}<>1Error in pg_probackup dir {#BACKUPDIR} (hostname={HOSTNAME} value={ITEM.LASTVALUE})030pg_probackup backup dir: {#BACKUPDIR} size9002000.0100.0111100.00.0000002A39B98020Mamonsu PostgreSQL Linuxpg_probackup.dir.size[{#BACKUPDIR}]PostgreSQL Relations Sizes Discovery060000007pgsql.relation.size[{$PG_CONNINFO},{$PG_PATH}]{#RELATIONNAME}.*8A0PostgreSQL Relation Size: {#RELATIONNAME}000pgsql.relation.size[{#RELATIONNAME},{$PG_CONNINFO},{$PG_PATH}]73650153b0000100Mamonsu PostgreSQL LinuxPostgreSQL Relation Size: {#RELATIONNAME}9002000.0100.0111100.00.0000002A39B98020Mamonsu PostgreSQL Linuxpgsql.relation.size[{#RELATIONNAME},{$PG_CONNINFO},{$PG_PATH}]PostgreSQL Replication Lag Discovery060000007pgsql.replication.discovery[{$PG_CONNINFO},{$PG_PATH}]{#APPLICATION_NAME}.*8A0PostgreSQL Replication: {#APPLICATION_NAME} Send Lag - Time elapsed sending recent WAL locally000pgsql.replication.send_lag[{#APPLICATION_NAME},{$PG_CONNINFO},{$PG_PATH}]736506000000100Mamonsu PostgreSQL LinuxPostgreSQL Replication: {#APPLICATION_NAME} Receive Lag - Time elapsed between receiving recent WAL locally and receiving notification that this standby server has flushed it000pgsql.replication.receive_lag[{#APPLICATION_NAME},{$PG_CONNINFO},{$PG_PATH}]736506000000100Mamonsu PostgreSQL LinuxPostgreSQL Replication: {#APPLICATION_NAME} Write Lag - Time elapsed between flushing recent WAL locally and receiving notification that this standby server has written it000pgsql.replication.write_lag[{#APPLICATION_NAME},{$PG_CONNINFO},{$PG_PATH}]736506000000100Mamonsu PostgreSQL LinuxPostgreSQL Replication: {#APPLICATION_NAME} Flush Lag - Time elapsed between flushing recent WAL locally and receiving notification that this standby server has written and flushed it000pgsql.replication.flush_lag[{#APPLICATION_NAME},{$PG_CONNINFO},{$PG_PATH}]736506000000100Mamonsu PostgreSQL LinuxPostgreSQL Replication: {#APPLICATION_NAME} Replay Lag - Time elapsed between flushing recent WAL locally and receiving notification that this standby server has written, flushed and applied000pgsql.replication.replay_lag[{#APPLICATION_NAME},{$PG_CONNINFO},{$PG_PATH}]736506000000100Mamonsu PostgreSQL LinuxPostgreSQL Replication: {#APPLICATION_NAME} Delta of Total Lag000pgsql.replication.total_lag[{#APPLICATION_NAME},{$PG_CONNINFO},{$PG_PATH}]736506000000100Mamonsu PostgreSQL LinuxPostgreSQL Replication: Delta of Total Lag for {#APPLICATION_NAME}9002000.0100.0110100.00.0000000A39B98020Mamonsu PostgreSQL Linuxpgsql.replication.total_lag[{#APPLICATION_NAME},{$PG_CONNINFO},{$PG_PATH}] + Mamonsu Overview2505001500011010003PostgreSQL Connections: OverviewMamonsu PostgreSQL Linux05001501011010003PostgreSQL Instance: Transactions RateMamonsu PostgreSQL Linux05001500111010003System: CPU Time SpentMamonsu PostgreSQL Linux05001501111010003System: Server Free/Used Memory OverviewMamonsu PostgreSQL Linux05001500211010003PostgreSQL Autovacuum: Count of Autovacuum WorkersMamonsu PostgreSQL Linux05001501211010003PostgreSQL Instance: TuplesMamonsu PostgreSQL Linux05001500311010003PostgreSQL bgwriter: BuffersMamonsu PostgreSQL Linux05001501311010003PostgreSQL bgwriter: EventsMamonsu PostgreSQL Linux05001500411010003PostgreSQL Checkpoints: Count (in hour)Mamonsu PostgreSQL Linux05001501411010003PostgreSQL Checkpoints: Write/SyncMamonsu PostgreSQL LinuxMamonsu PostgreSQL Instance2515001500011010003pgsql.ping[{$PG_CONNINFO},{$PG_PATH}]Mamonsu PostgreSQL Linux15001501011010003pgsql.uptime[{$PG_CONNINFO},{$PG_PATH}]Mamonsu PostgreSQL Linux15001500111010003pgsql.cache.hit[{$PG_CONNINFO},{$PG_PATH}]Mamonsu PostgreSQL Linux05001501111010003PostgreSQL Instance: EventsMamonsu PostgreSQL Linux15001500211010003pgsql.temp.bytes[{$PG_CONNINFO},{$PG_PATH}]Mamonsu PostgreSQL Linux15001501211010003pgsql.temp.files[{$PG_CONNINFO},{$PG_PATH}]Mamonsu PostgreSQL LinuxMamonsu PostgreSQL WAL2505001500011010003PostgreSQL Archiver: Archive StatusMamonsu PostgreSQL Linux15001501011010003pgsql.wal.write[{$PG_CONNINFO},{$PG_PATH}]Mamonsu PostgreSQL Linux15001500111010003pgsql.archive_command.size_files_to_archive[{$PG_CONNINFO},{$PG_PATH}]Mamonsu PostgreSQL Linux15001501111010003pgsql.archive_command.archived_files[{$PG_CONNINFO},{$PG_PATH}]Mamonsu PostgreSQL Linux15001500211010003pgsql.wal.write_timeMamonsu PostgreSQL Linux15001501211010003pgsql.wal.sync_timeMamonsu PostgreSQL LinuxMamonsu PostgreSQL Locks3513301000011010003pgsql.events.conflicts[{$PG_CONNINFO},{$PG_PATH}]Mamonsu PostgreSQL Linux13301001011010003pgsql.pg_locks.accessshare[{$PG_CONNINFO},{$PG_PATH}]Mamonsu PostgreSQL Linux13301002011010003pgsql.pg_locks.rowshare[{$PG_CONNINFO},{$PG_PATH}]Mamonsu PostgreSQL Linux13301000111010003pgsql.pg_locks.rowexclusive[{$PG_CONNINFO},{$PG_PATH}]Mamonsu PostgreSQL Linux13301001111010003pgsql.pg_locks.shareupdateexclusive[{$PG_CONNINFO},{$PG_PATH}]Mamonsu PostgreSQL Linux13301002111010003pgsql.pg_locks.share[{$PG_CONNINFO},{$PG_PATH}]Mamonsu PostgreSQL Linux13301000211010003pgsql.pg_locks.sharerowexclusive[{$PG_CONNINFO},{$PG_PATH}]Mamonsu PostgreSQL Linux13301001211010003pgsql.pg_locks.exclusive[{$PG_CONNINFO},{$PG_PATH}]Mamonsu PostgreSQL Linux13301002211010003pgsql.pg_locks.accessexclusive[{$PG_CONNINFO},{$PG_PATH}]Mamonsu PostgreSQL LinuxMamonsu PostgreSQL Transactions2515001500011010003pgsql.oldest.xid_age[{$PG_CONNINFO},{$PG_PATH}]Mamonsu PostgreSQL Linux15001501011010003pgsql.oldest.transaction_time[{$PG_CONNINFO},{$PG_PATH}]Mamonsu PostgreSQL Linux15001500111010003pgsql.prepared.countMamonsu PostgreSQL Linux15001501111010003pgsql.prepared.oldestMamonsu PostgreSQL LinuxMamonsu System (Linux)2505001500011010003System: Block Devices Read/Write BytesMamonsu PostgreSQL Linux05001501011010003System: Block Devices Read/Write OperationsMamonsu PostgreSQL Linux05001500111010003System: Processes OverviewMamonsu PostgreSQL Linux {$PG_CONNINFO}-qAt -p 5433 -U postgres {$PG_PATH}/opt/pgpro/std-10/bin/psql - {Mamonsu PostgreSQL Linux:pgsql.archive_command.count_files_to_archive[{$PG_CONNINFO},{$PG_PATH}].last()}>2PostgreSQL Archiver: count files need to archive on {HOSTNAME} more than 2030{Mamonsu PostgreSQL Linux:pgsql.checkpoint.count_wal[{$PG_CONNINFO},{$PG_PATH}].last()}>12PostgreSQL Checkpoints: required checkpoints occurs to frequently on {HOSTNAME}030 {Mamonsu PostgreSQL Linux:pgsql.connections.total[{$PG_CONNINFO},{$PG_PATH}].last()}/{Mamonsu PostgreSQL Linux:pgsql.connections.max_connections[{$PG_CONNINFO},{$PG_PATH}].last()}*100 >90PostgreSQL Connections: too many connections on {HOSTNAME} (total connections more than 90% of max_connections)030{Mamonsu PostgreSQL Linux:mamonsu.plugin.keepalive.nodata(180)}=1Mamonsu nodata from {HOSTNAME}030{Mamonsu PostgreSQL Linux:pgsql.server_mode.change()}>0PostgreSQL Instance: server mode has been changed on {HOSTNAME} to {ITEM.LASTVALUE}030{Mamonsu PostgreSQL Linux:pgsql.memory_leak_diagnostic.msg_text[].strlen()}>1PostgreSQL Memory Leak: Number of Pids Which Private Anonymous Memory Exceeds private_anon_mem_threshold on {HOSTNAME}. {ITEM.LASTVALUE}030{Mamonsu PostgreSQL Linux:pgsql.oldest.xid_age[{$PG_CONNINFO},{$PG_PATH}].last()}>18000000PostgreSQL Transactions: the oldest XID is too big on {HOSTNAME}030{Mamonsu PostgreSQL Linux:pgsql.oldest.transaction_time[{$PG_CONNINFO},{$PG_PATH}].last()}>18000PostgreSQL Transactions: running transaction is too old on {HOSTNAME}030{Mamonsu PostgreSQL Linux:pgsql.uptime[{$PG_CONNINFO},{$PG_PATH}].last()}<600PostgreSQL Health: service has been restarted on {HOSTNAME} (uptime={ITEM.LASTVALUE})030{Mamonsu PostgreSQL Linux:pgsql.cache.hit[{$PG_CONNINFO},{$PG_PATH}].last()}<80PostgreSQL Health: cache hit ratio too low on {HOSTNAME} ({ITEM.LASTVALUE})030{Mamonsu PostgreSQL Linux:pgsql.ping[{$PG_CONNINFO},{$PG_PATH}].nodata(180)}=1PostgreSQL Health: no ping from PostgreSQL for 3 minutes on {HOSTNAME}030{Mamonsu PostgreSQL Linux:pgsql.prepared.oldest.last()}>60PostgreSQL Prepared Transactions: prepared transaction is too old on {HOSTNAME}030{Mamonsu PostgreSQL Linux:system.processes.forkrate.min(5m)}>500Process fork-rate to frequently on {HOSTNAME}030{Mamonsu PostgreSQL Linux:pgsql.replication_lag.sec[{$PG_CONNINFO},{$PG_PATH}].last()}>300PostgreSQL streaming lag too high on {HOSTNAME} (value={ITEM.LASTVALUE})030{Mamonsu PostgreSQL Linux:pgsql.replication.non_active_slots[{$PG_CONNINFO},{$PG_PATH}].last()}>0PostgreSQL number of non-active replication slots on {HOSTNAME} (value={ITEM.LASTVALUE})030{Mamonsu PostgreSQL Linux:system.uptime.last()}<300System was restarted on {HOSTNAME} (uptime={ITEM.LASTVALUE})030 - PostgreSQL Archiver: Archive Status9002000.0100.0110100.00.00000029C8A4E020Mamonsu PostgreSQL Linuxpgsql.archive_command.count_files_to_archive[{$PG_CONNINFO},{$PG_PATH}]12578159020Mamonsu PostgreSQL Linuxpgsql.archive_command.archived_files[{$PG_CONNINFO},{$PG_PATH}]22E57862020Mamonsu PostgreSQL Linuxpgsql.archive_command.failed_trying_to_archive[{$PG_CONNINFO},{$PG_PATH}]PostgreSQL bgwriter: Buffers9002000.0100.0110100.00.0000002793F5D020Mamonsu PostgreSQL Linuxpgsql.bgwriter.buffers_checkpoint[{$PG_CONNINFO},{$PG_PATH}]129C8A4E020Mamonsu PostgreSQL Linuxpgsql.bgwriter.buffers_clean[{$PG_CONNINFO},{$PG_PATH}]227EB29B020Mamonsu PostgreSQL Linuxpgsql.bgwriter.buffers_backend[{$PG_CONNINFO},{$PG_PATH}]323B415A020Mamonsu PostgreSQL Linuxpgsql.bgwriter.buffers_alloc[{$PG_CONNINFO},{$PG_PATH}]PostgreSQL bgwriter: Events9002000.0100.0110100.00.000000200B0B8020Mamonsu PostgreSQL Linuxpgsql.bgwriter.maxwritten_clean[{$PG_CONNINFO},{$PG_PATH}]129C8A4E020Mamonsu PostgreSQL Linuxpgsql.bgwriter.buffers_backend_fsync[{$PG_CONNINFO},{$PG_PATH}]PostgreSQL Checkpoints: Count (in hour)9002000.0100.0110100.00.0000002578159020Mamonsu PostgreSQL Linuxpgsql.checkpoint.count_timed[{$PG_CONNINFO},{$PG_PATH}]12793F5D020Mamonsu PostgreSQL Linuxpgsql.checkpoint.count_wal[{$PG_CONNINFO},{$PG_PATH}]PostgreSQL Checkpoints: Write/Sync9002000.0100.0110100.00.000000200B0B8020Mamonsu PostgreSQL Linuxpgsql.checkpoint.write_time[{$PG_CONNINFO},{$PG_PATH}]129C8A4E020Mamonsu PostgreSQL Linuxpgsql.checkpoint.checkpoint_sync_time[{$PG_CONNINFO},{$PG_PATH}]PostgreSQL Connections: Overview9002000.0100.0110100.00.0000002578159020Mamonsu PostgreSQL Linuxpgsql.connections.active[{$PG_CONNINFO},{$PG_PATH}]128B817C020Mamonsu PostgreSQL Linuxpgsql.connections.idle[{$PG_CONNINFO},{$PG_PATH}]229C8A4E020Mamonsu PostgreSQL Linuxpgsql.connections.idle_in_transaction[{$PG_CONNINFO},{$PG_PATH}]32F6CB93020Mamonsu PostgreSQL Linuxpgsql.connections.idle_in_transaction_aborted[{$PG_CONNINFO},{$PG_PATH}]4200B0B8020Mamonsu PostgreSQL Linuxpgsql.connections.fastpath_function_call[{$PG_CONNINFO},{$PG_PATH}]523B415A020Mamonsu PostgreSQL Linuxpgsql.connections.disabled[{$PG_CONNINFO},{$PG_PATH}]62E57862020Mamonsu PostgreSQL Linuxpgsql.connections.total[{$PG_CONNINFO},{$PG_PATH}]720082A5020Mamonsu PostgreSQL Linuxpgsql.connections.waiting[{$PG_CONNINFO},{$PG_PATH}]82FF3C47020Mamonsu PostgreSQL Linuxpgsql.connections.max_connections[{$PG_CONNINFO},{$PG_PATH}]927EB29B020Mamonsu PostgreSQL Linuxpgsql.connections.other[{$PG_CONNINFO},{$PG_PATH}]PostgreSQL Autovacuum: Count of Autovacuum Workers9002000.0100.0110100.00.00000027EB29B020Mamonsu PostgreSQL Linuxpgsql.autovacumm.count[{$PG_CONNINFO},{$PG_PATH}]System: Block Devices Read/Write Operations9002000.0100.0110100.00.00000007EB29B020Mamonsu PostgreSQL Linuxsystem.disk.all_read10793F5D020Mamonsu PostgreSQL Linuxsystem.disk.all_writeSystem: Block Devices Read/Write Bytes9002000.0100.0110100.00.00000007EB29B020Mamonsu PostgreSQL Linuxsystem.disk.all_read_b10793F5D020Mamonsu PostgreSQL Linuxsystem.disk.all_write_bPostgreSQL Instance: Blocks Rate9002000.0100.0110100.00.00000027EB29B020Mamonsu PostgreSQL Linuxpgsql.blocks.hit[{$PG_CONNINFO},{$PG_PATH}]12793F5D020Mamonsu PostgreSQL Linuxpgsql.blocks.read[{$PG_CONNINFO},{$PG_PATH}]PostgreSQL Instance: Transactions Rate9002000.0100.0110100.00.0000002578159020Mamonsu PostgreSQL Linuxpgsql.transactions.committed[{$PG_CONNINFO},{$PG_PATH}]12E57862020Mamonsu PostgreSQL Linuxpgsql.events.xact_rollback[{$PG_CONNINFO},{$PG_PATH}]PostgreSQL Instance: Events9002000.0100.0110100.00.00000029C8A4E020Mamonsu PostgreSQL Linuxpgsql.events.conflicts[{$PG_CONNINFO},{$PG_PATH}]123B415A020Mamonsu PostgreSQL Linuxpgsql.events.deadlocks[{$PG_CONNINFO},{$PG_PATH}]22793F5D020Mamonsu PostgreSQL Linuxpgsql.events.checksum_failures[{$PG_CONNINFO},{$PG_PATH}]PostgreSQL Instance: Temp Files9002000.0100.0110100.00.000000200B0B8020Mamonsu PostgreSQL Linuxpgsql.temp.bytes[{$PG_CONNINFO},{$PG_PATH}]120082A5120Mamonsu PostgreSQL Linuxpgsql.temp.files[{$PG_CONNINFO},{$PG_PATH}]PostgreSQL Instance: Tuples9002000.0100.0110100.00.00000023B415A020Mamonsu PostgreSQL Linuxpgsql.tuples.deleted[{$PG_CONNINFO},{$PG_PATH}]127EB29B020Mamonsu PostgreSQL Linuxpgsql.tuples.fetched[{$PG_CONNINFO},{$PG_PATH}]2200B0B8020Mamonsu PostgreSQL Linuxpgsql.tuples.inserted[{$PG_CONNINFO},{$PG_PATH}]329C8A4E120Mamonsu PostgreSQL Linuxpgsql.tuples.returned[{$PG_CONNINFO},{$PG_PATH}]426A4F5F020Mamonsu PostgreSQL Linuxpgsql.tuples.updated[{$PG_CONNINFO},{$PG_PATH}]System: Server Memory Detailed Overview9004000.0100.0111100.00.000000090BD72020Mamonsu PostgreSQL Linuxsystem.memory.active10578159020Mamonsu PostgreSQL Linuxsystem.memory.available2000B0B8020Mamonsu PostgreSQL Linuxsystem.memory.buffers309C8A4E020Mamonsu PostgreSQL Linuxsystem.memory.cached4052768F020Mamonsu PostgreSQL Linuxsystem.memory.committed50001219020Mamonsu PostgreSQL Linuxsystem.memory.inactive609F1E28020Mamonsu PostgreSQL Linuxsystem.memory.mapped708B817C020Mamonsu PostgreSQL Linuxsystem.memory.page_tables80F6CB93020Mamonsu PostgreSQL Linuxsystem.memory.slab900082A5020Mamonsu PostgreSQL Linuxsystem.memory.swap1007EB29B020Mamonsu PostgreSQL Linuxsystem.memory.swap_cache110E57862020Mamonsu PostgreSQL Linuxsystem.memory.total1203B415A020Mamonsu PostgreSQL Linuxsystem.memory.unused130793F5D020Mamonsu PostgreSQL Linuxsystem.memory.used140CF6518020Mamonsu PostgreSQL Linuxsystem.memory.vmalloc_usedSystem: Server Free/Used Memory Overview9004000.0100.0111100.00.0000001578159020Mamonsu PostgreSQL Linuxsystem.memory.available119C8A4E020Mamonsu PostgreSQL Linuxsystem.memory.cached24E57862020Mamonsu PostgreSQL Linuxsystem.memory.total31793F5D020Mamonsu PostgreSQL Linuxsystem.memory.usedPostgreSQL pg_buffercache: Shared Buffer9002000.0100.0110100.00.0000002E57862020Mamonsu PostgreSQL Linuxpgsql.buffers.size[{$PG_CONNINFO},{$PG_PATH}]127EB29B020Mamonsu PostgreSQL Linuxpgsql.buffers.twice_used[{$PG_CONNINFO},{$PG_PATH}]22793F5D020Mamonsu PostgreSQL Linuxpgsql.buffers.dirty[{$PG_CONNINFO},{$PG_PATH}]PostgreSQL: Locks Sampling9002000.0100.0110100.00.0000002578159020Mamonsu PostgreSQL Linuxpgsql.pg_locks.accessshare[{$PG_CONNINFO},{$PG_PATH}]123B415A020Mamonsu PostgreSQL Linuxpgsql.pg_locks.rowshare[{$PG_CONNINFO},{$PG_PATH}]227EB29B020Mamonsu PostgreSQL Linuxpgsql.pg_locks.rowexclusive[{$PG_CONNINFO},{$PG_PATH}]32F6CB93020Mamonsu PostgreSQL Linuxpgsql.pg_locks.shareupdateexclusive[{$PG_CONNINFO},{$PG_PATH}]420082A5020Mamonsu PostgreSQL Linuxpgsql.pg_locks.share[{$PG_CONNINFO},{$PG_PATH}]5200B0B8020Mamonsu PostgreSQL Linuxpgsql.pg_locks.sharerowexclusive[{$PG_CONNINFO},{$PG_PATH}]629C8A4E020Mamonsu PostgreSQL Linuxpgsql.pg_locks.exclusive[{$PG_CONNINFO},{$PG_PATH}]72793F5D020Mamonsu PostgreSQL Linuxpgsql.pg_locks.accessexclusive[{$PG_CONNINFO},{$PG_PATH}]PostgreSQL Prepared Transactions: Overview9002000.0100.0110100.00.00000028B817C020Mamonsu PostgreSQL Linuxpgsql.prepared.count129C8A4E120Mamonsu PostgreSQL Linuxpgsql.prepared.oldestSystem: Processes Overview9002000.0100.0110100.00.0000000578159020Mamonsu PostgreSQL Linuxsystem.processes.running10E57862020Mamonsu PostgreSQL Linuxsystem.processes.blocked209C8A4E120Mamonsu PostgreSQL Linuxsystem.processes.forkrateSystem: CPU Time Spent9002000.0100.0111100.00.0000000578159020Mamonsu PostgreSQL Linuxsystem.cpu.user10793F5D020Mamonsu PostgreSQL Linuxsystem.cpu.nice209C8A4E020Mamonsu PostgreSQL Linuxsystem.cpu.system308B817C020Mamonsu PostgreSQL Linuxsystem.cpu.idle400082A5020Mamonsu PostgreSQL Linuxsystem.cpu.iowait503B415A020Mamonsu PostgreSQL Linuxsystem.cpu.irq60F6CB93020Mamonsu PostgreSQL Linuxsystem.cpu.softirqPostgreSQL Statements: Bytes9002000.0100.0110100.00.00000027EB29B020Mamonsu PostgreSQL Linuxpgsql.stat.read_bytes[{$PG_CONNINFO},{$PG_PATH}]12793F5D020Mamonsu PostgreSQL Linuxpgsql.stat.write_bytes[{$PG_CONNINFO},{$PG_PATH}]229C8A4E020Mamonsu PostgreSQL Linuxpgsql.stat.dirty_bytes[{$PG_CONNINFO},{$PG_PATH}]PostgreSQL Statements: Spend Time9002000.0100.0111100.00.00000027EB29B020Mamonsu PostgreSQL Linuxpgsql.stat.read_time[{$PG_CONNINFO},{$PG_PATH}]12793F5D020Mamonsu PostgreSQL Linuxpgsql.stat.write_time[{$PG_CONNINFO},{$PG_PATH}]229C8A4E020Mamonsu PostgreSQL Linuxpgsql.stat.other_time[{$PG_CONNINFO},{$PG_PATH}]PostgreSQL Statements: WAL Statistics9002000.0100.0110100.00.000000200B0B8020Mamonsu PostgreSQL Linuxpgsql.stat.wal_bytes[{$PG_CONNINFO},{$PG_PATH}]120082A5020Mamonsu PostgreSQL Linuxpgsql.stat.wal_records[{$PG_CONNINFO},{$PG_PATH}]229C8A4E020Mamonsu PostgreSQL Linuxpgsql.stat.wal_fpi[{$PG_CONNINFO},{$PG_PATH}]PostgreSQL Wait Sampling: Locks by Type9002000.0100.0111100.00.00000027EB29B020Mamonsu PostgreSQL Linuxpgsql.all_lock[lwlock]12793F5D020Mamonsu PostgreSQL Linuxpgsql.all_lock[hwlock]2200B0B8020Mamonsu PostgreSQL Linuxpgsql.all_lock[buffer]329C8A4E020Mamonsu PostgreSQL Linuxpgsql.all_lock[extension]42F6CB93020Mamonsu PostgreSQL Linuxpgsql.all_lock[client]523B415A020Mamonsu PostgreSQL Linuxpgsql.all_lock[other]PostgreSQL Wait Sampling: Heavyweight Locks9002000.0100.0111100.00.00000027EB29B020Mamonsu PostgreSQL Linuxpgsql.hwlock[relation]123B415A020Mamonsu PostgreSQL Linuxpgsql.hwlock[extend]22F6CB93020Mamonsu PostgreSQL Linuxpgsql.hwlock[page]320082A5020Mamonsu PostgreSQL Linuxpgsql.hwlock[tuple]4200B0B8020Mamonsu PostgreSQL Linuxpgsql.hwlock[transactionid]52793F5D020Mamonsu PostgreSQL Linuxpgsql.hwlock[virtualxid]629C8A4E020Mamonsu PostgreSQL Linuxpgsql.hwlock[speculative_token]728B817C020Mamonsu PostgreSQL Linuxpgsql.hwlock[object]8252768F020Mamonsu PostgreSQL Linuxpgsql.hwlock[userlock]92FE9430020Mamonsu PostgreSQL Linuxpgsql.hwlock[advisory]PostgreSQL Wait Sampling: Lightweight Locks9002000.0100.0111100.00.0000002793F5D020Mamonsu PostgreSQL Linuxpgsql.lwlock[xid]1200B0B8020Mamonsu PostgreSQL Linuxpgsql.lwlock[autovacuum]227EB29B020Mamonsu PostgreSQL Linuxpgsql.lwlock[wal]320082A5020Mamonsu PostgreSQL Linuxpgsql.lwlock[clog]423B415A020Mamonsu PostgreSQL Linuxpgsql.lwlock[replication]529C8A4E020Mamonsu PostgreSQL Linuxpgsql.lwlock[logical_replication]62F6CB93020Mamonsu PostgreSQL Linuxpgsql.lwlock[buffer]728B817C020Mamonsu PostgreSQL Linuxpgsql.lwlock[other] + {Mamonsu PostgreSQL Linux:pgsql.archive_command.count_files_to_archive[{$PG_CONNINFO},{$PG_PATH}].last()}>2PostgreSQL Archiver: count files need to archive on {HOSTNAME} more than 2030{Mamonsu PostgreSQL Linux:pgsql.checkpoint.count_wal[{$PG_CONNINFO},{$PG_PATH}].last()}>12PostgreSQL Checkpoints: required checkpoints occurs too frequently on {HOSTNAME}030 {Mamonsu PostgreSQL Linux:pgsql.connections.total[{$PG_CONNINFO},{$PG_PATH}].last()}/{Mamonsu PostgreSQL Linux:pgsql.connections.max_connections[{$PG_CONNINFO},{$PG_PATH}].last()}*100 >90PostgreSQL Connections: too many connections on {HOSTNAME} (total connections more than 90% of max_connections)030{Mamonsu PostgreSQL Linux:mamonsu.plugin.keepalive.nodata(180)}=1Mamonsu nodata from {HOSTNAME}030{Mamonsu PostgreSQL Linux:pgsql.server_mode.change()}>0PostgreSQL Instance: server mode has been changed on {HOSTNAME} to {ITEM.LASTVALUE}030{Mamonsu PostgreSQL Linux:pgsql.memory_leak_diagnostic.msg_text[].strlen()}>1PostgreSQL Memory Leak: Number of Pids Which Private Anonymous Memory Exceeds private_anon_mem_threshold on {HOSTNAME}. {ITEM.LASTVALUE}030{Mamonsu PostgreSQL Linux:pgsql.oldest.xid_age[{$PG_CONNINFO},{$PG_PATH}].last()}>18000000PostgreSQL Transactions: the oldest XID is too big on {HOSTNAME}030{Mamonsu PostgreSQL Linux:pgsql.oldest.transaction_time[{$PG_CONNINFO},{$PG_PATH}].last()}>18000PostgreSQL Transactions: running transaction is too old on {HOSTNAME}030{Mamonsu PostgreSQL Linux:pgsql.uptime[{$PG_CONNINFO},{$PG_PATH}].change()}>600PostgreSQL Health: service has been restarted on {HOSTNAME} (uptime={ITEM.LASTVALUE})030{Mamonsu PostgreSQL Linux:pgsql.cache.hit[{$PG_CONNINFO},{$PG_PATH}].last()}<80PostgreSQL Health: cache hit ratio too low on {HOSTNAME} ({ITEM.LASTVALUE})030{Mamonsu PostgreSQL Linux:pgsql.ping[{$PG_CONNINFO},{$PG_PATH}].nodata(180)}=1PostgreSQL Health: no ping from PostgreSQL for 3 minutes on {HOSTNAME}030{Mamonsu PostgreSQL Linux:pgsql.prepared.oldest.last()}>60PostgreSQL Prepared Transactions: prepared transaction is too old on {HOSTNAME}030{Mamonsu PostgreSQL Linux:system.processes.forkrate.min(5m)}>500Process fork-rate too frequently on {HOSTNAME}030{Mamonsu PostgreSQL Linux:pgsql.replication_lag.sec[{$PG_CONNINFO},{$PG_PATH}].last()}>300PostgreSQL streaming lag too high on {HOSTNAME} (value={ITEM.LASTVALUE})030{Mamonsu PostgreSQL Linux:pgsql.replication.non_active_slots[{$PG_CONNINFO},{$PG_PATH}].last()}>0PostgreSQL number of non-active replication slots on {HOSTNAME} (value={ITEM.LASTVALUE})030{Mamonsu PostgreSQL Linux:system.uptime.last()}<300System was restarted on {HOSTNAME} (uptime={ITEM.LASTVALUE})030 + PostgreSQL Archiver: Archive Status9002000.0100.0110100.00.0000002006AAE020Mamonsu PostgreSQL Linuxpgsql.archive_command.count_files_to_archive[{$PG_CONNINFO},{$PG_PATH}]1200CC00020Mamonsu PostgreSQL Linuxpgsql.archive_command.archived_files[{$PG_CONNINFO},{$PG_PATH}]22FF5656020Mamonsu PostgreSQL Linuxpgsql.archive_command.failed_trying_to_archive[{$PG_CONNINFO},{$PG_PATH}]PostgreSQL bgwriter: Buffers9002000.0100.0110100.00.0000002006AAE020Mamonsu PostgreSQL Linuxpgsql.bgwriter.buffers_checkpoint[{$PG_CONNINFO},{$PG_PATH}]1200CC00020Mamonsu PostgreSQL Linuxpgsql.bgwriter.buffers_clean[{$PG_CONNINFO},{$PG_PATH}]229C8A4E020Mamonsu PostgreSQL Linuxpgsql.bgwriter.buffers_backend[{$PG_CONNINFO},{$PG_PATH}]32FF5656020Mamonsu PostgreSQL Linuxpgsql.bgwriter.buffers_alloc[{$PG_CONNINFO},{$PG_PATH}]PostgreSQL bgwriter: Events9002000.0100.0110100.00.0000002FF5656020Mamonsu PostgreSQL Linuxpgsql.bgwriter.maxwritten_clean[{$PG_CONNINFO},{$PG_PATH}]1200CC00020Mamonsu PostgreSQL Linuxpgsql.bgwriter.buffers_backend_fsync[{$PG_CONNINFO},{$PG_PATH}]PostgreSQL Checkpoints: Count (in hour)9002000.0100.0110100.00.000000200CC00020Mamonsu PostgreSQL Linuxpgsql.checkpoint.count_timed[{$PG_CONNINFO},{$PG_PATH}]12FF5656020Mamonsu PostgreSQL Linuxpgsql.checkpoint.count_wal[{$PG_CONNINFO},{$PG_PATH}]PostgreSQL Checkpoints: Write/Sync9002000.0100.0110100.00.000000200CC00020Mamonsu PostgreSQL Linuxpgsql.checkpoint.write_time[{$PG_CONNINFO},{$PG_PATH}]12FF5656020Mamonsu PostgreSQL Linuxpgsql.checkpoint.checkpoint_sync_time[{$PG_CONNINFO},{$PG_PATH}]PostgreSQL Connections: Overview9002000.0100.0111100.00.000000200CC00020Mamonsu PostgreSQL Linuxpgsql.connections.active[{$PG_CONNINFO},{$PG_PATH}]12A39B98020Mamonsu PostgreSQL Linuxpgsql.connections.idle[{$PG_CONNINFO},{$PG_PATH}]229C8A4E020Mamonsu PostgreSQL Linuxpgsql.connections.idle_in_transaction[{$PG_CONNINFO},{$PG_PATH}]32F6CB93020Mamonsu PostgreSQL Linuxpgsql.connections.idle_in_transaction_aborted[{$PG_CONNINFO},{$PG_PATH}]4200B0B8020Mamonsu PostgreSQL Linuxpgsql.connections.fastpath_function_call[{$PG_CONNINFO},{$PG_PATH}]523B415A020Mamonsu PostgreSQL Linuxpgsql.connections.disabled[{$PG_CONNINFO},{$PG_PATH}]62FF5656020Mamonsu PostgreSQL Linuxpgsql.connections.total[{$PG_CONNINFO},{$PG_PATH}]72006AAE020Mamonsu PostgreSQL Linuxpgsql.connections.waiting[{$PG_CONNINFO},{$PG_PATH}]8287C2B9020Mamonsu PostgreSQL Linuxpgsql.connections.other[{$PG_CONNINFO},{$PG_PATH}]PostgreSQL Autovacuum: Count of Autovacuum Workers9002000.0100.0110100.00.000000287C2B9020Mamonsu PostgreSQL Linuxpgsql.autovacumm.count[{$PG_CONNINFO},{$PG_PATH}]System: Block Devices Read/Write Operations9002000.0100.0110100.00.000000200CC00020Mamonsu PostgreSQL Linuxsystem.disk.all_read12FF5656020Mamonsu PostgreSQL Linuxsystem.disk.all_writeSystem: Block Devices Read/Write Bytes9002000.0100.0110100.00.000000200CC00020Mamonsu PostgreSQL Linuxsystem.disk.all_read_b12FF5656020Mamonsu PostgreSQL Linuxsystem.disk.all_write_bPostgreSQL Instance: Blocks Rate9002000.0100.0110100.00.000000287C2B9020Mamonsu PostgreSQL Linuxpgsql.blocks.hit[{$PG_CONNINFO},{$PG_PATH}]12793F5D020Mamonsu PostgreSQL Linuxpgsql.blocks.read[{$PG_CONNINFO},{$PG_PATH}]PostgreSQL Instance: Transactions Rate9002000.0100.0110100.00.000000200CC00020Mamonsu PostgreSQL Linuxpgsql.transactions.committed[{$PG_CONNINFO},{$PG_PATH}]12FF5656020Mamonsu PostgreSQL Linuxpgsql.events.xact_rollback[{$PG_CONNINFO},{$PG_PATH}]PostgreSQL Instance: Events9002000.0100.0110100.00.000000200CC00020Mamonsu PostgreSQL Linuxpgsql.events.conflicts[{$PG_CONNINFO},{$PG_PATH}]12FF5656020Mamonsu PostgreSQL Linuxpgsql.events.deadlocks[{$PG_CONNINFO},{$PG_PATH}]22006AAE020Mamonsu PostgreSQL Linuxpgsql.events.checksum_failures[{$PG_CONNINFO},{$PG_PATH}]PostgreSQL Instance: Temp Files9002000.0100.0110100.00.000000200B0B8020Mamonsu PostgreSQL Linuxpgsql.temp.bytes[{$PG_CONNINFO},{$PG_PATH}]12006AAE120Mamonsu PostgreSQL Linuxpgsql.temp.files[{$PG_CONNINFO},{$PG_PATH}]PostgreSQL Instance: Tuples9002000.0100.0110100.00.0000002FF5656020Mamonsu PostgreSQL Linuxpgsql.tuples.deleted[{$PG_CONNINFO},{$PG_PATH}]12006AAE020Mamonsu PostgreSQL Linuxpgsql.tuples.fetched[{$PG_CONNINFO},{$PG_PATH}]2200CC00020Mamonsu PostgreSQL Linuxpgsql.tuples.inserted[{$PG_CONNINFO},{$PG_PATH}]32001219120Mamonsu PostgreSQL Linuxpgsql.tuples.returned[{$PG_CONNINFO},{$PG_PATH}]429C8A4E020Mamonsu PostgreSQL Linuxpgsql.tuples.updated[{$PG_CONNINFO},{$PG_PATH}]System: Server Memory Detailed Overview9004000.0100.0111100.00.0000000BAEB6B020Mamonsu PostgreSQL Linuxsystem.memory.active1000CC00020Mamonsu PostgreSQL Linuxsystem.memory.available2000B0B8020Mamonsu PostgreSQL Linuxsystem.memory.buffers3052768F020Mamonsu PostgreSQL Linuxsystem.memory.cached409C8A4E020Mamonsu PostgreSQL Linuxsystem.memory.committed50A39B98020Mamonsu PostgreSQL Linuxsystem.memory.inactive609F1E28020Mamonsu PostgreSQL Linuxsystem.memory.mapped70793F5D020Mamonsu PostgreSQL Linuxsystem.memory.page_tables80F6CB93020Mamonsu PostgreSQL Linuxsystem.memory.slab90006AAE020Mamonsu PostgreSQL Linuxsystem.memory.swap10087C2B9020Mamonsu PostgreSQL Linuxsystem.memory.swap_cache1103B415A020Mamonsu PostgreSQL Linuxsystem.memory.unused120001219020Mamonsu PostgreSQL Linuxsystem.memory.used130CF6518020Mamonsu PostgreSQL Linuxsystem.memory.vmalloc_usedSystem: Server Free/Used Memory Overview9004000.0100.0110100.00.0000001001219020Mamonsu PostgreSQL Linuxsystem.memory.used1152768F020Mamonsu PostgreSQL Linuxsystem.memory.cached2100CC00020Mamonsu PostgreSQL Linuxsystem.memory.available34FF5656020Mamonsu PostgreSQL Linuxsystem.memory.totalPostgreSQL pg_buffercache: Shared Buffer9002000.0100.0110100.00.000000200CC00020Mamonsu PostgreSQL Linuxpgsql.buffers.size[{$PG_CONNINFO},{$PG_PATH}]12006AAE020Mamonsu PostgreSQL Linuxpgsql.buffers.twice_used[{$PG_CONNINFO},{$PG_PATH}]22FF5656020Mamonsu PostgreSQL Linuxpgsql.buffers.dirty[{$PG_CONNINFO},{$PG_PATH}]PostgreSQL: Locks Sampling9002000.0100.0110100.00.000000200CC00020Mamonsu PostgreSQL Linuxpgsql.pg_locks.accessshare[{$PG_CONNINFO},{$PG_PATH}]123B415A020Mamonsu PostgreSQL Linuxpgsql.pg_locks.rowshare[{$PG_CONNINFO},{$PG_PATH}]22FF5656020Mamonsu PostgreSQL Linuxpgsql.pg_locks.rowexclusive[{$PG_CONNINFO},{$PG_PATH}]32F6CB93020Mamonsu PostgreSQL Linuxpgsql.pg_locks.shareupdateexclusive[{$PG_CONNINFO},{$PG_PATH}]42006AAE020Mamonsu PostgreSQL Linuxpgsql.pg_locks.share[{$PG_CONNINFO},{$PG_PATH}]5200B0B8020Mamonsu PostgreSQL Linuxpgsql.pg_locks.sharerowexclusive[{$PG_CONNINFO},{$PG_PATH}]629C8A4E020Mamonsu PostgreSQL Linuxpgsql.pg_locks.exclusive[{$PG_CONNINFO},{$PG_PATH}]72793F5D020Mamonsu PostgreSQL Linuxpgsql.pg_locks.accessexclusive[{$PG_CONNINFO},{$PG_PATH}]PostgreSQL Prepared Transactions: Overview9002000.0100.0110100.00.0000002A39B98020Mamonsu PostgreSQL Linuxpgsql.prepared.count129C8A4E120Mamonsu PostgreSQL Linuxpgsql.prepared.oldestSystem: Processes Overview9002000.0100.0110100.00.000000200CC00020Mamonsu PostgreSQL Linuxsystem.processes.running12FF5656020Mamonsu PostgreSQL Linuxsystem.processes.blocked22006AAE120Mamonsu PostgreSQL Linuxsystem.processes.forkrateSystem: CPU Time Spent9002000.0100.0111100.00.000000200CC00020Mamonsu PostgreSQL Linuxsystem.cpu.user12793F5D020Mamonsu PostgreSQL Linuxsystem.cpu.nice229C8A4E020Mamonsu PostgreSQL Linuxsystem.cpu.system32A39B98020Mamonsu PostgreSQL Linuxsystem.cpu.idle42006AAE020Mamonsu PostgreSQL Linuxsystem.cpu.iowait52FF5656020Mamonsu PostgreSQL Linuxsystem.cpu.irq62F6CB93020Mamonsu PostgreSQL Linuxsystem.cpu.softirqPostgreSQL Statements: Bytes9002000.0100.0110100.00.000000287C2B9020Mamonsu PostgreSQL Linuxpgsql.stat.read_bytes[{$PG_CONNINFO},{$PG_PATH}]12793F5D020Mamonsu PostgreSQL Linuxpgsql.stat.write_bytes[{$PG_CONNINFO},{$PG_PATH}]229C8A4E020Mamonsu PostgreSQL Linuxpgsql.stat.dirty_bytes[{$PG_CONNINFO},{$PG_PATH}]PostgreSQL Statements: Spent Time9002000.0100.0111100.00.000000287C2B9020Mamonsu PostgreSQL Linuxpgsql.stat.read_time[{$PG_CONNINFO},{$PG_PATH}]12793F5D020Mamonsu PostgreSQL Linuxpgsql.stat.write_time[{$PG_CONNINFO},{$PG_PATH}]229C8A4E020Mamonsu PostgreSQL Linuxpgsql.stat.other_time[{$PG_CONNINFO},{$PG_PATH}]PostgreSQL Statements: WAL Statistics9002000.0100.0110100.00.000000200B0B8020Mamonsu PostgreSQL Linuxpgsql.stat.wal_bytes[{$PG_CONNINFO},{$PG_PATH}]12006AAE020Mamonsu PostgreSQL Linuxpgsql.stat.wal_records[{$PG_CONNINFO},{$PG_PATH}]229C8A4E020Mamonsu PostgreSQL Linuxpgsql.stat.wal_fpi[{$PG_CONNINFO},{$PG_PATH}] \ No newline at end of file diff --git a/packaging/conf/template_linux.xml b/packaging/conf/template_linux.xml index 71383e6..dce07f0 100644 --- a/packaging/conf/template_linux.xml +++ b/packaging/conf/template_linux.xml @@ -21,12 +21,12 @@ Mamonsu PostgreSQL Linux - PostgreSQL Archiver: Files in archive_status Need to Archive Count200pgsql.archive_command[count_files_to_archive]736501530000100Mamonsu PostgreSQL LinuxPostgreSQL Archiver: Files Need to Archive Size200pgsql.archive_command[size_files_to_archive]73650153b0000100Mamonsu PostgreSQL LinuxPostgreSQL Archiver: Archived Files Count200pgsql.archive_command[archived_files]736501532000100Mamonsu PostgreSQL LinuxPostgreSQL Archiver: Attempts to Archive Files Count200pgsql.archive_command[failed_trying_to_archive]736501532000100Mamonsu PostgreSQL LinuxPostgreSQL bgwriter: Buffers Written During Checkpoints200pgsql.bgwriter[buffers_checkpoint]736501530000100Mamonsu PostgreSQL LinuxPostgreSQL bgwriter: Buffers Written200pgsql.bgwriter[buffers_clean]736501530000100Mamonsu PostgreSQL LinuxPostgreSQL bgwriter: Number of bgwriter Stopped by Max Write Count200pgsql.bgwriter[maxwritten_clean]736501530000100Mamonsu PostgreSQL LinuxPostgreSQL bgwriter: Buffers Written Directly by a Backend200pgsql.bgwriter[buffers_backend]736501530000100Mamonsu PostgreSQL LinuxPostgreSQL bgwriter: Times a Backend Execute Its Own Fsync200pgsql.bgwriter[buffers_backend_fsync]736501530000100Mamonsu PostgreSQL LinuxPostgreSQL bgwriter: Buffers Allocated200pgsql.bgwriter[buffers_alloc]736501530000100Mamonsu PostgreSQL LinuxPostgreSQL CFS: Written byte/s200pgsql.cfs.activity[written_bytes]73650600Bps0000100Mamonsu PostgreSQL LinuxPostgreSQL CFS: Scanned byte/s200pgsql.cfs.activity[scanned_bytes]73650600Bps0000100Mamonsu PostgreSQL LinuxPostgreSQL CFS: Compressed Files200pgsql.cfs.activity[compressed_files]736506000000100Mamonsu PostgreSQL LinuxPostgreSQL CFS: Scanned Files200pgsql.cfs.activity[scanned_files]736506000000100Mamonsu PostgreSQL LinuxPostgreSQL CFS: Current Ratio200pgsql.cfs.activity[current_compress_ratio]736506000000100Mamonsu PostgreSQL LinuxPostgreSQL CFS: Total Ratio200pgsql.cfs.activity[total_compress_ratio]736506000000100Mamonsu PostgreSQL LinuxPostgreSQL Checkpoints: by Timeout (in hour)200pgsql.checkpoint[count_timed]7365030000000100Mamonsu PostgreSQL LinuxPostgreSQL Checkpoints: by WAL (in hour)200pgsql.checkpoint[count_wal]7365030000000100Mamonsu PostgreSQL LinuxPostgreSQL Checkpoints: Write Time200pgsql.checkpoint[write_time]736503000ms0000100Mamonsu PostgreSQL LinuxPostgreSQL Checkpoints: Sync Time200pgsql.checkpoint[checkpoint_sync_time]736503000ms0000100Mamonsu PostgreSQL LinuxPostgreSQL Connections: Number of Total User Connections200pgsql.connections[total]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Connections: Number of Waiting User Connections200pgsql.connections[waiting]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Connections: Max Connections200pgsql.connections[max_connections]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Connections: Number of Active User Connections200pgsql.connections[active]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Connections: Number of Idle User Connections200pgsql.connections[idle]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Connections: Number of Idle in Transaction User Connections200pgsql.connections[idle_in_transaction]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Connections: Number of Idle in Transaction (Aborted) User Connections200pgsql.connections[idle_in_transaction_aborted]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Connections: Number of Fastpath Function Call User Connections200pgsql.connections[fastpath_function_call]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Connections: Number of Disabled User Connections200pgsql.connections[disabled]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Connections: Number of Other Connections200pgsql.connections[other]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Autovacuum: Count of Autovacuum Workers200pgsql.autovacumm.count[]7365030000000100Mamonsu PostgreSQL LinuxSystem: Block Devices Read Requests200system.disk.all_read[]736501500000100Mamonsu PostgreSQL LinuxSystem: Block Devices Write Requests200system.disk.all_write[]736501500000100Mamonsu PostgreSQL LinuxSystem: Block Devices Read byte/s200system.disk.all_read_b[]736501500000100Mamonsu PostgreSQL LinuxSystem: Block Devices Write byte/s200system.disk.all_write_b[]736501500000100Mamonsu PostgreSQL LinuxMamonsu: Plugin Errors200mamonsu.plugin.errors[]736506040000100Mamonsu PostgreSQL LinuxMamonsu: Plugin Keep Alive200mamonsu.plugin.keepalive[]736506000000100Mamonsu PostgreSQL LinuxMamonsu: RSS Memory Max Usage200mamonsu.memory.rss[max]73650600b0000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Transactions Committed200pgsql.transactions[committed]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Server Mode200pgsql.server_mode736501540000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Blocks Hit200pgsql.blocks[hit]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Server Mode200pgsql.server_mode736501540000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Blocks Read200pgsql.blocks[read]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Server Mode200pgsql.server_mode736501540000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Conflict Events200pgsql.events[conflicts]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Server Mode200pgsql.server_mode736501540000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Deadlock Events200pgsql.events[deadlocks]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Server Mode200pgsql.server_mode736501540000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Rollback Events200pgsql.events[xact_rollback]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Server Mode200pgsql.server_mode736501540000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Temp Bytes Written200pgsql.temp[bytes]73650150b0000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Server Mode200pgsql.server_mode736501540000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Temp Files Created200pgsql.temp[files]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Server Mode200pgsql.server_mode736501540000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Tuples Deleted200pgsql.tuples[deleted]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Server Mode200pgsql.server_mode736501540000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Tuples Fetched200pgsql.tuples[fetched]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Server Mode200pgsql.server_mode736501540000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Tuples Inserted200pgsql.tuples[inserted]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Server Mode200pgsql.server_mode736501540000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Tuples Returned200pgsql.tuples[returned]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Server Mode200pgsql.server_mode736501540000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Tuples Updated200pgsql.tuples[updated]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Server Mode200pgsql.server_mode736501540000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: checksum_failures Events200pgsql.events[checksum_failures]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Server Mode200pgsql.server_mode736501540000100Mamonsu PostgreSQL LinuxSystem: Load Average Over 1 Minute200system.la[1]736501500000100Mamonsu PostgreSQL LinuxSystem: Active - Memory Recently Used200system.memory[active]73650153b0000100Mamonsu PostgreSQL LinuxSystem: Available - Free Memory200system.memory[available]73650153b0000100Mamonsu PostgreSQL LinuxSystem: Buffers - Block Device Cache and Dirty200system.memory[buffers]73650153b0000100Mamonsu PostgreSQL LinuxSystem: Cached - Parked File Data (file content) Cache200system.memory[cached]73650153b0000100Mamonsu PostgreSQL LinuxSystem: Committed AS - Total Committed Memory200system.memory[committed]73650153b0000100Mamonsu PostgreSQL LinuxSystem: Inactive - Memory Not Currently Used200system.memory[inactive]73650153b0000100Mamonsu PostgreSQL LinuxSystem: Mapped - All mmap()ed Pages200system.memory[mapped]73650153b0000100Mamonsu PostgreSQL LinuxSystem: PageTables - Map bt Virtual and Physical200system.memory[page_tables]73650153b0000100Mamonsu PostgreSQL LinuxSystem: Slab - Kernel Used Memory (inode cache)200system.memory[slab]73650153b0000100Mamonsu PostgreSQL LinuxSystem: Swap - Swap Space Used200system.memory[swap]73650153b0000100Mamonsu PostgreSQL LinuxSystem: SwapCached - Fetched unmod Yet Swap Pages200system.memory[swap_cache]73650153b0000100Mamonsu PostgreSQL LinuxSystem: Total - All Memory200system.memory[total]73650153b0000100Mamonsu PostgreSQL LinuxSystem: Unused - Wasted Memory200system.memory[unused]73650153b0000100Mamonsu PostgreSQL LinuxSystem: Used - User-Space Applications200system.memory[used]73650153b0000100Mamonsu PostgreSQL LinuxSystem: VMallocUsed - vmaloc() Allocated by Kernel200system.memory[vmalloc_used]73650153b0000100Mamonsu PostgreSQL LinuxPostgreSQL Memory Leak: Number of Pids Which Private Anonymous Memory Exceeds private_anon_mem_threshold200pgsql.memory_leak_diagnostic.count_diff[]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Memory Leak: Number of Pids Which Private Anonymous Memory Exceeds private_anon_mem_threshold, text of message200pgsql.memory_leak_diagnostic.msg_text[]736501540000100Mamonsu PostgreSQL LinuxPostgreSQL Transactions: Age of the Oldest XID200pgsql.oldest[xid_age]736501530000100Mamonsu PostgreSQL LinuxPostgreSQL Transactions: the Oldest Transaction Running Time in sec200pgsql.oldest[transaction_time]73650150s0000100Mamonsu PostgreSQL LinuxPostgreSQL Transactions: Number of Parallel Queries Being Executed Now200pgsql.parallel[queries]736501530000100Mamonsu PostgreSQL LinuxSystem: Opened Files200system.open_files[]736501530000100Mamonsu PostgreSQL LinuxPostgreSQL pg_buffercache: Shared Buffer Size200pgsql.buffers[size]73650150b0000100Mamonsu PostgreSQL LinuxPostgreSQL pg_buffercache: Shared Buffer Twice Used Size200pgsql.buffers[twice_used]73650150b0000100Mamonsu PostgreSQL LinuxPostgreSQL pg_buffercache: Shared Buffer Dirty Size200pgsql.buffers[dirty]73650150b0000100Mamonsu PostgreSQL LinuxPostgreSQL Health: Ping200pgsql.ping[]73650150ms0000100Mamonsu PostgreSQL LinuxPostgreSQL Health: Cache Hit Ratio1500pgsql.cache[hit]73650600%00001last(pgsql.blocks[hit])*100/(last(pgsql.blocks[hit])+last(pgsql.blocks[read]))00Mamonsu PostgreSQL LinuxPostgreSQL Health: Service Uptime200pgsql.uptime[]73650153unixtime0000100Mamonsu PostgreSQL LinuxPostgreSQL Health: Server Version200pgsql.version[]736501540000100Mamonsu PostgreSQL LinuxPostgreSQL Locks: Read Only Queries200pgsql.pg_locks[accessshare]736501530000100Mamonsu PostgreSQL LinuxPostgreSQL Locks: SELECT FOR SHARE and SELECT FOR UPDATE200pgsql.pg_locks[rowshare]736501530000100Mamonsu PostgreSQL LinuxPostgreSQL Locks: Write Queries200pgsql.pg_locks[rowexclusive]736501530000100Mamonsu PostgreSQL LinuxPostgreSQL Locks: VACUUM, ANALYZE, CREATE INDEX CONCURRENTLY200pgsql.pg_locks[shareupdateexclusive]736501530000100Mamonsu PostgreSQL LinuxPostgreSQL Locks: CREATE INDEX200pgsql.pg_locks[share]736501530000100Mamonsu PostgreSQL LinuxPostgreSQL Locks: Locks from Application200pgsql.pg_locks[sharerowexclusive]736501530000100Mamonsu PostgreSQL LinuxPostgreSQL Locks: Locks from Application or Some Operations on System Catalogs200pgsql.pg_locks[exclusive]736501530000100Mamonsu PostgreSQL LinuxPostgreSQL Locks: ALTER TABLE, DROP TABLE, TRUNCATE, REINDEX, CLUSTER, VACUUM FULL, LOCK TABLE200pgsql.pg_locks[accessexclusive]736501530000100Mamonsu PostgreSQL LinuxPostgreSQL Prepared Transactions: Number of Prepared Transactions200pgsql.prepared.count736506000000100Mamonsu PostgreSQL LinuxPostgreSQL Prepared Transactions: the Oldest Prepared Transaction Running Time in sec200pgsql.prepared.oldest736501500000100Mamonsu PostgreSQL LinuxSystem: Processes in State Running200system.processes[running]736501500000100Mamonsu PostgreSQL LinuxSystem: Processes in State Blocked200system.processes[blocked]736501500000100Mamonsu PostgreSQL LinuxSystem: Processes Forkrate200system.processes[forkrate]736501500000100Mamonsu PostgreSQL LinuxSystem: CPU Time Spent by Normal Programs and Daemons200system.cpu[user]736501500000100Mamonsu PostgreSQL LinuxSystem: CPU Time Spent by nice(1)d Programs200system.cpu[nice]736501500000100Mamonsu PostgreSQL LinuxSystem: CPU Time Spent by the Kernel in System Activities200system.cpu[system]736501500000100Mamonsu PostgreSQL LinuxSystem: CPU Time Spent Idle200system.cpu[idle]736501500000100Mamonsu PostgreSQL LinuxSystem: CPU Time Spent Waiting for I/O Operations200system.cpu[iowait]736501500000100Mamonsu PostgreSQL LinuxSystem: CPU Time Spent Handling Interrupts200system.cpu[irq]736501500000100Mamonsu PostgreSQL LinuxSystem: CPU Time Spent Handling Batched Interrupts200system.cpu[softirq]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Replication: Streaming Replication Lag200pgsql.replication_lag[sec]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Replication: Count Non-Active Replication Slots200pgsql.replication.non_active_slots[]736506030000100Mamonsu PostgreSQL LinuxPostgreSQL Statements: Read bytes/s200pgsql.stat[read_bytes]73650600Bps0000100Mamonsu PostgreSQL LinuxPostgreSQL Statements: Write bytes/s200pgsql.stat[write_bytes]73650600Bps0000100Mamonsu PostgreSQL LinuxPostgreSQL Statements: Dirty bytes/s200pgsql.stat[dirty_bytes]73650600Bps0000100Mamonsu PostgreSQL LinuxPostgreSQL Statements: Read IO Time200pgsql.stat[read_time]73650600s0000100Mamonsu PostgreSQL LinuxPostgreSQL Statements: Write IO Time200pgsql.stat[write_time]73650600s0000100Mamonsu PostgreSQL LinuxPostgreSQL Statements: Other (mostly CPU) Time200pgsql.stat[other_time]73650600s0000100Mamonsu PostgreSQL LinuxPostgreSQL Statements: Amount of WAL Files200pgsql.stat[wal_bytes]73650600Bps0000100Mamonsu PostgreSQL LinuxPostgreSQL Statements: Amount of WAL Records200pgsql.stat[wal_records]736506000000100Mamonsu PostgreSQL LinuxPostgreSQL Statements: Full Page Writes200pgsql.stat[wal_fpi]736506000000100Mamonsu PostgreSQL LinuxPostgreSQL Statements: Nnumber of Times pg_stat_statements.max Was Exceeded200pgsql.stat_info[dealloc]736506000000100Mamonsu PostgreSQL LinuxPostgreSQL Statements: Last Statistics Reset Time200pgsql.stat_info[stats_reset]73650600unixtime0000100Mamonsu PostgreSQL LinuxSystem: Uptime200system.uptime[]73650153uptime0000100Mamonsu PostgreSQL LinuxPostgreSQL Wait Sampling: Lightweight Locks200pgsql.all_lock[lwlock]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Wait Sampling: Heavyweight Locks200pgsql.all_lock[hwlock]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Wait Sampling: Buffer Locks200pgsql.all_lock[buffer]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Wait Sampling: Extension Locks200pgsql.all_lock[extension]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Wait Sampling: Client Locks200pgsql.all_lock[client]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Wait Sampling: Other Locks (e.g. IPC, Timeout, IO)200pgsql.all_lock[other]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Wait Sampling LWLocks: XID Access Locks200pgsql.lwlock[xid]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Wait Sampling LWLocks: Autovacuum Locks200pgsql.lwlock[autovacuum]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Wait Sampling LWLocks: WAL Access Locks200pgsql.lwlock[wal]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Wait Sampling LWLocks: CLOG Access Locks200pgsql.lwlock[clog]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Wait Sampling LWLocks: Replication Locks200pgsql.lwlock[replication]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Wait Sampling LWLocks: Logical Replication Locks200pgsql.lwlock[logical_replication]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Wait Sampling LWLocks: Buffer Operations Locks200pgsql.lwlock[buffer]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Wait Sampling LWLocks: Other Operations Lightweight Locks200pgsql.lwlock[other]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Wait Sampling HWLocks: Locks on a Relation200pgsql.hwlock[relation]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Wait Sampling HWLocks: Extend a Relation Locks200pgsql.hwlock[extend]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Wait Sampling HWLocks: Locks on a Page200pgsql.hwlock[page]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Wait Sampling HWLocks: Locks on a Tuple200pgsql.hwlock[tuple]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Wait Sampling HWLocks: Transaction to Finish Locks200pgsql.hwlock[transactionid]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Wait Sampling HWLocks: Virtual XID Locks200pgsql.hwlock[virtualxid]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Wait Sampling HWLocks: Speculative Insertion Locks200pgsql.hwlock[speculative_token]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Wait Sampling HWLocks: Locks on Database Object200pgsql.hwlock[object]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Wait Sampling HWLocks: Userlocks200pgsql.hwlock[userlock]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Wait Sampling HWLocks: Advisory User Locks200pgsql.hwlock[advisory]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL WAL: Write Speed200pgsql.wal.write[]73650150Bps0000100Mamonsu PostgreSQL LinuxPostgreSQL WAL: Count of WAL Files200pgsql.wal.count[]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL WAL: Records Generated200pgsql.wal.records.count[]736506030000100Mamonsu PostgreSQL LinuxPostgreSQL WAL: Full Page Images Generated200pgsql.wal.fpi.count[]736506030000100Mamonsu PostgreSQL LinuxPostgreSQL WAL: Buffers Full200pgsql.wal.buffers_full736506030000100Mamonsu PostgreSQL LinuxPostgreSQL WAL: Write Time (ms)200pgsql.wal.write_time736506030000100Mamonsu PostgreSQL LinuxPostgreSQL WAL: Sync Time (ms)200pgsql.wal.sync_time736506030000100Mamonsu PostgreSQL LinuxPostgreSQL WAL: Sync Duty (%)1500pgsql.wal.sync_duty73650600%00001last(pgsql.wal.sync_time)/10/1500Mamonsu PostgreSQL Linux - PostgreSQL CFS Discovery260000007pgsql.cfs.discovery_compressed_relations[]{#COMPRESSED_RELATION}.*8A0PostgreSQL CFS: Relation {#COMPRESSED_RELATION} Compress Ratio200pgsql.cfs.compress_ratio[{#COMPRESSED_RELATION}]7365060000000100Mamonsu PostgreSQL LinuxPostgreSQL CFS: Relation {#COMPRESSED_RELATION} Compress Ratio9002000.0100.0110100.00.00000008B817C020Mamonsu PostgreSQL Linuxpgsql.cfs.compress_ratio[{#COMPRESSED_RELATION}]PostgreSQL Databases Discovery260000007pgsql.database.discovery[]{#DATABASE}.*8A0PostgreSQL Databases {#DATABASE}: size200pgsql.database.size[{#DATABASE}]736503003b0000100Mamonsu PostgreSQL LinuxPostgreSQL Databases: Max datfrozenxid Age in: {#DATABASE}200pgsql.database.max_age[{#DATABASE}]7365030000000100Mamonsu PostgreSQL LinuxPostgreSQL Databases: Count of Bloating Tables in {#DATABASE}200pgsql.database.bloating_tables[{#DATABASE}]7365030000000100Mamonsu PostgreSQL LinuxPostgreSQL Databases: Count of Invalid Indexes in {#DATABASE}200pgsql.database.invalid_indexes[{#DATABASE}]7365030000000100Mamonsu PostgreSQL Linux{Mamonsu PostgreSQL Linux:pgsql.database.invalid_indexes[{#DATABASE}].last()}>0PostgreSQL Databases: invalid indexes in {#DATABASE} (hostname={HOSTNAME} value={ITEM.LASTVALUE})030PostgreSQL Databases: {#DATABASE} size9002000.0100.0111100.00.00000028B817C020Mamonsu PostgreSQL Linuxpgsql.database.size[{#DATABASE}]PostgreSQL Databases: {#DATABASE} Bloating Overview9002000.0100.0110100.00.00000027EB29B020Mamonsu PostgreSQL Linuxpgsql.database.bloating_tables[{#DATABASE}]12793F5D120Mamonsu PostgreSQL Linuxpgsql.autovacumm.count[]PostgreSQL Databases: {#DATABASE} Max age(datfrozenxid)9002000.0100.0110100.00.00000027EB29B020Mamonsu PostgreSQL Linuxpgsql.database.max_age[{#DATABASE}]12793F5D120Mamonsu PostgreSQL Linuxpgsql.autovacumm.count[]VFS Discovery260000007system.vfs.discovery[]{#MOUNTPOINT}.*8A0System: Mount Point {#MOUNTPOINT}: Used200system.vfs.used[{#MOUNTPOINT}]73650153b0000100Mamonsu PostgreSQL LinuxSystem: Mount Point {#MOUNTPOINT}: Free200system.vfs.free[{#MOUNTPOINT}]73650153b0000100Mamonsu PostgreSQL LinuxSystem: Mount Point {#MOUNTPOINT}: Free in Percents200system.vfs.percent_free[{#MOUNTPOINT}]73650150%0000100Mamonsu PostgreSQL LinuxSystem: Mount Point {#MOUNTPOINT} Free Inodes in Percent200system.vfs.percent_inode_free[{#MOUNTPOINT}]73650150%0000100Mamonsu PostgreSQL Linux{Mamonsu PostgreSQL Linux:system.vfs.percent_free[{#MOUNTPOINT}].last()}<10Free disk space less then 10% on mountpoint {#MOUNTPOINT} (hostname={HOSTNAME} value={ITEM.LASTVALUE})030{Mamonsu PostgreSQL Linux:system.vfs.percent_inode_free[{#MOUNTPOINT}].last()}<10Free inode space less then 10% on mountpoint {#MOUNTPOINT} (hostname={HOSTNAME} value={ITEM.LASTVALUE})030System: Mount Point Overview {#MOUNTPOINT}9002000.0100.0111100.00.0000000E57862020Mamonsu PostgreSQL Linuxsystem.vfs.used[{#MOUNTPOINT}]10578159020Mamonsu PostgreSQL Linuxsystem.vfs.free[{#MOUNTPOINT}]System: Block Devices Discovery260000007system.disk.discovery[]{#BLOCKDEVICE}.*8A0System: Block Device {#BLOCKDEVICE} Utilization200system.disk.utilization[{#BLOCKDEVICE}]73650150%0000100Mamonsu PostgreSQL LinuxSystem: Block Device {#BLOCKDEVICE} Read Operations200system.disk.read[{#BLOCKDEVICE}]736501500000100Mamonsu PostgreSQL LinuxSystem: Block Device {#BLOCKDEVICE} Write Operations200system.disk.write[{#BLOCKDEVICE}]736501500000100Mamonsu PostgreSQL LinuxSystem: Block Device {#BLOCKDEVICE} Read byte/s200system.disk.read_b[{#BLOCKDEVICE}]73650150b0000100Mamonsu PostgreSQL LinuxSystem: Block Device {#BLOCKDEVICE} Write byte/s200system.disk.write_b[{#BLOCKDEVICE}]73650150b0000100Mamonsu PostgreSQL LinuxSystem: Block Device Overview {#BLOCKDEVICE} operations9002000.0100.0110100.00.00000007EB29B020Mamonsu PostgreSQL Linuxsystem.disk.read[{#BLOCKDEVICE}]10793F5D020Mamonsu PostgreSQL Linuxsystem.disk.write[{#BLOCKDEVICE}]20F6CB93120Mamonsu PostgreSQL Linuxsystem.disk.utilization[{#BLOCKDEVICE}]System: Block Device Overview {#BLOCKDEVICE} byte/s9002000.0100.0110100.00.00000007EB29B020Mamonsu PostgreSQL Linuxsystem.disk.read_b[{#BLOCKDEVICE}]10793F5D020Mamonsu PostgreSQL Linuxsystem.disk.write_b[{#BLOCKDEVICE}]20F6CB93120Mamonsu PostgreSQL Linuxsystem.disk.utilization[{#BLOCKDEVICE}]Net Iface Discovery260000007system.net.discovery[]{#NETDEVICE}.*8A0System: Network Device {#NETDEVICE} RX bytes/s200system.net.rx_bytes[{#NETDEVICE}]73650150b0000100Mamonsu PostgreSQL LinuxSystem: Network Device {#NETDEVICE} RX errors/s200system.net.rx_errs[{#NETDEVICE}]736501500000100Mamonsu PostgreSQL LinuxSystem: Network Device {#NETDEVICE} RX drops/s200system.net.rx_drop[{#NETDEVICE}]736501500000100Mamonsu PostgreSQL LinuxSystem: Network Device {#NETDEVICE} TX bytes/s200system.net.tx_bytes[{#NETDEVICE}]73650150b0000100Mamonsu PostgreSQL LinuxSystem: Network Device {#NETDEVICE} TX errors/s200system.net.tx_errs[{#NETDEVICE}]736501500000100Mamonsu PostgreSQL LinuxSystem: Network Device {#NETDEVICE} TX drops/s200system.net.tx_drop[{#NETDEVICE}]736501500000100Mamonsu PostgreSQL LinuxSystem: Network Device {#NETDEVICE}9002000.0100.0110100.00.00000007EB29B020Mamonsu PostgreSQL Linuxsystem.net.rx_bytes[{#NETDEVICE}]10793F5D020Mamonsu PostgreSQL Linuxsystem.net.tx_bytes[{#NETDEVICE}]pg_probackup discovery260000007pg_probackup.discovery[]{#BACKUPDIR}.*8A0pg_probackup dir {#BACKUPDIR}: size200pg_probackup.dir.size[{#BACKUPDIR}]736503003b0000100Mamonsu PostgreSQL Linuxpg_probackup dir {#BACKUPDIR}: error200pg_probackup.dir.error[{#BACKUPDIR}]7365030040000100Mamonsu PostgreSQL Linux{Mamonsu PostgreSQL Linux:pg_probackup.dir.error[{#BACKUPDIR}].str(ok)}<>1Error in pg_probackup dir {#BACKUPDIR} (hostname={HOSTNAME} value={ITEM.LASTVALUE})030pg_probackup backup dir: {#BACKUPDIR} size9002000.0100.0111100.00.00000008B817C020Mamonsu PostgreSQL Linuxpg_probackup.dir.size[{#BACKUPDIR}]PostgreSQL Relations Sizes Discovery260000007pgsql.relation.size[]{#RELATIONNAME}.*8A0PostgreSQL Relation Size: {#RELATIONNAME}200pgsql.relation.size[{#RELATIONNAME}]736503003b0000100Mamonsu PostgreSQL LinuxPostgreSQL Relation Size: {#RELATIONNAME}9002000.0100.0111100.00.00000028B817C020Mamonsu PostgreSQL Linuxpgsql.relation.size[{#RELATIONNAME}]PostgreSQL Replication Lag Discovery260000007pgsql.replication.discovery[]{#APPLICATION_NAME}.*8A0PostgreSQL Replication: {#APPLICATION_NAME} Send Lag - Time elapsed sending recent WAL locally200pgsql.replication.send_lag[{#APPLICATION_NAME}]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Replication: {#APPLICATION_NAME} Receive Lag - Time elapsed between receiving recent WAL locally and receiving notification that this standby server has flushed it200pgsql.replication.receive_lag[{#APPLICATION_NAME}]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Replication: {#APPLICATION_NAME} Write Lag - Time elapsed between flushing recent WAL locally and receiving notification that this standby server has written it200pgsql.replication.write_lag[{#APPLICATION_NAME}]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Replication: {#APPLICATION_NAME} Flush Lag - Time elapsed between flushing recent WAL locally and receiving notification that this standby server has written and flushed it200pgsql.replication.flush_lag[{#APPLICATION_NAME}]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Replication: {#APPLICATION_NAME} Replay Lag - Time elapsed between flushing recent WAL locally and receiving notification that this standby server has written, flushed and applied200pgsql.replication.replay_lag[{#APPLICATION_NAME}]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Replication: {#APPLICATION_NAME} Delta of Total Lag200pgsql.replication.total_lag[{#APPLICATION_NAME}]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Replication: Delta of Total Lag for {#APPLICATION_NAME}9002000.0100.0110100.00.00000008B817C020Mamonsu PostgreSQL Linuxpgsql.replication.total_lag[{#APPLICATION_NAME}] - Mamonsu Overview2505001500011010003PostgreSQL Connections: OverviewMamonsu PostgreSQL Linux05001501011010003PostgreSQL pg_buffercache: Shared BufferMamonsu PostgreSQL Linux05001500111010003System: CPU Time SpentMamonsu PostgreSQL Linux05001501111010003System: Server Free/Used Memory OverviewMamonsu PostgreSQL Linux05001500211010003PostgreSQL Autovacuum: Count of Autovacuum WorkersMamonsu PostgreSQL Linux05001501211010003PostgreSQL Instance: TuplesMamonsu PostgreSQL Linux05001500311010003PostgreSQL bgwriter: BuffersMamonsu PostgreSQL Linux05001501311010003PostgreSQL bgwriter: EventsMamonsu PostgreSQL Linux05001500411010003PostgreSQL Checkpoints: Count (in hour)Mamonsu PostgreSQL Linux05001501411010003PostgreSQL Checkpoints: Write/SyncMamonsu PostgreSQL LinuxMamonsu PostgreSQL Instance2515001500011010003pgsql.ping[]Mamonsu PostgreSQL Linux15001501011010003pgsql.uptime[]Mamonsu PostgreSQL Linux15001500111010003pgsql.cache[hit]Mamonsu PostgreSQL Linux05001501111010003PostgreSQL Instance: EventsMamonsu PostgreSQL Linux15001500211010003pgsql.temp[bytes]Mamonsu PostgreSQL Linux15001501211010003pgsql.temp[files]Mamonsu PostgreSQL LinuxMamonsu PostgreSQL WAL2505001500011010003PostgreSQL Archiver: Archive StatusMamonsu PostgreSQL Linux15001501011010003pgsql.wal.write[]Mamonsu PostgreSQL Linux15001500111010003pgsql.archive_command[size_files_to_archive]Mamonsu PostgreSQL Linux15001501111010003pgsql.archive_command[archived_files]Mamonsu PostgreSQL LinuxMamonsu PostgreSQL Locks3513301000011010003pgsql.events[deadlocks]Mamonsu PostgreSQL Linux13301001011010003pgsql.pg_locks[accessshare]Mamonsu PostgreSQL Linux13301002011010003pgsql.pg_locks[rowshare]Mamonsu PostgreSQL Linux13301000111010003pgsql.pg_locks[rowexclusive]Mamonsu PostgreSQL Linux13301001111010003pgsql.pg_locks[shareupdateexclusive]Mamonsu PostgreSQL Linux13301002111010003pgsql.pg_locks[share]Mamonsu PostgreSQL Linux13301000211010003pgsql.pg_locks[sharerowexclusive]Mamonsu PostgreSQL Linux13301001211010003pgsql.pg_locks[exclusive]Mamonsu PostgreSQL Linux13301002211010003pgsql.pg_locks[accessexclusive]Mamonsu PostgreSQL LinuxMamonsu PostgreSQL Transactions2515001500011010003pgsql.oldest[xid_age]Mamonsu PostgreSQL Linux15001501011010003pgsql.oldest[transaction_time]Mamonsu PostgreSQL Linux15001500111010003pgsql.prepared.countMamonsu PostgreSQL Linux15001501111010003pgsql.prepared.oldestMamonsu PostgreSQL LinuxMamonsu System (Linux)2505001500011010003System: Block Devices Read/Write BytesMamonsu PostgreSQL Linux05001501011010003System: Block Devices Read/Write OperationsMamonsu PostgreSQL Linux05001500111010003System: Processes OverviewMamonsu PostgreSQL Linux + PostgreSQL Archiver: Files in archive_status Need to Archive Count200pgsql.archive_command[count_files_to_archive]736501530000100Mamonsu PostgreSQL LinuxPostgreSQL Archiver: Files Need to Archive Size200pgsql.archive_command[size_files_to_archive]73650153b0000100Mamonsu PostgreSQL LinuxPostgreSQL Archiver: Archived Files Count200pgsql.archive_command[archived_files]736501532000100Mamonsu PostgreSQL LinuxPostgreSQL Archiver: Attempts to Archive Files Count200pgsql.archive_command[failed_trying_to_archive]736501532000100Mamonsu PostgreSQL LinuxPostgreSQL bgwriter: Buffers Written During Checkpoints200pgsql.bgwriter[buffers_checkpoint]736501530000100Mamonsu PostgreSQL LinuxPostgreSQL bgwriter: Buffers Written200pgsql.bgwriter[buffers_clean]736501530000100Mamonsu PostgreSQL LinuxPostgreSQL bgwriter: Number of bgwriter Stopped by Max Write Count200pgsql.bgwriter[maxwritten_clean]736501530000100Mamonsu PostgreSQL LinuxPostgreSQL bgwriter: Buffers Written Directly by a Backend200pgsql.bgwriter[buffers_backend]736501530000100Mamonsu PostgreSQL LinuxPostgreSQL bgwriter: Times a Backend Execute Its Own Fsync200pgsql.bgwriter[buffers_backend_fsync]736501530000100Mamonsu PostgreSQL LinuxPostgreSQL bgwriter: Buffers Allocated200pgsql.bgwriter[buffers_alloc]736501530000100Mamonsu PostgreSQL LinuxPostgreSQL CFS: Written byte/s200pgsql.cfs.activity[written_bytes]73650600Bps0000100Mamonsu PostgreSQL LinuxPostgreSQL CFS: Scanned byte/s200pgsql.cfs.activity[scanned_bytes]73650600Bps0000100Mamonsu PostgreSQL LinuxPostgreSQL CFS: Compressed Files200pgsql.cfs.activity[compressed_files]736506000000100Mamonsu PostgreSQL LinuxPostgreSQL CFS: Scanned Files200pgsql.cfs.activity[scanned_files]736506000000100Mamonsu PostgreSQL LinuxPostgreSQL CFS: Current Ratio200pgsql.cfs.activity[current_compress_ratio]736506000000100Mamonsu PostgreSQL LinuxPostgreSQL CFS: Total Ratio200pgsql.cfs.activity[total_compress_ratio]736506000000100Mamonsu PostgreSQL LinuxPostgreSQL Checkpoints: by Timeout (in hour)200pgsql.checkpoint[count_timed]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Checkpoints: by WAL (in hour)200pgsql.checkpoint[count_wal]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Checkpoints: Write Time200pgsql.checkpoint[write_time]73650150ms0000100Mamonsu PostgreSQL LinuxPostgreSQL Checkpoints: Sync Time200pgsql.checkpoint[checkpoint_sync_time]73650150ms0000100Mamonsu PostgreSQL LinuxPostgreSQL Connections: Number of Total User Connections200pgsql.connections[total]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Connections: Number of Waiting User Connections200pgsql.connections[waiting]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Connections: Max Connections200pgsql.connections[max_connections]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Connections: Number of Active User Connections200pgsql.connections[active]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Connections: Number of Idle User Connections200pgsql.connections[idle]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Connections: Number of Idle in Transaction User Connections200pgsql.connections[idle_in_transaction]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Connections: Number of Idle in Transaction (Aborted) User Connections200pgsql.connections[idle_in_transaction_aborted]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Connections: Number of Fastpath Function Call User Connections200pgsql.connections[fastpath_function_call]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Connections: Number of Disabled User Connections200pgsql.connections[disabled]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Connections: Number of Other Connections200pgsql.connections[other]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Autovacuum: Count of Autovacuum Workers200pgsql.autovacumm.count[]736501500000100Mamonsu PostgreSQL LinuxSystem: Block Devices Read Requests200system.disk.all_read[]736501500000100Mamonsu PostgreSQL LinuxSystem: Block Devices Write Requests200system.disk.all_write[]736501500000100Mamonsu PostgreSQL LinuxSystem: Block Devices Read byte/s200system.disk.all_read_b[]736501500000100Mamonsu PostgreSQL LinuxSystem: Block Devices Write byte/s200system.disk.all_write_b[]736501500000100Mamonsu PostgreSQL LinuxMamonsu: Plugin Errors200mamonsu.plugin.errors[]736506040000100Mamonsu PostgreSQL LinuxMamonsu: Plugin Keep Alive200mamonsu.plugin.keepalive[]736506000000100Mamonsu PostgreSQL LinuxMamonsu: RSS Memory Max Usage200mamonsu.memory.rss[max]73650600b0000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Transactions Committed200pgsql.transactions[committed]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Server Mode200pgsql.server_mode736501540000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Rollback Events200pgsql.events[xact_rollback]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Server Mode200pgsql.server_mode736501540000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Blocks Hit200pgsql.blocks[hit]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Server Mode200pgsql.server_mode736501540000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Blocks Read200pgsql.blocks[read]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Server Mode200pgsql.server_mode736501540000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Conflict Events200pgsql.events[conflicts]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Server Mode200pgsql.server_mode736501540000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Deadlock Events200pgsql.events[deadlocks]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Server Mode200pgsql.server_mode736501540000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Temp Bytes Written200pgsql.temp[bytes]73650150b0000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Server Mode200pgsql.server_mode736501540000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Temp Files Created200pgsql.temp[files]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Server Mode200pgsql.server_mode736501540000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Tuples Deleted200pgsql.tuples[deleted]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Server Mode200pgsql.server_mode736501540000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Tuples Fetched200pgsql.tuples[fetched]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Server Mode200pgsql.server_mode736501540000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Tuples Inserted200pgsql.tuples[inserted]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Server Mode200pgsql.server_mode736501540000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Tuples Returned200pgsql.tuples[returned]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Server Mode200pgsql.server_mode736501540000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Tuples Updated200pgsql.tuples[updated]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Server Mode200pgsql.server_mode736501540000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: checksum_failures Events200pgsql.events[checksum_failures]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Server Mode200pgsql.server_mode736501540000100Mamonsu PostgreSQL LinuxSystem: Load Average Over 1 Minute200system.la[1]736501500000100Mamonsu PostgreSQL LinuxSystem: Active - Memory Recently Used200system.memory[active]73650153b0000100Mamonsu PostgreSQL LinuxSystem: Available - Free Memory200system.memory[available]73650153b0000100Mamonsu PostgreSQL LinuxSystem: Buffers - Block Device Cache and Dirty200system.memory[buffers]73650153b0000100Mamonsu PostgreSQL LinuxSystem: Cached - Parked File Data (file content) Cache200system.memory[cached]73650153b0000100Mamonsu PostgreSQL LinuxSystem: Committed AS - Total Committed Memory200system.memory[committed]73650153b0000100Mamonsu PostgreSQL LinuxSystem: Inactive - Memory Not Currently Used200system.memory[inactive]73650153b0000100Mamonsu PostgreSQL LinuxSystem: Mapped - All mmap()ed Pages200system.memory[mapped]73650153b0000100Mamonsu PostgreSQL LinuxSystem: PageTables - Map bt Virtual and Physical200system.memory[page_tables]73650153b0000100Mamonsu PostgreSQL LinuxSystem: Slab - Kernel Used Memory (inode cache)200system.memory[slab]73650153b0000100Mamonsu PostgreSQL LinuxSystem: Swap - Swap Space Used200system.memory[swap]73650153b0000100Mamonsu PostgreSQL LinuxSystem: SwapCached - Fetched unmod Yet Swap Pages200system.memory[swap_cache]73650153b0000100Mamonsu PostgreSQL LinuxSystem: Total - All Memory200system.memory[total]73650153b0000100Mamonsu PostgreSQL LinuxSystem: Unused - Wasted Memory200system.memory[unused]73650153b0000100Mamonsu PostgreSQL LinuxSystem: Used - User-Space Applications200system.memory[used]73650153b0000100Mamonsu PostgreSQL LinuxSystem: VMallocUsed - vmaloc() Allocated by Kernel200system.memory[vmalloc_used]73650153b0000100Mamonsu PostgreSQL LinuxPostgreSQL Memory Leak: Number of Pids Which Private Anonymous Memory Exceeds private_anon_mem_threshold200pgsql.memory_leak_diagnostic.count_diff[]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Memory Leak: Number of Pids Which Private Anonymous Memory Exceeds private_anon_mem_threshold, text of message200pgsql.memory_leak_diagnostic.msg_text[]736501540000100Mamonsu PostgreSQL LinuxPostgreSQL Transactions: Age of the Oldest XID200pgsql.oldest[xid_age]736501530000100Mamonsu PostgreSQL LinuxPostgreSQL Transactions: the Oldest Transaction Running Time in sec200pgsql.oldest[transaction_time]73650150s0000100Mamonsu PostgreSQL LinuxPostgreSQL Transactions: Number of Parallel Queries Being Executed Now200pgsql.parallel[queries]736501530000100Mamonsu PostgreSQL LinuxSystem: Opened Files200system.open_files[]736501530000100Mamonsu PostgreSQL LinuxPostgreSQL pg_buffercache: Shared Buffer Size200pgsql.buffers[size]73650150b0000100Mamonsu PostgreSQL LinuxPostgreSQL pg_buffercache: Shared Buffer Twice Used Size200pgsql.buffers[twice_used]73650150b0000100Mamonsu PostgreSQL LinuxPostgreSQL pg_buffercache: Shared Buffer Dirty Size200pgsql.buffers[dirty]73650150b0000100Mamonsu PostgreSQL LinuxPostgreSQL Health: Ping200pgsql.ping[]73650150ms0000100Mamonsu PostgreSQL LinuxPostgreSQL Health: Cache Hit Ratio1500pgsql.cache[hit]73650600%00001last(pgsql.blocks[hit])*100/(last(pgsql.blocks[hit])+last(pgsql.blocks[read]))00Mamonsu PostgreSQL LinuxPostgreSQL Health: Service Uptime200pgsql.uptime[]73650153unixtime0000100Mamonsu PostgreSQL LinuxPostgreSQL Health: Server Version200pgsql.version[]736501540000100Mamonsu PostgreSQL LinuxPostgreSQL Locks: Read Only Queries200pgsql.pg_locks[accessshare]736501530000100Mamonsu PostgreSQL LinuxPostgreSQL Locks: SELECT FOR SHARE and SELECT FOR UPDATE200pgsql.pg_locks[rowshare]736501530000100Mamonsu PostgreSQL LinuxPostgreSQL Locks: Write Queries200pgsql.pg_locks[rowexclusive]736501530000100Mamonsu PostgreSQL LinuxPostgreSQL Locks: VACUUM, ANALYZE, CREATE INDEX CONCURRENTLY200pgsql.pg_locks[shareupdateexclusive]736501530000100Mamonsu PostgreSQL LinuxPostgreSQL Locks: CREATE INDEX200pgsql.pg_locks[share]736501530000100Mamonsu PostgreSQL LinuxPostgreSQL Locks: Locks from Application200pgsql.pg_locks[sharerowexclusive]736501530000100Mamonsu PostgreSQL LinuxPostgreSQL Locks: Locks from Application or Some Operations on System Catalogs200pgsql.pg_locks[exclusive]736501530000100Mamonsu PostgreSQL LinuxPostgreSQL Locks: ALTER TABLE, DROP TABLE, TRUNCATE, REINDEX, CLUSTER, VACUUM FULL, LOCK TABLE200pgsql.pg_locks[accessexclusive]736501530000100Mamonsu PostgreSQL LinuxPostgreSQL Prepared Transactions: Number of Prepared Transactions200pgsql.prepared.count736506000000100Mamonsu PostgreSQL LinuxPostgreSQL Prepared Transactions: the Oldest Prepared Transaction Running Time in sec200pgsql.prepared.oldest736501500000100Mamonsu PostgreSQL LinuxSystem: Processes in State Running200system.processes[running]736501500000100Mamonsu PostgreSQL LinuxSystem: Processes in State Blocked200system.processes[blocked]736501500000100Mamonsu PostgreSQL LinuxSystem: Processes Forkrate200system.processes[forkrate]736501500000100Mamonsu PostgreSQL LinuxSystem: CPU Time Spent by Normal Programs and Daemons200system.cpu[user]736501500000100Mamonsu PostgreSQL LinuxSystem: CPU Time Spent by nice(1)d Programs200system.cpu[nice]736501500000100Mamonsu PostgreSQL LinuxSystem: CPU Time Spent by the Kernel in System Activities200system.cpu[system]736501500000100Mamonsu PostgreSQL LinuxSystem: CPU Time Spent Idle200system.cpu[idle]736501500000100Mamonsu PostgreSQL LinuxSystem: CPU Time Spent Waiting for I/O Operations200system.cpu[iowait]736501500000100Mamonsu PostgreSQL LinuxSystem: CPU Time Spent Handling Interrupts200system.cpu[irq]736501500000100Mamonsu PostgreSQL LinuxSystem: CPU Time Spent Handling Batched Interrupts200system.cpu[softirq]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Replication: Streaming Replication Lag200pgsql.replication_lag[sec]736506000000100Mamonsu PostgreSQL LinuxPostgreSQL Replication: Count Non-Active Replication Slots200pgsql.replication.non_active_slots[]736506030000100Mamonsu PostgreSQL LinuxPostgreSQL Statements: Read bytes/s200pgsql.stat[read_bytes]73650150Bps0000100Mamonsu PostgreSQL LinuxPostgreSQL Statements: Write bytes/s200pgsql.stat[write_bytes]73650150Bps0000100Mamonsu PostgreSQL LinuxPostgreSQL Statements: Dirty bytes/s200pgsql.stat[dirty_bytes]73650150Bps0000100Mamonsu PostgreSQL LinuxPostgreSQL Statements: Read IO Time200pgsql.stat[read_time]73650150s0000100Mamonsu PostgreSQL LinuxPostgreSQL Statements: Write IO Time200pgsql.stat[write_time]73650150s0000100Mamonsu PostgreSQL LinuxPostgreSQL Statements: Other (mostly CPU) Time200pgsql.stat[other_time]73650150s0000100Mamonsu PostgreSQL LinuxPostgreSQL Statements: Amount of WAL Files200pgsql.stat[wal_bytes]73650150Bps0000100Mamonsu PostgreSQL LinuxPostgreSQL Statements: Amount of WAL Records200pgsql.stat[wal_records]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Statements: Full Page Writes200pgsql.stat[wal_fpi]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Statements: Nnumber of Times pg_stat_statements.max Was Exceeded200pgsql.stat_info[dealloc]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Statements: Last Statistics Reset Time200pgsql.stat_info[stats_reset]73650150unixtime0000100Mamonsu PostgreSQL LinuxSystem: Uptime200system.uptime[]73650153uptime0000100Mamonsu PostgreSQL LinuxPostgreSQL Wait Sampling: Lightweight Locks200pgsql.all_lock[lwlock]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Wait Sampling: Heavyweight Locks200pgsql.all_lock[hwlock]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Wait Sampling: Buffer Locks200pgsql.all_lock[buffer]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Wait Sampling: Extension Locks200pgsql.all_lock[extension]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Wait Sampling: Client Locks200pgsql.all_lock[client]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Wait Sampling: Other Locks (e.g. IPC, Timeout, IO)200pgsql.all_lock[other]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Wait Sampling LWLocks: XID Access Locks200pgsql.lwlock[xid]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Wait Sampling LWLocks: Autovacuum Locks200pgsql.lwlock[autovacuum]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Wait Sampling LWLocks: WAL Access Locks200pgsql.lwlock[wal]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Wait Sampling LWLocks: CLOG Access Locks200pgsql.lwlock[clog]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Wait Sampling LWLocks: Replication Locks200pgsql.lwlock[replication]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Wait Sampling LWLocks: Logical Replication Locks200pgsql.lwlock[logical_replication]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Wait Sampling LWLocks: Buffer Operations Locks200pgsql.lwlock[buffer]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Wait Sampling LWLocks: Other Operations Lightweight Locks200pgsql.lwlock[other]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Wait Sampling HWLocks: Locks on a Relation200pgsql.hwlock[relation]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Wait Sampling HWLocks: Extend a Relation Locks200pgsql.hwlock[extend]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Wait Sampling HWLocks: Locks on a Page200pgsql.hwlock[page]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Wait Sampling HWLocks: Locks on a Tuple200pgsql.hwlock[tuple]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Wait Sampling HWLocks: Transaction to Finish Locks200pgsql.hwlock[transactionid]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Wait Sampling HWLocks: Virtual XID Locks200pgsql.hwlock[virtualxid]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Wait Sampling HWLocks: Speculative Insertion Locks200pgsql.hwlock[speculative_token]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Wait Sampling HWLocks: Locks on Database Object200pgsql.hwlock[object]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Wait Sampling HWLocks: Userlocks200pgsql.hwlock[userlock]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Wait Sampling HWLocks: Advisory User Locks200pgsql.hwlock[advisory]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL WAL: Write Speed200pgsql.wal.write[]73650600Bps0000100Mamonsu PostgreSQL LinuxPostgreSQL WAL: Count of WAL Files200pgsql.wal.count[]736506000000100Mamonsu PostgreSQL LinuxPostgreSQL WAL: Records Generated200pgsql.wal.records.count[]736506000000100Mamonsu PostgreSQL LinuxPostgreSQL WAL: Full Page Images Generated200pgsql.wal.fpi.count[]736506000000100Mamonsu PostgreSQL LinuxPostgreSQL WAL: Buffers Full200pgsql.wal.buffers_full736506000000100Mamonsu PostgreSQL LinuxPostgreSQL WAL: Write Time (ms)200pgsql.wal.write_time736506000000100Mamonsu PostgreSQL LinuxPostgreSQL WAL: Sync Time (ms)200pgsql.wal.sync_time736506000000100Mamonsu PostgreSQL LinuxPostgreSQL WAL: Sync Duty (%)1500pgsql.wal.sync_duty73650600%00001last(pgsql.wal.sync_time)/1000Mamonsu PostgreSQL Linux + PostgreSQL CFS Discovery260000007pgsql.cfs.discovery_compressed_relations[]{#COMPRESSED_RELATION}.*8A0PostgreSQL CFS: Relation {#COMPRESSED_RELATION} Compress Ratio200pgsql.cfs.compress_ratio[{#COMPRESSED_RELATION}]7365060000000100Mamonsu PostgreSQL LinuxPostgreSQL CFS: Relation {#COMPRESSED_RELATION} Compress Ratio9002000.0100.0110100.00.0000000A39B98020Mamonsu PostgreSQL Linuxpgsql.cfs.compress_ratio[{#COMPRESSED_RELATION}]PostgreSQL Databases Discovery260000007pgsql.database.discovery[]{#DATABASE}.*8A0PostgreSQL Databases {#DATABASE}: size200pgsql.database.size[{#DATABASE}]73650153b0000100Mamonsu PostgreSQL LinuxPostgreSQL Databases: Max datfrozenxid Age in: {#DATABASE}200pgsql.database.max_age[{#DATABASE}]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Databases: Count of Bloating Tables in {#DATABASE}200pgsql.database.bloating_tables[{#DATABASE}]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Databases: Count of Invalid Indexes in {#DATABASE}200pgsql.database.invalid_indexes[{#DATABASE}]736501500000100Mamonsu PostgreSQL Linux{Mamonsu PostgreSQL Linux:pgsql.database.invalid_indexes[{#DATABASE}].last()}>0PostgreSQL Databases: invalid indexes in {#DATABASE} (hostname={HOSTNAME} value={ITEM.LASTVALUE})030PostgreSQL Databases: {#DATABASE} size9002000.0100.0111100.00.0000002A39B98020Mamonsu PostgreSQL Linuxpgsql.database.size[{#DATABASE}]PostgreSQL Databases: {#DATABASE} Bloating Overview9002000.0100.0110100.00.000000287C2B9020Mamonsu PostgreSQL Linuxpgsql.database.bloating_tables[{#DATABASE}]12793F5D120Mamonsu PostgreSQL Linuxpgsql.autovacumm.count[]PostgreSQL Databases: {#DATABASE} Max age(datfrozenxid)9002000.0100.0110100.00.000000287C2B9020Mamonsu PostgreSQL Linuxpgsql.database.max_age[{#DATABASE}]12793F5D120Mamonsu PostgreSQL Linuxpgsql.autovacumm.count[]VFS Discovery260000007system.vfs.discovery[]{#MOUNTPOINT}.*8A0System: Mount Point {#MOUNTPOINT} Used200system.vfs.used[{#MOUNTPOINT}]73650153b0000100Mamonsu PostgreSQL LinuxSystem: Mount Point {#MOUNTPOINT} Free200system.vfs.free[{#MOUNTPOINT}]73650153b0000100Mamonsu PostgreSQL LinuxSystem: Mount Point {#MOUNTPOINT} Free in Percents200system.vfs.percent_free[{#MOUNTPOINT}]73650150%0000100Mamonsu PostgreSQL LinuxSystem: Mount Point {#MOUNTPOINT} Free Inodes in Percent200system.vfs.percent_inode_free[{#MOUNTPOINT}]73650150%0000100Mamonsu PostgreSQL Linux{Mamonsu PostgreSQL Linux:system.vfs.percent_free[{#MOUNTPOINT}].last()}<10Free disk space less than 10% on mountpoint {#MOUNTPOINT} (hostname={HOSTNAME} value={ITEM.LASTVALUE})030{Mamonsu PostgreSQL Linux:system.vfs.percent_inode_free[{#MOUNTPOINT}].last()}<10Free inode space less than 10% on mountpoint {#MOUNTPOINT} (hostname={HOSTNAME} value={ITEM.LASTVALUE})030System: Mount Point Overview {#MOUNTPOINT}9002000.0100.0111100.00.0000002FF5656020Mamonsu PostgreSQL Linuxsystem.vfs.used[{#MOUNTPOINT}]1200CC00020Mamonsu PostgreSQL Linuxsystem.vfs.free[{#MOUNTPOINT}]System: Block Devices Discovery260000007system.disk.discovery[]{#BLOCKDEVICE}.*8A0System: Block Device {#BLOCKDEVICE} Utilization200system.disk.utilization[{#BLOCKDEVICE}]73650150%0000100Mamonsu PostgreSQL LinuxSystem: Block Device {#BLOCKDEVICE} Read Operations200system.disk.read[{#BLOCKDEVICE}]736501500000100Mamonsu PostgreSQL LinuxSystem: Block Device {#BLOCKDEVICE} Write Operations200system.disk.write[{#BLOCKDEVICE}]736501500000100Mamonsu PostgreSQL LinuxSystem: Block Device {#BLOCKDEVICE} Read byte/s200system.disk.read_b[{#BLOCKDEVICE}]73650150b0000100Mamonsu PostgreSQL LinuxSystem: Block Device {#BLOCKDEVICE} Write byte/s200system.disk.write_b[{#BLOCKDEVICE}]73650150b0000100Mamonsu PostgreSQL LinuxSystem: Block Device Overview {#BLOCKDEVICE} operations9002000.0100.0110100.00.000000200CC00020Mamonsu PostgreSQL Linuxsystem.disk.read[{#BLOCKDEVICE}]12FF5656020Mamonsu PostgreSQL Linuxsystem.disk.write[{#BLOCKDEVICE}]22006AAE120Mamonsu PostgreSQL Linuxsystem.disk.utilization[{#BLOCKDEVICE}]System: Block Device Overview {#BLOCKDEVICE} byte/s9002000.0100.0110100.00.000000200CC00020Mamonsu PostgreSQL Linuxsystem.disk.read_b[{#BLOCKDEVICE}]12FF5656020Mamonsu PostgreSQL Linuxsystem.disk.write_b[{#BLOCKDEVICE}]22006AAE120Mamonsu PostgreSQL Linuxsystem.disk.utilization[{#BLOCKDEVICE}]Net Iface Discovery260000007system.net.discovery[]{#NETDEVICE}.*8A0System: Network Device {#NETDEVICE} RX bytes/s200system.net.rx_bytes[{#NETDEVICE}]73650150b0000100Mamonsu PostgreSQL LinuxSystem: Network Device {#NETDEVICE} RX errors/s200system.net.rx_errs[{#NETDEVICE}]736501500000100Mamonsu PostgreSQL LinuxSystem: Network Device {#NETDEVICE} RX drops/s200system.net.rx_drop[{#NETDEVICE}]736501500000100Mamonsu PostgreSQL LinuxSystem: Network Device {#NETDEVICE} TX bytes/s200system.net.tx_bytes[{#NETDEVICE}]73650150b0000100Mamonsu PostgreSQL LinuxSystem: Network Device {#NETDEVICE} TX errors/s200system.net.tx_errs[{#NETDEVICE}]736501500000100Mamonsu PostgreSQL LinuxSystem: Network Device {#NETDEVICE} TX drops/s200system.net.tx_drop[{#NETDEVICE}]736501500000100Mamonsu PostgreSQL LinuxSystem: Network Device {#NETDEVICE}9002000.0100.0110100.00.000000287C2B9020Mamonsu PostgreSQL Linuxsystem.net.rx_bytes[{#NETDEVICE}]12793F5D020Mamonsu PostgreSQL Linuxsystem.net.tx_bytes[{#NETDEVICE}]pg_probackup discovery260000007pg_probackup.discovery[]{#BACKUPDIR}.*8A0pg_probackup dir {#BACKUPDIR}: size200pg_probackup.dir.size[{#BACKUPDIR}]736503003b0000100Mamonsu PostgreSQL Linuxpg_probackup dir {#BACKUPDIR}: error200pg_probackup.dir.error[{#BACKUPDIR}]7365030040000100Mamonsu PostgreSQL Linux{Mamonsu PostgreSQL Linux:pg_probackup.dir.error[{#BACKUPDIR}].str(ok)}<>1Error in pg_probackup dir {#BACKUPDIR} (hostname={HOSTNAME} value={ITEM.LASTVALUE})030pg_probackup backup dir: {#BACKUPDIR} size9002000.0100.0111100.00.0000002A39B98020Mamonsu PostgreSQL Linuxpg_probackup.dir.size[{#BACKUPDIR}]PostgreSQL Relations Sizes Discovery260000007pgsql.relation.size[]{#RELATIONNAME}.*8A0PostgreSQL Relation Size: {#RELATIONNAME}200pgsql.relation.size[{#RELATIONNAME}]73650153b0000100Mamonsu PostgreSQL LinuxPostgreSQL Relation Size: {#RELATIONNAME}9002000.0100.0111100.00.0000002A39B98020Mamonsu PostgreSQL Linuxpgsql.relation.size[{#RELATIONNAME}]PostgreSQL Replication Lag Discovery260000007pgsql.replication.discovery[]{#APPLICATION_NAME}.*8A0PostgreSQL Replication: {#APPLICATION_NAME} Send Lag - Time elapsed sending recent WAL locally200pgsql.replication.send_lag[{#APPLICATION_NAME}]736506000000100Mamonsu PostgreSQL LinuxPostgreSQL Replication: {#APPLICATION_NAME} Receive Lag - Time elapsed between receiving recent WAL locally and receiving notification that this standby server has flushed it200pgsql.replication.receive_lag[{#APPLICATION_NAME}]736506000000100Mamonsu PostgreSQL LinuxPostgreSQL Replication: {#APPLICATION_NAME} Write Lag - Time elapsed between flushing recent WAL locally and receiving notification that this standby server has written it200pgsql.replication.write_lag[{#APPLICATION_NAME}]736506000000100Mamonsu PostgreSQL LinuxPostgreSQL Replication: {#APPLICATION_NAME} Flush Lag - Time elapsed between flushing recent WAL locally and receiving notification that this standby server has written and flushed it200pgsql.replication.flush_lag[{#APPLICATION_NAME}]736506000000100Mamonsu PostgreSQL LinuxPostgreSQL Replication: {#APPLICATION_NAME} Replay Lag - Time elapsed between flushing recent WAL locally and receiving notification that this standby server has written, flushed and applied200pgsql.replication.replay_lag[{#APPLICATION_NAME}]736506000000100Mamonsu PostgreSQL LinuxPostgreSQL Replication: {#APPLICATION_NAME} Delta of Total Lag200pgsql.replication.total_lag[{#APPLICATION_NAME}]736506000000100Mamonsu PostgreSQL LinuxPostgreSQL Replication: Delta of Total Lag for {#APPLICATION_NAME}9002000.0100.0110100.00.0000000A39B98020Mamonsu PostgreSQL Linuxpgsql.replication.total_lag[{#APPLICATION_NAME}] + Mamonsu Overview2505001500011010003PostgreSQL Connections: OverviewMamonsu PostgreSQL Linux05001501011010003PostgreSQL Instance: Transactions RateMamonsu PostgreSQL Linux05001500111010003System: CPU Time SpentMamonsu PostgreSQL Linux05001501111010003System: Server Free/Used Memory OverviewMamonsu PostgreSQL Linux05001500211010003PostgreSQL Autovacuum: Count of Autovacuum WorkersMamonsu PostgreSQL Linux05001501211010003PostgreSQL Instance: TuplesMamonsu PostgreSQL Linux05001500311010003PostgreSQL bgwriter: BuffersMamonsu PostgreSQL Linux05001501311010003PostgreSQL bgwriter: EventsMamonsu PostgreSQL Linux05001500411010003PostgreSQL Checkpoints: Count (in hour)Mamonsu PostgreSQL Linux05001501411010003PostgreSQL Checkpoints: Write/SyncMamonsu PostgreSQL LinuxMamonsu PostgreSQL Instance2515001500011010003pgsql.ping[]Mamonsu PostgreSQL Linux15001501011010003pgsql.uptime[]Mamonsu PostgreSQL Linux15001500111010003pgsql.cache[hit]Mamonsu PostgreSQL Linux05001501111010003PostgreSQL Instance: EventsMamonsu PostgreSQL Linux15001500211010003pgsql.temp[bytes]Mamonsu PostgreSQL Linux15001501211010003pgsql.temp[files]Mamonsu PostgreSQL LinuxMamonsu PostgreSQL WAL2505001500011010003PostgreSQL Archiver: Archive StatusMamonsu PostgreSQL Linux15001501011010003pgsql.wal.write[]Mamonsu PostgreSQL Linux15001500111010003pgsql.archive_command[size_files_to_archive]Mamonsu PostgreSQL Linux15001501111010003pgsql.archive_command[archived_files]Mamonsu PostgreSQL Linux15001500211010003pgsql.wal.write_timeMamonsu PostgreSQL Linux15001501211010003pgsql.wal.sync_timeMamonsu PostgreSQL LinuxMamonsu PostgreSQL Locks3513301000011010003pgsql.events[conflicts]Mamonsu PostgreSQL Linux13301001011010003pgsql.pg_locks[accessshare]Mamonsu PostgreSQL Linux13301002011010003pgsql.pg_locks[rowshare]Mamonsu PostgreSQL Linux13301000111010003pgsql.pg_locks[rowexclusive]Mamonsu PostgreSQL Linux13301001111010003pgsql.pg_locks[shareupdateexclusive]Mamonsu PostgreSQL Linux13301002111010003pgsql.pg_locks[share]Mamonsu PostgreSQL Linux13301000211010003pgsql.pg_locks[sharerowexclusive]Mamonsu PostgreSQL Linux13301001211010003pgsql.pg_locks[exclusive]Mamonsu PostgreSQL Linux13301002211010003pgsql.pg_locks[accessexclusive]Mamonsu PostgreSQL LinuxMamonsu PostgreSQL Transactions2515001500011010003pgsql.oldest[xid_age]Mamonsu PostgreSQL Linux15001501011010003pgsql.oldest[transaction_time]Mamonsu PostgreSQL Linux15001500111010003pgsql.prepared.countMamonsu PostgreSQL Linux15001501111010003pgsql.prepared.oldestMamonsu PostgreSQL LinuxMamonsu System (Linux)2505001500011010003System: Block Devices Read/Write BytesMamonsu PostgreSQL Linux05001501011010003System: Block Devices Read/Write OperationsMamonsu PostgreSQL Linux05001500111010003System: Processes OverviewMamonsu PostgreSQL Linux - {Mamonsu PostgreSQL Linux:pgsql.archive_command[count_files_to_archive].last()}>2PostgreSQL Archiver: count files need to archive on {HOSTNAME} more than 2030{Mamonsu PostgreSQL Linux:pgsql.checkpoint[count_wal].last()}>12PostgreSQL Checkpoints: required checkpoints occurs to frequently on {HOSTNAME}030 {Mamonsu PostgreSQL Linux:pgsql.connections[total].last()}/{Mamonsu PostgreSQL Linux:pgsql.connections[max_connections].last()}*100 >90PostgreSQL Connections: too many connections on {HOSTNAME} (total connections more than 90% of max_connections)030{Mamonsu PostgreSQL Linux:mamonsu.plugin.errors[].strlen()}>1Mamonsu plugin errors on {HOSTNAME}. {ITEM.LASTVALUE}030{Mamonsu PostgreSQL Linux:mamonsu.plugin.keepalive[].nodata(180)}=1Mamonsu nodata from {HOSTNAME}030{Mamonsu PostgreSQL Linux:mamonsu.memory.rss[max].last()}>41943040Mamonsu agent memory usage alert on {HOSTNAME}: {ITEM.LASTVALUE} bytes030{Mamonsu PostgreSQL Linux:pgsql.server_mode.change()}>0PostgreSQL Instance: server mode has been changed on {HOSTNAME} to {ITEM.LASTVALUE}030{Mamonsu PostgreSQL Linux:pgsql.memory_leak_diagnostic.msg_text[].strlen()}>1PostgreSQL Memory Leak: Number of Pids Which Private Anonymous Memory Exceeds private_anon_mem_threshold on {HOSTNAME}. {ITEM.LASTVALUE}030{Mamonsu PostgreSQL Linux:pgsql.oldest[xid_age].last()}>18000000PostgreSQL Transactions: the oldest XID is too big on {HOSTNAME}030{Mamonsu PostgreSQL Linux:pgsql.oldest[transaction_time].last()}>18000PostgreSQL Transactions: running transaction is too old on {HOSTNAME}030{Mamonsu PostgreSQL Linux:pgsql.uptime[].last()}<600PostgreSQL Health: service has been restarted on {HOSTNAME} (uptime={ITEM.LASTVALUE})030{Mamonsu PostgreSQL Linux:pgsql.cache[hit].last()}<80PostgreSQL Health: cache hit ratio too low on {HOSTNAME} ({ITEM.LASTVALUE})030{Mamonsu PostgreSQL Linux:pgsql.ping[].nodata(180)}=1PostgreSQL Health: no ping from PostgreSQL for 3 minutes on {HOSTNAME}030{Mamonsu PostgreSQL Linux:pgsql.prepared.oldest.last()}>60PostgreSQL Prepared Transactions: prepared transaction is too old on {HOSTNAME}030{Mamonsu PostgreSQL Linux:system.processes[forkrate].min(5m)}>500Process fork-rate to frequently on {HOSTNAME}030{Mamonsu PostgreSQL Linux:pgsql.replication_lag[sec].last()}>300PostgreSQL streaming lag too high on {HOSTNAME} (value={ITEM.LASTVALUE})030{Mamonsu PostgreSQL Linux:pgsql.replication.non_active_slots[].last()}>0PostgreSQL number of non-active replication slots on {HOSTNAME} (value={ITEM.LASTVALUE})030{Mamonsu PostgreSQL Linux:system.uptime[].last()}<300System was restarted on {HOSTNAME} (uptime={ITEM.LASTVALUE})030 - PostgreSQL Archiver: Archive Status9002000.0100.0110100.00.00000029C8A4E020Mamonsu PostgreSQL Linuxpgsql.archive_command[count_files_to_archive]12578159020Mamonsu PostgreSQL Linuxpgsql.archive_command[archived_files]22E57862020Mamonsu PostgreSQL Linuxpgsql.archive_command[failed_trying_to_archive]PostgreSQL bgwriter: Buffers9002000.0100.0110100.00.0000002793F5D020Mamonsu PostgreSQL Linuxpgsql.bgwriter[buffers_checkpoint]129C8A4E020Mamonsu PostgreSQL Linuxpgsql.bgwriter[buffers_clean]227EB29B020Mamonsu PostgreSQL Linuxpgsql.bgwriter[buffers_backend]323B415A020Mamonsu PostgreSQL Linuxpgsql.bgwriter[buffers_alloc]PostgreSQL bgwriter: Events9002000.0100.0110100.00.000000200B0B8020Mamonsu PostgreSQL Linuxpgsql.bgwriter[maxwritten_clean]129C8A4E020Mamonsu PostgreSQL Linuxpgsql.bgwriter[buffers_backend_fsync]PostgreSQL Checkpoints: Count (in hour)9002000.0100.0110100.00.0000002578159020Mamonsu PostgreSQL Linuxpgsql.checkpoint[count_timed]12793F5D020Mamonsu PostgreSQL Linuxpgsql.checkpoint[count_wal]PostgreSQL Checkpoints: Write/Sync9002000.0100.0110100.00.000000200B0B8020Mamonsu PostgreSQL Linuxpgsql.checkpoint[write_time]129C8A4E020Mamonsu PostgreSQL Linuxpgsql.checkpoint[checkpoint_sync_time]PostgreSQL Connections: Overview9002000.0100.0110100.00.0000002578159020Mamonsu PostgreSQL Linuxpgsql.connections[active]128B817C020Mamonsu PostgreSQL Linuxpgsql.connections[idle]229C8A4E020Mamonsu PostgreSQL Linuxpgsql.connections[idle_in_transaction]32F6CB93020Mamonsu PostgreSQL Linuxpgsql.connections[idle_in_transaction_aborted]4200B0B8020Mamonsu PostgreSQL Linuxpgsql.connections[fastpath_function_call]523B415A020Mamonsu PostgreSQL Linuxpgsql.connections[disabled]62E57862020Mamonsu PostgreSQL Linuxpgsql.connections[total]720082A5020Mamonsu PostgreSQL Linuxpgsql.connections[waiting]82FF3C47020Mamonsu PostgreSQL Linuxpgsql.connections[max_connections]927EB29B020Mamonsu PostgreSQL Linuxpgsql.connections[other]PostgreSQL Autovacuum: Count of Autovacuum Workers9002000.0100.0110100.00.00000027EB29B020Mamonsu PostgreSQL Linuxpgsql.autovacumm.count[]System: Block Devices Read/Write Operations9002000.0100.0110100.00.00000007EB29B020Mamonsu PostgreSQL Linuxsystem.disk.all_read[]10793F5D020Mamonsu PostgreSQL Linuxsystem.disk.all_write[]System: Block Devices Read/Write Bytes9002000.0100.0110100.00.00000007EB29B020Mamonsu PostgreSQL Linuxsystem.disk.all_read_b[]10793F5D020Mamonsu PostgreSQL Linuxsystem.disk.all_write_b[]PostgreSQL Instance: Blocks Rate9002000.0100.0110100.00.00000027EB29B020Mamonsu PostgreSQL Linuxpgsql.blocks[hit]12793F5D020Mamonsu PostgreSQL Linuxpgsql.blocks[read]PostgreSQL Instance: Transactions Rate9002000.0100.0110100.00.0000002578159020Mamonsu PostgreSQL Linuxpgsql.transactions[committed]12E57862020Mamonsu PostgreSQL Linuxpgsql.events[xact_rollback]PostgreSQL Instance: Events9002000.0100.0110100.00.00000029C8A4E020Mamonsu PostgreSQL Linuxpgsql.events[conflicts]123B415A020Mamonsu PostgreSQL Linuxpgsql.events[deadlocks]22793F5D020Mamonsu PostgreSQL Linuxpgsql.events[checksum_failures]PostgreSQL Instance: Temp Files9002000.0100.0110100.00.000000200B0B8020Mamonsu PostgreSQL Linuxpgsql.temp[bytes]120082A5120Mamonsu PostgreSQL Linuxpgsql.temp[files]PostgreSQL Instance: Tuples9002000.0100.0110100.00.00000023B415A020Mamonsu PostgreSQL Linuxpgsql.tuples[deleted]127EB29B020Mamonsu PostgreSQL Linuxpgsql.tuples[fetched]2200B0B8020Mamonsu PostgreSQL Linuxpgsql.tuples[inserted]329C8A4E120Mamonsu PostgreSQL Linuxpgsql.tuples[returned]426A4F5F020Mamonsu PostgreSQL Linuxpgsql.tuples[updated]System: Server Memory Detailed Overview9004000.0100.0111100.00.000000090BD72020Mamonsu PostgreSQL Linuxsystem.memory[active]10578159020Mamonsu PostgreSQL Linuxsystem.memory[available]2000B0B8020Mamonsu PostgreSQL Linuxsystem.memory[buffers]309C8A4E020Mamonsu PostgreSQL Linuxsystem.memory[cached]4052768F020Mamonsu PostgreSQL Linuxsystem.memory[committed]50001219020Mamonsu PostgreSQL Linuxsystem.memory[inactive]609F1E28020Mamonsu PostgreSQL Linuxsystem.memory[mapped]708B817C020Mamonsu PostgreSQL Linuxsystem.memory[page_tables]80F6CB93020Mamonsu PostgreSQL Linuxsystem.memory[slab]900082A5020Mamonsu PostgreSQL Linuxsystem.memory[swap]1007EB29B020Mamonsu PostgreSQL Linuxsystem.memory[swap_cache]110E57862020Mamonsu PostgreSQL Linuxsystem.memory[total]1203B415A020Mamonsu PostgreSQL Linuxsystem.memory[unused]130793F5D020Mamonsu PostgreSQL Linuxsystem.memory[used]140CF6518020Mamonsu PostgreSQL Linuxsystem.memory[vmalloc_used]System: Server Free/Used Memory Overview9004000.0100.0111100.00.0000001578159020Mamonsu PostgreSQL Linuxsystem.memory[available]119C8A4E020Mamonsu PostgreSQL Linuxsystem.memory[cached]24E57862020Mamonsu PostgreSQL Linuxsystem.memory[total]31793F5D020Mamonsu PostgreSQL Linuxsystem.memory[used]PostgreSQL pg_buffercache: Shared Buffer9002000.0100.0110100.00.0000002E57862020Mamonsu PostgreSQL Linuxpgsql.buffers[size]127EB29B020Mamonsu PostgreSQL Linuxpgsql.buffers[twice_used]22793F5D020Mamonsu PostgreSQL Linuxpgsql.buffers[dirty]PostgreSQL: Locks Sampling9002000.0100.0110100.00.0000002578159020Mamonsu PostgreSQL Linuxpgsql.pg_locks[accessshare]123B415A020Mamonsu PostgreSQL Linuxpgsql.pg_locks[rowshare]227EB29B020Mamonsu PostgreSQL Linuxpgsql.pg_locks[rowexclusive]32F6CB93020Mamonsu PostgreSQL Linuxpgsql.pg_locks[shareupdateexclusive]420082A5020Mamonsu PostgreSQL Linuxpgsql.pg_locks[share]5200B0B8020Mamonsu PostgreSQL Linuxpgsql.pg_locks[sharerowexclusive]629C8A4E020Mamonsu PostgreSQL Linuxpgsql.pg_locks[exclusive]72793F5D020Mamonsu PostgreSQL Linuxpgsql.pg_locks[accessexclusive]PostgreSQL Prepared Transactions: Overview9002000.0100.0110100.00.00000028B817C020Mamonsu PostgreSQL Linuxpgsql.prepared.count129C8A4E120Mamonsu PostgreSQL Linuxpgsql.prepared.oldestSystem: Processes Overview9002000.0100.0110100.00.0000000578159020Mamonsu PostgreSQL Linuxsystem.processes[running]10E57862020Mamonsu PostgreSQL Linuxsystem.processes[blocked]209C8A4E120Mamonsu PostgreSQL Linuxsystem.processes[forkrate]System: CPU Time Spent9002000.0100.0111100.00.0000000578159020Mamonsu PostgreSQL Linuxsystem.cpu[user]10793F5D020Mamonsu PostgreSQL Linuxsystem.cpu[nice]209C8A4E020Mamonsu PostgreSQL Linuxsystem.cpu[system]308B817C020Mamonsu PostgreSQL Linuxsystem.cpu[idle]400082A5020Mamonsu PostgreSQL Linuxsystem.cpu[iowait]503B415A020Mamonsu PostgreSQL Linuxsystem.cpu[irq]60F6CB93020Mamonsu PostgreSQL Linuxsystem.cpu[softirq]PostgreSQL Statements: Bytes9002000.0100.0110100.00.00000027EB29B020Mamonsu PostgreSQL Linuxpgsql.stat[read_bytes]12793F5D020Mamonsu PostgreSQL Linuxpgsql.stat[write_bytes]229C8A4E020Mamonsu PostgreSQL Linuxpgsql.stat[dirty_bytes]PostgreSQL Statements: Spend Time9002000.0100.0111100.00.00000027EB29B020Mamonsu PostgreSQL Linuxpgsql.stat[read_time]12793F5D020Mamonsu PostgreSQL Linuxpgsql.stat[write_time]229C8A4E020Mamonsu PostgreSQL Linuxpgsql.stat[other_time]PostgreSQL Statements: WAL Statistics9002000.0100.0110100.00.000000200B0B8020Mamonsu PostgreSQL Linuxpgsql.stat[wal_bytes]120082A5020Mamonsu PostgreSQL Linuxpgsql.stat[wal_records]229C8A4E020Mamonsu PostgreSQL Linuxpgsql.stat[wal_fpi]PostgreSQL Wait Sampling: Locks by Type9002000.0100.0111100.00.00000027EB29B020Mamonsu PostgreSQL Linuxpgsql.all_lock[lwlock]12793F5D020Mamonsu PostgreSQL Linuxpgsql.all_lock[hwlock]2200B0B8020Mamonsu PostgreSQL Linuxpgsql.all_lock[buffer]329C8A4E020Mamonsu PostgreSQL Linuxpgsql.all_lock[extension]42F6CB93020Mamonsu PostgreSQL Linuxpgsql.all_lock[client]523B415A020Mamonsu PostgreSQL Linuxpgsql.all_lock[other]PostgreSQL Wait Sampling: Heavyweight Locks9002000.0100.0111100.00.00000027EB29B020Mamonsu PostgreSQL Linuxpgsql.hwlock[relation]123B415A020Mamonsu PostgreSQL Linuxpgsql.hwlock[extend]22F6CB93020Mamonsu PostgreSQL Linuxpgsql.hwlock[page]320082A5020Mamonsu PostgreSQL Linuxpgsql.hwlock[tuple]4200B0B8020Mamonsu PostgreSQL Linuxpgsql.hwlock[transactionid]52793F5D020Mamonsu PostgreSQL Linuxpgsql.hwlock[virtualxid]629C8A4E020Mamonsu PostgreSQL Linuxpgsql.hwlock[speculative_token]728B817C020Mamonsu PostgreSQL Linuxpgsql.hwlock[object]8252768F020Mamonsu PostgreSQL Linuxpgsql.hwlock[userlock]92FE9430020Mamonsu PostgreSQL Linuxpgsql.hwlock[advisory]PostgreSQL Wait Sampling: Lightweight Locks9002000.0100.0111100.00.0000002793F5D020Mamonsu PostgreSQL Linuxpgsql.lwlock[xid]1200B0B8020Mamonsu PostgreSQL Linuxpgsql.lwlock[autovacuum]227EB29B020Mamonsu PostgreSQL Linuxpgsql.lwlock[wal]320082A5020Mamonsu PostgreSQL Linuxpgsql.lwlock[clog]423B415A020Mamonsu PostgreSQL Linuxpgsql.lwlock[replication]529C8A4E020Mamonsu PostgreSQL Linuxpgsql.lwlock[logical_replication]62F6CB93020Mamonsu PostgreSQL Linuxpgsql.lwlock[buffer]728B817C020Mamonsu PostgreSQL Linuxpgsql.lwlock[other] + {Mamonsu PostgreSQL Linux:pgsql.archive_command[count_files_to_archive].last()}>2PostgreSQL Archiver: count files need to archive on {HOSTNAME} more than 2030{Mamonsu PostgreSQL Linux:pgsql.checkpoint[count_wal].last()}>12PostgreSQL Checkpoints: required checkpoints occurs too frequently on {HOSTNAME}030 {Mamonsu PostgreSQL Linux:pgsql.connections[total].last()}/{Mamonsu PostgreSQL Linux:pgsql.connections[max_connections].last()}*100 >90PostgreSQL Connections: too many connections on {HOSTNAME} (total connections more than 90% of max_connections)030{Mamonsu PostgreSQL Linux:mamonsu.plugin.errors[].strlen()}>1Mamonsu plugin errors on {HOSTNAME}. {ITEM.LASTVALUE}030{Mamonsu PostgreSQL Linux:mamonsu.plugin.keepalive[].nodata(180)}=1Mamonsu nodata from {HOSTNAME}030{Mamonsu PostgreSQL Linux:mamonsu.memory.rss[max].last()}>41943040Mamonsu agent memory usage alert on {HOSTNAME}: {ITEM.LASTVALUE} bytes030{Mamonsu PostgreSQL Linux:pgsql.server_mode.change()}>0PostgreSQL Instance: server mode has been changed on {HOSTNAME} to {ITEM.LASTVALUE}030{Mamonsu PostgreSQL Linux:pgsql.memory_leak_diagnostic.msg_text[].strlen()}>1PostgreSQL Memory Leak: Number of Pids Which Private Anonymous Memory Exceeds private_anon_mem_threshold on {HOSTNAME}. {ITEM.LASTVALUE}030{Mamonsu PostgreSQL Linux:pgsql.oldest[xid_age].last()}>18000000PostgreSQL Transactions: the oldest XID is too big on {HOSTNAME}030{Mamonsu PostgreSQL Linux:pgsql.oldest[transaction_time].last()}>18000PostgreSQL Transactions: running transaction is too old on {HOSTNAME}030{Mamonsu PostgreSQL Linux:pgsql.uptime[].change()}>600PostgreSQL Health: service has been restarted on {HOSTNAME} (uptime={ITEM.LASTVALUE})030{Mamonsu PostgreSQL Linux:pgsql.cache[hit].last()}<80PostgreSQL Health: cache hit ratio too low on {HOSTNAME} ({ITEM.LASTVALUE})030{Mamonsu PostgreSQL Linux:pgsql.ping[].nodata(180)}=1PostgreSQL Health: no ping from PostgreSQL for 3 minutes on {HOSTNAME}030{Mamonsu PostgreSQL Linux:pgsql.prepared.oldest.last()}>60PostgreSQL Prepared Transactions: prepared transaction is too old on {HOSTNAME}030{Mamonsu PostgreSQL Linux:system.processes[forkrate].min(5m)}>500Process fork-rate too frequently on {HOSTNAME}030{Mamonsu PostgreSQL Linux:pgsql.replication_lag[sec].last()}>300PostgreSQL streaming lag too high on {HOSTNAME} (value={ITEM.LASTVALUE})030{Mamonsu PostgreSQL Linux:pgsql.replication.non_active_slots[].last()}>0PostgreSQL number of non-active replication slots on {HOSTNAME} (value={ITEM.LASTVALUE})030{Mamonsu PostgreSQL Linux:system.uptime[].last()}<300System was restarted on {HOSTNAME} (uptime={ITEM.LASTVALUE})030 + PostgreSQL Archiver: Archive Status9002000.0100.0110100.00.0000002006AAE020Mamonsu PostgreSQL Linuxpgsql.archive_command[count_files_to_archive]1200CC00020Mamonsu PostgreSQL Linuxpgsql.archive_command[archived_files]22FF5656020Mamonsu PostgreSQL Linuxpgsql.archive_command[failed_trying_to_archive]PostgreSQL bgwriter: Buffers9002000.0100.0110100.00.0000002006AAE020Mamonsu PostgreSQL Linuxpgsql.bgwriter[buffers_checkpoint]1200CC00020Mamonsu PostgreSQL Linuxpgsql.bgwriter[buffers_clean]229C8A4E020Mamonsu PostgreSQL Linuxpgsql.bgwriter[buffers_backend]32FF5656020Mamonsu PostgreSQL Linuxpgsql.bgwriter[buffers_alloc]PostgreSQL bgwriter: Events9002000.0100.0110100.00.0000002FF5656020Mamonsu PostgreSQL Linuxpgsql.bgwriter[maxwritten_clean]1200CC00020Mamonsu PostgreSQL Linuxpgsql.bgwriter[buffers_backend_fsync]PostgreSQL Checkpoints: Count (in hour)9002000.0100.0110100.00.000000200CC00020Mamonsu PostgreSQL Linuxpgsql.checkpoint[count_timed]12FF5656020Mamonsu PostgreSQL Linuxpgsql.checkpoint[count_wal]PostgreSQL Checkpoints: Write/Sync9002000.0100.0110100.00.000000200CC00020Mamonsu PostgreSQL Linuxpgsql.checkpoint[write_time]12FF5656020Mamonsu PostgreSQL Linuxpgsql.checkpoint[checkpoint_sync_time]PostgreSQL Connections: Overview9002000.0100.0111100.00.000000200CC00020Mamonsu PostgreSQL Linuxpgsql.connections[active]12A39B98020Mamonsu PostgreSQL Linuxpgsql.connections[idle]229C8A4E020Mamonsu PostgreSQL Linuxpgsql.connections[idle_in_transaction]32F6CB93020Mamonsu PostgreSQL Linuxpgsql.connections[idle_in_transaction_aborted]4200B0B8020Mamonsu PostgreSQL Linuxpgsql.connections[fastpath_function_call]523B415A020Mamonsu PostgreSQL Linuxpgsql.connections[disabled]62FF5656020Mamonsu PostgreSQL Linuxpgsql.connections[total]72006AAE020Mamonsu PostgreSQL Linuxpgsql.connections[waiting]8287C2B9020Mamonsu PostgreSQL Linuxpgsql.connections[other]PostgreSQL Autovacuum: Count of Autovacuum Workers9002000.0100.0110100.00.000000287C2B9020Mamonsu PostgreSQL Linuxpgsql.autovacumm.count[]System: Block Devices Read/Write Operations9002000.0100.0110100.00.000000200CC00020Mamonsu PostgreSQL Linuxsystem.disk.all_read[]12FF5656020Mamonsu PostgreSQL Linuxsystem.disk.all_write[]System: Block Devices Read/Write Bytes9002000.0100.0110100.00.000000200CC00020Mamonsu PostgreSQL Linuxsystem.disk.all_read_b[]12FF5656020Mamonsu PostgreSQL Linuxsystem.disk.all_write_b[]PostgreSQL Instance: Blocks Rate9002000.0100.0110100.00.000000287C2B9020Mamonsu PostgreSQL Linuxpgsql.blocks[hit]12793F5D020Mamonsu PostgreSQL Linuxpgsql.blocks[read]PostgreSQL Instance: Transactions Rate9002000.0100.0110100.00.000000200CC00020Mamonsu PostgreSQL Linuxpgsql.transactions[committed]12FF5656020Mamonsu PostgreSQL Linuxpgsql.events[xact_rollback]PostgreSQL Instance: Events9002000.0100.0110100.00.000000200CC00020Mamonsu PostgreSQL Linuxpgsql.events[conflicts]12FF5656020Mamonsu PostgreSQL Linuxpgsql.events[deadlocks]22006AAE020Mamonsu PostgreSQL Linuxpgsql.events[checksum_failures]PostgreSQL Instance: Temp Files9002000.0100.0110100.00.000000200B0B8020Mamonsu PostgreSQL Linuxpgsql.temp[bytes]12006AAE120Mamonsu PostgreSQL Linuxpgsql.temp[files]PostgreSQL Instance: Tuples9002000.0100.0110100.00.0000002FF5656020Mamonsu PostgreSQL Linuxpgsql.tuples[deleted]12006AAE020Mamonsu PostgreSQL Linuxpgsql.tuples[fetched]2200CC00020Mamonsu PostgreSQL Linuxpgsql.tuples[inserted]32001219120Mamonsu PostgreSQL Linuxpgsql.tuples[returned]429C8A4E020Mamonsu PostgreSQL Linuxpgsql.tuples[updated]System: Server Memory Detailed Overview9004000.0100.0111100.00.0000000BAEB6B020Mamonsu PostgreSQL Linuxsystem.memory[active]1000CC00020Mamonsu PostgreSQL Linuxsystem.memory[available]2000B0B8020Mamonsu PostgreSQL Linuxsystem.memory[buffers]3052768F020Mamonsu PostgreSQL Linuxsystem.memory[cached]409C8A4E020Mamonsu PostgreSQL Linuxsystem.memory[committed]50A39B98020Mamonsu PostgreSQL Linuxsystem.memory[inactive]609F1E28020Mamonsu PostgreSQL Linuxsystem.memory[mapped]70793F5D020Mamonsu PostgreSQL Linuxsystem.memory[page_tables]80F6CB93020Mamonsu PostgreSQL Linuxsystem.memory[slab]90006AAE020Mamonsu PostgreSQL Linuxsystem.memory[swap]10087C2B9020Mamonsu PostgreSQL Linuxsystem.memory[swap_cache]1103B415A020Mamonsu PostgreSQL Linuxsystem.memory[unused]120001219020Mamonsu PostgreSQL Linuxsystem.memory[used]130CF6518020Mamonsu PostgreSQL Linuxsystem.memory[vmalloc_used]System: Server Free/Used Memory Overview9004000.0100.0110100.00.0000001001219020Mamonsu PostgreSQL Linuxsystem.memory[used]1152768F020Mamonsu PostgreSQL Linuxsystem.memory[cached]2100CC00020Mamonsu PostgreSQL Linuxsystem.memory[available]34FF5656020Mamonsu PostgreSQL Linuxsystem.memory[total]PostgreSQL pg_buffercache: Shared Buffer9002000.0100.0110100.00.000000200CC00020Mamonsu PostgreSQL Linuxpgsql.buffers[size]12006AAE020Mamonsu PostgreSQL Linuxpgsql.buffers[twice_used]22FF5656020Mamonsu PostgreSQL Linuxpgsql.buffers[dirty]PostgreSQL: Locks Sampling9002000.0100.0110100.00.000000200CC00020Mamonsu PostgreSQL Linuxpgsql.pg_locks[accessshare]123B415A020Mamonsu PostgreSQL Linuxpgsql.pg_locks[rowshare]22FF5656020Mamonsu PostgreSQL Linuxpgsql.pg_locks[rowexclusive]32F6CB93020Mamonsu PostgreSQL Linuxpgsql.pg_locks[shareupdateexclusive]42006AAE020Mamonsu PostgreSQL Linuxpgsql.pg_locks[share]5200B0B8020Mamonsu PostgreSQL Linuxpgsql.pg_locks[sharerowexclusive]629C8A4E020Mamonsu PostgreSQL Linuxpgsql.pg_locks[exclusive]72793F5D020Mamonsu PostgreSQL Linuxpgsql.pg_locks[accessexclusive]PostgreSQL Prepared Transactions: Overview9002000.0100.0110100.00.0000002A39B98020Mamonsu PostgreSQL Linuxpgsql.prepared.count129C8A4E120Mamonsu PostgreSQL Linuxpgsql.prepared.oldestSystem: Processes Overview9002000.0100.0110100.00.000000200CC00020Mamonsu PostgreSQL Linuxsystem.processes[running]12FF5656020Mamonsu PostgreSQL Linuxsystem.processes[blocked]22006AAE120Mamonsu PostgreSQL Linuxsystem.processes[forkrate]System: CPU Time Spent9002000.0100.0111100.00.000000200CC00020Mamonsu PostgreSQL Linuxsystem.cpu[user]12793F5D020Mamonsu PostgreSQL Linuxsystem.cpu[nice]229C8A4E020Mamonsu PostgreSQL Linuxsystem.cpu[system]32A39B98020Mamonsu PostgreSQL Linuxsystem.cpu[idle]42006AAE020Mamonsu PostgreSQL Linuxsystem.cpu[iowait]52FF5656020Mamonsu PostgreSQL Linuxsystem.cpu[irq]62F6CB93020Mamonsu PostgreSQL Linuxsystem.cpu[softirq]PostgreSQL Statements: Bytes9002000.0100.0110100.00.000000287C2B9020Mamonsu PostgreSQL Linuxpgsql.stat[read_bytes]12793F5D020Mamonsu PostgreSQL Linuxpgsql.stat[write_bytes]229C8A4E020Mamonsu PostgreSQL Linuxpgsql.stat[dirty_bytes]PostgreSQL Statements: Spent Time9002000.0100.0111100.00.000000287C2B9020Mamonsu PostgreSQL Linuxpgsql.stat[read_time]12793F5D020Mamonsu PostgreSQL Linuxpgsql.stat[write_time]229C8A4E020Mamonsu PostgreSQL Linuxpgsql.stat[other_time]PostgreSQL Statements: WAL Statistics9002000.0100.0110100.00.000000200B0B8020Mamonsu PostgreSQL Linuxpgsql.stat[wal_bytes]12006AAE020Mamonsu PostgreSQL Linuxpgsql.stat[wal_records]229C8A4E020Mamonsu PostgreSQL Linuxpgsql.stat[wal_fpi]PostgreSQL Wait Sampling: Locks by Type9002000.0100.0111100.00.000000287C2B9020Mamonsu PostgreSQL Linuxpgsql.all_lock[lwlock]12793F5D020Mamonsu PostgreSQL Linuxpgsql.all_lock[hwlock]2200B0B8020Mamonsu PostgreSQL Linuxpgsql.all_lock[buffer]329C8A4E020Mamonsu PostgreSQL Linuxpgsql.all_lock[extension]42F6CB93020Mamonsu PostgreSQL Linuxpgsql.all_lock[client]523B415A020Mamonsu PostgreSQL Linuxpgsql.all_lock[other]PostgreSQL Wait Sampling: Heavyweight Locks9002000.0100.0111100.00.000000287C2B9020Mamonsu PostgreSQL Linuxpgsql.hwlock[relation]123B415A020Mamonsu PostgreSQL Linuxpgsql.hwlock[extend]22F6CB93020Mamonsu PostgreSQL Linuxpgsql.hwlock[page]32006AAE020Mamonsu PostgreSQL Linuxpgsql.hwlock[tuple]4200B0B8020Mamonsu PostgreSQL Linuxpgsql.hwlock[transactionid]52793F5D020Mamonsu PostgreSQL Linuxpgsql.hwlock[virtualxid]629C8A4E020Mamonsu PostgreSQL Linuxpgsql.hwlock[speculative_token]72A39B98020Mamonsu PostgreSQL Linuxpgsql.hwlock[object]8252768F020Mamonsu PostgreSQL Linuxpgsql.hwlock[userlock]92FE9430020Mamonsu PostgreSQL Linuxpgsql.hwlock[advisory]PostgreSQL Wait Sampling: Lightweight Locks9002000.0100.0111100.00.0000002793F5D020Mamonsu PostgreSQL Linuxpgsql.lwlock[xid]1200B0B8020Mamonsu PostgreSQL Linuxpgsql.lwlock[autovacuum]2287C2B9020Mamonsu PostgreSQL Linuxpgsql.lwlock[wal]32006AAE020Mamonsu PostgreSQL Linuxpgsql.lwlock[clog]423B415A020Mamonsu PostgreSQL Linuxpgsql.lwlock[replication]529C8A4E020Mamonsu PostgreSQL Linuxpgsql.lwlock[logical_replication]62F6CB93020Mamonsu PostgreSQL Linuxpgsql.lwlock[buffer]72A39B98020Mamonsu PostgreSQL Linuxpgsql.lwlock[other] \ No newline at end of file From 36fac7fdda09af181048afb17bbf9733ba5f1333 Mon Sep 17 00:00:00 2001 From: cuprumtan Date: Tue, 16 Aug 2022 10:57:04 +0300 Subject: [PATCH 006/106] doc: fixed cmd syntax --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 47c647c..f169533 100644 --- a/README.md +++ b/README.md @@ -169,7 +169,7 @@ $ pyinstaller --onefile service_win32.spec **Build NSIS installer:** ```shell $ git clone ... && cd mamonsu && py setup_win32.py py2exe -$ makensis packaging/win/mamonsu.nsis +$ makensis packaging\win\mamonsu.nsis ``` ## Installation From 7b433c1baccc24a75c3057138056ab2844117b23 Mon Sep 17 00:00:00 2001 From: cuprumtan Date: Tue, 16 Aug 2022 10:58:03 +0300 Subject: [PATCH 007/106] cicd: excluded packaging/conf from workflow --- .github/workflows/mamonsu-tests-dev.yml | 1 + .github/workflows/mamonsu-tests-master.yml | 1 + 2 files changed, 2 insertions(+) diff --git a/.github/workflows/mamonsu-tests-dev.yml b/.github/workflows/mamonsu-tests-dev.yml index 963ef8e..76e37bf 100644 --- a/.github/workflows/mamonsu-tests-dev.yml +++ b/.github/workflows/mamonsu-tests-dev.yml @@ -8,6 +8,7 @@ on: - 'README.md' - 'documentation/**' - 'examples/**' + - 'packaging/conf/**' pull_request: branches: - dev diff --git a/.github/workflows/mamonsu-tests-master.yml b/.github/workflows/mamonsu-tests-master.yml index a114eaf..5f7788e 100644 --- a/.github/workflows/mamonsu-tests-master.yml +++ b/.github/workflows/mamonsu-tests-master.yml @@ -8,6 +8,7 @@ on: - 'README.md' - 'documentation/**' - 'examples/**' + - 'packaging/conf/**' pull_request: branches: - master From 7f16ffb469f387980e46c123dee26b2157fa6c62 Mon Sep 17 00:00:00 2001 From: cuprumtan Date: Tue, 16 Aug 2022 10:59:56 +0300 Subject: [PATCH 008/106] cicd: excluded packaging/conf from workflow --- .github/workflows/mamonsu-tests-dev.yml | 1 + .github/workflows/mamonsu-tests-master.yml | 1 + 2 files changed, 2 insertions(+) diff --git a/.github/workflows/mamonsu-tests-dev.yml b/.github/workflows/mamonsu-tests-dev.yml index 76e37bf..ac9e8a1 100644 --- a/.github/workflows/mamonsu-tests-dev.yml +++ b/.github/workflows/mamonsu-tests-dev.yml @@ -16,6 +16,7 @@ on: - 'README.md' - 'documentation/**' - 'examples/**' + - 'packaging/conf/**' jobs: mamonsu-tests: diff --git a/.github/workflows/mamonsu-tests-master.yml b/.github/workflows/mamonsu-tests-master.yml index 5f7788e..7670e24 100644 --- a/.github/workflows/mamonsu-tests-master.yml +++ b/.github/workflows/mamonsu-tests-master.yml @@ -16,6 +16,7 @@ on: - 'README.md' - 'documentation/**' - 'examples/**' + - 'packaging/conf/**' jobs: mamonsu-tests: From 5ee6c58c07a9783524d618efbc68479b97795193 Mon Sep 17 00:00:00 2001 From: cuprumtan Date: Wed, 20 Jul 2022 20:06:49 +0300 Subject: [PATCH 009/106] feature: drafted new autovacuum utilization metrics (cherry picked from commit 3f937df7f042235e1e474cb6eab136c9372f697d) --- Makefile.pkg | 2 +- .../sources/metrics-linux-10.txt | 3 +- .../sources/metrics-linux-11.txt | 3 +- .../sources/metrics-linux-12.txt | 3 +- .../sources/metrics-linux-13.txt | 3 +- .../sources/metrics-linux-14.txt | 3 +- .../sources/metrics-linux-9.6.txt | 3 +- .../sources/metrics-linux-full-list.txt | 3 +- mamonsu/plugins/pgsql/autovacuum.py | 57 +++++++++++++++++++ mamonsu/plugins/pgsql/databases.py | 50 +--------------- mamonsu/plugins/pgsql/driver/pool.py | 19 +++++++ mamonsu/tools/bootstrap/sql.py | 43 ++++++++++++++ 12 files changed, 137 insertions(+), 55 deletions(-) create mode 100644 mamonsu/plugins/pgsql/autovacuum.py diff --git a/Makefile.pkg b/Makefile.pkg index d46bf12..3b84041 100644 --- a/Makefile.pkg +++ b/Makefile.pkg @@ -12,7 +12,7 @@ prepare_builddir: clean chown -R root.root $(BUILDDIR) deb: prepare_builddir - cd $(BUILDDIR) && cp -a $(WORKDIR)/packaging/debian . && dpkg-buildpackage -b + cd $(BUILDDIR) && cp -a $(WORKDIR)/packaging/debian . && dpkg-buildpackage -b --no-sign cp -av build/mamonsu*.deb . rpm: prepare_builddir $(BUILDDIR)/packaging/rpm/SPECS/$(SPEC) diff --git a/github-actions-tests/sources/metrics-linux-10.txt b/github-actions-tests/sources/metrics-linux-10.txt index bc1546f..f62a60f 100644 --- a/github-actions-tests/sources/metrics-linux-10.txt +++ b/github-actions-tests/sources/metrics-linux-10.txt @@ -5,7 +5,8 @@ pgsql.archive_command[archived_files] pgsql.archive_command[count_files_to_archive] pgsql.archive_command[failed_trying_to_archive] pgsql.archive_command[size_files_to_archive] -pgsql.autovacumm.count[] +pgsql.autovacuum.count[] +pgsql.autovacuum.utilization[] pgsql.bgwriter[buffers_alloc] pgsql.bgwriter[buffers_backend] pgsql.bgwriter[buffers_backend_fsync] diff --git a/github-actions-tests/sources/metrics-linux-11.txt b/github-actions-tests/sources/metrics-linux-11.txt index bc1546f..f62a60f 100644 --- a/github-actions-tests/sources/metrics-linux-11.txt +++ b/github-actions-tests/sources/metrics-linux-11.txt @@ -5,7 +5,8 @@ pgsql.archive_command[archived_files] pgsql.archive_command[count_files_to_archive] pgsql.archive_command[failed_trying_to_archive] pgsql.archive_command[size_files_to_archive] -pgsql.autovacumm.count[] +pgsql.autovacuum.count[] +pgsql.autovacuum.utilization[] pgsql.bgwriter[buffers_alloc] pgsql.bgwriter[buffers_backend] pgsql.bgwriter[buffers_backend_fsync] diff --git a/github-actions-tests/sources/metrics-linux-12.txt b/github-actions-tests/sources/metrics-linux-12.txt index 64ecb61..94ffe7e 100644 --- a/github-actions-tests/sources/metrics-linux-12.txt +++ b/github-actions-tests/sources/metrics-linux-12.txt @@ -5,7 +5,8 @@ pgsql.archive_command[archived_files] pgsql.archive_command[count_files_to_archive] pgsql.archive_command[failed_trying_to_archive] pgsql.archive_command[size_files_to_archive] -pgsql.autovacumm.count[] +pgsql.autovacuum.count[] +pgsql.autovacuum.utilization[] pgsql.bgwriter[buffers_alloc] pgsql.bgwriter[buffers_backend] pgsql.bgwriter[buffers_backend_fsync] diff --git a/github-actions-tests/sources/metrics-linux-13.txt b/github-actions-tests/sources/metrics-linux-13.txt index 73b677e..c847ac5 100644 --- a/github-actions-tests/sources/metrics-linux-13.txt +++ b/github-actions-tests/sources/metrics-linux-13.txt @@ -5,7 +5,8 @@ pgsql.archive_command[archived_files] pgsql.archive_command[count_files_to_archive] pgsql.archive_command[failed_trying_to_archive] pgsql.archive_command[size_files_to_archive] -pgsql.autovacumm.count[] +pgsql.autovacuum.count[] +pgsql.autovacuum.utilization[] pgsql.bgwriter[buffers_alloc] pgsql.bgwriter[buffers_backend] pgsql.bgwriter[buffers_backend_fsync] diff --git a/github-actions-tests/sources/metrics-linux-14.txt b/github-actions-tests/sources/metrics-linux-14.txt index 5029463..407ff17 100644 --- a/github-actions-tests/sources/metrics-linux-14.txt +++ b/github-actions-tests/sources/metrics-linux-14.txt @@ -5,7 +5,8 @@ pgsql.archive_command[archived_files] pgsql.archive_command[count_files_to_archive] pgsql.archive_command[failed_trying_to_archive] pgsql.archive_command[size_files_to_archive] -pgsql.autovacumm.count[] +pgsql.autovacuum.count[] +pgsql.autovacuum.utilization[] pgsql.bgwriter[buffers_alloc] pgsql.bgwriter[buffers_backend] pgsql.bgwriter[buffers_backend_fsync] diff --git a/github-actions-tests/sources/metrics-linux-9.6.txt b/github-actions-tests/sources/metrics-linux-9.6.txt index 0de8b0f..3e3b990 100644 --- a/github-actions-tests/sources/metrics-linux-9.6.txt +++ b/github-actions-tests/sources/metrics-linux-9.6.txt @@ -5,7 +5,8 @@ pgsql.archive_command[archived_files] pgsql.archive_command[count_files_to_archive] pgsql.archive_command[failed_trying_to_archive] pgsql.archive_command[size_files_to_archive] -pgsql.autovacumm.count[] +pgsql.autovacuum.count[] +pgsql.autovacuum.utilization[] pgsql.bgwriter[buffers_alloc] pgsql.bgwriter[buffers_backend] pgsql.bgwriter[buffers_backend_fsync] diff --git a/github-actions-tests/sources/metrics-linux-full-list.txt b/github-actions-tests/sources/metrics-linux-full-list.txt index a698ee9..a658c9a 100644 --- a/github-actions-tests/sources/metrics-linux-full-list.txt +++ b/github-actions-tests/sources/metrics-linux-full-list.txt @@ -5,7 +5,8 @@ pgsql.archive_command[archived_files] pgsql.archive_command[count_files_to_archive] pgsql.archive_command[failed_trying_to_archive] pgsql.archive_command[size_files_to_archive] -pgsql.autovacumm.count[] +pgsql.autovacuum.count[] +pgsql.autovacuum.utilization[] pgsql.bgwriter[buffers_alloc] pgsql.bgwriter[buffers_backend] pgsql.bgwriter[buffers_backend_fsync] diff --git a/mamonsu/plugins/pgsql/autovacuum.py b/mamonsu/plugins/pgsql/autovacuum.py new file mode 100644 index 0000000..431896f --- /dev/null +++ b/mamonsu/plugins/pgsql/autovacuum.py @@ -0,0 +1,57 @@ +# -*- coding: utf-8 -*- +from distutils.version import LooseVersion +from mamonsu.plugins.pgsql.plugin import PgsqlPlugin as Plugin +from .pool import Pooler +from mamonsu.lib.zbx_template import ZbxTemplate + +class Autovacuum(Plugin): + + AgentPluginType = "pg" + key = "pgsql.autovacuum.count{0}" + + def run(self, zbx): + if Pooler.server_version_greater("10.0"): + result = Pooler.run_sql_type("count_autovacuum", args=["backend_type = 'autovacuum worker'"]) + else: + result = Pooler.run_sql_type("count_autovacuum", args=[ + "query LIKE '%%autovacuum%%' AND state <> 'idle' AND pid <> pg_catalog.pg_backend_pid()"]) + zbx.send("pgsql.autovacuum.count[]", int(result[0][0])) + + def items(self, template, dashboard=False): + if not dashboard: + return template.item({ + "name": "PostgreSQL Autovacuum: Count of Autovacuum Workers", + "key": self.right_type(self.key), + "delay": self.plugin_config("interval") + }) + else: + return [] + + def graphs(self, template, dashboard=False): + result = template.graph({ + "name": "PostgreSQL Autovacuum: Count of Autovacuum Workers", + "items": [{ + "key": self.right_type(self.key), + "color": "87C2B9", + "drawtype": 2 + }] + }) + if not dashboard: + return result + else: + return [{ + "dashboard": {"name": "PostgreSQL Autovacuum: Count of Autovacuum Workers", + "page": ZbxTemplate.dashboard_page_overview["name"], + "size": ZbxTemplate.dashboard_widget_size_medium, + "position": 5} + }] + + def keys_and_queries(self, template_zabbix): + result = [] + if LooseVersion(self.VersionPG) >= LooseVersion("10"): + result.append("{0},$2 $1 -c \"{1}\"".format(self.key.format("[*]"), + Pooler.SQL["count_autovacuum"][0].format("backend_type = 'autovacuum worker'"))) + else: + result.append("{0},$2 $1 -c \"{1}\"".format(self.key.format("[*]"), + Pooler.SQL["count_autovacuum"][0].format("query LIKE '%%autovacuum%%' AND state <> 'idle' AND pid <> pg_catalog.pg_backend_pid()"))) + return template_zabbix.key_and_query(result) diff --git a/mamonsu/plugins/pgsql/databases.py b/mamonsu/plugins/pgsql/databases.py index 3659c7b..cd37f5d 100644 --- a/mamonsu/plugins/pgsql/databases.py +++ b/mamonsu/plugins/pgsql/databases.py @@ -4,6 +4,7 @@ from mamonsu.plugins.pgsql.plugin import PgsqlPlugin as Plugin from .pool import Pooler from mamonsu.lib.zbx_template import ZbxTemplate +from mamonsu.plugins.pgsql.autovacuum import Autovacuum class Databases(Plugin): @@ -50,7 +51,6 @@ class Databases(Plugin): key_db_size = "pgsql.database.size{0}" key_db_age = "pgsql.database.max_age{0}" key_db_bloating_tables = "pgsql.database.bloating_tables{0}" - key_autovacumm = "pgsql.autovacumm.count{0}" key_invalid_indexes = "pgsql.database.invalid_indexes{0}" DEFAULT_CONFIG = { @@ -81,42 +81,6 @@ def run(self, zbx): zbx.send("pgsql.database.discovery[]", zbx.json({"data": dbs})) del dbs, bloat_count, invalid_indexes_count - if Pooler.server_version_greater("10.0"): - result = Pooler.run_sql_type("count_autovacuum", args=["backend_type = 'autovacuum worker'"]) - else: - result = Pooler.run_sql_type("count_autovacuum", args=[ - "query LIKE '%%autovacuum%%' AND state <> 'idle' AND pid <> pg_catalog.pg_backend_pid()"]) - zbx.send("pgsql.autovacumm.count[]", int(result[0][0])) - - def items(self, template, dashboard=False): - if not dashboard: - return template.item({ - "name": "PostgreSQL Autovacuum: Count of Autovacuum Workers", - "key": self.right_type(self.key_autovacumm), - "delay": self.plugin_config("interval") - }) - else: - return [] - - def graphs(self, template, dashboard=False): - result = template.graph({ - "name": "PostgreSQL Autovacuum: Count of Autovacuum Workers", - "items": [{ - "key": self.right_type(self.key_autovacumm), - "color": "87C2B9", - "drawtype": 2 - }] - }) - if not dashboard: - return result - else: - return [{ - "dashboard": {"name": "PostgreSQL Autovacuum: Count of Autovacuum Workers", - "page": ZbxTemplate.dashboard_page_overview["name"], - "size": ZbxTemplate.dashboard_widget_size_medium, - "position": 5} - }] - def discovery_rules(self, template, dashboard=False): rule = { "name": "PostgreSQL Databases Discovery", @@ -166,7 +130,7 @@ def discovery_rules(self, template, dashboard=False): "key": self.right_type(self.key_db_bloating_tables, var_discovery="{#DATABASE},"), "drawtype": 2}, {"color": "793F5D", - "key": self.right_type(self.key_autovacumm), + "key": self.right_type(Autovacuum.key_count), "yaxisside": 1, "drawtype": 2}] }, @@ -177,7 +141,7 @@ def discovery_rules(self, template, dashboard=False): "key": self.right_type(self.key_db_age, var_discovery="{#DATABASE},"), "drawtype": 2}, {"color": "793F5D", - "key": self.right_type(self.key_autovacumm), + "key": self.right_type(Autovacuum.key_count), "yaxisside": 1, "drawtype": 2}] }] @@ -197,12 +161,4 @@ def keys_and_queries(self, template_zabbix): self.plugin_config("min_rows"))), "{0},$3 $2 -d \"$1\" -c \"{1}\"".format(self.key_invalid_indexes.format("[*]"), self.query_invalid_indexes)] - if LooseVersion(self.VersionPG) >= LooseVersion("10"): - result.append("{0},$2 $1 -c \"{1}\"".format(self.key_autovacumm.format("[*]"), - Pooler.SQL["count_autovacuum"][0].format( - "backend_type = 'autovacuum worker'"))) - else: - result.append("{0},$2 $1 -c \"{1}\"".format(self.key_autovacumm.format("[*]"), - Pooler.SQL["count_autovacuum"][0].format( - "query LIKE '%%autovacuum%%' AND state <> 'idle' AND pid <> pg_catalog.pg_backend_pid()"))) return template_zabbix.key_and_query(result) diff --git a/mamonsu/plugins/pgsql/driver/pool.py b/mamonsu/plugins/pgsql/driver/pool.py index 88f5ec7..1f39e52 100644 --- a/mamonsu/plugins/pgsql/driver/pool.py +++ b/mamonsu/plugins/pgsql/driver/pool.py @@ -47,6 +47,25 @@ class Pool(object): SELECT mamonsu.count_autovacuum(); """ ), + "autovacuum_utilization": ( + """ + WITH count_tb AS ( + SELECT count(*)::float AS count + FROM pg_catalog.pg_stat_activity + WHERE {0} + ), + settings_tb AS ( + SELECT setting::float + FROM pg_catalog.pg_settings + WHERE name = 'autovacuum_max_workers' + ) + SELECT count_tb.count*100/settings_tb.setting + FROM count_tb, settings_tb; + """, + """ + SELECT mamonsu.autovacuum_utilization(); + """ + ), "buffer_cache": ( """ SELECT sum(1) * (current_setting('block_size')::int8) AS size, diff --git a/mamonsu/tools/bootstrap/sql.py b/mamonsu/tools/bootstrap/sql.py index ecbc3dd..bcaeff5 100644 --- a/mamonsu/tools/bootstrap/sql.py +++ b/mamonsu/tools/bootstrap/sql.py @@ -81,6 +81,49 @@ END $do$; +DO +$do$ +BEGIN + IF (SELECT setting::integer FROM pg_settings WHERE name = 'server_version_num') >= 100000 THEN + DROP FUNCTION IF EXISTS mamonsu.autovacuum_utilization(); + CREATE OR REPLACE FUNCTION mamonsu.autovacuum_utilization() + RETURNS FLOAT AS $$ + WITH count_tb AS ( + SELECT count(*)::float AS count + FROM pg_catalog.pg_stat_activity + WHERE backend_type = 'autovacuum worker' + ), + settings_tb AS ( + SELECT setting::float + FROM pg_catalog.pg_settings + WHERE name = 'autovacuum_max_workers' + ) + SELECT count_tb.count*100/settings_tb.setting + FROM count_tb, settings_tb + $$ LANGUAGE SQL SECURITY DEFINER; + ELSE + DROP FUNCTION IF EXISTS mamonsu.count_autovacuum(); + CREATE OR REPLACE FUNCTION mamonsu.count_autovacuum() + RETURNS FLOAT AS $$ + WITH count_tb AS ( + SELECT count(*)::float AS count + FROM pg_catalog.pg_stat_activity + WHERE query LIKE '%%autovacuum%%' + AND state <> 'idle' + AND pid <> pg_catalog.pg_backend_pid() + ), + settings_tb AS ( + SELECT setting::float + FROM pg_catalog.pg_settings + WHERE name = 'autovacuum_max_workers' + ) + SELECT count_tb.count*100/settings_tb.setting + FROM count_tb, settings_tb + $$ LANGUAGE SQL SECURITY DEFINER; + END IF; +END +$do$; + DO $do$ BEGIN From 98effb13c5a4f5702e3f7791cf8c96abb96c14c7 Mon Sep 17 00:00:00 2001 From: cuprumtan Date: Thu, 21 Jul 2022 10:18:11 +0300 Subject: [PATCH 010/106] fix: fixed autovacuum utilization intervals (cherry picked from commit f45fb560c937426eb9d4cb016e942d1e61283a74) --- mamonsu/plugins/pgsql/autovacuum.py | 77 ++++++++++++++++++++++++----- 1 file changed, 66 insertions(+), 11 deletions(-) diff --git a/mamonsu/plugins/pgsql/autovacuum.py b/mamonsu/plugins/pgsql/autovacuum.py index 431896f..80df791 100644 --- a/mamonsu/plugins/pgsql/autovacuum.py +++ b/mamonsu/plugins/pgsql/autovacuum.py @@ -7,23 +7,72 @@ class Autovacuum(Plugin): AgentPluginType = "pg" - key = "pgsql.autovacuum.count{0}" + # TODO: unify keys and remove its direct mentioning in zbx.send() functions + key_count = "pgsql.autovacuum.count{0}" + key_utilization = "pgsql.autovacuum.utilization{0}" + key_utilization_avg5 = "pgsql.autovacuum.utilization.avg5{0}" + key_utilization_avg15 = "pgsql.autovacuum.utilization.avg15{0}" + key_utilization_avg30 = "pgsql.autovacuum.utilization.avg30{0}" + + DEFAULT_CONFIG = { + "interval": str(60) + } def run(self, zbx): if Pooler.server_version_greater("10.0"): - result = Pooler.run_sql_type("count_autovacuum", args=["backend_type = 'autovacuum worker'"]) + result_count = Pooler.run_sql_type("count_autovacuum", args=["backend_type = 'autovacuum worker'"]) + result_utilization = Pooler.run_sql_type("autovacuum_utilization", args=["backend_type = 'autovacuum worker'"]) else: - result = Pooler.run_sql_type("count_autovacuum", args=[ + result_count = Pooler.run_sql_type("count_autovacuum", args=[ "query LIKE '%%autovacuum%%' AND state <> 'idle' AND pid <> pg_catalog.pg_backend_pid()"]) - zbx.send("pgsql.autovacuum.count[]", int(result[0][0])) - + result_utilization = Pooler.run_sql_type("autovacuum_utilization", args=[ + "query LIKE '%%autovacuum%%' AND state <> 'idle' AND pid <> pg_catalog.pg_backend_pid()"]) + zbx.send("pgsql.autovacuum.count[]", int(result_count[0][0])) + zbx.send("pgsql.autovacuum.utilization[]", int(result_utilization[0][0])) + def items(self, template, dashboard=False): + result = "" if not dashboard: - return template.item({ + result += (template.item({ "name": "PostgreSQL Autovacuum: Count of Autovacuum Workers", - "key": self.right_type(self.key), + "key": self.right_type(self.key_count), + "delay": self.plugin_config("interval") + })) + result += (template.item({ + "name": "PostgreSQL Autovacuum: Utilization per {0} seconds".format(self.plugin_config("interval")), + "key": self.right_type(self.key_utilization), + "value_type": Plugin.VALUE_TYPE.numeric_float, + "units": Plugin.UNITS.percent, "delay": self.plugin_config("interval") - }) + })) + result += (template.item({ + "name": "PostgreSQL Autovacuum: Average Utilization per 5 minutes", + "key": self.right_type(self.key_utilization_avg5), + "value_type": Plugin.VALUE_TYPE.numeric_float, + "units": Plugin.UNITS.percent, + "type": Plugin.TYPE.CALCULATED, + "params": "avg(pgsql.autovacuum.utilization[], 5m)", + "delay": self.plugin_config("interval") + })) + result += (template.item({ + "name": "PostgreSQL Autovacuum: Average Utilization per 15 minutes", + "key": self.right_type(self.key_utilization_avg15), + "value_type": Plugin.VALUE_TYPE.numeric_float, + "units": Plugin.UNITS.percent, + "type": Plugin.TYPE.CALCULATED, + "params": "avg(pgsql.autovacuum.utilization[], 15m)", + "delay": self.plugin_config("interval") + })) + result += (template.item({ + "name": "PostgreSQL Autovacuum: Average Utilization per 30 minutes", + "key": self.right_type(self.key_utilization_avg30), + "value_type": Plugin.VALUE_TYPE.numeric_float, + "units": Plugin.UNITS.percent, + "type": Plugin.TYPE.CALCULATED, + "params": "avg(pgsql.autovacuum.utilization[], 30m)", + "delay": self.plugin_config("interval") + })) + return result else: return [] @@ -31,7 +80,7 @@ def graphs(self, template, dashboard=False): result = template.graph({ "name": "PostgreSQL Autovacuum: Count of Autovacuum Workers", "items": [{ - "key": self.right_type(self.key), + "key": self.right_type(self.key_count), "color": "87C2B9", "drawtype": 2 }] @@ -49,9 +98,15 @@ def graphs(self, template, dashboard=False): def keys_and_queries(self, template_zabbix): result = [] if LooseVersion(self.VersionPG) >= LooseVersion("10"): - result.append("{0},$2 $1 -c \"{1}\"".format(self.key.format("[*]"), + result.append("{0},$2 $1 -c \"{1}\"".format(self.key_count.format("[*]"), Pooler.SQL["count_autovacuum"][0].format("backend_type = 'autovacuum worker'"))) + result.append("{0},$2 $1 -c \"{1}\"".format(self.key_utilization.format("[*]"), + Pooler.SQL["autovacuum_utilization"][0].format( + "backend_type = 'autovacuum worker'"))) else: - result.append("{0},$2 $1 -c \"{1}\"".format(self.key.format("[*]"), + result.append("{0},$2 $1 -c \"{1}\"".format(self.key_count.format("[*]"), Pooler.SQL["count_autovacuum"][0].format("query LIKE '%%autovacuum%%' AND state <> 'idle' AND pid <> pg_catalog.pg_backend_pid()"))) + result.append("{0},$2 $1 -c \"{1}\"".format(self.key_utilization.format("[*]"), + Pooler.SQL["autovacuum_utilization"][0].format( + "query LIKE '%%autovacuum%%' AND state <> 'idle' AND pid <> pg_catalog.pg_backend_pid()"))) return template_zabbix.key_and_query(result) From eae9d3c658b3ff43120b5b023b0f78d45265a019 Mon Sep 17 00:00:00 2001 From: cuprumtan Date: Thu, 21 Jul 2022 11:46:59 +0300 Subject: [PATCH 011/106] refactoring: fixed trigger and discoveries names (cherry picked from commit 2e3d467ce03e745bd818c14958ad5edbcb40f783) --- mamonsu/plugins/common/health.py | 8 ++++---- mamonsu/plugins/pgsql/databases.py | 2 +- mamonsu/plugins/pgsql/replication.py | 4 ++-- mamonsu/plugins/system/linux/disk_sizes.py | 6 +++--- mamonsu/plugins/system/linux/net.py | 2 +- mamonsu/plugins/system/linux/pg_probackup.py | 10 +++++----- mamonsu/plugins/system/linux/proc_stat.py | 2 +- mamonsu/plugins/system/linux/uptime.py | 2 +- mamonsu/plugins/system/windows/cpu.py | 2 +- 9 files changed, 19 insertions(+), 19 deletions(-) diff --git a/mamonsu/plugins/common/health.py b/mamonsu/plugins/common/health.py index 2013ed2..8c7b489 100644 --- a/mamonsu/plugins/common/health.py +++ b/mamonsu/plugins/common/health.py @@ -55,21 +55,21 @@ def items(self, template, dashboard=False): def triggers(self, template, dashboard=False): if self.Type == "mamonsu": result = template.trigger({ - "name": "Mamonsu plugin errors on {HOSTNAME}. {ITEM.LASTVALUE}", + "name": "Mamonsu health: plugin errors on {HOSTNAME}. {ITEM.LASTVALUE}", "expression": "{#TEMPLATE:mamonsu.plugin.errors[].strlen()}>1" }) + template.trigger({ - "name": "Mamonsu nodata from {HOSTNAME}", + "name": "Mamonsu health: nodata from {HOSTNAME}", "expression": "{#TEMPLATE:" + self.right_type("mamonsu.plugin.keepalive{0}") + ".nodata(180)}=1" }) if platform.LINUX: result += template.trigger({ - "name": "Mamonsu agent memory usage alert on {HOSTNAME}: {ITEM.LASTVALUE} bytes", + "name": "Mamonsu health: agent memory usage alert on {HOSTNAME}: {ITEM.LASTVALUE} bytes", "expression": "{#TEMPLATE:mamonsu.memory.rss[max].last()}>" + self.plugin_config( "max_memory_usage") }) else: result = template.trigger({ - "name": "Mamonsu nodata from {HOSTNAME}", + "name": "Mamonsu health: nodata from {HOSTNAME}", "expression": "{#TEMPLATE:" + self.right_type("mamonsu.plugin.keepalive{0}") + ".nodata(180)}=1" }) return result diff --git a/mamonsu/plugins/pgsql/databases.py b/mamonsu/plugins/pgsql/databases.py index cd37f5d..9b01e94 100644 --- a/mamonsu/plugins/pgsql/databases.py +++ b/mamonsu/plugins/pgsql/databases.py @@ -101,7 +101,7 @@ def discovery_rules(self, template, dashboard=False): }] items = [ {"key": self.right_type(self.key_db_size, var_discovery="{#DATABASE},"), - "name": "PostgreSQL Databases {#DATABASE}: size", + "name": "PostgreSQL Databases: {#DATABASE} size", "units": Plugin.UNITS.bytes, "value_type": Plugin.VALUE_TYPE.numeric_unsigned, "delay": self.plugin_config("interval")}, diff --git a/mamonsu/plugins/pgsql/replication.py b/mamonsu/plugins/pgsql/replication.py index 414c024..425221c 100644 --- a/mamonsu/plugins/pgsql/replication.py +++ b/mamonsu/plugins/pgsql/replication.py @@ -112,12 +112,12 @@ def items(self, template, dashboard=False): def triggers(self, template, dashboard=False): triggers = template.trigger({ - "name": "PostgreSQL streaming lag too high on {HOSTNAME} (value={ITEM.LASTVALUE})", + "name": "PostgreSQL Replication: streaming lag too high on {HOSTNAME} (value={ITEM.LASTVALUE})", "expression": "{#TEMPLATE:" + self.right_type(self.key_replication, "sec") + ".last()}>" + self.plugin_config( "lag_more_than_in_sec") }) + template.trigger({ - "name": "PostgreSQL number of non-active replication slots on {HOSTNAME} (value={ITEM.LASTVALUE})", + "name": "PostgreSQL Replication: number of non-active replication slots on {HOSTNAME} (value={ITEM.LASTVALUE})", "expression": "{#TEMPLATE:" + self.right_type(self.key_non_active_slots) + ".last()}>" + str( NUMBER_NON_ACTIVE_SLOTS) }) diff --git a/mamonsu/plugins/system/linux/disk_sizes.py b/mamonsu/plugins/system/linux/disk_sizes.py index e8e7ba0..3aeaf96 100644 --- a/mamonsu/plugins/system/linux/disk_sizes.py +++ b/mamonsu/plugins/system/linux/disk_sizes.py @@ -61,7 +61,7 @@ def discovery_rules(self, template, dashboard=False): else: key_discovery = "system.vfs.discovery" rule = { - "name": "VFS Discovery", + "name": "System: VFS Discovery", "key": key_discovery } if Plugin.old_zabbix: @@ -136,7 +136,7 @@ def discovery_rules(self, template, dashboard=False): triggers = [ { - "name": "Free disk space less than 10% on mountpoint " + "name": "System: free disk space less than 10% on mountpoint " "{#MOUNTPOINT} (hostname={HOSTNAME} value={ITEM.LASTVALUE})", "expression": "{#TEMPLATE:system.vfs." "percent_free[{#MOUNTPOINT}].last" @@ -147,7 +147,7 @@ def discovery_rules(self, template, dashboard=False): if Plugin.Type == "mamonsu": triggers.append( { - "name": "Free inode space less than 10% on mountpoint " + "name": "System: free inode space less than 10% on mountpoint " "{#MOUNTPOINT} (hostname={HOSTNAME} value={ITEM.LASTVALUE})", "expression": "{#TEMPLATE:system.vfs.percent_inode_free[{#MOUNTPOINT}].last" "()}<" + self.plugin_config("vfs_inode_percent_free") diff --git a/mamonsu/plugins/system/linux/net.py b/mamonsu/plugins/system/linux/net.py index 901c207..a5f86d8 100644 --- a/mamonsu/plugins/system/linux/net.py +++ b/mamonsu/plugins/system/linux/net.py @@ -50,7 +50,7 @@ def discovery_rules(self, template, dashboard=False): }) rule = { - "name": "Net Iface Discovery", + "name": "System: net Iface Discovery", "key": key_discovery } if Plugin.old_zabbix: diff --git a/mamonsu/plugins/system/linux/pg_probackup.py b/mamonsu/plugins/system/linux/pg_probackup.py index 97023ac..89025ca 100644 --- a/mamonsu/plugins/system/linux/pg_probackup.py +++ b/mamonsu/plugins/system/linux/pg_probackup.py @@ -107,7 +107,7 @@ def run(self, zbx): def discovery_rules(self, template, dashboard=False): rule = { - "name": "pg_probackup discovery", + "name": "pg_probackup Discovery", "key": self.key_main.format("[{0}]".format(self.Macros[self.Type])), } if Plugin.old_zabbix: @@ -129,21 +129,21 @@ def discovery_rules(self, template, dashboard=False): items = [ { "key": self.right_type(self.key_dir_size, var_discovery="{#BACKUPDIR},"), - "name": "pg_probackup dir {#BACKUPDIR}: size", + "name": "pg_probackup dir {#BACKUPDIR}: Size", "units": Plugin.UNITS.bytes, "value_type": Plugin.VALUE_TYPE.numeric_unsigned, "delay": self.plugin_config("interval") }, { "key": self.right_type(self.key_dir_error, var_discovery="{#BACKUPDIR},"), - "name": "pg_probackup dir {#BACKUPDIR}: error", + "name": "pg_probackup dir {#BACKUPDIR}: Error", "value_type": Plugin.VALUE_TYPE.text, "delay": self.plugin_config("interval") }, ] graphs = [ { - "name": "pg_probackup backup dir: {#BACKUPDIR} size", + "name": "pg_probackup Backup dir: {#BACKUPDIR} Size", "type": 1, "items": [ { @@ -156,7 +156,7 @@ def discovery_rules(self, template, dashboard=False): ] triggers = [ { - "name": "Error in pg_probackup dir {#BACKUPDIR} (hostname={HOSTNAME} value={ITEM.LASTVALUE})", + "name": "pg_probackup: error in dir {#BACKUPDIR} (hostname={HOSTNAME} value={ITEM.LASTVALUE})", "expression": "{#TEMPLATE:pg_probackup.dir.error[{#BACKUPDIR}].str(ok)}<>1" } ] diff --git a/mamonsu/plugins/system/linux/proc_stat.py b/mamonsu/plugins/system/linux/proc_stat.py index 7b47ed6..4da3960 100644 --- a/mamonsu/plugins/system/linux/proc_stat.py +++ b/mamonsu/plugins/system/linux/proc_stat.py @@ -142,7 +142,7 @@ def graphs(self, template, dashboard=False): def triggers(self, template, dashboard=False): return template.trigger( { - "name": "Process fork-rate too frequently on {HOSTNAME}", + "name": "System: process fork-rate too frequently on {HOSTNAME}", "expression": "{#TEMPLATE:" + self.right_type("system.processes{0}", "forkrate") + ".min(5m)}>" + str(self.ForkRate) } diff --git a/mamonsu/plugins/system/linux/uptime.py b/mamonsu/plugins/system/linux/uptime.py index 94d0786..8c04504 100644 --- a/mamonsu/plugins/system/linux/uptime.py +++ b/mamonsu/plugins/system/linux/uptime.py @@ -27,7 +27,7 @@ def items(self, template, dashboard=False): def triggers(self, template, dashboard=False): return template.trigger( { - "name": "System was restarted on {HOSTNAME} (uptime={ITEM.LASTVALUE})", + "name": "System: {HOSTNAME} was restarted (uptime={ITEM.LASTVALUE})", "expression": "{#TEMPLATE:" + self.right_type(self.key) + ".last()}<" + self.plugin_config("uptime") } ) diff --git a/mamonsu/plugins/system/windows/cpu.py b/mamonsu/plugins/system/windows/cpu.py index 54f5872..6cf8b70 100644 --- a/mamonsu/plugins/system/windows/cpu.py +++ b/mamonsu/plugins/system/windows/cpu.py @@ -64,6 +64,6 @@ def graphs(self, template, dashboard=False): def triggers(self, template, dashboard=False): return template.trigger({ - "name": "CPU privileged time is too big on {HOSTNAME}", + "name": "System: CPU privileged time is too big on {HOSTNAME}", "expression": "{#TEMPLATE:system.cpu[privileged_time].last()}>" + str(self.MaxPrivilegedTime) }) From c1d1461158ba1d06efba090f466478d95c90643c Mon Sep 17 00:00:00 2001 From: cuprumtan Date: Thu, 21 Jul 2022 12:14:48 +0300 Subject: [PATCH 012/106] feature: changed default autovacuum plugin interval value and added a comment about this parameter (cherry picked from commit f94616767792e5220236df3c65ff7aac39cc9ef4) --- github-actions-tests/sources/agent_3.5.1.conf | 6 ++++++ packaging/conf/example_linux.conf | 6 ++++++ packaging/conf/example_win.conf | 6 ++++++ 3 files changed, 18 insertions(+) diff --git a/github-actions-tests/sources/agent_3.5.1.conf b/github-actions-tests/sources/agent_3.5.1.conf index 027a01a..9dc6b60 100644 --- a/github-actions-tests/sources/agent_3.5.1.conf +++ b/github-actions-tests/sources/agent_3.5.1.conf @@ -84,6 +84,12 @@ interval = 15 [bgwriter] interval = 15 +# Besides standard autovacuum workers count, mamonsu also counts autovacuum utilization. +# But this metric is instantaneous, so recommended to run this plugin frequently +# to get a complete picture of autovacuum utilization. +[autovacuum] +interval = 30 + [connections] percent_connections_tr = 90 interval = 15 diff --git a/packaging/conf/example_linux.conf b/packaging/conf/example_linux.conf index 065b98c..7ba0c19 100644 --- a/packaging/conf/example_linux.conf +++ b/packaging/conf/example_linux.conf @@ -85,6 +85,12 @@ interval = 60 max_count_files = 2 interval = 60 +# Besides standard autovacuum workers count, mamonsu also counts autovacuum utilization. +# But this metric is instantaneous, so recommended to run this plugin frequently +# to get a complete picture of autovacuum utilization. +[autovacuum] +interval = 30 + [bgwriter] interval = 60 diff --git a/packaging/conf/example_win.conf b/packaging/conf/example_win.conf index f125dc0..a4486ef 100644 --- a/packaging/conf/example_win.conf +++ b/packaging/conf/example_win.conf @@ -85,6 +85,12 @@ interval = 60 max_count_files = 2 interval = 60 +# Besides standard autovacuum workers count, mamonsu also counts autovacuum utilization. +# But this metric is instantaneous, so recommended to run this plugin frequently +# to get a complete picture of autovacuum utilization. +[autovacuum] +interval = 30 + [bgwriter] interval = 60 From 99b4c7ab49f0bb64b047d366b334036fe0aed382 Mon Sep 17 00:00:00 2001 From: cuprumtan Date: Thu, 21 Jul 2022 16:16:02 +0300 Subject: [PATCH 013/106] feature: replaced default config plugin parameters with macros (cherry picked from commit e3a4bb73fc709ba9cbaf0a6a9a1a62bdb5dce45b) --- github-actions-tests/sources/agent_3.5.1.conf | 182 ++++++++---------- mamonsu/lib/plugin.py | 3 + mamonsu/lib/zbx_template.py | 22 ++- mamonsu/plugins/common/health.py | 17 +- mamonsu/plugins/pgsql/archive_command.py | 20 +- mamonsu/plugins/pgsql/checkpoint.py | 17 +- mamonsu/plugins/pgsql/connections.py | 23 ++- mamonsu/plugins/pgsql/health.py | 22 ++- mamonsu/plugins/pgsql/oldest.py | 24 ++- mamonsu/plugins/pgsql/prepared_transaction.py | 18 +- mamonsu/plugins/pgsql/replication.py | 19 +- mamonsu/plugins/system/linux/disk_sizes.py | 21 +- mamonsu/plugins/system/linux/uptime.py | 18 +- packaging/conf/example_linux.conf | 15 -- packaging/conf/example_win.conf | 13 -- 15 files changed, 250 insertions(+), 184 deletions(-) diff --git a/github-actions-tests/sources/agent_3.5.1.conf b/github-actions-tests/sources/agent_3.5.1.conf index 9dc6b60..709d8c9 100644 --- a/github-actions-tests/sources/agent_3.5.1.conf +++ b/github-actions-tests/sources/agent_3.5.1.conf @@ -78,11 +78,10 @@ format = [%(levelname)s] %(asctime)s - %(name)s - %(message)s # below listed all available parameters for each plugin to modify. [health] -max_memory_usage = 41943040 -interval = 15 +interval = 60 -[bgwriter] -interval = 15 +[archivecommand] +interval = 60 # Besides standard autovacuum workers count, mamonsu also counts autovacuum utilization. # But this metric is instantaneous, so recommended to run this plugin frequently @@ -90,100 +89,101 @@ interval = 15 [autovacuum] interval = 30 +[bgwriter] +interval = 60 + +[cfs] +force_enable = False +interval = 60 + +[checkpoint] +interval = 300 + [connections] -percent_connections_tr = 90 -interval = 15 +interval = 60 [databases] -bloat_scale = 0.2 -min_rows = 50 -interval = 15 +interval = 300 [pghealth] -uptime = 600 -cache = 80 -interval = 15 +interval = 60 [instance] -interval = 15 +interval = 60 -[xlog] -lag_more_than_in_sec = 300 -interval = 15 +# This plugin allows detects possible memory leaks while working with PostgreSQL using /proc/pid/status and /proc/pid/statm +# We use RES and SHR difference to calculate approximate volume of private anonymous backend memory. +# If it exceeds private_anon_mem_threshold then that pid will be added to a message. An example is presented below +# statm - 'pid: {pid}, RES {RES} - SHR {SHR} more then {private_anon_mem_threshold}\n' +# Since Linux 4.5 RssAnon, RssFile and RssShmem have been added. +# They allows to distinguish types of memory such as private anonymous, file-backed, and shared anonymous memory. +# We are interested in RssAnon. If its value exceeds private_anon_mem_threshold then that pid will also be added to a message. +# By default this plugin disabled. To enable this plugin - set bellow "enabled = False" +# #interval - (onitoring frequency in seconds. 60 seconds by default +# private_anon_mem_threshold - memory volume threshold after which we need an investigation about memory leak. 1GB by default. +# Possible values MB, GB, TB. For example 1GB +[memoryleakdiagnostic] +enabled = False +interval = 60 +private_anon_mem_threshold = 1GB -[statements] -interval = 15 +[oldest] +interval = 60 [pgbuffercache] -interval = 15 - -[waitsampling] -interval = 15 - -[checkpoint] -max_checkpoint_by_wal_in_hour = 12 -interval = 15 - -[oldest] -max_xid_age = 18000000 -max_query_time = 18000 -interval = 15 +interval = 60 [pglocks] -interval = 15 - -[cfs] -force_enable = False -interval = 15 +interval = 60 -[archivecommand] -max_count_files = 2 -interval = 15 +# Get age (in seconds) of the oldest running prepared transaction and number of all prepared transactions for two-phase commit. +# https://www.postgresql.org/docs/current/sql-prepare-transaction.html +# https://www.postgresql.org/docs/12/view-pg-prepared-xacts.html +# max_prepared_transaction_time - age of prepared transaction in seconds. +# If pgsql.prepared.oldest exceeds max_prepared_transaction_time the trigger fires. +[preparedtransaction] +interval = 60 -[procstat] -interval = 15 +# Get size of relations defined in this section +# Relations - comma separated list of objects - tables and endexes (database_name.schema.relation) used to calculate relations size. +# Example: +# relations=postgres.pg_catalog.pg_class,postgres.pg_catalog.pg_user +# If the relation is blocked by some process such as vacuum full or create index, the result will be -1 +# by default this plugin disabled. To enable this plugin - set bellow "enabled = False" and define a list of relations. +[relationssize] +enabled = False +relations=postgres.pg_catalog.pg_class,postgres.pg_catalog.pg_user +interval = 300 -[diskstats] -interval = 15 +[replication] +interval = 60 -[disksizes] -vfs_percent_free = 10 -vfs_inode_percent_free = 10 -interval = 15 +[statstatements] +interval = 60 -[memory] -interval = 15 +[waitsampling] +interval = 60 -[systemuptime] -up_time = 300 -interval = 15 +[wal] +interval = 60 -[openfiles] -interval = 15 +[disksizes] +interval = 60 -[net] -interval = 15 +[diskstats] +interval = 60 [la] -interval = 15 +interval = 60 -[zbxsender] -interval = 10 - -[logsender] -interval = 2 +[memory] +interval = 60 -[agentapi] -interval = 15 +[net] +interval = 60 -# Get age (in seconds) of the oldest running prepared transaction and number of all prepared transactions for two-phase commit. -# https://www.postgresql.org/docs/current/sql-prepare-transaction.html -# https://www.postgresql.org/docs/12/view-pg-prepared-xacts.html -# max_prepared_transaction_time - age of prepared transaction in seconds. -# If pgsql.prepared.oldest exceeds max_prepared_transaction_time the trigger fires. -[preparedtransaction] -max_prepared_transaction_time = 60 -interval = 15 +[openfiles] +interval = 60 # Get size of backup catalogs stroring all WAL and backup files using pg_probackup # (https://github.com/postgrespro/pg_probackup) @@ -194,29 +194,17 @@ interval = 300 backup_dirs = /backup_dir1,/backup_dir2 pg_probackup_path = /usr/bin/pg_probackup-11 -# Get size of relations defined in this section -# Relations - comma separated list of objects - tables and endexes (database_name.schema.relation) used to calculate relations size. -# Example: -# relations=postgres.pg_catalog.pg_class,postgres.pg_catalog.pg_user -# If the relation is blocked by some process such as vacuum full or create index, the result will be -1 -# by default this plugin disabled. To enable this plugin - set bellow "enabled = False" and define a list of relations. -[relationssize] -enabled = True -relations=postgres.pg_catalog.pg_class,mamonsu_test_db.mamonsu.config -interval = 15 +[procstat] +interval = 60 -# This plugin allows detects possible memory leaks while working with PostgreSQL using /proc/pid/status and /proc/pid/statm -# We use RES and SHR difference to calculate approximate volume of private anonymous backend memory. -# If it exceeds private_anon_mem_threshold then that pid will be added to a message. An example is presented below -# statm - 'pid: {pid}, RES {RES} - SHR {SHR} more then {private_anon_mem_threshold}\n' -# Since Linux 4.5 RssAnon, RssFile and RssShmem have been added. -# They allows to distinguish types of memory such as private anonymous, file-backed, and shared anonymous memory. -# We are interested in RssAnon. If its value exceeds private_anon_mem_threshold then that pid will also be added to a message. -# By default this plugin disabled. To enable this plugin - set bellow "enabled = False" -# #interval - (onitoring frequency in seconds. 60 seconds by default -# private_anon_mem_threshold - memory volume threshold after which we need an investigation about memory leak. 1GB by default. -# Possible values MB, GB, TB. For example 1GB -[memoryleakdiagnostic] -enabled = True -interval = 15 -private_anon_mem_threshold = 1GB +[systemuptime] +interval = 60 + +[agentapi] +interval = 60 + +[logsender] +interval = 2 + +[zbxsender] +interval = 10 diff --git a/mamonsu/lib/plugin.py b/mamonsu/lib/plugin.py index 48e7dfa..c5bc6ca 100644 --- a/mamonsu/lib/plugin.py +++ b/mamonsu/lib/plugin.py @@ -148,6 +148,9 @@ def items(self, template, dashboard=False): def graphs(self, template, dashboard=False): return None + def macros(self, template, dashboard=False): + return None + def triggers(self, template, dashboard=False): return None diff --git a/mamonsu/lib/zbx_template.py b/mamonsu/lib/zbx_template.py index bceb9e3..3ccc910 100644 --- a/mamonsu/lib/zbx_template.py +++ b/mamonsu/lib/zbx_template.py @@ -32,8 +32,8 @@ class ZbxTemplate(object): {items} {discovery_rules} - {screens} {macros} + {screens} {triggers} @@ -172,15 +172,14 @@ def xml(self, plg_type, plugins=None): self.plg_type = plg_type # create template template_data = {'template': self.Template, 'application': self.Application} - if Plugin.Type == 'agent': - template_data['macros'] = self._macro() - else: - template_data['macros'] = "" - template_data['triggers'] = self._get_all('triggers', plugins) template_data['items'] = self._get_all('items', plugins) - template_data['graphs'] = self._get_all('graphs', plugins) template_data['discovery_rules'] = self._get_all('discovery_rules', plugins) + if Plugin.Type == 'agent': + template_data['macros'] = self.agent_macro() + template_data['macros'] = self._get_all('macros', plugins) template_data['screens'] = self.screen(plugins) + template_data['triggers'] = self._get_all('triggers', plugins) + template_data['graphs'] = self._get_all('graphs', plugins) output_xml = self.mainTemplate.format(**template_data) if Plugin.Type == 'agent': output_xml = ZbxTemplate.turn_agent_type(self, output_xml) @@ -300,7 +299,7 @@ def screen(self, plugins=None, xml_key='screen'): xml_key) return result - def _macro(self, xml_key='macro'): + def agent_macro(self, xml_key='macro'): result = '' value = {'value': '-qAt -p 5433 -U postgres ', 'macro': "{$PG_CONNINFO}"} result += '<{1}>{0}'.format(self._format_args(self.macro_defaults, value), xml_key) @@ -308,6 +307,13 @@ def _macro(self, xml_key='macro'): result += '<{1}>{0}'.format(self._format_args(self.macro_defaults, value), xml_key) return result + def mamonsu_macro(self, args=None, xml_key='macro', defaults=None): + if args is None: + args = {} + if defaults is None: + defaults = self.macro_defaults + return '<{1}>{0}'.format(self._format_args(defaults, args), xml_key) + def item(self, args=None, xml_key='item', prototype=False): if args is None: args = {} diff --git a/mamonsu/plugins/common/health.py b/mamonsu/plugins/common/health.py index 8c7b489..abd4f7d 100644 --- a/mamonsu/plugins/common/health.py +++ b/mamonsu/plugins/common/health.py @@ -9,8 +9,9 @@ class Health(Plugin): AgentPluginType = "sys" - DEFAULT_CONFIG = { - "max_memory_usage": str(40 * 1024 * 1024) + # key: (macro, value) + plugin_macros = { + "mamonsu_max_memory_usage": [("macro", "{$MAMONSU_MAX_MEMORY_USAGE}"), ("value", 40 * 1024 * 1024)] } counter = 0 @@ -52,6 +53,15 @@ def items(self, template, dashboard=False): else: return [] + def macros(self, template, dashboard=False): + result = "" + for macro in self.plugin_macros.keys(): + result += template.mamonsu_macro(defaults=self.plugin_macros[macro]) + if not dashboard: + return result + else: + return [] + def triggers(self, template, dashboard=False): if self.Type == "mamonsu": result = template.trigger({ @@ -64,8 +74,7 @@ def triggers(self, template, dashboard=False): if platform.LINUX: result += template.trigger({ "name": "Mamonsu health: agent memory usage alert on {HOSTNAME}: {ITEM.LASTVALUE} bytes", - "expression": "{#TEMPLATE:mamonsu.memory.rss[max].last()}>" + self.plugin_config( - "max_memory_usage") + "expression": "{#TEMPLATE:mamonsu.memory.rss[max].last()}>" + self.plugin_macros["mamonsu_max_memory_usage"][0][1] }) else: result = template.trigger({ diff --git a/mamonsu/plugins/pgsql/archive_command.py b/mamonsu/plugins/pgsql/archive_command.py index 8c897c4..5d04a2d 100644 --- a/mamonsu/plugins/pgsql/archive_command.py +++ b/mamonsu/plugins/pgsql/archive_command.py @@ -9,11 +9,13 @@ class ArchiveCommand(Plugin): AgentPluginType = "pg" - DEFAULT_CONFIG = { - "max_count_files": str(2) - } Interval = 60 + # key: (macro, value) + plugin_macros = { + "archive_queue_files": [("macro", "{$ARCHIVE_QUEUE_FILES}"), ("value", 2)] + } + # if streaming replication is on, archive queue length and size will always be 0 for replicas query_agent_count_files = """ WITH values AS ( @@ -177,12 +179,20 @@ def graphs(self, template, dashboard=False): "position": 1} }] + def macros(self, template, dashboard=False): + result = "" + for macro in self.plugin_macros.keys(): + result += template.mamonsu_macro(defaults=self.plugin_macros[macro]) + if not dashboard: + return result + else: + return [] + def triggers(self, template, dashboard=False): return template.trigger({ "name": "PostgreSQL Archiver: count files need to archive on {HOSTNAME} more than 2", "expression": "{#TEMPLATE:" + self.right_type(self.key, - self.Items[0][0]) + ".last()}>" + self.plugin_config( - "max_count_files") + self.Items[0][0]) + ".last()}>" + self.plugin_macros["archive_queue_files"][0][1] }) def keys_and_queries(self, template_zabbix): diff --git a/mamonsu/plugins/pgsql/checkpoint.py b/mamonsu/plugins/pgsql/checkpoint.py index 78a0e1c..698cf4b 100644 --- a/mamonsu/plugins/pgsql/checkpoint.py +++ b/mamonsu/plugins/pgsql/checkpoint.py @@ -19,8 +19,9 @@ class Checkpoint(Plugin): """ # for mamonsu and agent checkpoints in hour key = "pgsql.checkpoint{0}" - DEFAULT_CONFIG = { - "max_checkpoint_by_wal_in_hour": str(12) + # key: (macro, value) + plugin_macros = { + "max_checkpoint_by_wal_in_hour": [("macro", "{$MAX_CHECKPOINT_BY_WAL_IN_HOUR}"), ("value", 12)] } Items = [ @@ -119,12 +120,20 @@ def graphs(self, template, dashboard=False): "position": 10} }] + def macros(self, template, dashboard=False): + result = "" + for macro in self.plugin_macros.keys(): + result += template.mamonsu_macro(defaults=self.plugin_macros[macro]) + if not dashboard: + return result + else: + return [] + def triggers(self, template, dashboard=False): return template.trigger({ "name": "PostgreSQL Checkpoints: required checkpoints occurs too frequently on {HOSTNAME}", "expression": "{#TEMPLATE:" + self.right_type(self.key, - self.Items[1][1]) + ".last()}>" + self.plugin_config( - "max_checkpoint_by_wal_in_hour") + self.Items[1][1]) + ".last()}>" + self.plugin_macros["max_checkpoint_by_wal_in_hour"][0][1] }) def keys_and_queries(self, template_zabbix): diff --git a/mamonsu/plugins/pgsql/connections.py b/mamonsu/plugins/pgsql/connections.py index 8d277e2..04998b4 100644 --- a/mamonsu/plugins/pgsql/connections.py +++ b/mamonsu/plugins/pgsql/connections.py @@ -8,9 +8,9 @@ class Connections(Plugin): AgentPluginType = "pg" - # (state, key, name, graph) - DEFAULT_CONFIG = { - "percent_connections_tr": str(90) + # key: (macro, value) + plugin_macros = { + "connections_percent": [("macro", "{$CONNECTIONS_PERCENT}"), ("value", 90)] } # (state, key, name, graph item color) Items = [ @@ -217,14 +217,23 @@ def graphs(self, template, dashboard=False): "position": 1} }] + def macros(self, template, dashboard=False): + result = "" + for macro in self.plugin_macros.keys(): + result += template.mamonsu_macro(defaults=self.plugin_macros[macro]) + if not dashboard: + return result + else: + return [] + def triggers(self, template, dashboard=False): return template.trigger({ - "name": "PostgreSQL Connections: too many connections on {HOSTNAME} (total connections more than " + self.plugin_config( - "percent_connections_tr") + "% of max_connections)", + "name": "PostgreSQL Connections: too many connections on {HOSTNAME} (total connections more than " + + self.plugin_macros["connections_percent"][0][1] + "% of max_connections)", "expression": " {#TEMPLATE:" + self.right_type(self.key, "total") + ".last()}/{#TEMPLATE:" + self.right_type(self.key, - "max_connections") + ".last()}*100 >" + self.plugin_config( - "percent_connections_tr") + "max_connections") + ".last()}*100 >" + + self.plugin_macros["connections_percent"][0][1] }) def keys_and_queries(self, template_zabbix): diff --git a/mamonsu/plugins/pgsql/health.py b/mamonsu/plugins/pgsql/health.py index 1a5c178..fb4968d 100644 --- a/mamonsu/plugins/pgsql/health.py +++ b/mamonsu/plugins/pgsql/health.py @@ -8,9 +8,10 @@ class PgHealth(Plugin): AgentPluginType = "pg" - DEFAULT_CONFIG = { - "uptime": str(60 * 10), - "cache": str(80) + # key: (macro, value) + plugin_macros = { + "pg_uptime": [("macro", "{$PG_UPTIME}"), ("value", 60 * 10)], + "cache_hit_ratio_percent": [("macro", "{$CACHE_HIT_RATIO_PERCENT}"), ("value", 80)] } query_health = """ SELECT 1 AS health; @@ -93,15 +94,22 @@ def items(self, template, dashboard=False): "position": 3} }] + def macros(self, template, dashboard=False): + result = "" + for macro in self.plugin_macros.keys(): + result += template.mamonsu_macro(defaults=self.plugin_macros[macro]) + if not dashboard: + return result + else: + return [] + def triggers(self, template, dashboard=False): result = template.trigger({ "name": "PostgreSQL Health: service has been restarted on {HOSTNAME} (uptime={ITEM.LASTVALUE})", - "expression": "{#TEMPLATE:" + self.right_type(self.key_uptime) + ".change()}>" + str( - self.plugin_config("uptime")) + "expression": "{#TEMPLATE:" + self.right_type(self.key_uptime) + ".change()}>" + self.plugin_macros["pg_uptime"][0][1] }) + template.trigger({ "name": "PostgreSQL Health: cache hit ratio too low on {HOSTNAME} ({ITEM.LASTVALUE})", - "expression": "{#TEMPLATE:" + self.right_type(self.key_cache, "hit") + ".last()}<" + str( - self.plugin_config("cache")) + "expression": "{#TEMPLATE:" + self.right_type(self.key_cache, "hit") + ".last()}<" + self.plugin_macros["cache_hit_ratio_percent"][0][1] }) + template.trigger({ "name": "PostgreSQL Health: no ping from PostgreSQL for 3 minutes on {HOSTNAME}", "expression": "{#TEMPLATE:" + self.right_type(self.key_ping) + ".nodata(180)}=1" diff --git a/mamonsu/plugins/pgsql/oldest.py b/mamonsu/plugins/pgsql/oldest.py index ba0dbbd..2a335d4 100644 --- a/mamonsu/plugins/pgsql/oldest.py +++ b/mamonsu/plugins/pgsql/oldest.py @@ -35,9 +35,10 @@ class Oldest(Plugin): WHERE leader_pid is not NULL; """ - DEFAULT_CONFIG = { - "max_xid_age": str(5000 * 60 * 60), - "max_transaction_time": str(5 * 60 * 60) + # key: (macro, value) + plugin_macros = { + "max_xid_age": [("macro", "{$MAX_XID_AGE}"), ("value", 5000 * 60 * 60)], + "max_transaction_time": [("macro", "{$MAX_TRANSACTION_TIME}"), ("value", 5 * 60 * 60)], } def run(self, zbx): @@ -85,16 +86,25 @@ def items(self, template, dashboard=False): "position": 2} }] + def macros(self, template, dashboard=False): + result = "" + for macro in self.plugin_macros.keys(): + result += template.mamonsu_macro(defaults=self.plugin_macros[macro]) + if not dashboard: + return result + else: + return [] + def triggers(self, template, dashboard=False): return template.trigger({ "name": "PostgreSQL Transactions: the oldest XID is too big on {HOSTNAME}", - "expression": "{#TEMPLATE:" + self.right_type(self.key, "xid_age") + ".last()}>" + self.plugin_config( - "max_xid_age") + "expression": "{#TEMPLATE:" + self.right_type(self.key, "xid_age") + ".last()}>" + + self.plugin_macros["max_xid_age"][0][1] }) + template.trigger({ "name": "PostgreSQL Transactions: running transaction is too old on {HOSTNAME}", "expression": "{#TEMPLATE:" + self.right_type(self.key, - "transaction_time") + ".last()}>" + self.plugin_config( - "max_transaction_time") + "transaction_time") + ".last()}>" + + self.plugin_macros["max_transaction_time"][0][1] }) def keys_and_queries(self, template_zabbix): diff --git a/mamonsu/plugins/pgsql/prepared_transaction.py b/mamonsu/plugins/pgsql/prepared_transaction.py index 3b1aff5..0aecb95 100644 --- a/mamonsu/plugins/pgsql/prepared_transaction.py +++ b/mamonsu/plugins/pgsql/prepared_transaction.py @@ -30,8 +30,9 @@ class PreparedTransaction(Plugin): FROM mamonsu.prepared_transaction(); """ - DEFAULT_CONFIG = { - "max_prepared_transaction_time": str(5 * 60 * 60) + # key: (macro, value) + plugin_macros = { + "max_prepared_transaction_time": [("macro", "{$MAX_PREPARED_TRANSACTION_TIME}"), ("value", 5 * 60 * 60)] } def run(self, zbx): @@ -92,10 +93,19 @@ def graphs(self, template, dashboard=False): else: return [] + def macros(self, template, dashboard=False): + result = "" + for macro in self.plugin_macros.keys(): + result += template.mamonsu_macro(defaults=self.plugin_macros[macro]) + if not dashboard: + return result + else: + return [] + def triggers(self, template, dashboard=False): result = template.trigger({ "name": "PostgreSQL Prepared Transactions: prepared transaction is too old on {HOSTNAME}", - "expression": "{#TEMPLATE:" + self.key_prepared["key"] + ".last()}>" + self.plugin_config( - "max_prepared_transaction_time") + "expression": "{#TEMPLATE:" + self.key_prepared["key"] + ".last()}>" + + self.plugin_macros["max_prepared_transaction_time"][0][1] }) return result diff --git a/mamonsu/plugins/pgsql/replication.py b/mamonsu/plugins/pgsql/replication.py index 425221c..ec164b8 100644 --- a/mamonsu/plugins/pgsql/replication.py +++ b/mamonsu/plugins/pgsql/replication.py @@ -10,8 +10,9 @@ class Replication(Plugin): AgentPluginType = "pg" - DEFAULT_CONFIG = { - "lag_more_than_in_sec": str(60 * 5) + # key: (macro, value) + plugin_macros = { + "critical_lag_seconds": [("macro", "{$CRITICAL_LAG_SECONDS}"), ("value", 60 * 5)] } # get time of replication lag @@ -89,7 +90,6 @@ def run(self, zbx): """) zbx.send(self.key_non_active_slots.format("[]"), int(non_active_slots[0][0])) - def items(self, template, dashboard=False): result = "" if self.Type == "mamonsu": @@ -110,12 +110,21 @@ def items(self, template, dashboard=False): else: return [] + def macros(self, template, dashboard=False): + result = "" + for macro in self.plugin_macros.keys(): + result += template.mamonsu_macro(defaults=self.plugin_macros[macro]) + if not dashboard: + return result + else: + return [] + def triggers(self, template, dashboard=False): triggers = template.trigger({ "name": "PostgreSQL Replication: streaming lag too high on {HOSTNAME} (value={ITEM.LASTVALUE})", "expression": "{#TEMPLATE:" + self.right_type(self.key_replication, - "sec") + ".last()}>" + self.plugin_config( - "lag_more_than_in_sec") + "sec") + ".last()}>" + + self.plugin_macros["critical_lag_seconds"][0][1] }) + template.trigger({ "name": "PostgreSQL Replication: number of non-active replication slots on {HOSTNAME} (value={ITEM.LASTVALUE})", "expression": "{#TEMPLATE:" + self.right_type(self.key_non_active_slots) + ".last()}>" + str( diff --git a/mamonsu/plugins/system/linux/disk_sizes.py b/mamonsu/plugins/system/linux/disk_sizes.py index 3aeaf96..898c2c0 100644 --- a/mamonsu/plugins/system/linux/disk_sizes.py +++ b/mamonsu/plugins/system/linux/disk_sizes.py @@ -12,9 +12,11 @@ class DiskSizes(Plugin): # tmp_query_agent_percent_inode_free = " "FIXME for inode key = "system.vfs" - DEFAULT_CONFIG = { - "vfs_percent_free": str(10), - "vfs_inode_percent_free": str(10)} + # key: (macro, value) + plugin_macros = { + "vfs_percent_free": [("macro", "{$VFS_PERCENT_FREE}"), ("value", 10)], + "vfs_inode_percent_free": [("macro", "{$VFS_INODE_PERCENT_FREE}"), ("value", 10)] + } ExcludeFsTypes = [ "none", "unknown", "rootfs", "iso9660", "squashfs", "udf", "romfs", "ramfs", "debugfs", "cgroup", "cgroup_root", @@ -54,6 +56,15 @@ def run(self, zbx): zbx.send("system.vfs.discovery[]", zbx.json({"data": points})) + def macros(self, template, dashboard=False): + result = "" + for macro in self.plugin_macros.keys(): + result += template.mamonsu_macro(defaults=self.plugin_macros[macro]) + if not dashboard: + return result + else: + return [] + def discovery_rules(self, template, dashboard=False): if Plugin.Type == "mamonsu": @@ -140,7 +151,7 @@ def discovery_rules(self, template, dashboard=False): "{#MOUNTPOINT} (hostname={HOSTNAME} value={ITEM.LASTVALUE})", "expression": "{#TEMPLATE:system.vfs." "percent_free[{#MOUNTPOINT}].last" - "()}<" + self.plugin_config("vfs_percent_free") + "()}<" + self.plugin_macros["vfs_percent_free"][0][1] }, ] @@ -150,7 +161,7 @@ def discovery_rules(self, template, dashboard=False): "name": "System: free inode space less than 10% on mountpoint " "{#MOUNTPOINT} (hostname={HOSTNAME} value={ITEM.LASTVALUE})", "expression": "{#TEMPLATE:system.vfs.percent_inode_free[{#MOUNTPOINT}].last" - "()}<" + self.plugin_config("vfs_inode_percent_free") + "()}<" + self.plugin_macros["vfs_inode_percent_free"][0][1] } ) diff --git a/mamonsu/plugins/system/linux/uptime.py b/mamonsu/plugins/system/linux/uptime.py index 8c04504..7f228e6 100644 --- a/mamonsu/plugins/system/linux/uptime.py +++ b/mamonsu/plugins/system/linux/uptime.py @@ -4,7 +4,10 @@ class SystemUptime(Plugin): AgentPluginType = "sys" - DEFAULT_CONFIG = {"uptime": str(60 * 5)} + # key: (macro, value) + plugin_macros = { + "system_uptime": [("macro", "{$SYSTEM_UPTIME}"), ("value", 60 * 5)] + } query_agent = "cat /proc/uptime | awk '{ print int($1) }'" key = "system.uptime{0}" @@ -24,11 +27,20 @@ def items(self, template, dashboard=False): else: return [] + def macros(self, template, dashboard=False): + result = "" + for macro in self.plugin_macros.keys(): + result += template.mamonsu_macro(defaults=self.plugin_macros[macro]) + if not dashboard: + return result + else: + return [] + def triggers(self, template, dashboard=False): return template.trigger( { - "name": "System: {HOSTNAME} was restarted (uptime={ITEM.LASTVALUE})", - "expression": "{#TEMPLATE:" + self.right_type(self.key) + ".last()}<" + self.plugin_config("uptime") + "name": "System: {HOSTNAME} was restarted (start time={ITEM.LASTVALUE})", + "expression": "{#TEMPLATE:" + self.right_type(self.key) + ".last()}<" + self.plugin_macros["system_uptime"][0][1] } ) diff --git a/packaging/conf/example_linux.conf b/packaging/conf/example_linux.conf index 7ba0c19..ddd0f2f 100644 --- a/packaging/conf/example_linux.conf +++ b/packaging/conf/example_linux.conf @@ -78,11 +78,9 @@ format = [%(levelname)s] %(asctime)s - %(name)s - %(message)s # below listed all available parameters for each plugin to modify. [health] -max_memory_usage = 41943040 interval = 60 [archivecommand] -max_count_files = 2 interval = 60 # Besides standard autovacuum workers count, mamonsu also counts autovacuum utilization. @@ -99,21 +97,15 @@ force_enable = False interval = 60 [checkpoint] -max_checkpoint_by_wal_in_hour = 12 interval = 300 [connections] -percent_connections_tr = 90 interval = 60 [databases] -bloat_scale = 0.2 -min_rows = 50 interval = 300 [pghealth] -uptime = 600 -cache = 80 interval = 60 [instance] @@ -136,8 +128,6 @@ interval = 60 private_anon_mem_threshold = 1GB [oldest] -max_xid_age = 18000000 -max_query_time = 18000 interval = 60 [pgbuffercache] @@ -152,7 +142,6 @@ interval = 60 # max_prepared_transaction_time - age of prepared transaction in seconds. # If pgsql.prepared.oldest exceeds max_prepared_transaction_time the trigger fires. [preparedtransaction] -max_prepared_transaction_time = 60 interval = 60 # Get size of relations defined in this section @@ -167,7 +156,6 @@ relations=postgres.pg_catalog.pg_class,postgres.pg_catalog.pg_user interval = 300 [replication] -lag_more_than_in_sec = 300 interval = 60 [statstatements] @@ -180,8 +168,6 @@ interval = 60 interval = 60 [disksizes] -vfs_percent_free = 10 -vfs_inode_percent_free = 10 interval = 60 [diskstats] @@ -212,7 +198,6 @@ pg_probackup_path = /usr/bin/pg_probackup-11 interval = 60 [systemuptime] -up_time = 300 interval = 60 [agentapi] diff --git a/packaging/conf/example_win.conf b/packaging/conf/example_win.conf index a4486ef..d77008c 100644 --- a/packaging/conf/example_win.conf +++ b/packaging/conf/example_win.conf @@ -78,11 +78,9 @@ format = [%(levelname)s] %(asctime)s - %(name)s - %(message)s # below listed all available parameters for each plugin to modify. [health] -max_memory_usage = 41943040 interval = 60 [archivecommand] -max_count_files = 2 interval = 60 # Besides standard autovacuum workers count, mamonsu also counts autovacuum utilization. @@ -99,21 +97,15 @@ force_enable = False interval = 60 [checkpoint] -max_checkpoint_by_wal_in_hour = 12 interval = 300 [connections] -percent_connections_tr = 90 interval = 60 [databases] -bloat_scale = 0.2 -min_rows = 50 interval = 300 [pghealth] -uptime = 600 -cache = 80 interval = 60 [instance] @@ -133,11 +125,8 @@ interval = 60 [memoryleakdiagnostic] enabled = False interval = 60 -private_anon_mem_threshold = 1GB [oldest] -max_xid_age = 18000000 -max_query_time = 18000 interval = 60 [pgbuffercache] @@ -152,7 +141,6 @@ interval = 60 # max_prepared_transaction_time - age of prepared transaction in seconds. # If pgsql.prepared.oldest exceeds max_prepared_transaction_time the trigger fires. [preparedtransaction] -max_prepared_transaction_time = 60 interval = 60 # Get size of relations defined in this section @@ -167,7 +155,6 @@ relations=postgres.pg_catalog.pg_class,postgres.pg_catalog.pg_user interval = 300 [replication] -lag_more_than_in_sec = 300 interval = 60 [statstatements] From a5ee734bf217e6d93870e9781ce9cccfb56ed994 Mon Sep 17 00:00:00 2001 From: cuprumtan Date: Fri, 22 Jul 2022 11:01:16 +0300 Subject: [PATCH 014/106] cicd: fixed test config (cherry picked from commit 8333244df7be7c37c88f7aace89d8ce5e7f7ab50) --- github-actions-tests/sources/agent_3.5.1.conf | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/github-actions-tests/sources/agent_3.5.1.conf b/github-actions-tests/sources/agent_3.5.1.conf index 709d8c9..076419e 100644 --- a/github-actions-tests/sources/agent_3.5.1.conf +++ b/github-actions-tests/sources/agent_3.5.1.conf @@ -123,8 +123,8 @@ interval = 60 # private_anon_mem_threshold - memory volume threshold after which we need an investigation about memory leak. 1GB by default. # Possible values MB, GB, TB. For example 1GB [memoryleakdiagnostic] -enabled = False -interval = 60 +enabled = True +interval = 15 private_anon_mem_threshold = 1GB [oldest] @@ -151,9 +151,9 @@ interval = 60 # If the relation is blocked by some process such as vacuum full or create index, the result will be -1 # by default this plugin disabled. To enable this plugin - set bellow "enabled = False" and define a list of relations. [relationssize] -enabled = False -relations=postgres.pg_catalog.pg_class,postgres.pg_catalog.pg_user -interval = 300 +enabled = True +relations=postgres.pg_catalog.pg_class,mamonsu_test_db.mamonsu.config +interval = 15 [replication] interval = 60 From 8a338606e639ed5ac6b0afc786c23a64137621dc Mon Sep 17 00:00:00 2001 From: cuprumtan Date: Tue, 16 Aug 2022 12:08:45 +0300 Subject: [PATCH 015/106] fix: fixed Dashboard Autovacuum metric --- mamonsu/tools/zabbix_cli/dashboard.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mamonsu/tools/zabbix_cli/dashboard.py b/mamonsu/tools/zabbix_cli/dashboard.py index fab440c..e3d585e 100644 --- a/mamonsu/tools/zabbix_cli/dashboard.py +++ b/mamonsu/tools/zabbix_cli/dashboard.py @@ -1,6 +1,7 @@ from datetime import datetime from mamonsu.plugins.pgsql.archive_command import ArchiveCommand +from mamonsu.plugins.pgsql.autovacuum import Autovacuum from mamonsu.plugins.pgsql.bgwriter import BgWriter from mamonsu.plugins.pgsql.checkpoint import Checkpoint from mamonsu.plugins.pgsql.connections import Connections @@ -1049,7 +1050,7 @@ def generate_dashboard(template, uuid): Instance.graphs_name["transactions"], Memory.graph_name_free_used, ArchiveCommand.key.format("[" + ArchiveCommand.Items[2][0] + "]"), - Databases.key_autovacumm.format("[]"), + Autovacuum.key_count.format("[]"), BgWriter.graph_name_buffers, BgWriter.graph_name_ws, Instance.key + Instance.Items[1][1], From 59c2c8849387230f53c08146c351336cfd9e3b8e Mon Sep 17 00:00:00 2001 From: cuprumtan Date: Tue, 16 Aug 2022 13:51:44 +0300 Subject: [PATCH 016/106] fix: added autovauum module --- mamonsu/plugins/pgsql/__init__.py | 1 + mamonsu_win32.spec | 1 + service_win32.spec | 1 + 3 files changed, 3 insertions(+) diff --git a/mamonsu/plugins/pgsql/__init__.py b/mamonsu/plugins/pgsql/__init__.py index 6612b09..ab3f71e 100644 --- a/mamonsu/plugins/pgsql/__init__.py +++ b/mamonsu/plugins/pgsql/__init__.py @@ -6,6 +6,7 @@ __all__ += ['checkpoint', 'oldest', 'pg_locks'] __all__ += ['cfs'] __all__ += ['archive_command'] +__all__ += ['autovacuum'] __all__ += ['prepared_transaction'] __all__ += ['relations_size'] diff --git a/mamonsu_win32.spec b/mamonsu_win32.spec index 503a4f3..ca50586 100644 --- a/mamonsu_win32.spec +++ b/mamonsu_win32.spec @@ -9,6 +9,7 @@ a = Analysis(['mamonsu_win32.py'], datas=[], hiddenimports=[ 'mamonsu.plugins.pgsql.archive_command', + 'mamonsu.plugins.pgsql.autovacuum', 'mamonsu.plugins.pgsql.bgwriter', 'mamonsu.plugins.pgsql.cfs', 'mamonsu.plugins.pgsql.checkpoint', diff --git a/service_win32.spec b/service_win32.spec index 2d35e92..175fe4e 100644 --- a/service_win32.spec +++ b/service_win32.spec @@ -9,6 +9,7 @@ a = Analysis(['service_win32.py'], datas=[], hiddenimports=[ 'mamonsu.plugins.pgsql.archive_command', + 'mamonsu.plugins.pgsql.autovacuum', 'mamonsu.plugins.pgsql.bgwriter', 'mamonsu.plugins.pgsql.cfs', 'mamonsu.plugins.pgsql.checkpoint', From eb32c26986e4e5242b05672f72353fb6eaaa7668 Mon Sep 17 00:00:00 2001 From: cuprumtan Date: Tue, 16 Aug 2022 13:51:56 +0300 Subject: [PATCH 017/106] build: added new template examples --- .../old_templates/template_3.5.2_agent.xml | 32 +++++++++++++++++++ .../old_templates/template_3.5.2_linux.xml | 32 +++++++++++++++++++ packaging/conf/template_agent.xml | 10 +++--- packaging/conf/template_linux.xml | 10 +++--- 4 files changed, 74 insertions(+), 10 deletions(-) create mode 100644 packaging/conf/old_templates/template_3.5.2_agent.xml create mode 100644 packaging/conf/old_templates/template_3.5.2_linux.xml diff --git a/packaging/conf/old_templates/template_3.5.2_agent.xml b/packaging/conf/old_templates/template_3.5.2_agent.xml new file mode 100644 index 0000000..5d61f5a --- /dev/null +++ b/packaging/conf/old_templates/template_3.5.2_agent.xml @@ -0,0 +1,32 @@ + + + 3.0 + + + Templates + + + + + + {Mamonsu PostgreSQL Linux:pgsql.archive_command.count_files_to_archive[{$PG_CONNINFO},{$PG_PATH}].last()}>{$ARCHIVE_QUEUE_FILES}PostgreSQL Archiver: count files need to archive on {HOSTNAME} more than 2030{Mamonsu PostgreSQL Linux:pgsql.checkpoint.count_wal[{$PG_CONNINFO},{$PG_PATH}].last()}>{$MAX_CHECKPOINT_BY_WAL_IN_HOUR}PostgreSQL Checkpoints: required checkpoints occurs too frequently on {HOSTNAME}030 {Mamonsu PostgreSQL Linux:pgsql.connections.total[{$PG_CONNINFO},{$PG_PATH}].last()}/{Mamonsu PostgreSQL Linux:pgsql.connections.max_connections[{$PG_CONNINFO},{$PG_PATH}].last()}*100 >{$CONNECTIONS_PERCENT}PostgreSQL Connections: too many connections on {HOSTNAME} (total connections more than {$CONNECTIONS_PERCENT}% of max_connections)030{Mamonsu PostgreSQL Linux:mamonsu.plugin.keepalive.nodata(180)}=1Mamonsu health: nodata from {HOSTNAME}030{Mamonsu PostgreSQL Linux:pgsql.server_mode.change()}>0PostgreSQL Instance: server mode has been changed on {HOSTNAME} to {ITEM.LASTVALUE}030{Mamonsu PostgreSQL Linux:pgsql.memory_leak_diagnostic.msg_text[].strlen()}>1PostgreSQL Memory Leak: Number of Pids Which Private Anonymous Memory Exceeds private_anon_mem_threshold on {HOSTNAME}. {ITEM.LASTVALUE}030{Mamonsu PostgreSQL Linux:pgsql.oldest.xid_age[{$PG_CONNINFO},{$PG_PATH}].last()}>{$MAX_XID_AGE}PostgreSQL Transactions: the oldest XID is too big on {HOSTNAME}030{Mamonsu PostgreSQL Linux:pgsql.oldest.transaction_time[{$PG_CONNINFO},{$PG_PATH}].last()}>{$MAX_TRANSACTION_TIME}PostgreSQL Transactions: running transaction is too old on {HOSTNAME}030{Mamonsu PostgreSQL Linux:pgsql.uptime[{$PG_CONNINFO},{$PG_PATH}].change()}>{$PG_UPTIME}PostgreSQL Health: service has been restarted on {HOSTNAME} (uptime={ITEM.LASTVALUE})030{Mamonsu PostgreSQL Linux:pgsql.cache.hit[{$PG_CONNINFO},{$PG_PATH}].last()}<{$CACHE_HIT_RATIO_PERCENT}PostgreSQL Health: cache hit ratio too low on {HOSTNAME} ({ITEM.LASTVALUE})030{Mamonsu PostgreSQL Linux:pgsql.ping[{$PG_CONNINFO},{$PG_PATH}].nodata(180)}=1PostgreSQL Health: no ping from PostgreSQL for 3 minutes on {HOSTNAME}030{Mamonsu PostgreSQL Linux:pgsql.prepared.oldest.last()}>{$MAX_PREPARED_TRANSACTION_TIME}PostgreSQL Prepared Transactions: prepared transaction is too old on {HOSTNAME}030{Mamonsu PostgreSQL Linux:system.processes.forkrate.min(5m)}>500System: process fork-rate too frequently on {HOSTNAME}030{Mamonsu PostgreSQL Linux:pgsql.replication_lag.sec[{$PG_CONNINFO},{$PG_PATH}].last()}>{$CRITICAL_LAG_SECONDS}PostgreSQL Replication: streaming lag too high on {HOSTNAME} (value={ITEM.LASTVALUE})030{Mamonsu PostgreSQL Linux:pgsql.replication.non_active_slots[{$PG_CONNINFO},{$PG_PATH}].last()}>0PostgreSQL Replication: number of non-active replication slots on {HOSTNAME} (value={ITEM.LASTVALUE})030{Mamonsu PostgreSQL Linux:system.uptime.last()}<{$SYSTEM_UPTIME}System: {HOSTNAME} was restarted (start time={ITEM.LASTVALUE})030 + PostgreSQL Archiver: Archive Status9002000.0100.0110100.00.0000002006AAE020Mamonsu PostgreSQL Linuxpgsql.archive_command.count_files_to_archive[{$PG_CONNINFO},{$PG_PATH}]1200CC00020Mamonsu PostgreSQL Linuxpgsql.archive_command.archived_files[{$PG_CONNINFO},{$PG_PATH}]22FF5656020Mamonsu PostgreSQL Linuxpgsql.archive_command.failed_trying_to_archive[{$PG_CONNINFO},{$PG_PATH}]PostgreSQL Autovacuum: Count of Autovacuum Workers9002000.0100.0110100.00.000000287C2B9020Mamonsu PostgreSQL Linuxpgsql.autovacuum.count[{$PG_CONNINFO},{$PG_PATH}]PostgreSQL bgwriter: Buffers9002000.0100.0110100.00.0000002006AAE020Mamonsu PostgreSQL Linuxpgsql.bgwriter.buffers_checkpoint[{$PG_CONNINFO},{$PG_PATH}]1200CC00020Mamonsu PostgreSQL Linuxpgsql.bgwriter.buffers_clean[{$PG_CONNINFO},{$PG_PATH}]229C8A4E020Mamonsu PostgreSQL Linuxpgsql.bgwriter.buffers_backend[{$PG_CONNINFO},{$PG_PATH}]32FF5656020Mamonsu PostgreSQL Linuxpgsql.bgwriter.buffers_alloc[{$PG_CONNINFO},{$PG_PATH}]PostgreSQL bgwriter: Events9002000.0100.0110100.00.0000002FF5656020Mamonsu PostgreSQL Linuxpgsql.bgwriter.maxwritten_clean[{$PG_CONNINFO},{$PG_PATH}]1200CC00020Mamonsu PostgreSQL Linuxpgsql.bgwriter.buffers_backend_fsync[{$PG_CONNINFO},{$PG_PATH}]PostgreSQL Checkpoints: Count (in hour)9002000.0100.0110100.00.000000200CC00020Mamonsu PostgreSQL Linuxpgsql.checkpoint.count_timed[{$PG_CONNINFO},{$PG_PATH}]12FF5656020Mamonsu PostgreSQL Linuxpgsql.checkpoint.count_wal[{$PG_CONNINFO},{$PG_PATH}]PostgreSQL Checkpoints: Write/Sync9002000.0100.0110100.00.000000200CC00020Mamonsu PostgreSQL Linuxpgsql.checkpoint.write_time[{$PG_CONNINFO},{$PG_PATH}]12FF5656020Mamonsu PostgreSQL Linuxpgsql.checkpoint.checkpoint_sync_time[{$PG_CONNINFO},{$PG_PATH}]PostgreSQL Connections: Overview9002000.0100.0111100.00.000000200CC00020Mamonsu PostgreSQL Linuxpgsql.connections.active[{$PG_CONNINFO},{$PG_PATH}]12A39B98020Mamonsu PostgreSQL Linuxpgsql.connections.idle[{$PG_CONNINFO},{$PG_PATH}]229C8A4E020Mamonsu PostgreSQL Linuxpgsql.connections.idle_in_transaction[{$PG_CONNINFO},{$PG_PATH}]32F6CB93020Mamonsu PostgreSQL Linuxpgsql.connections.idle_in_transaction_aborted[{$PG_CONNINFO},{$PG_PATH}]4200B0B8020Mamonsu PostgreSQL Linuxpgsql.connections.fastpath_function_call[{$PG_CONNINFO},{$PG_PATH}]523B415A020Mamonsu PostgreSQL Linuxpgsql.connections.disabled[{$PG_CONNINFO},{$PG_PATH}]62FF5656020Mamonsu PostgreSQL Linuxpgsql.connections.total[{$PG_CONNINFO},{$PG_PATH}]72006AAE020Mamonsu PostgreSQL Linuxpgsql.connections.waiting[{$PG_CONNINFO},{$PG_PATH}]8287C2B9020Mamonsu PostgreSQL Linuxpgsql.connections.other[{$PG_CONNINFO},{$PG_PATH}]System: Block Devices Read/Write Operations9002000.0100.0110100.00.000000200CC00020Mamonsu PostgreSQL Linuxsystem.disk.all_read12FF5656020Mamonsu PostgreSQL Linuxsystem.disk.all_writeSystem: Block Devices Read/Write Bytes9002000.0100.0110100.00.000000200CC00020Mamonsu PostgreSQL Linuxsystem.disk.all_read_b12FF5656020Mamonsu PostgreSQL Linuxsystem.disk.all_write_bPostgreSQL Instance: Blocks Rate9002000.0100.0110100.00.000000287C2B9020Mamonsu PostgreSQL Linuxpgsql.blocks.hit[{$PG_CONNINFO},{$PG_PATH}]12793F5D020Mamonsu PostgreSQL Linuxpgsql.blocks.read[{$PG_CONNINFO},{$PG_PATH}]PostgreSQL Instance: Transactions Rate9002000.0100.0110100.00.000000200CC00020Mamonsu PostgreSQL Linuxpgsql.transactions.committed[{$PG_CONNINFO},{$PG_PATH}]12FF5656020Mamonsu PostgreSQL Linuxpgsql.events.xact_rollback[{$PG_CONNINFO},{$PG_PATH}]PostgreSQL Instance: Events9002000.0100.0110100.00.000000200CC00020Mamonsu PostgreSQL Linuxpgsql.events.conflicts[{$PG_CONNINFO},{$PG_PATH}]12FF5656020Mamonsu PostgreSQL Linuxpgsql.events.deadlocks[{$PG_CONNINFO},{$PG_PATH}]22006AAE020Mamonsu PostgreSQL Linuxpgsql.events.checksum_failures[{$PG_CONNINFO},{$PG_PATH}]PostgreSQL Instance: Temp Files9002000.0100.0110100.00.000000200B0B8020Mamonsu PostgreSQL Linuxpgsql.temp.bytes[{$PG_CONNINFO},{$PG_PATH}]12006AAE120Mamonsu PostgreSQL Linuxpgsql.temp.files[{$PG_CONNINFO},{$PG_PATH}]PostgreSQL Instance: Tuples9002000.0100.0110100.00.0000002FF5656020Mamonsu PostgreSQL Linuxpgsql.tuples.deleted[{$PG_CONNINFO},{$PG_PATH}]12006AAE020Mamonsu PostgreSQL Linuxpgsql.tuples.fetched[{$PG_CONNINFO},{$PG_PATH}]2200CC00020Mamonsu PostgreSQL Linuxpgsql.tuples.inserted[{$PG_CONNINFO},{$PG_PATH}]32001219120Mamonsu PostgreSQL Linuxpgsql.tuples.returned[{$PG_CONNINFO},{$PG_PATH}]429C8A4E020Mamonsu PostgreSQL Linuxpgsql.tuples.updated[{$PG_CONNINFO},{$PG_PATH}]System: Server Memory Detailed Overview9004000.0100.0111100.00.0000000BAEB6B020Mamonsu PostgreSQL Linuxsystem.memory.active1000CC00020Mamonsu PostgreSQL Linuxsystem.memory.available2000B0B8020Mamonsu PostgreSQL Linuxsystem.memory.buffers3052768F020Mamonsu PostgreSQL Linuxsystem.memory.cached409C8A4E020Mamonsu PostgreSQL Linuxsystem.memory.committed50A39B98020Mamonsu PostgreSQL Linuxsystem.memory.inactive609F1E28020Mamonsu PostgreSQL Linuxsystem.memory.mapped70793F5D020Mamonsu PostgreSQL Linuxsystem.memory.page_tables80F6CB93020Mamonsu PostgreSQL Linuxsystem.memory.slab90006AAE020Mamonsu PostgreSQL Linuxsystem.memory.swap10087C2B9020Mamonsu PostgreSQL Linuxsystem.memory.swap_cache1103B415A020Mamonsu PostgreSQL Linuxsystem.memory.unused120001219020Mamonsu PostgreSQL Linuxsystem.memory.used130CF6518020Mamonsu PostgreSQL Linuxsystem.memory.vmalloc_usedSystem: Server Free/Used Memory Overview9004000.0100.0110100.00.0000001001219020Mamonsu PostgreSQL Linuxsystem.memory.used1152768F020Mamonsu PostgreSQL Linuxsystem.memory.cached2100CC00020Mamonsu PostgreSQL Linuxsystem.memory.available34FF5656020Mamonsu PostgreSQL Linuxsystem.memory.totalPostgreSQL pg_buffercache: Shared Buffer9002000.0100.0110100.00.000000200CC00020Mamonsu PostgreSQL Linuxpgsql.buffers.size[{$PG_CONNINFO},{$PG_PATH}]12006AAE020Mamonsu PostgreSQL Linuxpgsql.buffers.twice_used[{$PG_CONNINFO},{$PG_PATH}]22FF5656020Mamonsu PostgreSQL Linuxpgsql.buffers.dirty[{$PG_CONNINFO},{$PG_PATH}]PostgreSQL: Locks Sampling9002000.0100.0110100.00.000000200CC00020Mamonsu PostgreSQL Linuxpgsql.pg_locks.accessshare[{$PG_CONNINFO},{$PG_PATH}]123B415A020Mamonsu PostgreSQL Linuxpgsql.pg_locks.rowshare[{$PG_CONNINFO},{$PG_PATH}]22FF5656020Mamonsu PostgreSQL Linuxpgsql.pg_locks.rowexclusive[{$PG_CONNINFO},{$PG_PATH}]32F6CB93020Mamonsu PostgreSQL Linuxpgsql.pg_locks.shareupdateexclusive[{$PG_CONNINFO},{$PG_PATH}]42006AAE020Mamonsu PostgreSQL Linuxpgsql.pg_locks.share[{$PG_CONNINFO},{$PG_PATH}]5200B0B8020Mamonsu PostgreSQL Linuxpgsql.pg_locks.sharerowexclusive[{$PG_CONNINFO},{$PG_PATH}]629C8A4E020Mamonsu PostgreSQL Linuxpgsql.pg_locks.exclusive[{$PG_CONNINFO},{$PG_PATH}]72793F5D020Mamonsu PostgreSQL Linuxpgsql.pg_locks.accessexclusive[{$PG_CONNINFO},{$PG_PATH}]PostgreSQL Prepared Transactions: Overview9002000.0100.0110100.00.0000002A39B98020Mamonsu PostgreSQL Linuxpgsql.prepared.count129C8A4E120Mamonsu PostgreSQL Linuxpgsql.prepared.oldestSystem: Processes Overview9002000.0100.0110100.00.000000200CC00020Mamonsu PostgreSQL Linuxsystem.processes.running12FF5656020Mamonsu PostgreSQL Linuxsystem.processes.blocked22006AAE120Mamonsu PostgreSQL Linuxsystem.processes.forkrateSystem: CPU Time Spent9002000.0100.0111100.00.000000200CC00020Mamonsu PostgreSQL Linuxsystem.cpu.user12793F5D020Mamonsu PostgreSQL Linuxsystem.cpu.nice229C8A4E020Mamonsu PostgreSQL Linuxsystem.cpu.system32A39B98020Mamonsu PostgreSQL Linuxsystem.cpu.idle42006AAE020Mamonsu PostgreSQL Linuxsystem.cpu.iowait52FF5656020Mamonsu PostgreSQL Linuxsystem.cpu.irq62F6CB93020Mamonsu PostgreSQL Linuxsystem.cpu.softirqPostgreSQL Statements: Bytes9002000.0100.0110100.00.000000287C2B9020Mamonsu PostgreSQL Linuxpgsql.stat.read_bytes[{$PG_CONNINFO},{$PG_PATH}]12793F5D020Mamonsu PostgreSQL Linuxpgsql.stat.write_bytes[{$PG_CONNINFO},{$PG_PATH}]229C8A4E020Mamonsu PostgreSQL Linuxpgsql.stat.dirty_bytes[{$PG_CONNINFO},{$PG_PATH}]PostgreSQL Statements: Spent Time9002000.0100.0111100.00.000000287C2B9020Mamonsu PostgreSQL Linuxpgsql.stat.read_time[{$PG_CONNINFO},{$PG_PATH}]12793F5D020Mamonsu PostgreSQL Linuxpgsql.stat.write_time[{$PG_CONNINFO},{$PG_PATH}]229C8A4E020Mamonsu PostgreSQL Linuxpgsql.stat.other_time[{$PG_CONNINFO},{$PG_PATH}]PostgreSQL Statements: WAL Statistics9002000.0100.0110100.00.000000200B0B8020Mamonsu PostgreSQL Linuxpgsql.stat.wal_bytes[{$PG_CONNINFO},{$PG_PATH}]12006AAE020Mamonsu PostgreSQL Linuxpgsql.stat.wal_records[{$PG_CONNINFO},{$PG_PATH}]229C8A4E020Mamonsu PostgreSQL Linuxpgsql.stat.wal_fpi[{$PG_CONNINFO},{$PG_PATH}] + \ No newline at end of file diff --git a/packaging/conf/old_templates/template_3.5.2_linux.xml b/packaging/conf/old_templates/template_3.5.2_linux.xml new file mode 100644 index 0000000..d8b75f5 --- /dev/null +++ b/packaging/conf/old_templates/template_3.5.2_linux.xml @@ -0,0 +1,32 @@ + + + 3.0 + + + Templates + + + + + + {Mamonsu PostgreSQL Linux:pgsql.archive_command[count_files_to_archive].last()}>{$ARCHIVE_QUEUE_FILES}PostgreSQL Archiver: count files need to archive on {HOSTNAME} more than 2030{Mamonsu PostgreSQL Linux:pgsql.checkpoint[count_wal].last()}>{$MAX_CHECKPOINT_BY_WAL_IN_HOUR}PostgreSQL Checkpoints: required checkpoints occurs too frequently on {HOSTNAME}030 {Mamonsu PostgreSQL Linux:pgsql.connections[total].last()}/{Mamonsu PostgreSQL Linux:pgsql.connections[max_connections].last()}*100 >{$CONNECTIONS_PERCENT}PostgreSQL Connections: too many connections on {HOSTNAME} (total connections more than {$CONNECTIONS_PERCENT}% of max_connections)030{Mamonsu PostgreSQL Linux:mamonsu.plugin.errors[].strlen()}>1Mamonsu health: plugin errors on {HOSTNAME}. {ITEM.LASTVALUE}030{Mamonsu PostgreSQL Linux:mamonsu.plugin.keepalive[].nodata(180)}=1Mamonsu health: nodata from {HOSTNAME}030{Mamonsu PostgreSQL Linux:mamonsu.memory.rss[max].last()}>{$MAMONSU_MAX_MEMORY_USAGE}Mamonsu health: agent memory usage alert on {HOSTNAME}: {ITEM.LASTVALUE} bytes030{Mamonsu PostgreSQL Linux:pgsql.server_mode.change()}>0PostgreSQL Instance: server mode has been changed on {HOSTNAME} to {ITEM.LASTVALUE}030{Mamonsu PostgreSQL Linux:pgsql.memory_leak_diagnostic.msg_text[].strlen()}>1PostgreSQL Memory Leak: Number of Pids Which Private Anonymous Memory Exceeds private_anon_mem_threshold on {HOSTNAME}. {ITEM.LASTVALUE}030{Mamonsu PostgreSQL Linux:pgsql.oldest[xid_age].last()}>{$MAX_XID_AGE}PostgreSQL Transactions: the oldest XID is too big on {HOSTNAME}030{Mamonsu PostgreSQL Linux:pgsql.oldest[transaction_time].last()}>{$MAX_TRANSACTION_TIME}PostgreSQL Transactions: running transaction is too old on {HOSTNAME}030{Mamonsu PostgreSQL Linux:pgsql.uptime[].change()}>{$PG_UPTIME}PostgreSQL Health: service has been restarted on {HOSTNAME} (uptime={ITEM.LASTVALUE})030{Mamonsu PostgreSQL Linux:pgsql.cache[hit].last()}<{$CACHE_HIT_RATIO_PERCENT}PostgreSQL Health: cache hit ratio too low on {HOSTNAME} ({ITEM.LASTVALUE})030{Mamonsu PostgreSQL Linux:pgsql.ping[].nodata(180)}=1PostgreSQL Health: no ping from PostgreSQL for 3 minutes on {HOSTNAME}030{Mamonsu PostgreSQL Linux:pgsql.prepared.oldest.last()}>{$MAX_PREPARED_TRANSACTION_TIME}PostgreSQL Prepared Transactions: prepared transaction is too old on {HOSTNAME}030{Mamonsu PostgreSQL Linux:system.processes[forkrate].min(5m)}>500System: process fork-rate too frequently on {HOSTNAME}030{Mamonsu PostgreSQL Linux:pgsql.replication_lag[sec].last()}>{$CRITICAL_LAG_SECONDS}PostgreSQL Replication: streaming lag too high on {HOSTNAME} (value={ITEM.LASTVALUE})030{Mamonsu PostgreSQL Linux:pgsql.replication.non_active_slots[].last()}>0PostgreSQL Replication: number of non-active replication slots on {HOSTNAME} (value={ITEM.LASTVALUE})030{Mamonsu PostgreSQL Linux:system.uptime[].last()}<{$SYSTEM_UPTIME}System: {HOSTNAME} was restarted (start time={ITEM.LASTVALUE})030 + PostgreSQL Archiver: Archive Status9002000.0100.0110100.00.0000002006AAE020Mamonsu PostgreSQL Linuxpgsql.archive_command[count_files_to_archive]1200CC00020Mamonsu PostgreSQL Linuxpgsql.archive_command[archived_files]22FF5656020Mamonsu PostgreSQL Linuxpgsql.archive_command[failed_trying_to_archive]PostgreSQL Autovacuum: Count of Autovacuum Workers9002000.0100.0110100.00.000000287C2B9020Mamonsu PostgreSQL Linuxpgsql.autovacuum.count[]PostgreSQL bgwriter: Buffers9002000.0100.0110100.00.0000002006AAE020Mamonsu PostgreSQL Linuxpgsql.bgwriter[buffers_checkpoint]1200CC00020Mamonsu PostgreSQL Linuxpgsql.bgwriter[buffers_clean]229C8A4E020Mamonsu PostgreSQL Linuxpgsql.bgwriter[buffers_backend]32FF5656020Mamonsu PostgreSQL Linuxpgsql.bgwriter[buffers_alloc]PostgreSQL bgwriter: Events9002000.0100.0110100.00.0000002FF5656020Mamonsu PostgreSQL Linuxpgsql.bgwriter[maxwritten_clean]1200CC00020Mamonsu PostgreSQL Linuxpgsql.bgwriter[buffers_backend_fsync]PostgreSQL Checkpoints: Count (in hour)9002000.0100.0110100.00.000000200CC00020Mamonsu PostgreSQL Linuxpgsql.checkpoint[count_timed]12FF5656020Mamonsu PostgreSQL Linuxpgsql.checkpoint[count_wal]PostgreSQL Checkpoints: Write/Sync9002000.0100.0110100.00.000000200CC00020Mamonsu PostgreSQL Linuxpgsql.checkpoint[write_time]12FF5656020Mamonsu PostgreSQL Linuxpgsql.checkpoint[checkpoint_sync_time]PostgreSQL Connections: Overview9002000.0100.0111100.00.000000200CC00020Mamonsu PostgreSQL Linuxpgsql.connections[active]12A39B98020Mamonsu PostgreSQL Linuxpgsql.connections[idle]229C8A4E020Mamonsu PostgreSQL Linuxpgsql.connections[idle_in_transaction]32F6CB93020Mamonsu PostgreSQL Linuxpgsql.connections[idle_in_transaction_aborted]4200B0B8020Mamonsu PostgreSQL Linuxpgsql.connections[fastpath_function_call]523B415A020Mamonsu PostgreSQL Linuxpgsql.connections[disabled]62FF5656020Mamonsu PostgreSQL Linuxpgsql.connections[total]72006AAE020Mamonsu PostgreSQL Linuxpgsql.connections[waiting]8287C2B9020Mamonsu PostgreSQL Linuxpgsql.connections[other]System: Block Devices Read/Write Operations9002000.0100.0110100.00.000000200CC00020Mamonsu PostgreSQL Linuxsystem.disk.all_read[]12FF5656020Mamonsu PostgreSQL Linuxsystem.disk.all_write[]System: Block Devices Read/Write Bytes9002000.0100.0110100.00.000000200CC00020Mamonsu PostgreSQL Linuxsystem.disk.all_read_b[]12FF5656020Mamonsu PostgreSQL Linuxsystem.disk.all_write_b[]PostgreSQL Instance: Blocks Rate9002000.0100.0110100.00.000000287C2B9020Mamonsu PostgreSQL Linuxpgsql.blocks[hit]12793F5D020Mamonsu PostgreSQL Linuxpgsql.blocks[read]PostgreSQL Instance: Transactions Rate9002000.0100.0110100.00.000000200CC00020Mamonsu PostgreSQL Linuxpgsql.transactions[committed]12FF5656020Mamonsu PostgreSQL Linuxpgsql.events[xact_rollback]PostgreSQL Instance: Events9002000.0100.0110100.00.000000200CC00020Mamonsu PostgreSQL Linuxpgsql.events[conflicts]12FF5656020Mamonsu PostgreSQL Linuxpgsql.events[deadlocks]22006AAE020Mamonsu PostgreSQL Linuxpgsql.events[checksum_failures]PostgreSQL Instance: Temp Files9002000.0100.0110100.00.000000200B0B8020Mamonsu PostgreSQL Linuxpgsql.temp[bytes]12006AAE120Mamonsu PostgreSQL Linuxpgsql.temp[files]PostgreSQL Instance: Tuples9002000.0100.0110100.00.0000002FF5656020Mamonsu PostgreSQL Linuxpgsql.tuples[deleted]12006AAE020Mamonsu PostgreSQL Linuxpgsql.tuples[fetched]2200CC00020Mamonsu PostgreSQL Linuxpgsql.tuples[inserted]32001219120Mamonsu PostgreSQL Linuxpgsql.tuples[returned]429C8A4E020Mamonsu PostgreSQL Linuxpgsql.tuples[updated]System: Server Memory Detailed Overview9004000.0100.0111100.00.0000000BAEB6B020Mamonsu PostgreSQL Linuxsystem.memory[active]1000CC00020Mamonsu PostgreSQL Linuxsystem.memory[available]2000B0B8020Mamonsu PostgreSQL Linuxsystem.memory[buffers]3052768F020Mamonsu PostgreSQL Linuxsystem.memory[cached]409C8A4E020Mamonsu PostgreSQL Linuxsystem.memory[committed]50A39B98020Mamonsu PostgreSQL Linuxsystem.memory[inactive]609F1E28020Mamonsu PostgreSQL Linuxsystem.memory[mapped]70793F5D020Mamonsu PostgreSQL Linuxsystem.memory[page_tables]80F6CB93020Mamonsu PostgreSQL Linuxsystem.memory[slab]90006AAE020Mamonsu PostgreSQL Linuxsystem.memory[swap]10087C2B9020Mamonsu PostgreSQL Linuxsystem.memory[swap_cache]1103B415A020Mamonsu PostgreSQL Linuxsystem.memory[unused]120001219020Mamonsu PostgreSQL Linuxsystem.memory[used]130CF6518020Mamonsu PostgreSQL Linuxsystem.memory[vmalloc_used]System: Server Free/Used Memory Overview9004000.0100.0110100.00.0000001001219020Mamonsu PostgreSQL Linuxsystem.memory[used]1152768F020Mamonsu PostgreSQL Linuxsystem.memory[cached]2100CC00020Mamonsu PostgreSQL Linuxsystem.memory[available]34FF5656020Mamonsu PostgreSQL Linuxsystem.memory[total]PostgreSQL pg_buffercache: Shared Buffer9002000.0100.0110100.00.000000200CC00020Mamonsu PostgreSQL Linuxpgsql.buffers[size]12006AAE020Mamonsu PostgreSQL Linuxpgsql.buffers[twice_used]22FF5656020Mamonsu PostgreSQL Linuxpgsql.buffers[dirty]PostgreSQL: Locks Sampling9002000.0100.0110100.00.000000200CC00020Mamonsu PostgreSQL Linuxpgsql.pg_locks[accessshare]123B415A020Mamonsu PostgreSQL Linuxpgsql.pg_locks[rowshare]22FF5656020Mamonsu PostgreSQL Linuxpgsql.pg_locks[rowexclusive]32F6CB93020Mamonsu PostgreSQL Linuxpgsql.pg_locks[shareupdateexclusive]42006AAE020Mamonsu PostgreSQL Linuxpgsql.pg_locks[share]5200B0B8020Mamonsu PostgreSQL Linuxpgsql.pg_locks[sharerowexclusive]629C8A4E020Mamonsu PostgreSQL Linuxpgsql.pg_locks[exclusive]72793F5D020Mamonsu PostgreSQL Linuxpgsql.pg_locks[accessexclusive]PostgreSQL Prepared Transactions: Overview9002000.0100.0110100.00.0000002A39B98020Mamonsu PostgreSQL Linuxpgsql.prepared.count129C8A4E120Mamonsu PostgreSQL Linuxpgsql.prepared.oldestSystem: Processes Overview9002000.0100.0110100.00.000000200CC00020Mamonsu PostgreSQL Linuxsystem.processes[running]12FF5656020Mamonsu PostgreSQL Linuxsystem.processes[blocked]22006AAE120Mamonsu PostgreSQL Linuxsystem.processes[forkrate]System: CPU Time Spent9002000.0100.0111100.00.000000200CC00020Mamonsu PostgreSQL Linuxsystem.cpu[user]12793F5D020Mamonsu PostgreSQL Linuxsystem.cpu[nice]229C8A4E020Mamonsu PostgreSQL Linuxsystem.cpu[system]32A39B98020Mamonsu PostgreSQL Linuxsystem.cpu[idle]42006AAE020Mamonsu PostgreSQL Linuxsystem.cpu[iowait]52FF5656020Mamonsu PostgreSQL Linuxsystem.cpu[irq]62F6CB93020Mamonsu PostgreSQL Linuxsystem.cpu[softirq]PostgreSQL Statements: Bytes9002000.0100.0110100.00.000000287C2B9020Mamonsu PostgreSQL Linuxpgsql.stat[read_bytes]12793F5D020Mamonsu PostgreSQL Linuxpgsql.stat[write_bytes]229C8A4E020Mamonsu PostgreSQL Linuxpgsql.stat[dirty_bytes]PostgreSQL Statements: Spent Time9002000.0100.0111100.00.000000287C2B9020Mamonsu PostgreSQL Linuxpgsql.stat[read_time]12793F5D020Mamonsu PostgreSQL Linuxpgsql.stat[write_time]229C8A4E020Mamonsu PostgreSQL Linuxpgsql.stat[other_time]PostgreSQL Statements: WAL Statistics9002000.0100.0110100.00.000000200B0B8020Mamonsu PostgreSQL Linuxpgsql.stat[wal_bytes]12006AAE020Mamonsu PostgreSQL Linuxpgsql.stat[wal_records]229C8A4E020Mamonsu PostgreSQL Linuxpgsql.stat[wal_fpi]PostgreSQL Wait Sampling: Locks by Type9002000.0100.0111100.00.000000287C2B9020Mamonsu PostgreSQL Linuxpgsql.all_lock[lwlock]12793F5D020Mamonsu PostgreSQL Linuxpgsql.all_lock[hwlock]2200B0B8020Mamonsu PostgreSQL Linuxpgsql.all_lock[buffer]329C8A4E020Mamonsu PostgreSQL Linuxpgsql.all_lock[extension]42F6CB93020Mamonsu PostgreSQL Linuxpgsql.all_lock[client]523B415A020Mamonsu PostgreSQL Linuxpgsql.all_lock[other]PostgreSQL Wait Sampling: Heavyweight Locks9002000.0100.0111100.00.000000287C2B9020Mamonsu PostgreSQL Linuxpgsql.hwlock[relation]123B415A020Mamonsu PostgreSQL Linuxpgsql.hwlock[extend]22F6CB93020Mamonsu PostgreSQL Linuxpgsql.hwlock[page]32006AAE020Mamonsu PostgreSQL Linuxpgsql.hwlock[tuple]4200B0B8020Mamonsu PostgreSQL Linuxpgsql.hwlock[transactionid]52793F5D020Mamonsu PostgreSQL Linuxpgsql.hwlock[virtualxid]629C8A4E020Mamonsu PostgreSQL Linuxpgsql.hwlock[speculative_token]72A39B98020Mamonsu PostgreSQL Linuxpgsql.hwlock[object]8252768F020Mamonsu PostgreSQL Linuxpgsql.hwlock[userlock]92FE9430020Mamonsu PostgreSQL Linuxpgsql.hwlock[advisory]PostgreSQL Wait Sampling: Lightweight Locks9002000.0100.0111100.00.0000002793F5D020Mamonsu PostgreSQL Linuxpgsql.lwlock[xid]1200B0B8020Mamonsu PostgreSQL Linuxpgsql.lwlock[autovacuum]2287C2B9020Mamonsu PostgreSQL Linuxpgsql.lwlock[wal]32006AAE020Mamonsu PostgreSQL Linuxpgsql.lwlock[clog]423B415A020Mamonsu PostgreSQL Linuxpgsql.lwlock[replication]529C8A4E020Mamonsu PostgreSQL Linuxpgsql.lwlock[logical_replication]62F6CB93020Mamonsu PostgreSQL Linuxpgsql.lwlock[buffer]72A39B98020Mamonsu PostgreSQL Linuxpgsql.lwlock[other] + \ No newline at end of file diff --git a/packaging/conf/template_agent.xml b/packaging/conf/template_agent.xml index 81d0fad..5d61f5a 100644 --- a/packaging/conf/template_agent.xml +++ b/packaging/conf/template_agent.xml @@ -21,12 +21,12 @@ Mamonsu PostgreSQL Linux - PostgreSQL Archiver: Files in archive_status Need to Archive Count000pgsql.archive_command.count_files_to_archive[{$PG_CONNINFO},{$PG_PATH}]736501530000100Mamonsu PostgreSQL LinuxPostgreSQL Archiver: Files Need to Archive Size000pgsql.archive_command.size_files_to_archive[{$PG_CONNINFO},{$PG_PATH}]73650153b0000100Mamonsu PostgreSQL LinuxPostgreSQL Archiver: Archived Files Count000pgsql.archive_command.archived_files[{$PG_CONNINFO},{$PG_PATH}]736501532000100Mamonsu PostgreSQL LinuxPostgreSQL Archiver: Attempts to Archive Files Count000pgsql.archive_command.failed_trying_to_archive[{$PG_CONNINFO},{$PG_PATH}]736501532000100Mamonsu PostgreSQL LinuxPostgreSQL bgwriter: Buffers Written During Checkpoints000pgsql.bgwriter.buffers_checkpoint[{$PG_CONNINFO},{$PG_PATH}]736501532000100Mamonsu PostgreSQL LinuxPostgreSQL bgwriter: Buffers Written000pgsql.bgwriter.buffers_clean[{$PG_CONNINFO},{$PG_PATH}]736501532000100Mamonsu PostgreSQL LinuxPostgreSQL bgwriter: Number of bgwriter Stopped by Max Write Count000pgsql.bgwriter.maxwritten_clean[{$PG_CONNINFO},{$PG_PATH}]736501532000100Mamonsu PostgreSQL LinuxPostgreSQL bgwriter: Buffers Written Directly by a Backend000pgsql.bgwriter.buffers_backend[{$PG_CONNINFO},{$PG_PATH}]736501532000100Mamonsu PostgreSQL LinuxPostgreSQL bgwriter: Times a Backend Execute Its Own Fsync000pgsql.bgwriter.buffers_backend_fsync[{$PG_CONNINFO},{$PG_PATH}]736501532000100Mamonsu PostgreSQL LinuxPostgreSQL bgwriter: Buffers Allocated000pgsql.bgwriter.buffers_alloc[{$PG_CONNINFO},{$PG_PATH}]736501532000100Mamonsu PostgreSQL LinuxPostgreSQL Checkpoints: by Timeout (in hour)000pgsql.checkpoint.count_timed[{$PG_CONNINFO},{$PG_PATH}]736501501000100Mamonsu PostgreSQL LinuxPostgreSQL Checkpoints: by WAL (in hour)000pgsql.checkpoint.count_wal[{$PG_CONNINFO},{$PG_PATH}]736501501000100Mamonsu PostgreSQL LinuxPostgreSQL Checkpoints: Write Time000pgsql.checkpoint.write_time[{$PG_CONNINFO},{$PG_PATH}]73650150ms1000100Mamonsu PostgreSQL LinuxPostgreSQL Checkpoints: Sync Time000pgsql.checkpoint.checkpoint_sync_time[{$PG_CONNINFO},{$PG_PATH}]73650150ms1000100Mamonsu PostgreSQL LinuxPostgreSQL Connections: Number of Total User Connections000pgsql.connections.total[{$PG_CONNINFO},{$PG_PATH}]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Connections: Number of Waiting User Connections000pgsql.connections.waiting[{$PG_CONNINFO},{$PG_PATH}]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Connections: Max Connections000pgsql.connections.max_connections[{$PG_CONNINFO},{$PG_PATH}]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Connections: Number of Active User Connections000pgsql.connections.active[{$PG_CONNINFO},{$PG_PATH}]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Connections: Number of Idle User Connections000pgsql.connections.idle[{$PG_CONNINFO},{$PG_PATH}]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Connections: Number of Idle in Transaction User Connections000pgsql.connections.idle_in_transaction[{$PG_CONNINFO},{$PG_PATH}]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Connections: Number of Idle in Transaction (Aborted) User Connections000pgsql.connections.idle_in_transaction_aborted[{$PG_CONNINFO},{$PG_PATH}]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Connections: Number of Fastpath Function Call User Connections000pgsql.connections.fastpath_function_call[{$PG_CONNINFO},{$PG_PATH}]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Connections: Number of Disabled User Connections000pgsql.connections.disabled[{$PG_CONNINFO},{$PG_PATH}]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Connections: Number of Other Connections000pgsql.connections.other[{$PG_CONNINFO},{$PG_PATH}]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Autovacuum: Count of Autovacuum Workers000pgsql.autovacumm.count[{$PG_CONNINFO},{$PG_PATH}]736501500000100Mamonsu PostgreSQL LinuxSystem: Block Devices Read Requests000system.disk.all_read736501501000100Mamonsu PostgreSQL LinuxSystem: Block Devices Write Requests000system.disk.all_write736501501000100Mamonsu PostgreSQL LinuxSystem: Block Devices Read byte/s000system.disk.all_read_b736501501000100Mamonsu PostgreSQL LinuxSystem: Block Devices Write byte/s000system.disk.all_write_b736501501000100Mamonsu PostgreSQL LinuxMamonsu: Plugin Keep Alive000mamonsu.plugin.keepalive736506000000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Transactions Committed000pgsql.transactions.committed[{$PG_CONNINFO},{$PG_PATH}]736501501000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Server Mode000pgsql.server_mode736501540000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Rollback Events000pgsql.events.xact_rollback[{$PG_CONNINFO},{$PG_PATH}]736501501000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Server Mode000pgsql.server_mode736501540000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Blocks Hit000pgsql.blocks.hit[{$PG_CONNINFO},{$PG_PATH}]736501501000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Server Mode000pgsql.server_mode736501540000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Blocks Read000pgsql.blocks.read[{$PG_CONNINFO},{$PG_PATH}]736501501000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Server Mode000pgsql.server_mode736501540000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Conflict Events000pgsql.events.conflicts[{$PG_CONNINFO},{$PG_PATH}]736501502000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Server Mode000pgsql.server_mode736501540000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Deadlock Events000pgsql.events.deadlocks[{$PG_CONNINFO},{$PG_PATH}]736501502000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Server Mode000pgsql.server_mode736501540000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Temp Bytes Written000pgsql.temp.bytes[{$PG_CONNINFO},{$PG_PATH}]73650150b2000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Server Mode000pgsql.server_mode736501540000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Temp Files Created000pgsql.temp.files[{$PG_CONNINFO},{$PG_PATH}]736501502000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Server Mode000pgsql.server_mode736501540000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Tuples Deleted000pgsql.tuples.deleted[{$PG_CONNINFO},{$PG_PATH}]736501501000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Server Mode000pgsql.server_mode736501540000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Tuples Fetched000pgsql.tuples.fetched[{$PG_CONNINFO},{$PG_PATH}]736501501000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Server Mode000pgsql.server_mode736501540000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Tuples Inserted000pgsql.tuples.inserted[{$PG_CONNINFO},{$PG_PATH}]736501501000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Server Mode000pgsql.server_mode736501540000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Tuples Returned000pgsql.tuples.returned[{$PG_CONNINFO},{$PG_PATH}]736501501000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Server Mode000pgsql.server_mode736501540000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Tuples Updated000pgsql.tuples.updated[{$PG_CONNINFO},{$PG_PATH}]736501501000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Server Mode000pgsql.server_mode736501540000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: checksum_failures Events000pgsql.events.checksum_failures[{$PG_CONNINFO},{$PG_PATH}]736501502000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Server Mode000pgsql.server_mode736501540000100Mamonsu PostgreSQL LinuxSystem: Load Average Over 1 Minute000system.la.1736501500000100Mamonsu PostgreSQL LinuxSystem: Active - Memory Recently Used000system.memory.active73650153b0000100Mamonsu PostgreSQL LinuxSystem: Available - Free Memory000system.memory.available73650153b0000100Mamonsu PostgreSQL LinuxSystem: Buffers - Block Device Cache and Dirty000system.memory.buffers73650153b0000100Mamonsu PostgreSQL LinuxSystem: Cached - Parked File Data (file content) Cache000system.memory.cached73650153b0000100Mamonsu PostgreSQL LinuxSystem: Committed AS - Total Committed Memory000system.memory.committed73650153b0000100Mamonsu PostgreSQL LinuxSystem: Inactive - Memory Not Currently Used000system.memory.inactive73650153b0000100Mamonsu PostgreSQL LinuxSystem: Mapped - All mmap()ed Pages000system.memory.mapped73650153b0000100Mamonsu PostgreSQL LinuxSystem: PageTables - Map bt Virtual and Physical000system.memory.page_tables73650153b0000100Mamonsu PostgreSQL LinuxSystem: Slab - Kernel Used Memory (inode cache)000system.memory.slab73650153b0000100Mamonsu PostgreSQL LinuxSystem: Swap - Swap Space Used000system.memory.swap73650153b0000100Mamonsu PostgreSQL LinuxSystem: SwapCached - Fetched unmod Yet Swap Pages000system.memory.swap_cache73650153b0000100Mamonsu PostgreSQL LinuxSystem: Total - All Memory000system.memory.total73650153b0000100Mamonsu PostgreSQL LinuxSystem: Unused - Wasted Memory000system.memory.unused73650153b0000100Mamonsu PostgreSQL LinuxSystem: Used - User-Space Applications000system.memory.used73650153b0000100Mamonsu PostgreSQL LinuxSystem: VMallocUsed - vmaloc() Allocated by Kernel000system.memory.vmalloc_used73650153b0000100Mamonsu PostgreSQL LinuxPostgreSQL Memory Leak: Number of Pids Which Private Anonymous Memory Exceeds private_anon_mem_threshold000pgsql.memory_leak_diagnostic.count_diff[]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Memory Leak: Number of Pids Which Private Anonymous Memory Exceeds private_anon_mem_threshold, text of message000pgsql.memory_leak_diagnostic.msg_text[]736501540000100Mamonsu PostgreSQL LinuxPostgreSQL Transactions: Age of the Oldest XID000pgsql.oldest.xid_age[{$PG_CONNINFO},{$PG_PATH}]736501530000100Mamonsu PostgreSQL LinuxPostgreSQL Transactions: the Oldest Transaction Running Time in sec000pgsql.oldest.transaction_time[{$PG_CONNINFO},{$PG_PATH}]73650150s0000100Mamonsu PostgreSQL LinuxPostgreSQL Transactions: Number of Parallel Queries Being Executed Now000pgsql.parallel.queries[{$PG_CONNINFO},{$PG_PATH}]736501530000100Mamonsu PostgreSQL LinuxSystem: Opened Files000system.open_files736501530000100Mamonsu PostgreSQL LinuxPostgreSQL pg_buffercache: Shared Buffer Size000pgsql.buffers.size[{$PG_CONNINFO},{$PG_PATH}]73650150b0000100Mamonsu PostgreSQL LinuxPostgreSQL pg_buffercache: Shared Buffer Twice Used Size000pgsql.buffers.twice_used[{$PG_CONNINFO},{$PG_PATH}]73650150b0000100Mamonsu PostgreSQL LinuxPostgreSQL pg_buffercache: Shared Buffer Dirty Size000pgsql.buffers.dirty[{$PG_CONNINFO},{$PG_PATH}]73650150b0000100Mamonsu PostgreSQL LinuxPostgreSQL Health: Ping000pgsql.ping[{$PG_CONNINFO},{$PG_PATH}]7365050ms0000100Mamonsu PostgreSQL LinuxPostgreSQL Health: Cache Hit Ratio1500pgsql.cache.hit[{$PG_CONNINFO},{$PG_PATH}]73650600%00001last(pgsql.blocks[hit])*100/(last(pgsql.blocks[hit])+last(pgsql.blocks[read]))00Mamonsu PostgreSQL LinuxPostgreSQL Health: Service Uptime000pgsql.uptime[{$PG_CONNINFO},{$PG_PATH}]7365050unixtime0000100Mamonsu PostgreSQL LinuxPostgreSQL Health: Server Version000pgsql.version[{$PG_CONNINFO},{$PG_PATH}]73650540000100Mamonsu PostgreSQL LinuxPostgreSQL Locks: Read Only Queries000pgsql.pg_locks.accessshare[{$PG_CONNINFO},{$PG_PATH}]736501530000100Mamonsu PostgreSQL LinuxPostgreSQL Locks: SELECT FOR SHARE and SELECT FOR UPDATE000pgsql.pg_locks.rowshare[{$PG_CONNINFO},{$PG_PATH}]736501530000100Mamonsu PostgreSQL LinuxPostgreSQL Locks: Write Queries000pgsql.pg_locks.rowexclusive[{$PG_CONNINFO},{$PG_PATH}]736501530000100Mamonsu PostgreSQL LinuxPostgreSQL Locks: VACUUM, ANALYZE, CREATE INDEX CONCURRENTLY000pgsql.pg_locks.shareupdateexclusive[{$PG_CONNINFO},{$PG_PATH}]736501530000100Mamonsu PostgreSQL LinuxPostgreSQL Locks: CREATE INDEX000pgsql.pg_locks.share[{$PG_CONNINFO},{$PG_PATH}]736501530000100Mamonsu PostgreSQL LinuxPostgreSQL Locks: Locks from Application000pgsql.pg_locks.sharerowexclusive[{$PG_CONNINFO},{$PG_PATH}]736501530000100Mamonsu PostgreSQL LinuxPostgreSQL Locks: Locks from Application or Some Operations on System Catalogs000pgsql.pg_locks.exclusive[{$PG_CONNINFO},{$PG_PATH}]736501530000100Mamonsu PostgreSQL LinuxPostgreSQL Locks: ALTER TABLE, DROP TABLE, TRUNCATE, REINDEX, CLUSTER, VACUUM FULL, LOCK TABLE000pgsql.pg_locks.accessexclusive[{$PG_CONNINFO},{$PG_PATH}]736501530000100Mamonsu PostgreSQL LinuxPostgreSQL Prepared Transactions: Number of Prepared Transactions000pgsql.prepared.count736506000000100Mamonsu PostgreSQL LinuxPostgreSQL Prepared Transactions: the Oldest Prepared Transaction Running Time in sec000pgsql.prepared.oldest736501500000100Mamonsu PostgreSQL LinuxSystem: Processes in State Running000system.processes.running736501500000100Mamonsu PostgreSQL LinuxSystem: Processes in State Blocked000system.processes.blocked736501500000100Mamonsu PostgreSQL LinuxSystem: Processes Forkrate000system.processes.forkrate736501501000100Mamonsu PostgreSQL LinuxSystem: CPU Time Spent by Normal Programs and Daemons000system.cpu.user736501501000100Mamonsu PostgreSQL LinuxSystem: CPU Time Spent by nice(1)d Programs000system.cpu.nice736501501000100Mamonsu PostgreSQL LinuxSystem: CPU Time Spent by the Kernel in System Activities000system.cpu.system736501501000100Mamonsu PostgreSQL LinuxSystem: CPU Time Spent Idle000system.cpu.idle736501501000100Mamonsu PostgreSQL LinuxSystem: CPU Time Spent Waiting for I/O Operations000system.cpu.iowait736501501000100Mamonsu PostgreSQL LinuxSystem: CPU Time Spent Handling Interrupts000system.cpu.irq736501501000100Mamonsu PostgreSQL LinuxSystem: CPU Time Spent Handling Batched Interrupts000system.cpu.softirq736501501000100Mamonsu PostgreSQL LinuxPostgreSQL Replication: Streaming Replication Lag000pgsql.replication_lag.sec[{$PG_CONNINFO},{$PG_PATH}]736506000000100Mamonsu PostgreSQL LinuxPostgreSQL Replication: Count Non-Active Replication Slots000pgsql.replication.non_active_slots[{$PG_CONNINFO},{$PG_PATH}]736506030000100Mamonsu PostgreSQL LinuxPostgreSQL Statements: Read bytes/s000pgsql.stat.read_bytes[{$PG_CONNINFO},{$PG_PATH}]73650150Bps1000100Mamonsu PostgreSQL LinuxPostgreSQL Statements: Write bytes/s000pgsql.stat.write_bytes[{$PG_CONNINFO},{$PG_PATH}]73650150Bps1000100Mamonsu PostgreSQL LinuxPostgreSQL Statements: Dirty bytes/s000pgsql.stat.dirty_bytes[{$PG_CONNINFO},{$PG_PATH}]73650150Bps1000100Mamonsu PostgreSQL LinuxPostgreSQL Statements: Read IO Time000pgsql.stat.read_time[{$PG_CONNINFO},{$PG_PATH}]73650150s1000100Mamonsu PostgreSQL LinuxPostgreSQL Statements: Write IO Time000pgsql.stat.write_time[{$PG_CONNINFO},{$PG_PATH}]73650150s1000100Mamonsu PostgreSQL LinuxPostgreSQL Statements: Other (mostly CPU) Time000pgsql.stat.other_time[{$PG_CONNINFO},{$PG_PATH}]73650150s1000100Mamonsu PostgreSQL LinuxPostgreSQL Statements: Amount of WAL Files000pgsql.stat.wal_bytes[{$PG_CONNINFO},{$PG_PATH}]73650150Bps1000100Mamonsu PostgreSQL LinuxPostgreSQL Statements: Amount of WAL Records000pgsql.stat.wal_records[{$PG_CONNINFO},{$PG_PATH}]736501501000100Mamonsu PostgreSQL LinuxPostgreSQL Statements: Full Page Writes000pgsql.stat.wal_fpi[{$PG_CONNINFO},{$PG_PATH}]736501501000100Mamonsu PostgreSQL LinuxPostgreSQL Statements: Nnumber of Times pg_stat_statements.max Was Exceeded000pgsql.stat_info.dealloc[{$PG_CONNINFO},{$PG_PATH}]736501501000100Mamonsu PostgreSQL LinuxPostgreSQL Statements: Last Statistics Reset Time000pgsql.stat_info.stats_reset[{$PG_CONNINFO},{$PG_PATH}]73650150unixtime1000100Mamonsu PostgreSQL LinuxSystem: Uptime000system.uptime73650153uptime0000100Mamonsu PostgreSQL LinuxPostgreSQL WAL: Write Speed000pgsql.wal.write[{$PG_CONNINFO},{$PG_PATH}]73650600Bps1000100Mamonsu PostgreSQL LinuxPostgreSQL WAL: Count of WAL Files000pgsql.wal.count[{$PG_CONNINFO},{$PG_PATH}]736506000000100Mamonsu PostgreSQL LinuxPostgreSQL WAL: Records Generated000pgsql.wal.records.count[{$PG_CONNINFO},{$PG_PATH}]736506001000100Mamonsu PostgreSQL LinuxPostgreSQL WAL: Full Page Images Generated000pgsql.wal.fpi.count[{$PG_CONNINFO},{$PG_PATH}]736506001000100Mamonsu PostgreSQL LinuxPostgreSQL WAL: Buffers Full000pgsql.wal.buffers_full736506001000100Mamonsu PostgreSQL LinuxPostgreSQL WAL: Write Time (ms)000pgsql.wal.write_time736506001000100Mamonsu PostgreSQL LinuxPostgreSQL WAL: Sync Time (ms)000pgsql.wal.sync_time736506001000100Mamonsu PostgreSQL LinuxPostgreSQL WAL: Sync Duty (%)1500pgsql.wal.sync_duty73650600%00001last(pgsql.wal.sync_time)/1000Mamonsu PostgreSQL Linux - PostgreSQL Databases Discovery060000007pgsql.database.discovery[{$PG_CONNINFO},{$PG_PATH}]{#DATABASE}.*8A0PostgreSQL Databases {#DATABASE}: size000pgsql.database.size[{#DATABASE},{$PG_CONNINFO},{$PG_PATH}]73650153b0000100Mamonsu PostgreSQL LinuxPostgreSQL Databases: Max datfrozenxid Age in: {#DATABASE}000pgsql.database.max_age[{#DATABASE},{$PG_CONNINFO},{$PG_PATH}]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Databases: Count of Bloating Tables in {#DATABASE}000pgsql.database.bloating_tables[{#DATABASE},{$PG_CONNINFO},{$PG_PATH}]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Databases: Count of Invalid Indexes in {#DATABASE}000pgsql.database.invalid_indexes[{#DATABASE},{$PG_CONNINFO},{$PG_PATH}]736501500000100Mamonsu PostgreSQL Linux{Mamonsu PostgreSQL Linux:pgsql.database.invalid_indexes[{#DATABASE}].last()}>0PostgreSQL Databases: invalid indexes in {#DATABASE} (hostname={HOSTNAME} value={ITEM.LASTVALUE})030PostgreSQL Databases: {#DATABASE} size9002000.0100.0111100.00.0000002A39B98020Mamonsu PostgreSQL Linuxpgsql.database.size[{#DATABASE},{$PG_CONNINFO},{$PG_PATH}]PostgreSQL Databases: {#DATABASE} Bloating Overview9002000.0100.0110100.00.000000287C2B9020Mamonsu PostgreSQL Linuxpgsql.database.bloating_tables[{#DATABASE},{$PG_CONNINFO},{$PG_PATH}]12793F5D120Mamonsu PostgreSQL Linuxpgsql.autovacumm.count[{$PG_CONNINFO},{$PG_PATH}]PostgreSQL Databases: {#DATABASE} Max age(datfrozenxid)9002000.0100.0110100.00.000000287C2B9020Mamonsu PostgreSQL Linuxpgsql.database.max_age[{#DATABASE},{$PG_CONNINFO},{$PG_PATH}]12793F5D120Mamonsu PostgreSQL Linuxpgsql.autovacumm.count[{$PG_CONNINFO},{$PG_PATH}]VFS Discovery060000007system.vfs.discovery{#MOUNTPOINT}.*8A0System: Mount Point {#MOUNTPOINT} Used000system.vfs.used[{#MOUNTPOINT}]73650153b0000100Mamonsu PostgreSQL LinuxSystem: Mount Point {#MOUNTPOINT} Free000system.vfs.free[{#MOUNTPOINT}]73650153b0000100Mamonsu PostgreSQL LinuxSystem: Mount Point {#MOUNTPOINT} Free in Percents000system.vfs.percent_free[{#MOUNTPOINT}]73650150%0000100Mamonsu PostgreSQL Linux{Mamonsu PostgreSQL Linux:system.vfs.percent_free[{#MOUNTPOINT}].last()}<10Free disk space less than 10% on mountpoint {#MOUNTPOINT} (hostname={HOSTNAME} value={ITEM.LASTVALUE})030System: Mount Point Overview {#MOUNTPOINT}9002000.0100.0111100.00.0000002FF5656020Mamonsu PostgreSQL Linuxsystem.vfs.used[{#MOUNTPOINT}]1200CC00020Mamonsu PostgreSQL Linuxsystem.vfs.free[{#MOUNTPOINT}]System: Block Devices Discovery060000007system.disk.discovery{#BLOCKDEVICE}.*8A0System: Block Device {#BLOCKDEVICE} Utilization000system.disk.utilization[{#BLOCKDEVICE}]73650150%1000100Mamonsu PostgreSQL LinuxSystem: Block Device {#BLOCKDEVICE} Read Operations000system.disk.read[{#BLOCKDEVICE}]736501501000100Mamonsu PostgreSQL LinuxSystem: Block Device {#BLOCKDEVICE} Write Operations000system.disk.write[{#BLOCKDEVICE}]736501501000100Mamonsu PostgreSQL LinuxSystem: Block Device {#BLOCKDEVICE} Read byte/s000system.disk.read_b[{#BLOCKDEVICE}]73650150b1000100Mamonsu PostgreSQL LinuxSystem: Block Device {#BLOCKDEVICE} Write byte/s000system.disk.write_b[{#BLOCKDEVICE}]73650150b1000100Mamonsu PostgreSQL LinuxSystem: Block Device Overview {#BLOCKDEVICE} operations9002000.0100.0110100.00.000000200CC00020Mamonsu PostgreSQL Linuxsystem.disk.read[{#BLOCKDEVICE}]12FF5656020Mamonsu PostgreSQL Linuxsystem.disk.write[{#BLOCKDEVICE}]22006AAE120Mamonsu PostgreSQL Linuxsystem.disk.utilization[{#BLOCKDEVICE}]System: Block Device Overview {#BLOCKDEVICE} byte/s9002000.0100.0110100.00.000000200CC00020Mamonsu PostgreSQL Linuxsystem.disk.read_b[{#BLOCKDEVICE}]12FF5656020Mamonsu PostgreSQL Linuxsystem.disk.write_b[{#BLOCKDEVICE}]22006AAE120Mamonsu PostgreSQL Linuxsystem.disk.utilization[{#BLOCKDEVICE}]Net Iface Discovery060000007system.net.discovery{#NETDEVICE}.*8A0System: Network Device {#NETDEVICE} RX bytes/s000system.net.rx_bytes[{#NETDEVICE}]73650150b1000100Mamonsu PostgreSQL LinuxSystem: Network Device {#NETDEVICE} RX errors/s000system.net.rx_errs[{#NETDEVICE}]736501501000100Mamonsu PostgreSQL LinuxSystem: Network Device {#NETDEVICE} RX drops/s000system.net.rx_drop[{#NETDEVICE}]736501501000100Mamonsu PostgreSQL LinuxSystem: Network Device {#NETDEVICE} TX bytes/s000system.net.tx_bytes[{#NETDEVICE}]73650150b1000100Mamonsu PostgreSQL LinuxSystem: Network Device {#NETDEVICE} TX errors/s000system.net.tx_errs[{#NETDEVICE}]736501501000100Mamonsu PostgreSQL LinuxSystem: Network Device {#NETDEVICE} TX drops/s000system.net.tx_drop[{#NETDEVICE}]736501501000100Mamonsu PostgreSQL LinuxSystem: Network Device {#NETDEVICE}9002000.0100.0110100.00.000000287C2B9020Mamonsu PostgreSQL Linuxsystem.net.rx_bytes[{#NETDEVICE}]12793F5D020Mamonsu PostgreSQL Linuxsystem.net.tx_bytes[{#NETDEVICE}]pg_probackup discovery060000007pg_probackup.discovery[]{#BACKUPDIR}.*8A0pg_probackup dir {#BACKUPDIR}: size000pg_probackup.dir.size[{#BACKUPDIR}]736503003b0000100Mamonsu PostgreSQL Linuxpg_probackup dir {#BACKUPDIR}: error000pg_probackup.dir.error[{#BACKUPDIR}]7365030040000100Mamonsu PostgreSQL Linux{Mamonsu PostgreSQL Linux:pg_probackup.dir.error[{#BACKUPDIR}].str(ok)}<>1Error in pg_probackup dir {#BACKUPDIR} (hostname={HOSTNAME} value={ITEM.LASTVALUE})030pg_probackup backup dir: {#BACKUPDIR} size9002000.0100.0111100.00.0000002A39B98020Mamonsu PostgreSQL Linuxpg_probackup.dir.size[{#BACKUPDIR}]PostgreSQL Relations Sizes Discovery060000007pgsql.relation.size[{$PG_CONNINFO},{$PG_PATH}]{#RELATIONNAME}.*8A0PostgreSQL Relation Size: {#RELATIONNAME}000pgsql.relation.size[{#RELATIONNAME},{$PG_CONNINFO},{$PG_PATH}]73650153b0000100Mamonsu PostgreSQL LinuxPostgreSQL Relation Size: {#RELATIONNAME}9002000.0100.0111100.00.0000002A39B98020Mamonsu PostgreSQL Linuxpgsql.relation.size[{#RELATIONNAME},{$PG_CONNINFO},{$PG_PATH}]PostgreSQL Replication Lag Discovery060000007pgsql.replication.discovery[{$PG_CONNINFO},{$PG_PATH}]{#APPLICATION_NAME}.*8A0PostgreSQL Replication: {#APPLICATION_NAME} Send Lag - Time elapsed sending recent WAL locally000pgsql.replication.send_lag[{#APPLICATION_NAME},{$PG_CONNINFO},{$PG_PATH}]736506000000100Mamonsu PostgreSQL LinuxPostgreSQL Replication: {#APPLICATION_NAME} Receive Lag - Time elapsed between receiving recent WAL locally and receiving notification that this standby server has flushed it000pgsql.replication.receive_lag[{#APPLICATION_NAME},{$PG_CONNINFO},{$PG_PATH}]736506000000100Mamonsu PostgreSQL LinuxPostgreSQL Replication: {#APPLICATION_NAME} Write Lag - Time elapsed between flushing recent WAL locally and receiving notification that this standby server has written it000pgsql.replication.write_lag[{#APPLICATION_NAME},{$PG_CONNINFO},{$PG_PATH}]736506000000100Mamonsu PostgreSQL LinuxPostgreSQL Replication: {#APPLICATION_NAME} Flush Lag - Time elapsed between flushing recent WAL locally and receiving notification that this standby server has written and flushed it000pgsql.replication.flush_lag[{#APPLICATION_NAME},{$PG_CONNINFO},{$PG_PATH}]736506000000100Mamonsu PostgreSQL LinuxPostgreSQL Replication: {#APPLICATION_NAME} Replay Lag - Time elapsed between flushing recent WAL locally and receiving notification that this standby server has written, flushed and applied000pgsql.replication.replay_lag[{#APPLICATION_NAME},{$PG_CONNINFO},{$PG_PATH}]736506000000100Mamonsu PostgreSQL LinuxPostgreSQL Replication: {#APPLICATION_NAME} Delta of Total Lag000pgsql.replication.total_lag[{#APPLICATION_NAME},{$PG_CONNINFO},{$PG_PATH}]736506000000100Mamonsu PostgreSQL LinuxPostgreSQL Replication: Delta of Total Lag for {#APPLICATION_NAME}9002000.0100.0110100.00.0000000A39B98020Mamonsu PostgreSQL Linuxpgsql.replication.total_lag[{#APPLICATION_NAME},{$PG_CONNINFO},{$PG_PATH}] + PostgreSQL Archiver: Files in archive_status Need to Archive Count000pgsql.archive_command.count_files_to_archive[{$PG_CONNINFO},{$PG_PATH}]736506030000100Mamonsu PostgreSQL LinuxPostgreSQL Archiver: Files Need to Archive Size000pgsql.archive_command.size_files_to_archive[{$PG_CONNINFO},{$PG_PATH}]73650603b0000100Mamonsu PostgreSQL LinuxPostgreSQL Archiver: Archived Files Count000pgsql.archive_command.archived_files[{$PG_CONNINFO},{$PG_PATH}]736506032000100Mamonsu PostgreSQL LinuxPostgreSQL Archiver: Attempts to Archive Files Count000pgsql.archive_command.failed_trying_to_archive[{$PG_CONNINFO},{$PG_PATH}]736506032000100Mamonsu PostgreSQL LinuxPostgreSQL Autovacuum: Count of Autovacuum Workers000pgsql.autovacuum.count[{$PG_CONNINFO},{$PG_PATH}]736503000000100Mamonsu PostgreSQL LinuxPostgreSQL Autovacuum: Utilization per 30 seconds000pgsql.autovacuum.utilization[{$PG_CONNINFO},{$PG_PATH}]73650300%0000100Mamonsu PostgreSQL LinuxPostgreSQL Autovacuum: Average Utilization per 5 minutes1500pgsql.autovacuum.utilization.avg5[{$PG_CONNINFO},{$PG_PATH}]73650300%00001avg(pgsql.autovacuum.utilization[], 5m)00Mamonsu PostgreSQL LinuxPostgreSQL Autovacuum: Average Utilization per 15 minutes1500pgsql.autovacuum.utilization.avg15[{$PG_CONNINFO},{$PG_PATH}]73650300%00001avg(pgsql.autovacuum.utilization[], 15m)00Mamonsu PostgreSQL LinuxPostgreSQL Autovacuum: Average Utilization per 30 minutes1500pgsql.autovacuum.utilization.avg30[{$PG_CONNINFO},{$PG_PATH}]73650300%00001avg(pgsql.autovacuum.utilization[], 30m)00Mamonsu PostgreSQL LinuxPostgreSQL bgwriter: Buffers Written During Checkpoints000pgsql.bgwriter.buffers_checkpoint[{$PG_CONNINFO},{$PG_PATH}]736506032000100Mamonsu PostgreSQL LinuxPostgreSQL bgwriter: Buffers Written000pgsql.bgwriter.buffers_clean[{$PG_CONNINFO},{$PG_PATH}]736506032000100Mamonsu PostgreSQL LinuxPostgreSQL bgwriter: Number of bgwriter Stopped by Max Write Count000pgsql.bgwriter.maxwritten_clean[{$PG_CONNINFO},{$PG_PATH}]736506032000100Mamonsu PostgreSQL LinuxPostgreSQL bgwriter: Buffers Written Directly by a Backend000pgsql.bgwriter.buffers_backend[{$PG_CONNINFO},{$PG_PATH}]736506032000100Mamonsu PostgreSQL LinuxPostgreSQL bgwriter: Times a Backend Execute Its Own Fsync000pgsql.bgwriter.buffers_backend_fsync[{$PG_CONNINFO},{$PG_PATH}]736506032000100Mamonsu PostgreSQL LinuxPostgreSQL bgwriter: Buffers Allocated000pgsql.bgwriter.buffers_alloc[{$PG_CONNINFO},{$PG_PATH}]736506032000100Mamonsu PostgreSQL LinuxPostgreSQL Checkpoints: by Timeout (in hour)000pgsql.checkpoint.count_timed[{$PG_CONNINFO},{$PG_PATH}]7365030001000100Mamonsu PostgreSQL LinuxPostgreSQL Checkpoints: by WAL (in hour)000pgsql.checkpoint.count_wal[{$PG_CONNINFO},{$PG_PATH}]7365030001000100Mamonsu PostgreSQL LinuxPostgreSQL Checkpoints: Write Time000pgsql.checkpoint.write_time[{$PG_CONNINFO},{$PG_PATH}]736503000ms1000100Mamonsu PostgreSQL LinuxPostgreSQL Checkpoints: Sync Time000pgsql.checkpoint.checkpoint_sync_time[{$PG_CONNINFO},{$PG_PATH}]736503000ms1000100Mamonsu PostgreSQL LinuxPostgreSQL Connections: Number of Total User Connections000pgsql.connections.total[{$PG_CONNINFO},{$PG_PATH}]736506000000100Mamonsu PostgreSQL LinuxPostgreSQL Connections: Number of Waiting User Connections000pgsql.connections.waiting[{$PG_CONNINFO},{$PG_PATH}]736506000000100Mamonsu PostgreSQL LinuxPostgreSQL Connections: Max Connections000pgsql.connections.max_connections[{$PG_CONNINFO},{$PG_PATH}]736506000000100Mamonsu PostgreSQL LinuxPostgreSQL Connections: Number of Active User Connections000pgsql.connections.active[{$PG_CONNINFO},{$PG_PATH}]736506000000100Mamonsu PostgreSQL LinuxPostgreSQL Connections: Number of Idle User Connections000pgsql.connections.idle[{$PG_CONNINFO},{$PG_PATH}]736506000000100Mamonsu PostgreSQL LinuxPostgreSQL Connections: Number of Idle in Transaction User Connections000pgsql.connections.idle_in_transaction[{$PG_CONNINFO},{$PG_PATH}]736506000000100Mamonsu PostgreSQL LinuxPostgreSQL Connections: Number of Idle in Transaction (Aborted) User Connections000pgsql.connections.idle_in_transaction_aborted[{$PG_CONNINFO},{$PG_PATH}]736506000000100Mamonsu PostgreSQL LinuxPostgreSQL Connections: Number of Fastpath Function Call User Connections000pgsql.connections.fastpath_function_call[{$PG_CONNINFO},{$PG_PATH}]736506000000100Mamonsu PostgreSQL LinuxPostgreSQL Connections: Number of Disabled User Connections000pgsql.connections.disabled[{$PG_CONNINFO},{$PG_PATH}]736506000000100Mamonsu PostgreSQL LinuxPostgreSQL Connections: Number of Other Connections000pgsql.connections.other[{$PG_CONNINFO},{$PG_PATH}]736506000000100Mamonsu PostgreSQL LinuxSystem: Block Devices Read Requests000system.disk.all_read736506001000100Mamonsu PostgreSQL LinuxSystem: Block Devices Write Requests000system.disk.all_write736506001000100Mamonsu PostgreSQL LinuxSystem: Block Devices Read byte/s000system.disk.all_read_b736506001000100Mamonsu PostgreSQL LinuxSystem: Block Devices Write byte/s000system.disk.all_write_b736506001000100Mamonsu PostgreSQL LinuxMamonsu: Plugin Keep Alive000mamonsu.plugin.keepalive736506000000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Transactions Committed000pgsql.transactions.committed[{$PG_CONNINFO},{$PG_PATH}]736506001000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Server Mode000pgsql.server_mode736506040000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Rollback Events000pgsql.events.xact_rollback[{$PG_CONNINFO},{$PG_PATH}]736506001000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Server Mode000pgsql.server_mode736506040000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Blocks Hit000pgsql.blocks.hit[{$PG_CONNINFO},{$PG_PATH}]736506001000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Server Mode000pgsql.server_mode736506040000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Blocks Read000pgsql.blocks.read[{$PG_CONNINFO},{$PG_PATH}]736506001000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Server Mode000pgsql.server_mode736506040000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Conflict Events000pgsql.events.conflicts[{$PG_CONNINFO},{$PG_PATH}]736506002000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Server Mode000pgsql.server_mode736506040000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Deadlock Events000pgsql.events.deadlocks[{$PG_CONNINFO},{$PG_PATH}]736506002000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Server Mode000pgsql.server_mode736506040000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Temp Bytes Written000pgsql.temp.bytes[{$PG_CONNINFO},{$PG_PATH}]73650600b2000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Server Mode000pgsql.server_mode736506040000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Temp Files Created000pgsql.temp.files[{$PG_CONNINFO},{$PG_PATH}]736506002000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Server Mode000pgsql.server_mode736506040000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Tuples Deleted000pgsql.tuples.deleted[{$PG_CONNINFO},{$PG_PATH}]736506001000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Server Mode000pgsql.server_mode736506040000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Tuples Fetched000pgsql.tuples.fetched[{$PG_CONNINFO},{$PG_PATH}]736506001000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Server Mode000pgsql.server_mode736506040000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Tuples Inserted000pgsql.tuples.inserted[{$PG_CONNINFO},{$PG_PATH}]736506001000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Server Mode000pgsql.server_mode736506040000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Tuples Returned000pgsql.tuples.returned[{$PG_CONNINFO},{$PG_PATH}]736506001000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Server Mode000pgsql.server_mode736506040000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Tuples Updated000pgsql.tuples.updated[{$PG_CONNINFO},{$PG_PATH}]736506001000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Server Mode000pgsql.server_mode736506040000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: checksum_failures Events000pgsql.events.checksum_failures[{$PG_CONNINFO},{$PG_PATH}]736506002000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Server Mode000pgsql.server_mode736506040000100Mamonsu PostgreSQL LinuxSystem: Load Average Over 1 Minute000system.la.1736506000000100Mamonsu PostgreSQL LinuxSystem: Active - Memory Recently Used000system.memory.active73650603b0000100Mamonsu PostgreSQL LinuxSystem: Available - Free Memory000system.memory.available73650603b0000100Mamonsu PostgreSQL LinuxSystem: Buffers - Block Device Cache and Dirty000system.memory.buffers73650603b0000100Mamonsu PostgreSQL LinuxSystem: Cached - Parked File Data (file content) Cache000system.memory.cached73650603b0000100Mamonsu PostgreSQL LinuxSystem: Committed AS - Total Committed Memory000system.memory.committed73650603b0000100Mamonsu PostgreSQL LinuxSystem: Inactive - Memory Not Currently Used000system.memory.inactive73650603b0000100Mamonsu PostgreSQL LinuxSystem: Mapped - All mmap()ed Pages000system.memory.mapped73650603b0000100Mamonsu PostgreSQL LinuxSystem: PageTables - Map bt Virtual and Physical000system.memory.page_tables73650603b0000100Mamonsu PostgreSQL LinuxSystem: Slab - Kernel Used Memory (inode cache)000system.memory.slab73650603b0000100Mamonsu PostgreSQL LinuxSystem: Swap - Swap Space Used000system.memory.swap73650603b0000100Mamonsu PostgreSQL LinuxSystem: SwapCached - Fetched unmod Yet Swap Pages000system.memory.swap_cache73650603b0000100Mamonsu PostgreSQL LinuxSystem: Total - All Memory000system.memory.total73650603b0000100Mamonsu PostgreSQL LinuxSystem: Unused - Wasted Memory000system.memory.unused73650603b0000100Mamonsu PostgreSQL LinuxSystem: Used - User-Space Applications000system.memory.used73650603b0000100Mamonsu PostgreSQL LinuxSystem: VMallocUsed - vmaloc() Allocated by Kernel000system.memory.vmalloc_used73650603b0000100Mamonsu PostgreSQL LinuxPostgreSQL Memory Leak: Number of Pids Which Private Anonymous Memory Exceeds private_anon_mem_threshold000pgsql.memory_leak_diagnostic.count_diff[]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Memory Leak: Number of Pids Which Private Anonymous Memory Exceeds private_anon_mem_threshold, text of message000pgsql.memory_leak_diagnostic.msg_text[]736501540000100Mamonsu PostgreSQL LinuxPostgreSQL Transactions: Age of the Oldest XID000pgsql.oldest.xid_age[{$PG_CONNINFO},{$PG_PATH}]736506030000100Mamonsu PostgreSQL LinuxPostgreSQL Transactions: the Oldest Transaction Running Time in sec000pgsql.oldest.transaction_time[{$PG_CONNINFO},{$PG_PATH}]73650600s0000100Mamonsu PostgreSQL LinuxPostgreSQL Transactions: Number of Parallel Queries Being Executed Now000pgsql.parallel.queries[{$PG_CONNINFO},{$PG_PATH}]736506030000100Mamonsu PostgreSQL LinuxSystem: Opened Files000system.open_files736506030000100Mamonsu PostgreSQL LinuxPostgreSQL pg_buffercache: Shared Buffer Size000pgsql.buffers.size[{$PG_CONNINFO},{$PG_PATH}]73650600b0000100Mamonsu PostgreSQL LinuxPostgreSQL pg_buffercache: Shared Buffer Twice Used Size000pgsql.buffers.twice_used[{$PG_CONNINFO},{$PG_PATH}]73650600b0000100Mamonsu PostgreSQL LinuxPostgreSQL pg_buffercache: Shared Buffer Dirty Size000pgsql.buffers.dirty[{$PG_CONNINFO},{$PG_PATH}]73650600b0000100Mamonsu PostgreSQL LinuxPostgreSQL Health: Ping000pgsql.ping[{$PG_CONNINFO},{$PG_PATH}]7365050ms0000100Mamonsu PostgreSQL LinuxPostgreSQL Health: Cache Hit Ratio1500pgsql.cache.hit[{$PG_CONNINFO},{$PG_PATH}]73650600%00001last(pgsql.blocks[hit])*100/(last(pgsql.blocks[hit])+last(pgsql.blocks[read]))00Mamonsu PostgreSQL LinuxPostgreSQL Health: Service Uptime000pgsql.uptime[{$PG_CONNINFO},{$PG_PATH}]7365050unixtime0000100Mamonsu PostgreSQL LinuxPostgreSQL Health: Server Version000pgsql.version[{$PG_CONNINFO},{$PG_PATH}]73650540000100Mamonsu PostgreSQL LinuxPostgreSQL Locks: Read Only Queries000pgsql.pg_locks.accessshare[{$PG_CONNINFO},{$PG_PATH}]736506030000100Mamonsu PostgreSQL LinuxPostgreSQL Locks: SELECT FOR SHARE and SELECT FOR UPDATE000pgsql.pg_locks.rowshare[{$PG_CONNINFO},{$PG_PATH}]736506030000100Mamonsu PostgreSQL LinuxPostgreSQL Locks: Write Queries000pgsql.pg_locks.rowexclusive[{$PG_CONNINFO},{$PG_PATH}]736506030000100Mamonsu PostgreSQL LinuxPostgreSQL Locks: VACUUM, ANALYZE, CREATE INDEX CONCURRENTLY000pgsql.pg_locks.shareupdateexclusive[{$PG_CONNINFO},{$PG_PATH}]736506030000100Mamonsu PostgreSQL LinuxPostgreSQL Locks: CREATE INDEX000pgsql.pg_locks.share[{$PG_CONNINFO},{$PG_PATH}]736506030000100Mamonsu PostgreSQL LinuxPostgreSQL Locks: Locks from Application000pgsql.pg_locks.sharerowexclusive[{$PG_CONNINFO},{$PG_PATH}]736506030000100Mamonsu PostgreSQL LinuxPostgreSQL Locks: Locks from Application or Some Operations on System Catalogs000pgsql.pg_locks.exclusive[{$PG_CONNINFO},{$PG_PATH}]736506030000100Mamonsu PostgreSQL LinuxPostgreSQL Locks: ALTER TABLE, DROP TABLE, TRUNCATE, REINDEX, CLUSTER, VACUUM FULL, LOCK TABLE000pgsql.pg_locks.accessexclusive[{$PG_CONNINFO},{$PG_PATH}]736506030000100Mamonsu PostgreSQL LinuxPostgreSQL Prepared Transactions: Number of Prepared Transactions000pgsql.prepared.count736506000000100Mamonsu PostgreSQL LinuxPostgreSQL Prepared Transactions: the Oldest Prepared Transaction Running Time in sec000pgsql.prepared.oldest736506000000100Mamonsu PostgreSQL LinuxSystem: Processes in State Running000system.processes.running736506000000100Mamonsu PostgreSQL LinuxSystem: Processes in State Blocked000system.processes.blocked736506000000100Mamonsu PostgreSQL LinuxSystem: Processes Forkrate000system.processes.forkrate736506001000100Mamonsu PostgreSQL LinuxSystem: CPU Time Spent by Normal Programs and Daemons000system.cpu.user736506001000100Mamonsu PostgreSQL LinuxSystem: CPU Time Spent by nice(1)d Programs000system.cpu.nice736506001000100Mamonsu PostgreSQL LinuxSystem: CPU Time Spent by the Kernel in System Activities000system.cpu.system736506001000100Mamonsu PostgreSQL LinuxSystem: CPU Time Spent Idle000system.cpu.idle736506001000100Mamonsu PostgreSQL LinuxSystem: CPU Time Spent Waiting for I/O Operations000system.cpu.iowait736506001000100Mamonsu PostgreSQL LinuxSystem: CPU Time Spent Handling Interrupts000system.cpu.irq736506001000100Mamonsu PostgreSQL LinuxSystem: CPU Time Spent Handling Batched Interrupts000system.cpu.softirq736506001000100Mamonsu PostgreSQL LinuxPostgreSQL Replication: Streaming Replication Lag000pgsql.replication_lag.sec[{$PG_CONNINFO},{$PG_PATH}]736506000000100Mamonsu PostgreSQL LinuxPostgreSQL Replication: Count Non-Active Replication Slots000pgsql.replication.non_active_slots[{$PG_CONNINFO},{$PG_PATH}]736506030000100Mamonsu PostgreSQL LinuxPostgreSQL Statements: Read bytes/s000pgsql.stat.read_bytes[{$PG_CONNINFO},{$PG_PATH}]73650600Bps1000100Mamonsu PostgreSQL LinuxPostgreSQL Statements: Write bytes/s000pgsql.stat.write_bytes[{$PG_CONNINFO},{$PG_PATH}]73650600Bps1000100Mamonsu PostgreSQL LinuxPostgreSQL Statements: Dirty bytes/s000pgsql.stat.dirty_bytes[{$PG_CONNINFO},{$PG_PATH}]73650600Bps1000100Mamonsu PostgreSQL LinuxPostgreSQL Statements: Read IO Time000pgsql.stat.read_time[{$PG_CONNINFO},{$PG_PATH}]73650600s1000100Mamonsu PostgreSQL LinuxPostgreSQL Statements: Write IO Time000pgsql.stat.write_time[{$PG_CONNINFO},{$PG_PATH}]73650600s1000100Mamonsu PostgreSQL LinuxPostgreSQL Statements: Other (mostly CPU) Time000pgsql.stat.other_time[{$PG_CONNINFO},{$PG_PATH}]73650600s1000100Mamonsu PostgreSQL LinuxPostgreSQL Statements: Amount of WAL Files000pgsql.stat.wal_bytes[{$PG_CONNINFO},{$PG_PATH}]73650600Bps1000100Mamonsu PostgreSQL LinuxPostgreSQL Statements: Amount of WAL Records000pgsql.stat.wal_records[{$PG_CONNINFO},{$PG_PATH}]736506001000100Mamonsu PostgreSQL LinuxPostgreSQL Statements: Full Page Writes000pgsql.stat.wal_fpi[{$PG_CONNINFO},{$PG_PATH}]736506001000100Mamonsu PostgreSQL LinuxPostgreSQL Statements: Nnumber of Times pg_stat_statements.max Was Exceeded000pgsql.stat_info.dealloc[{$PG_CONNINFO},{$PG_PATH}]736506001000100Mamonsu PostgreSQL LinuxPostgreSQL Statements: Last Statistics Reset Time000pgsql.stat_info.stats_reset[{$PG_CONNINFO},{$PG_PATH}]73650600unixtime1000100Mamonsu PostgreSQL LinuxSystem: Uptime000system.uptime73650603uptime0000100Mamonsu PostgreSQL LinuxPostgreSQL WAL: Write Speed000pgsql.wal.write[{$PG_CONNINFO},{$PG_PATH}]73650600Bps1000100Mamonsu PostgreSQL LinuxPostgreSQL WAL: Count of WAL Files000pgsql.wal.count[{$PG_CONNINFO},{$PG_PATH}]736506000000100Mamonsu PostgreSQL LinuxPostgreSQL WAL: Records Generated000pgsql.wal.records.count[{$PG_CONNINFO},{$PG_PATH}]736506001000100Mamonsu PostgreSQL LinuxPostgreSQL WAL: Full Page Images Generated000pgsql.wal.fpi.count[{$PG_CONNINFO},{$PG_PATH}]736506001000100Mamonsu PostgreSQL LinuxPostgreSQL WAL: Buffers Full000pgsql.wal.buffers_full736506001000100Mamonsu PostgreSQL LinuxPostgreSQL WAL: Write Time (ms)000pgsql.wal.write_time736506001000100Mamonsu PostgreSQL LinuxPostgreSQL WAL: Sync Time (ms)000pgsql.wal.sync_time736506001000100Mamonsu PostgreSQL LinuxPostgreSQL WAL: Sync Duty (%)1500pgsql.wal.sync_duty73650600%00001last(pgsql.wal.sync_time)/1000Mamonsu PostgreSQL Linux + PostgreSQL Databases Discovery060000007pgsql.database.discovery[{$PG_CONNINFO},{$PG_PATH}]{#DATABASE}.*8A0PostgreSQL Databases: {#DATABASE} size000pgsql.database.size[{#DATABASE},{$PG_CONNINFO},{$PG_PATH}]736503003b0000100Mamonsu PostgreSQL LinuxPostgreSQL Databases: Max datfrozenxid Age in: {#DATABASE}000pgsql.database.max_age[{#DATABASE},{$PG_CONNINFO},{$PG_PATH}]7365030000000100Mamonsu PostgreSQL LinuxPostgreSQL Databases: Count of Bloating Tables in {#DATABASE}000pgsql.database.bloating_tables[{#DATABASE},{$PG_CONNINFO},{$PG_PATH}]7365030000000100Mamonsu PostgreSQL LinuxPostgreSQL Databases: Count of Invalid Indexes in {#DATABASE}000pgsql.database.invalid_indexes[{#DATABASE},{$PG_CONNINFO},{$PG_PATH}]7365030000000100Mamonsu PostgreSQL Linux{Mamonsu PostgreSQL Linux:pgsql.database.invalid_indexes[{#DATABASE}].last()}>0PostgreSQL Databases: invalid indexes in {#DATABASE} (hostname={HOSTNAME} value={ITEM.LASTVALUE})030PostgreSQL Databases: {#DATABASE} size9002000.0100.0111100.00.0000002A39B98020Mamonsu PostgreSQL Linuxpgsql.database.size[{#DATABASE},{$PG_CONNINFO},{$PG_PATH}]PostgreSQL Databases: {#DATABASE} Bloating Overview9002000.0100.0110100.00.000000287C2B9020Mamonsu PostgreSQL Linuxpgsql.database.bloating_tables[{#DATABASE},{$PG_CONNINFO},{$PG_PATH}]12793F5D120Mamonsu PostgreSQL Linuxpgsql.autovacuum.count[{$PG_CONNINFO},{$PG_PATH}]PostgreSQL Databases: {#DATABASE} Max age(datfrozenxid)9002000.0100.0110100.00.000000287C2B9020Mamonsu PostgreSQL Linuxpgsql.database.max_age[{#DATABASE},{$PG_CONNINFO},{$PG_PATH}]12793F5D120Mamonsu PostgreSQL Linuxpgsql.autovacuum.count[{$PG_CONNINFO},{$PG_PATH}]System: VFS Discovery060000007system.vfs.discovery{#MOUNTPOINT}.*8A0System: Mount Point {#MOUNTPOINT} Used000system.vfs.used[{#MOUNTPOINT}]73650603b0000100Mamonsu PostgreSQL LinuxSystem: Mount Point {#MOUNTPOINT} Free000system.vfs.free[{#MOUNTPOINT}]73650603b0000100Mamonsu PostgreSQL LinuxSystem: Mount Point {#MOUNTPOINT} Free in Percents000system.vfs.percent_free[{#MOUNTPOINT}]73650600%0000100Mamonsu PostgreSQL Linux{Mamonsu PostgreSQL Linux:system.vfs.percent_free[{#MOUNTPOINT}].last()}<{$VFS_PERCENT_FREE}System: free disk space less than 10% on mountpoint {#MOUNTPOINT} (hostname={HOSTNAME} value={ITEM.LASTVALUE})030System: Mount Point Overview {#MOUNTPOINT}9002000.0100.0111100.00.0000002FF5656020Mamonsu PostgreSQL Linuxsystem.vfs.used[{#MOUNTPOINT}]1200CC00020Mamonsu PostgreSQL Linuxsystem.vfs.free[{#MOUNTPOINT}]System: Block Devices Discovery060000007system.disk.discovery{#BLOCKDEVICE}.*8A0System: Block Device {#BLOCKDEVICE} Utilization000system.disk.utilization[{#BLOCKDEVICE}]73650600%1000100Mamonsu PostgreSQL LinuxSystem: Block Device {#BLOCKDEVICE} Read Operations000system.disk.read[{#BLOCKDEVICE}]736506001000100Mamonsu PostgreSQL LinuxSystem: Block Device {#BLOCKDEVICE} Write Operations000system.disk.write[{#BLOCKDEVICE}]736506001000100Mamonsu PostgreSQL LinuxSystem: Block Device {#BLOCKDEVICE} Read byte/s000system.disk.read_b[{#BLOCKDEVICE}]73650600b1000100Mamonsu PostgreSQL LinuxSystem: Block Device {#BLOCKDEVICE} Write byte/s000system.disk.write_b[{#BLOCKDEVICE}]73650600b1000100Mamonsu PostgreSQL LinuxSystem: Block Device Overview {#BLOCKDEVICE} operations9002000.0100.0110100.00.000000200CC00020Mamonsu PostgreSQL Linuxsystem.disk.read[{#BLOCKDEVICE}]12FF5656020Mamonsu PostgreSQL Linuxsystem.disk.write[{#BLOCKDEVICE}]22006AAE120Mamonsu PostgreSQL Linuxsystem.disk.utilization[{#BLOCKDEVICE}]System: Block Device Overview {#BLOCKDEVICE} byte/s9002000.0100.0110100.00.000000200CC00020Mamonsu PostgreSQL Linuxsystem.disk.read_b[{#BLOCKDEVICE}]12FF5656020Mamonsu PostgreSQL Linuxsystem.disk.write_b[{#BLOCKDEVICE}]22006AAE120Mamonsu PostgreSQL Linuxsystem.disk.utilization[{#BLOCKDEVICE}]System: net Iface Discovery060000007system.net.discovery{#NETDEVICE}.*8A0System: Network Device {#NETDEVICE} RX bytes/s000system.net.rx_bytes[{#NETDEVICE}]73650600b1000100Mamonsu PostgreSQL LinuxSystem: Network Device {#NETDEVICE} RX errors/s000system.net.rx_errs[{#NETDEVICE}]736506001000100Mamonsu PostgreSQL LinuxSystem: Network Device {#NETDEVICE} RX drops/s000system.net.rx_drop[{#NETDEVICE}]736506001000100Mamonsu PostgreSQL LinuxSystem: Network Device {#NETDEVICE} TX bytes/s000system.net.tx_bytes[{#NETDEVICE}]73650600b1000100Mamonsu PostgreSQL LinuxSystem: Network Device {#NETDEVICE} TX errors/s000system.net.tx_errs[{#NETDEVICE}]736506001000100Mamonsu PostgreSQL LinuxSystem: Network Device {#NETDEVICE} TX drops/s000system.net.tx_drop[{#NETDEVICE}]736506001000100Mamonsu PostgreSQL LinuxSystem: Network Device {#NETDEVICE}9002000.0100.0110100.00.000000287C2B9020Mamonsu PostgreSQL Linuxsystem.net.rx_bytes[{#NETDEVICE}]12793F5D020Mamonsu PostgreSQL Linuxsystem.net.tx_bytes[{#NETDEVICE}]pg_probackup Discovery060000007pg_probackup.discovery[]{#BACKUPDIR}.*8A0pg_probackup dir {#BACKUPDIR}: Size000pg_probackup.dir.size[{#BACKUPDIR}]736503003b0000100Mamonsu PostgreSQL Linuxpg_probackup dir {#BACKUPDIR}: Error000pg_probackup.dir.error[{#BACKUPDIR}]7365030040000100Mamonsu PostgreSQL Linux{Mamonsu PostgreSQL Linux:pg_probackup.dir.error[{#BACKUPDIR}].str(ok)}<>1pg_probackup: error in dir {#BACKUPDIR} (hostname={HOSTNAME} value={ITEM.LASTVALUE})030pg_probackup Backup dir: {#BACKUPDIR} Size9002000.0100.0111100.00.0000002A39B98020Mamonsu PostgreSQL Linuxpg_probackup.dir.size[{#BACKUPDIR}]PostgreSQL Relations Sizes Discovery060000007pgsql.relation.size[{$PG_CONNINFO},{$PG_PATH}]{#RELATIONNAME}.*8A0PostgreSQL Relation Size: {#RELATIONNAME}000pgsql.relation.size[{#RELATIONNAME},{$PG_CONNINFO},{$PG_PATH}]73650153b0000100Mamonsu PostgreSQL LinuxPostgreSQL Relation Size: {#RELATIONNAME}9002000.0100.0111100.00.0000002A39B98020Mamonsu PostgreSQL Linuxpgsql.relation.size[{#RELATIONNAME},{$PG_CONNINFO},{$PG_PATH}]PostgreSQL Replication Lag Discovery060000007pgsql.replication.discovery[{$PG_CONNINFO},{$PG_PATH}]{#APPLICATION_NAME}.*8A0PostgreSQL Replication: {#APPLICATION_NAME} Send Lag - Time elapsed sending recent WAL locally000pgsql.replication.send_lag[{#APPLICATION_NAME},{$PG_CONNINFO},{$PG_PATH}]736506000000100Mamonsu PostgreSQL LinuxPostgreSQL Replication: {#APPLICATION_NAME} Receive Lag - Time elapsed between receiving recent WAL locally and receiving notification that this standby server has flushed it000pgsql.replication.receive_lag[{#APPLICATION_NAME},{$PG_CONNINFO},{$PG_PATH}]736506000000100Mamonsu PostgreSQL LinuxPostgreSQL Replication: {#APPLICATION_NAME} Write Lag - Time elapsed between flushing recent WAL locally and receiving notification that this standby server has written it000pgsql.replication.write_lag[{#APPLICATION_NAME},{$PG_CONNINFO},{$PG_PATH}]736506000000100Mamonsu PostgreSQL LinuxPostgreSQL Replication: {#APPLICATION_NAME} Flush Lag - Time elapsed between flushing recent WAL locally and receiving notification that this standby server has written and flushed it000pgsql.replication.flush_lag[{#APPLICATION_NAME},{$PG_CONNINFO},{$PG_PATH}]736506000000100Mamonsu PostgreSQL LinuxPostgreSQL Replication: {#APPLICATION_NAME} Replay Lag - Time elapsed between flushing recent WAL locally and receiving notification that this standby server has written, flushed and applied000pgsql.replication.replay_lag[{#APPLICATION_NAME},{$PG_CONNINFO},{$PG_PATH}]736506000000100Mamonsu PostgreSQL LinuxPostgreSQL Replication: {#APPLICATION_NAME} Delta of Total Lag000pgsql.replication.total_lag[{#APPLICATION_NAME},{$PG_CONNINFO},{$PG_PATH}]736506000000100Mamonsu PostgreSQL LinuxPostgreSQL Replication: Delta of Total Lag for {#APPLICATION_NAME}9002000.0100.0110100.00.0000000A39B98020Mamonsu PostgreSQL Linuxpgsql.replication.total_lag[{#APPLICATION_NAME},{$PG_CONNINFO},{$PG_PATH}] + {$ARCHIVE_QUEUE_FILES}2{$MAX_CHECKPOINT_BY_WAL_IN_HOUR}12{$CONNECTIONS_PERCENT}90{$VFS_PERCENT_FREE}10{$VFS_INODE_PERCENT_FREE}10{$MAMONSU_MAX_MEMORY_USAGE}41943040{$MAX_XID_AGE}18000000{$MAX_TRANSACTION_TIME}18000{$PG_UPTIME}600{$CACHE_HIT_RATIO_PERCENT}80{$MAX_PREPARED_TRANSACTION_TIME}18000{$CRITICAL_LAG_SECONDS}300{$SYSTEM_UPTIME}300 Mamonsu Overview2505001500011010003PostgreSQL Connections: OverviewMamonsu PostgreSQL Linux05001501011010003PostgreSQL Instance: Transactions RateMamonsu PostgreSQL Linux05001500111010003System: CPU Time SpentMamonsu PostgreSQL Linux05001501111010003System: Server Free/Used Memory OverviewMamonsu PostgreSQL Linux05001500211010003PostgreSQL Autovacuum: Count of Autovacuum WorkersMamonsu PostgreSQL Linux05001501211010003PostgreSQL Instance: TuplesMamonsu PostgreSQL Linux05001500311010003PostgreSQL bgwriter: BuffersMamonsu PostgreSQL Linux05001501311010003PostgreSQL bgwriter: EventsMamonsu PostgreSQL Linux05001500411010003PostgreSQL Checkpoints: Count (in hour)Mamonsu PostgreSQL Linux05001501411010003PostgreSQL Checkpoints: Write/SyncMamonsu PostgreSQL LinuxMamonsu PostgreSQL Instance2515001500011010003pgsql.ping[{$PG_CONNINFO},{$PG_PATH}]Mamonsu PostgreSQL Linux15001501011010003pgsql.uptime[{$PG_CONNINFO},{$PG_PATH}]Mamonsu PostgreSQL Linux15001500111010003pgsql.cache.hit[{$PG_CONNINFO},{$PG_PATH}]Mamonsu PostgreSQL Linux05001501111010003PostgreSQL Instance: EventsMamonsu PostgreSQL Linux15001500211010003pgsql.temp.bytes[{$PG_CONNINFO},{$PG_PATH}]Mamonsu PostgreSQL Linux15001501211010003pgsql.temp.files[{$PG_CONNINFO},{$PG_PATH}]Mamonsu PostgreSQL LinuxMamonsu PostgreSQL WAL2505001500011010003PostgreSQL Archiver: Archive StatusMamonsu PostgreSQL Linux15001501011010003pgsql.wal.write[{$PG_CONNINFO},{$PG_PATH}]Mamonsu PostgreSQL Linux15001500111010003pgsql.archive_command.size_files_to_archive[{$PG_CONNINFO},{$PG_PATH}]Mamonsu PostgreSQL Linux15001501111010003pgsql.archive_command.archived_files[{$PG_CONNINFO},{$PG_PATH}]Mamonsu PostgreSQL Linux15001500211010003pgsql.wal.write_timeMamonsu PostgreSQL Linux15001501211010003pgsql.wal.sync_timeMamonsu PostgreSQL LinuxMamonsu PostgreSQL Locks3513301000011010003pgsql.events.conflicts[{$PG_CONNINFO},{$PG_PATH}]Mamonsu PostgreSQL Linux13301001011010003pgsql.pg_locks.accessshare[{$PG_CONNINFO},{$PG_PATH}]Mamonsu PostgreSQL Linux13301002011010003pgsql.pg_locks.rowshare[{$PG_CONNINFO},{$PG_PATH}]Mamonsu PostgreSQL Linux13301000111010003pgsql.pg_locks.rowexclusive[{$PG_CONNINFO},{$PG_PATH}]Mamonsu PostgreSQL Linux13301001111010003pgsql.pg_locks.shareupdateexclusive[{$PG_CONNINFO},{$PG_PATH}]Mamonsu PostgreSQL Linux13301002111010003pgsql.pg_locks.share[{$PG_CONNINFO},{$PG_PATH}]Mamonsu PostgreSQL Linux13301000211010003pgsql.pg_locks.sharerowexclusive[{$PG_CONNINFO},{$PG_PATH}]Mamonsu PostgreSQL Linux13301001211010003pgsql.pg_locks.exclusive[{$PG_CONNINFO},{$PG_PATH}]Mamonsu PostgreSQL Linux13301002211010003pgsql.pg_locks.accessexclusive[{$PG_CONNINFO},{$PG_PATH}]Mamonsu PostgreSQL LinuxMamonsu PostgreSQL Transactions2515001500011010003pgsql.oldest.xid_age[{$PG_CONNINFO},{$PG_PATH}]Mamonsu PostgreSQL Linux15001501011010003pgsql.oldest.transaction_time[{$PG_CONNINFO},{$PG_PATH}]Mamonsu PostgreSQL Linux15001500111010003pgsql.prepared.countMamonsu PostgreSQL Linux15001501111010003pgsql.prepared.oldestMamonsu PostgreSQL LinuxMamonsu System (Linux)2505001500011010003System: Block Devices Read/Write BytesMamonsu PostgreSQL Linux05001501011010003System: Block Devices Read/Write OperationsMamonsu PostgreSQL Linux05001500111010003System: Processes OverviewMamonsu PostgreSQL Linux - {$PG_CONNINFO}-qAt -p 5433 -U postgres {$PG_PATH}/opt/pgpro/std-10/bin/psql - {Mamonsu PostgreSQL Linux:pgsql.archive_command.count_files_to_archive[{$PG_CONNINFO},{$PG_PATH}].last()}>2PostgreSQL Archiver: count files need to archive on {HOSTNAME} more than 2030{Mamonsu PostgreSQL Linux:pgsql.checkpoint.count_wal[{$PG_CONNINFO},{$PG_PATH}].last()}>12PostgreSQL Checkpoints: required checkpoints occurs too frequently on {HOSTNAME}030 {Mamonsu PostgreSQL Linux:pgsql.connections.total[{$PG_CONNINFO},{$PG_PATH}].last()}/{Mamonsu PostgreSQL Linux:pgsql.connections.max_connections[{$PG_CONNINFO},{$PG_PATH}].last()}*100 >90PostgreSQL Connections: too many connections on {HOSTNAME} (total connections more than 90% of max_connections)030{Mamonsu PostgreSQL Linux:mamonsu.plugin.keepalive.nodata(180)}=1Mamonsu nodata from {HOSTNAME}030{Mamonsu PostgreSQL Linux:pgsql.server_mode.change()}>0PostgreSQL Instance: server mode has been changed on {HOSTNAME} to {ITEM.LASTVALUE}030{Mamonsu PostgreSQL Linux:pgsql.memory_leak_diagnostic.msg_text[].strlen()}>1PostgreSQL Memory Leak: Number of Pids Which Private Anonymous Memory Exceeds private_anon_mem_threshold on {HOSTNAME}. {ITEM.LASTVALUE}030{Mamonsu PostgreSQL Linux:pgsql.oldest.xid_age[{$PG_CONNINFO},{$PG_PATH}].last()}>18000000PostgreSQL Transactions: the oldest XID is too big on {HOSTNAME}030{Mamonsu PostgreSQL Linux:pgsql.oldest.transaction_time[{$PG_CONNINFO},{$PG_PATH}].last()}>18000PostgreSQL Transactions: running transaction is too old on {HOSTNAME}030{Mamonsu PostgreSQL Linux:pgsql.uptime[{$PG_CONNINFO},{$PG_PATH}].change()}>600PostgreSQL Health: service has been restarted on {HOSTNAME} (uptime={ITEM.LASTVALUE})030{Mamonsu PostgreSQL Linux:pgsql.cache.hit[{$PG_CONNINFO},{$PG_PATH}].last()}<80PostgreSQL Health: cache hit ratio too low on {HOSTNAME} ({ITEM.LASTVALUE})030{Mamonsu PostgreSQL Linux:pgsql.ping[{$PG_CONNINFO},{$PG_PATH}].nodata(180)}=1PostgreSQL Health: no ping from PostgreSQL for 3 minutes on {HOSTNAME}030{Mamonsu PostgreSQL Linux:pgsql.prepared.oldest.last()}>60PostgreSQL Prepared Transactions: prepared transaction is too old on {HOSTNAME}030{Mamonsu PostgreSQL Linux:system.processes.forkrate.min(5m)}>500Process fork-rate too frequently on {HOSTNAME}030{Mamonsu PostgreSQL Linux:pgsql.replication_lag.sec[{$PG_CONNINFO},{$PG_PATH}].last()}>300PostgreSQL streaming lag too high on {HOSTNAME} (value={ITEM.LASTVALUE})030{Mamonsu PostgreSQL Linux:pgsql.replication.non_active_slots[{$PG_CONNINFO},{$PG_PATH}].last()}>0PostgreSQL number of non-active replication slots on {HOSTNAME} (value={ITEM.LASTVALUE})030{Mamonsu PostgreSQL Linux:system.uptime.last()}<300System was restarted on {HOSTNAME} (uptime={ITEM.LASTVALUE})030 - PostgreSQL Archiver: Archive Status9002000.0100.0110100.00.0000002006AAE020Mamonsu PostgreSQL Linuxpgsql.archive_command.count_files_to_archive[{$PG_CONNINFO},{$PG_PATH}]1200CC00020Mamonsu PostgreSQL Linuxpgsql.archive_command.archived_files[{$PG_CONNINFO},{$PG_PATH}]22FF5656020Mamonsu PostgreSQL Linuxpgsql.archive_command.failed_trying_to_archive[{$PG_CONNINFO},{$PG_PATH}]PostgreSQL bgwriter: Buffers9002000.0100.0110100.00.0000002006AAE020Mamonsu PostgreSQL Linuxpgsql.bgwriter.buffers_checkpoint[{$PG_CONNINFO},{$PG_PATH}]1200CC00020Mamonsu PostgreSQL Linuxpgsql.bgwriter.buffers_clean[{$PG_CONNINFO},{$PG_PATH}]229C8A4E020Mamonsu PostgreSQL Linuxpgsql.bgwriter.buffers_backend[{$PG_CONNINFO},{$PG_PATH}]32FF5656020Mamonsu PostgreSQL Linuxpgsql.bgwriter.buffers_alloc[{$PG_CONNINFO},{$PG_PATH}]PostgreSQL bgwriter: Events9002000.0100.0110100.00.0000002FF5656020Mamonsu PostgreSQL Linuxpgsql.bgwriter.maxwritten_clean[{$PG_CONNINFO},{$PG_PATH}]1200CC00020Mamonsu PostgreSQL Linuxpgsql.bgwriter.buffers_backend_fsync[{$PG_CONNINFO},{$PG_PATH}]PostgreSQL Checkpoints: Count (in hour)9002000.0100.0110100.00.000000200CC00020Mamonsu PostgreSQL Linuxpgsql.checkpoint.count_timed[{$PG_CONNINFO},{$PG_PATH}]12FF5656020Mamonsu PostgreSQL Linuxpgsql.checkpoint.count_wal[{$PG_CONNINFO},{$PG_PATH}]PostgreSQL Checkpoints: Write/Sync9002000.0100.0110100.00.000000200CC00020Mamonsu PostgreSQL Linuxpgsql.checkpoint.write_time[{$PG_CONNINFO},{$PG_PATH}]12FF5656020Mamonsu PostgreSQL Linuxpgsql.checkpoint.checkpoint_sync_time[{$PG_CONNINFO},{$PG_PATH}]PostgreSQL Connections: Overview9002000.0100.0111100.00.000000200CC00020Mamonsu PostgreSQL Linuxpgsql.connections.active[{$PG_CONNINFO},{$PG_PATH}]12A39B98020Mamonsu PostgreSQL Linuxpgsql.connections.idle[{$PG_CONNINFO},{$PG_PATH}]229C8A4E020Mamonsu PostgreSQL Linuxpgsql.connections.idle_in_transaction[{$PG_CONNINFO},{$PG_PATH}]32F6CB93020Mamonsu PostgreSQL Linuxpgsql.connections.idle_in_transaction_aborted[{$PG_CONNINFO},{$PG_PATH}]4200B0B8020Mamonsu PostgreSQL Linuxpgsql.connections.fastpath_function_call[{$PG_CONNINFO},{$PG_PATH}]523B415A020Mamonsu PostgreSQL Linuxpgsql.connections.disabled[{$PG_CONNINFO},{$PG_PATH}]62FF5656020Mamonsu PostgreSQL Linuxpgsql.connections.total[{$PG_CONNINFO},{$PG_PATH}]72006AAE020Mamonsu PostgreSQL Linuxpgsql.connections.waiting[{$PG_CONNINFO},{$PG_PATH}]8287C2B9020Mamonsu PostgreSQL Linuxpgsql.connections.other[{$PG_CONNINFO},{$PG_PATH}]PostgreSQL Autovacuum: Count of Autovacuum Workers9002000.0100.0110100.00.000000287C2B9020Mamonsu PostgreSQL Linuxpgsql.autovacumm.count[{$PG_CONNINFO},{$PG_PATH}]System: Block Devices Read/Write Operations9002000.0100.0110100.00.000000200CC00020Mamonsu PostgreSQL Linuxsystem.disk.all_read12FF5656020Mamonsu PostgreSQL Linuxsystem.disk.all_writeSystem: Block Devices Read/Write Bytes9002000.0100.0110100.00.000000200CC00020Mamonsu PostgreSQL Linuxsystem.disk.all_read_b12FF5656020Mamonsu PostgreSQL Linuxsystem.disk.all_write_bPostgreSQL Instance: Blocks Rate9002000.0100.0110100.00.000000287C2B9020Mamonsu PostgreSQL Linuxpgsql.blocks.hit[{$PG_CONNINFO},{$PG_PATH}]12793F5D020Mamonsu PostgreSQL Linuxpgsql.blocks.read[{$PG_CONNINFO},{$PG_PATH}]PostgreSQL Instance: Transactions Rate9002000.0100.0110100.00.000000200CC00020Mamonsu PostgreSQL Linuxpgsql.transactions.committed[{$PG_CONNINFO},{$PG_PATH}]12FF5656020Mamonsu PostgreSQL Linuxpgsql.events.xact_rollback[{$PG_CONNINFO},{$PG_PATH}]PostgreSQL Instance: Events9002000.0100.0110100.00.000000200CC00020Mamonsu PostgreSQL Linuxpgsql.events.conflicts[{$PG_CONNINFO},{$PG_PATH}]12FF5656020Mamonsu PostgreSQL Linuxpgsql.events.deadlocks[{$PG_CONNINFO},{$PG_PATH}]22006AAE020Mamonsu PostgreSQL Linuxpgsql.events.checksum_failures[{$PG_CONNINFO},{$PG_PATH}]PostgreSQL Instance: Temp Files9002000.0100.0110100.00.000000200B0B8020Mamonsu PostgreSQL Linuxpgsql.temp.bytes[{$PG_CONNINFO},{$PG_PATH}]12006AAE120Mamonsu PostgreSQL Linuxpgsql.temp.files[{$PG_CONNINFO},{$PG_PATH}]PostgreSQL Instance: Tuples9002000.0100.0110100.00.0000002FF5656020Mamonsu PostgreSQL Linuxpgsql.tuples.deleted[{$PG_CONNINFO},{$PG_PATH}]12006AAE020Mamonsu PostgreSQL Linuxpgsql.tuples.fetched[{$PG_CONNINFO},{$PG_PATH}]2200CC00020Mamonsu PostgreSQL Linuxpgsql.tuples.inserted[{$PG_CONNINFO},{$PG_PATH}]32001219120Mamonsu PostgreSQL Linuxpgsql.tuples.returned[{$PG_CONNINFO},{$PG_PATH}]429C8A4E020Mamonsu PostgreSQL Linuxpgsql.tuples.updated[{$PG_CONNINFO},{$PG_PATH}]System: Server Memory Detailed Overview9004000.0100.0111100.00.0000000BAEB6B020Mamonsu PostgreSQL Linuxsystem.memory.active1000CC00020Mamonsu PostgreSQL Linuxsystem.memory.available2000B0B8020Mamonsu PostgreSQL Linuxsystem.memory.buffers3052768F020Mamonsu PostgreSQL Linuxsystem.memory.cached409C8A4E020Mamonsu PostgreSQL Linuxsystem.memory.committed50A39B98020Mamonsu PostgreSQL Linuxsystem.memory.inactive609F1E28020Mamonsu PostgreSQL Linuxsystem.memory.mapped70793F5D020Mamonsu PostgreSQL Linuxsystem.memory.page_tables80F6CB93020Mamonsu PostgreSQL Linuxsystem.memory.slab90006AAE020Mamonsu PostgreSQL Linuxsystem.memory.swap10087C2B9020Mamonsu PostgreSQL Linuxsystem.memory.swap_cache1103B415A020Mamonsu PostgreSQL Linuxsystem.memory.unused120001219020Mamonsu PostgreSQL Linuxsystem.memory.used130CF6518020Mamonsu PostgreSQL Linuxsystem.memory.vmalloc_usedSystem: Server Free/Used Memory Overview9004000.0100.0110100.00.0000001001219020Mamonsu PostgreSQL Linuxsystem.memory.used1152768F020Mamonsu PostgreSQL Linuxsystem.memory.cached2100CC00020Mamonsu PostgreSQL Linuxsystem.memory.available34FF5656020Mamonsu PostgreSQL Linuxsystem.memory.totalPostgreSQL pg_buffercache: Shared Buffer9002000.0100.0110100.00.000000200CC00020Mamonsu PostgreSQL Linuxpgsql.buffers.size[{$PG_CONNINFO},{$PG_PATH}]12006AAE020Mamonsu PostgreSQL Linuxpgsql.buffers.twice_used[{$PG_CONNINFO},{$PG_PATH}]22FF5656020Mamonsu PostgreSQL Linuxpgsql.buffers.dirty[{$PG_CONNINFO},{$PG_PATH}]PostgreSQL: Locks Sampling9002000.0100.0110100.00.000000200CC00020Mamonsu PostgreSQL Linuxpgsql.pg_locks.accessshare[{$PG_CONNINFO},{$PG_PATH}]123B415A020Mamonsu PostgreSQL Linuxpgsql.pg_locks.rowshare[{$PG_CONNINFO},{$PG_PATH}]22FF5656020Mamonsu PostgreSQL Linuxpgsql.pg_locks.rowexclusive[{$PG_CONNINFO},{$PG_PATH}]32F6CB93020Mamonsu PostgreSQL Linuxpgsql.pg_locks.shareupdateexclusive[{$PG_CONNINFO},{$PG_PATH}]42006AAE020Mamonsu PostgreSQL Linuxpgsql.pg_locks.share[{$PG_CONNINFO},{$PG_PATH}]5200B0B8020Mamonsu PostgreSQL Linuxpgsql.pg_locks.sharerowexclusive[{$PG_CONNINFO},{$PG_PATH}]629C8A4E020Mamonsu PostgreSQL Linuxpgsql.pg_locks.exclusive[{$PG_CONNINFO},{$PG_PATH}]72793F5D020Mamonsu PostgreSQL Linuxpgsql.pg_locks.accessexclusive[{$PG_CONNINFO},{$PG_PATH}]PostgreSQL Prepared Transactions: Overview9002000.0100.0110100.00.0000002A39B98020Mamonsu PostgreSQL Linuxpgsql.prepared.count129C8A4E120Mamonsu PostgreSQL Linuxpgsql.prepared.oldestSystem: Processes Overview9002000.0100.0110100.00.000000200CC00020Mamonsu PostgreSQL Linuxsystem.processes.running12FF5656020Mamonsu PostgreSQL Linuxsystem.processes.blocked22006AAE120Mamonsu PostgreSQL Linuxsystem.processes.forkrateSystem: CPU Time Spent9002000.0100.0111100.00.000000200CC00020Mamonsu PostgreSQL Linuxsystem.cpu.user12793F5D020Mamonsu PostgreSQL Linuxsystem.cpu.nice229C8A4E020Mamonsu PostgreSQL Linuxsystem.cpu.system32A39B98020Mamonsu PostgreSQL Linuxsystem.cpu.idle42006AAE020Mamonsu PostgreSQL Linuxsystem.cpu.iowait52FF5656020Mamonsu PostgreSQL Linuxsystem.cpu.irq62F6CB93020Mamonsu PostgreSQL Linuxsystem.cpu.softirqPostgreSQL Statements: Bytes9002000.0100.0110100.00.000000287C2B9020Mamonsu PostgreSQL Linuxpgsql.stat.read_bytes[{$PG_CONNINFO},{$PG_PATH}]12793F5D020Mamonsu PostgreSQL Linuxpgsql.stat.write_bytes[{$PG_CONNINFO},{$PG_PATH}]229C8A4E020Mamonsu PostgreSQL Linuxpgsql.stat.dirty_bytes[{$PG_CONNINFO},{$PG_PATH}]PostgreSQL Statements: Spent Time9002000.0100.0111100.00.000000287C2B9020Mamonsu PostgreSQL Linuxpgsql.stat.read_time[{$PG_CONNINFO},{$PG_PATH}]12793F5D020Mamonsu PostgreSQL Linuxpgsql.stat.write_time[{$PG_CONNINFO},{$PG_PATH}]229C8A4E020Mamonsu PostgreSQL Linuxpgsql.stat.other_time[{$PG_CONNINFO},{$PG_PATH}]PostgreSQL Statements: WAL Statistics9002000.0100.0110100.00.000000200B0B8020Mamonsu PostgreSQL Linuxpgsql.stat.wal_bytes[{$PG_CONNINFO},{$PG_PATH}]12006AAE020Mamonsu PostgreSQL Linuxpgsql.stat.wal_records[{$PG_CONNINFO},{$PG_PATH}]229C8A4E020Mamonsu PostgreSQL Linuxpgsql.stat.wal_fpi[{$PG_CONNINFO},{$PG_PATH}] + {Mamonsu PostgreSQL Linux:pgsql.archive_command.count_files_to_archive[{$PG_CONNINFO},{$PG_PATH}].last()}>{$ARCHIVE_QUEUE_FILES}PostgreSQL Archiver: count files need to archive on {HOSTNAME} more than 2030{Mamonsu PostgreSQL Linux:pgsql.checkpoint.count_wal[{$PG_CONNINFO},{$PG_PATH}].last()}>{$MAX_CHECKPOINT_BY_WAL_IN_HOUR}PostgreSQL Checkpoints: required checkpoints occurs too frequently on {HOSTNAME}030 {Mamonsu PostgreSQL Linux:pgsql.connections.total[{$PG_CONNINFO},{$PG_PATH}].last()}/{Mamonsu PostgreSQL Linux:pgsql.connections.max_connections[{$PG_CONNINFO},{$PG_PATH}].last()}*100 >{$CONNECTIONS_PERCENT}PostgreSQL Connections: too many connections on {HOSTNAME} (total connections more than {$CONNECTIONS_PERCENT}% of max_connections)030{Mamonsu PostgreSQL Linux:mamonsu.plugin.keepalive.nodata(180)}=1Mamonsu health: nodata from {HOSTNAME}030{Mamonsu PostgreSQL Linux:pgsql.server_mode.change()}>0PostgreSQL Instance: server mode has been changed on {HOSTNAME} to {ITEM.LASTVALUE}030{Mamonsu PostgreSQL Linux:pgsql.memory_leak_diagnostic.msg_text[].strlen()}>1PostgreSQL Memory Leak: Number of Pids Which Private Anonymous Memory Exceeds private_anon_mem_threshold on {HOSTNAME}. {ITEM.LASTVALUE}030{Mamonsu PostgreSQL Linux:pgsql.oldest.xid_age[{$PG_CONNINFO},{$PG_PATH}].last()}>{$MAX_XID_AGE}PostgreSQL Transactions: the oldest XID is too big on {HOSTNAME}030{Mamonsu PostgreSQL Linux:pgsql.oldest.transaction_time[{$PG_CONNINFO},{$PG_PATH}].last()}>{$MAX_TRANSACTION_TIME}PostgreSQL Transactions: running transaction is too old on {HOSTNAME}030{Mamonsu PostgreSQL Linux:pgsql.uptime[{$PG_CONNINFO},{$PG_PATH}].change()}>{$PG_UPTIME}PostgreSQL Health: service has been restarted on {HOSTNAME} (uptime={ITEM.LASTVALUE})030{Mamonsu PostgreSQL Linux:pgsql.cache.hit[{$PG_CONNINFO},{$PG_PATH}].last()}<{$CACHE_HIT_RATIO_PERCENT}PostgreSQL Health: cache hit ratio too low on {HOSTNAME} ({ITEM.LASTVALUE})030{Mamonsu PostgreSQL Linux:pgsql.ping[{$PG_CONNINFO},{$PG_PATH}].nodata(180)}=1PostgreSQL Health: no ping from PostgreSQL for 3 minutes on {HOSTNAME}030{Mamonsu PostgreSQL Linux:pgsql.prepared.oldest.last()}>{$MAX_PREPARED_TRANSACTION_TIME}PostgreSQL Prepared Transactions: prepared transaction is too old on {HOSTNAME}030{Mamonsu PostgreSQL Linux:system.processes.forkrate.min(5m)}>500System: process fork-rate too frequently on {HOSTNAME}030{Mamonsu PostgreSQL Linux:pgsql.replication_lag.sec[{$PG_CONNINFO},{$PG_PATH}].last()}>{$CRITICAL_LAG_SECONDS}PostgreSQL Replication: streaming lag too high on {HOSTNAME} (value={ITEM.LASTVALUE})030{Mamonsu PostgreSQL Linux:pgsql.replication.non_active_slots[{$PG_CONNINFO},{$PG_PATH}].last()}>0PostgreSQL Replication: number of non-active replication slots on {HOSTNAME} (value={ITEM.LASTVALUE})030{Mamonsu PostgreSQL Linux:system.uptime.last()}<{$SYSTEM_UPTIME}System: {HOSTNAME} was restarted (start time={ITEM.LASTVALUE})030 + PostgreSQL Archiver: Archive Status9002000.0100.0110100.00.0000002006AAE020Mamonsu PostgreSQL Linuxpgsql.archive_command.count_files_to_archive[{$PG_CONNINFO},{$PG_PATH}]1200CC00020Mamonsu PostgreSQL Linuxpgsql.archive_command.archived_files[{$PG_CONNINFO},{$PG_PATH}]22FF5656020Mamonsu PostgreSQL Linuxpgsql.archive_command.failed_trying_to_archive[{$PG_CONNINFO},{$PG_PATH}]PostgreSQL Autovacuum: Count of Autovacuum Workers9002000.0100.0110100.00.000000287C2B9020Mamonsu PostgreSQL Linuxpgsql.autovacuum.count[{$PG_CONNINFO},{$PG_PATH}]PostgreSQL bgwriter: Buffers9002000.0100.0110100.00.0000002006AAE020Mamonsu PostgreSQL Linuxpgsql.bgwriter.buffers_checkpoint[{$PG_CONNINFO},{$PG_PATH}]1200CC00020Mamonsu PostgreSQL Linuxpgsql.bgwriter.buffers_clean[{$PG_CONNINFO},{$PG_PATH}]229C8A4E020Mamonsu PostgreSQL Linuxpgsql.bgwriter.buffers_backend[{$PG_CONNINFO},{$PG_PATH}]32FF5656020Mamonsu PostgreSQL Linuxpgsql.bgwriter.buffers_alloc[{$PG_CONNINFO},{$PG_PATH}]PostgreSQL bgwriter: Events9002000.0100.0110100.00.0000002FF5656020Mamonsu PostgreSQL Linuxpgsql.bgwriter.maxwritten_clean[{$PG_CONNINFO},{$PG_PATH}]1200CC00020Mamonsu PostgreSQL Linuxpgsql.bgwriter.buffers_backend_fsync[{$PG_CONNINFO},{$PG_PATH}]PostgreSQL Checkpoints: Count (in hour)9002000.0100.0110100.00.000000200CC00020Mamonsu PostgreSQL Linuxpgsql.checkpoint.count_timed[{$PG_CONNINFO},{$PG_PATH}]12FF5656020Mamonsu PostgreSQL Linuxpgsql.checkpoint.count_wal[{$PG_CONNINFO},{$PG_PATH}]PostgreSQL Checkpoints: Write/Sync9002000.0100.0110100.00.000000200CC00020Mamonsu PostgreSQL Linuxpgsql.checkpoint.write_time[{$PG_CONNINFO},{$PG_PATH}]12FF5656020Mamonsu PostgreSQL Linuxpgsql.checkpoint.checkpoint_sync_time[{$PG_CONNINFO},{$PG_PATH}]PostgreSQL Connections: Overview9002000.0100.0111100.00.000000200CC00020Mamonsu PostgreSQL Linuxpgsql.connections.active[{$PG_CONNINFO},{$PG_PATH}]12A39B98020Mamonsu PostgreSQL Linuxpgsql.connections.idle[{$PG_CONNINFO},{$PG_PATH}]229C8A4E020Mamonsu PostgreSQL Linuxpgsql.connections.idle_in_transaction[{$PG_CONNINFO},{$PG_PATH}]32F6CB93020Mamonsu PostgreSQL Linuxpgsql.connections.idle_in_transaction_aborted[{$PG_CONNINFO},{$PG_PATH}]4200B0B8020Mamonsu PostgreSQL Linuxpgsql.connections.fastpath_function_call[{$PG_CONNINFO},{$PG_PATH}]523B415A020Mamonsu PostgreSQL Linuxpgsql.connections.disabled[{$PG_CONNINFO},{$PG_PATH}]62FF5656020Mamonsu PostgreSQL Linuxpgsql.connections.total[{$PG_CONNINFO},{$PG_PATH}]72006AAE020Mamonsu PostgreSQL Linuxpgsql.connections.waiting[{$PG_CONNINFO},{$PG_PATH}]8287C2B9020Mamonsu PostgreSQL Linuxpgsql.connections.other[{$PG_CONNINFO},{$PG_PATH}]System: Block Devices Read/Write Operations9002000.0100.0110100.00.000000200CC00020Mamonsu PostgreSQL Linuxsystem.disk.all_read12FF5656020Mamonsu PostgreSQL Linuxsystem.disk.all_writeSystem: Block Devices Read/Write Bytes9002000.0100.0110100.00.000000200CC00020Mamonsu PostgreSQL Linuxsystem.disk.all_read_b12FF5656020Mamonsu PostgreSQL Linuxsystem.disk.all_write_bPostgreSQL Instance: Blocks Rate9002000.0100.0110100.00.000000287C2B9020Mamonsu PostgreSQL Linuxpgsql.blocks.hit[{$PG_CONNINFO},{$PG_PATH}]12793F5D020Mamonsu PostgreSQL Linuxpgsql.blocks.read[{$PG_CONNINFO},{$PG_PATH}]PostgreSQL Instance: Transactions Rate9002000.0100.0110100.00.000000200CC00020Mamonsu PostgreSQL Linuxpgsql.transactions.committed[{$PG_CONNINFO},{$PG_PATH}]12FF5656020Mamonsu PostgreSQL Linuxpgsql.events.xact_rollback[{$PG_CONNINFO},{$PG_PATH}]PostgreSQL Instance: Events9002000.0100.0110100.00.000000200CC00020Mamonsu PostgreSQL Linuxpgsql.events.conflicts[{$PG_CONNINFO},{$PG_PATH}]12FF5656020Mamonsu PostgreSQL Linuxpgsql.events.deadlocks[{$PG_CONNINFO},{$PG_PATH}]22006AAE020Mamonsu PostgreSQL Linuxpgsql.events.checksum_failures[{$PG_CONNINFO},{$PG_PATH}]PostgreSQL Instance: Temp Files9002000.0100.0110100.00.000000200B0B8020Mamonsu PostgreSQL Linuxpgsql.temp.bytes[{$PG_CONNINFO},{$PG_PATH}]12006AAE120Mamonsu PostgreSQL Linuxpgsql.temp.files[{$PG_CONNINFO},{$PG_PATH}]PostgreSQL Instance: Tuples9002000.0100.0110100.00.0000002FF5656020Mamonsu PostgreSQL Linuxpgsql.tuples.deleted[{$PG_CONNINFO},{$PG_PATH}]12006AAE020Mamonsu PostgreSQL Linuxpgsql.tuples.fetched[{$PG_CONNINFO},{$PG_PATH}]2200CC00020Mamonsu PostgreSQL Linuxpgsql.tuples.inserted[{$PG_CONNINFO},{$PG_PATH}]32001219120Mamonsu PostgreSQL Linuxpgsql.tuples.returned[{$PG_CONNINFO},{$PG_PATH}]429C8A4E020Mamonsu PostgreSQL Linuxpgsql.tuples.updated[{$PG_CONNINFO},{$PG_PATH}]System: Server Memory Detailed Overview9004000.0100.0111100.00.0000000BAEB6B020Mamonsu PostgreSQL Linuxsystem.memory.active1000CC00020Mamonsu PostgreSQL Linuxsystem.memory.available2000B0B8020Mamonsu PostgreSQL Linuxsystem.memory.buffers3052768F020Mamonsu PostgreSQL Linuxsystem.memory.cached409C8A4E020Mamonsu PostgreSQL Linuxsystem.memory.committed50A39B98020Mamonsu PostgreSQL Linuxsystem.memory.inactive609F1E28020Mamonsu PostgreSQL Linuxsystem.memory.mapped70793F5D020Mamonsu PostgreSQL Linuxsystem.memory.page_tables80F6CB93020Mamonsu PostgreSQL Linuxsystem.memory.slab90006AAE020Mamonsu PostgreSQL Linuxsystem.memory.swap10087C2B9020Mamonsu PostgreSQL Linuxsystem.memory.swap_cache1103B415A020Mamonsu PostgreSQL Linuxsystem.memory.unused120001219020Mamonsu PostgreSQL Linuxsystem.memory.used130CF6518020Mamonsu PostgreSQL Linuxsystem.memory.vmalloc_usedSystem: Server Free/Used Memory Overview9004000.0100.0110100.00.0000001001219020Mamonsu PostgreSQL Linuxsystem.memory.used1152768F020Mamonsu PostgreSQL Linuxsystem.memory.cached2100CC00020Mamonsu PostgreSQL Linuxsystem.memory.available34FF5656020Mamonsu PostgreSQL Linuxsystem.memory.totalPostgreSQL pg_buffercache: Shared Buffer9002000.0100.0110100.00.000000200CC00020Mamonsu PostgreSQL Linuxpgsql.buffers.size[{$PG_CONNINFO},{$PG_PATH}]12006AAE020Mamonsu PostgreSQL Linuxpgsql.buffers.twice_used[{$PG_CONNINFO},{$PG_PATH}]22FF5656020Mamonsu PostgreSQL Linuxpgsql.buffers.dirty[{$PG_CONNINFO},{$PG_PATH}]PostgreSQL: Locks Sampling9002000.0100.0110100.00.000000200CC00020Mamonsu PostgreSQL Linuxpgsql.pg_locks.accessshare[{$PG_CONNINFO},{$PG_PATH}]123B415A020Mamonsu PostgreSQL Linuxpgsql.pg_locks.rowshare[{$PG_CONNINFO},{$PG_PATH}]22FF5656020Mamonsu PostgreSQL Linuxpgsql.pg_locks.rowexclusive[{$PG_CONNINFO},{$PG_PATH}]32F6CB93020Mamonsu PostgreSQL Linuxpgsql.pg_locks.shareupdateexclusive[{$PG_CONNINFO},{$PG_PATH}]42006AAE020Mamonsu PostgreSQL Linuxpgsql.pg_locks.share[{$PG_CONNINFO},{$PG_PATH}]5200B0B8020Mamonsu PostgreSQL Linuxpgsql.pg_locks.sharerowexclusive[{$PG_CONNINFO},{$PG_PATH}]629C8A4E020Mamonsu PostgreSQL Linuxpgsql.pg_locks.exclusive[{$PG_CONNINFO},{$PG_PATH}]72793F5D020Mamonsu PostgreSQL Linuxpgsql.pg_locks.accessexclusive[{$PG_CONNINFO},{$PG_PATH}]PostgreSQL Prepared Transactions: Overview9002000.0100.0110100.00.0000002A39B98020Mamonsu PostgreSQL Linuxpgsql.prepared.count129C8A4E120Mamonsu PostgreSQL Linuxpgsql.prepared.oldestSystem: Processes Overview9002000.0100.0110100.00.000000200CC00020Mamonsu PostgreSQL Linuxsystem.processes.running12FF5656020Mamonsu PostgreSQL Linuxsystem.processes.blocked22006AAE120Mamonsu PostgreSQL Linuxsystem.processes.forkrateSystem: CPU Time Spent9002000.0100.0111100.00.000000200CC00020Mamonsu PostgreSQL Linuxsystem.cpu.user12793F5D020Mamonsu PostgreSQL Linuxsystem.cpu.nice229C8A4E020Mamonsu PostgreSQL Linuxsystem.cpu.system32A39B98020Mamonsu PostgreSQL Linuxsystem.cpu.idle42006AAE020Mamonsu PostgreSQL Linuxsystem.cpu.iowait52FF5656020Mamonsu PostgreSQL Linuxsystem.cpu.irq62F6CB93020Mamonsu PostgreSQL Linuxsystem.cpu.softirqPostgreSQL Statements: Bytes9002000.0100.0110100.00.000000287C2B9020Mamonsu PostgreSQL Linuxpgsql.stat.read_bytes[{$PG_CONNINFO},{$PG_PATH}]12793F5D020Mamonsu PostgreSQL Linuxpgsql.stat.write_bytes[{$PG_CONNINFO},{$PG_PATH}]229C8A4E020Mamonsu PostgreSQL Linuxpgsql.stat.dirty_bytes[{$PG_CONNINFO},{$PG_PATH}]PostgreSQL Statements: Spent Time9002000.0100.0111100.00.000000287C2B9020Mamonsu PostgreSQL Linuxpgsql.stat.read_time[{$PG_CONNINFO},{$PG_PATH}]12793F5D020Mamonsu PostgreSQL Linuxpgsql.stat.write_time[{$PG_CONNINFO},{$PG_PATH}]229C8A4E020Mamonsu PostgreSQL Linuxpgsql.stat.other_time[{$PG_CONNINFO},{$PG_PATH}]PostgreSQL Statements: WAL Statistics9002000.0100.0110100.00.000000200B0B8020Mamonsu PostgreSQL Linuxpgsql.stat.wal_bytes[{$PG_CONNINFO},{$PG_PATH}]12006AAE020Mamonsu PostgreSQL Linuxpgsql.stat.wal_records[{$PG_CONNINFO},{$PG_PATH}]229C8A4E020Mamonsu PostgreSQL Linuxpgsql.stat.wal_fpi[{$PG_CONNINFO},{$PG_PATH}] \ No newline at end of file diff --git a/packaging/conf/template_linux.xml b/packaging/conf/template_linux.xml index dce07f0..d8b75f5 100644 --- a/packaging/conf/template_linux.xml +++ b/packaging/conf/template_linux.xml @@ -21,12 +21,12 @@ Mamonsu PostgreSQL Linux - PostgreSQL Archiver: Files in archive_status Need to Archive Count200pgsql.archive_command[count_files_to_archive]736501530000100Mamonsu PostgreSQL LinuxPostgreSQL Archiver: Files Need to Archive Size200pgsql.archive_command[size_files_to_archive]73650153b0000100Mamonsu PostgreSQL LinuxPostgreSQL Archiver: Archived Files Count200pgsql.archive_command[archived_files]736501532000100Mamonsu PostgreSQL LinuxPostgreSQL Archiver: Attempts to Archive Files Count200pgsql.archive_command[failed_trying_to_archive]736501532000100Mamonsu PostgreSQL LinuxPostgreSQL bgwriter: Buffers Written During Checkpoints200pgsql.bgwriter[buffers_checkpoint]736501530000100Mamonsu PostgreSQL LinuxPostgreSQL bgwriter: Buffers Written200pgsql.bgwriter[buffers_clean]736501530000100Mamonsu PostgreSQL LinuxPostgreSQL bgwriter: Number of bgwriter Stopped by Max Write Count200pgsql.bgwriter[maxwritten_clean]736501530000100Mamonsu PostgreSQL LinuxPostgreSQL bgwriter: Buffers Written Directly by a Backend200pgsql.bgwriter[buffers_backend]736501530000100Mamonsu PostgreSQL LinuxPostgreSQL bgwriter: Times a Backend Execute Its Own Fsync200pgsql.bgwriter[buffers_backend_fsync]736501530000100Mamonsu PostgreSQL LinuxPostgreSQL bgwriter: Buffers Allocated200pgsql.bgwriter[buffers_alloc]736501530000100Mamonsu PostgreSQL LinuxPostgreSQL CFS: Written byte/s200pgsql.cfs.activity[written_bytes]73650600Bps0000100Mamonsu PostgreSQL LinuxPostgreSQL CFS: Scanned byte/s200pgsql.cfs.activity[scanned_bytes]73650600Bps0000100Mamonsu PostgreSQL LinuxPostgreSQL CFS: Compressed Files200pgsql.cfs.activity[compressed_files]736506000000100Mamonsu PostgreSQL LinuxPostgreSQL CFS: Scanned Files200pgsql.cfs.activity[scanned_files]736506000000100Mamonsu PostgreSQL LinuxPostgreSQL CFS: Current Ratio200pgsql.cfs.activity[current_compress_ratio]736506000000100Mamonsu PostgreSQL LinuxPostgreSQL CFS: Total Ratio200pgsql.cfs.activity[total_compress_ratio]736506000000100Mamonsu PostgreSQL LinuxPostgreSQL Checkpoints: by Timeout (in hour)200pgsql.checkpoint[count_timed]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Checkpoints: by WAL (in hour)200pgsql.checkpoint[count_wal]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Checkpoints: Write Time200pgsql.checkpoint[write_time]73650150ms0000100Mamonsu PostgreSQL LinuxPostgreSQL Checkpoints: Sync Time200pgsql.checkpoint[checkpoint_sync_time]73650150ms0000100Mamonsu PostgreSQL LinuxPostgreSQL Connections: Number of Total User Connections200pgsql.connections[total]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Connections: Number of Waiting User Connections200pgsql.connections[waiting]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Connections: Max Connections200pgsql.connections[max_connections]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Connections: Number of Active User Connections200pgsql.connections[active]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Connections: Number of Idle User Connections200pgsql.connections[idle]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Connections: Number of Idle in Transaction User Connections200pgsql.connections[idle_in_transaction]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Connections: Number of Idle in Transaction (Aborted) User Connections200pgsql.connections[idle_in_transaction_aborted]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Connections: Number of Fastpath Function Call User Connections200pgsql.connections[fastpath_function_call]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Connections: Number of Disabled User Connections200pgsql.connections[disabled]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Connections: Number of Other Connections200pgsql.connections[other]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Autovacuum: Count of Autovacuum Workers200pgsql.autovacumm.count[]736501500000100Mamonsu PostgreSQL LinuxSystem: Block Devices Read Requests200system.disk.all_read[]736501500000100Mamonsu PostgreSQL LinuxSystem: Block Devices Write Requests200system.disk.all_write[]736501500000100Mamonsu PostgreSQL LinuxSystem: Block Devices Read byte/s200system.disk.all_read_b[]736501500000100Mamonsu PostgreSQL LinuxSystem: Block Devices Write byte/s200system.disk.all_write_b[]736501500000100Mamonsu PostgreSQL LinuxMamonsu: Plugin Errors200mamonsu.plugin.errors[]736506040000100Mamonsu PostgreSQL LinuxMamonsu: Plugin Keep Alive200mamonsu.plugin.keepalive[]736506000000100Mamonsu PostgreSQL LinuxMamonsu: RSS Memory Max Usage200mamonsu.memory.rss[max]73650600b0000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Transactions Committed200pgsql.transactions[committed]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Server Mode200pgsql.server_mode736501540000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Rollback Events200pgsql.events[xact_rollback]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Server Mode200pgsql.server_mode736501540000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Blocks Hit200pgsql.blocks[hit]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Server Mode200pgsql.server_mode736501540000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Blocks Read200pgsql.blocks[read]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Server Mode200pgsql.server_mode736501540000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Conflict Events200pgsql.events[conflicts]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Server Mode200pgsql.server_mode736501540000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Deadlock Events200pgsql.events[deadlocks]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Server Mode200pgsql.server_mode736501540000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Temp Bytes Written200pgsql.temp[bytes]73650150b0000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Server Mode200pgsql.server_mode736501540000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Temp Files Created200pgsql.temp[files]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Server Mode200pgsql.server_mode736501540000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Tuples Deleted200pgsql.tuples[deleted]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Server Mode200pgsql.server_mode736501540000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Tuples Fetched200pgsql.tuples[fetched]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Server Mode200pgsql.server_mode736501540000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Tuples Inserted200pgsql.tuples[inserted]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Server Mode200pgsql.server_mode736501540000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Tuples Returned200pgsql.tuples[returned]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Server Mode200pgsql.server_mode736501540000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Tuples Updated200pgsql.tuples[updated]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Server Mode200pgsql.server_mode736501540000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: checksum_failures Events200pgsql.events[checksum_failures]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Server Mode200pgsql.server_mode736501540000100Mamonsu PostgreSQL LinuxSystem: Load Average Over 1 Minute200system.la[1]736501500000100Mamonsu PostgreSQL LinuxSystem: Active - Memory Recently Used200system.memory[active]73650153b0000100Mamonsu PostgreSQL LinuxSystem: Available - Free Memory200system.memory[available]73650153b0000100Mamonsu PostgreSQL LinuxSystem: Buffers - Block Device Cache and Dirty200system.memory[buffers]73650153b0000100Mamonsu PostgreSQL LinuxSystem: Cached - Parked File Data (file content) Cache200system.memory[cached]73650153b0000100Mamonsu PostgreSQL LinuxSystem: Committed AS - Total Committed Memory200system.memory[committed]73650153b0000100Mamonsu PostgreSQL LinuxSystem: Inactive - Memory Not Currently Used200system.memory[inactive]73650153b0000100Mamonsu PostgreSQL LinuxSystem: Mapped - All mmap()ed Pages200system.memory[mapped]73650153b0000100Mamonsu PostgreSQL LinuxSystem: PageTables - Map bt Virtual and Physical200system.memory[page_tables]73650153b0000100Mamonsu PostgreSQL LinuxSystem: Slab - Kernel Used Memory (inode cache)200system.memory[slab]73650153b0000100Mamonsu PostgreSQL LinuxSystem: Swap - Swap Space Used200system.memory[swap]73650153b0000100Mamonsu PostgreSQL LinuxSystem: SwapCached - Fetched unmod Yet Swap Pages200system.memory[swap_cache]73650153b0000100Mamonsu PostgreSQL LinuxSystem: Total - All Memory200system.memory[total]73650153b0000100Mamonsu PostgreSQL LinuxSystem: Unused - Wasted Memory200system.memory[unused]73650153b0000100Mamonsu PostgreSQL LinuxSystem: Used - User-Space Applications200system.memory[used]73650153b0000100Mamonsu PostgreSQL LinuxSystem: VMallocUsed - vmaloc() Allocated by Kernel200system.memory[vmalloc_used]73650153b0000100Mamonsu PostgreSQL LinuxPostgreSQL Memory Leak: Number of Pids Which Private Anonymous Memory Exceeds private_anon_mem_threshold200pgsql.memory_leak_diagnostic.count_diff[]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Memory Leak: Number of Pids Which Private Anonymous Memory Exceeds private_anon_mem_threshold, text of message200pgsql.memory_leak_diagnostic.msg_text[]736501540000100Mamonsu PostgreSQL LinuxPostgreSQL Transactions: Age of the Oldest XID200pgsql.oldest[xid_age]736501530000100Mamonsu PostgreSQL LinuxPostgreSQL Transactions: the Oldest Transaction Running Time in sec200pgsql.oldest[transaction_time]73650150s0000100Mamonsu PostgreSQL LinuxPostgreSQL Transactions: Number of Parallel Queries Being Executed Now200pgsql.parallel[queries]736501530000100Mamonsu PostgreSQL LinuxSystem: Opened Files200system.open_files[]736501530000100Mamonsu PostgreSQL LinuxPostgreSQL pg_buffercache: Shared Buffer Size200pgsql.buffers[size]73650150b0000100Mamonsu PostgreSQL LinuxPostgreSQL pg_buffercache: Shared Buffer Twice Used Size200pgsql.buffers[twice_used]73650150b0000100Mamonsu PostgreSQL LinuxPostgreSQL pg_buffercache: Shared Buffer Dirty Size200pgsql.buffers[dirty]73650150b0000100Mamonsu PostgreSQL LinuxPostgreSQL Health: Ping200pgsql.ping[]73650150ms0000100Mamonsu PostgreSQL LinuxPostgreSQL Health: Cache Hit Ratio1500pgsql.cache[hit]73650600%00001last(pgsql.blocks[hit])*100/(last(pgsql.blocks[hit])+last(pgsql.blocks[read]))00Mamonsu PostgreSQL LinuxPostgreSQL Health: Service Uptime200pgsql.uptime[]73650153unixtime0000100Mamonsu PostgreSQL LinuxPostgreSQL Health: Server Version200pgsql.version[]736501540000100Mamonsu PostgreSQL LinuxPostgreSQL Locks: Read Only Queries200pgsql.pg_locks[accessshare]736501530000100Mamonsu PostgreSQL LinuxPostgreSQL Locks: SELECT FOR SHARE and SELECT FOR UPDATE200pgsql.pg_locks[rowshare]736501530000100Mamonsu PostgreSQL LinuxPostgreSQL Locks: Write Queries200pgsql.pg_locks[rowexclusive]736501530000100Mamonsu PostgreSQL LinuxPostgreSQL Locks: VACUUM, ANALYZE, CREATE INDEX CONCURRENTLY200pgsql.pg_locks[shareupdateexclusive]736501530000100Mamonsu PostgreSQL LinuxPostgreSQL Locks: CREATE INDEX200pgsql.pg_locks[share]736501530000100Mamonsu PostgreSQL LinuxPostgreSQL Locks: Locks from Application200pgsql.pg_locks[sharerowexclusive]736501530000100Mamonsu PostgreSQL LinuxPostgreSQL Locks: Locks from Application or Some Operations on System Catalogs200pgsql.pg_locks[exclusive]736501530000100Mamonsu PostgreSQL LinuxPostgreSQL Locks: ALTER TABLE, DROP TABLE, TRUNCATE, REINDEX, CLUSTER, VACUUM FULL, LOCK TABLE200pgsql.pg_locks[accessexclusive]736501530000100Mamonsu PostgreSQL LinuxPostgreSQL Prepared Transactions: Number of Prepared Transactions200pgsql.prepared.count736506000000100Mamonsu PostgreSQL LinuxPostgreSQL Prepared Transactions: the Oldest Prepared Transaction Running Time in sec200pgsql.prepared.oldest736501500000100Mamonsu PostgreSQL LinuxSystem: Processes in State Running200system.processes[running]736501500000100Mamonsu PostgreSQL LinuxSystem: Processes in State Blocked200system.processes[blocked]736501500000100Mamonsu PostgreSQL LinuxSystem: Processes Forkrate200system.processes[forkrate]736501500000100Mamonsu PostgreSQL LinuxSystem: CPU Time Spent by Normal Programs and Daemons200system.cpu[user]736501500000100Mamonsu PostgreSQL LinuxSystem: CPU Time Spent by nice(1)d Programs200system.cpu[nice]736501500000100Mamonsu PostgreSQL LinuxSystem: CPU Time Spent by the Kernel in System Activities200system.cpu[system]736501500000100Mamonsu PostgreSQL LinuxSystem: CPU Time Spent Idle200system.cpu[idle]736501500000100Mamonsu PostgreSQL LinuxSystem: CPU Time Spent Waiting for I/O Operations200system.cpu[iowait]736501500000100Mamonsu PostgreSQL LinuxSystem: CPU Time Spent Handling Interrupts200system.cpu[irq]736501500000100Mamonsu PostgreSQL LinuxSystem: CPU Time Spent Handling Batched Interrupts200system.cpu[softirq]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Replication: Streaming Replication Lag200pgsql.replication_lag[sec]736506000000100Mamonsu PostgreSQL LinuxPostgreSQL Replication: Count Non-Active Replication Slots200pgsql.replication.non_active_slots[]736506030000100Mamonsu PostgreSQL LinuxPostgreSQL Statements: Read bytes/s200pgsql.stat[read_bytes]73650150Bps0000100Mamonsu PostgreSQL LinuxPostgreSQL Statements: Write bytes/s200pgsql.stat[write_bytes]73650150Bps0000100Mamonsu PostgreSQL LinuxPostgreSQL Statements: Dirty bytes/s200pgsql.stat[dirty_bytes]73650150Bps0000100Mamonsu PostgreSQL LinuxPostgreSQL Statements: Read IO Time200pgsql.stat[read_time]73650150s0000100Mamonsu PostgreSQL LinuxPostgreSQL Statements: Write IO Time200pgsql.stat[write_time]73650150s0000100Mamonsu PostgreSQL LinuxPostgreSQL Statements: Other (mostly CPU) Time200pgsql.stat[other_time]73650150s0000100Mamonsu PostgreSQL LinuxPostgreSQL Statements: Amount of WAL Files200pgsql.stat[wal_bytes]73650150Bps0000100Mamonsu PostgreSQL LinuxPostgreSQL Statements: Amount of WAL Records200pgsql.stat[wal_records]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Statements: Full Page Writes200pgsql.stat[wal_fpi]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Statements: Nnumber of Times pg_stat_statements.max Was Exceeded200pgsql.stat_info[dealloc]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Statements: Last Statistics Reset Time200pgsql.stat_info[stats_reset]73650150unixtime0000100Mamonsu PostgreSQL LinuxSystem: Uptime200system.uptime[]73650153uptime0000100Mamonsu PostgreSQL LinuxPostgreSQL Wait Sampling: Lightweight Locks200pgsql.all_lock[lwlock]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Wait Sampling: Heavyweight Locks200pgsql.all_lock[hwlock]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Wait Sampling: Buffer Locks200pgsql.all_lock[buffer]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Wait Sampling: Extension Locks200pgsql.all_lock[extension]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Wait Sampling: Client Locks200pgsql.all_lock[client]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Wait Sampling: Other Locks (e.g. IPC, Timeout, IO)200pgsql.all_lock[other]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Wait Sampling LWLocks: XID Access Locks200pgsql.lwlock[xid]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Wait Sampling LWLocks: Autovacuum Locks200pgsql.lwlock[autovacuum]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Wait Sampling LWLocks: WAL Access Locks200pgsql.lwlock[wal]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Wait Sampling LWLocks: CLOG Access Locks200pgsql.lwlock[clog]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Wait Sampling LWLocks: Replication Locks200pgsql.lwlock[replication]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Wait Sampling LWLocks: Logical Replication Locks200pgsql.lwlock[logical_replication]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Wait Sampling LWLocks: Buffer Operations Locks200pgsql.lwlock[buffer]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Wait Sampling LWLocks: Other Operations Lightweight Locks200pgsql.lwlock[other]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Wait Sampling HWLocks: Locks on a Relation200pgsql.hwlock[relation]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Wait Sampling HWLocks: Extend a Relation Locks200pgsql.hwlock[extend]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Wait Sampling HWLocks: Locks on a Page200pgsql.hwlock[page]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Wait Sampling HWLocks: Locks on a Tuple200pgsql.hwlock[tuple]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Wait Sampling HWLocks: Transaction to Finish Locks200pgsql.hwlock[transactionid]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Wait Sampling HWLocks: Virtual XID Locks200pgsql.hwlock[virtualxid]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Wait Sampling HWLocks: Speculative Insertion Locks200pgsql.hwlock[speculative_token]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Wait Sampling HWLocks: Locks on Database Object200pgsql.hwlock[object]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Wait Sampling HWLocks: Userlocks200pgsql.hwlock[userlock]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Wait Sampling HWLocks: Advisory User Locks200pgsql.hwlock[advisory]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL WAL: Write Speed200pgsql.wal.write[]73650600Bps0000100Mamonsu PostgreSQL LinuxPostgreSQL WAL: Count of WAL Files200pgsql.wal.count[]736506000000100Mamonsu PostgreSQL LinuxPostgreSQL WAL: Records Generated200pgsql.wal.records.count[]736506000000100Mamonsu PostgreSQL LinuxPostgreSQL WAL: Full Page Images Generated200pgsql.wal.fpi.count[]736506000000100Mamonsu PostgreSQL LinuxPostgreSQL WAL: Buffers Full200pgsql.wal.buffers_full736506000000100Mamonsu PostgreSQL LinuxPostgreSQL WAL: Write Time (ms)200pgsql.wal.write_time736506000000100Mamonsu PostgreSQL LinuxPostgreSQL WAL: Sync Time (ms)200pgsql.wal.sync_time736506000000100Mamonsu PostgreSQL LinuxPostgreSQL WAL: Sync Duty (%)1500pgsql.wal.sync_duty73650600%00001last(pgsql.wal.sync_time)/1000Mamonsu PostgreSQL Linux - PostgreSQL CFS Discovery260000007pgsql.cfs.discovery_compressed_relations[]{#COMPRESSED_RELATION}.*8A0PostgreSQL CFS: Relation {#COMPRESSED_RELATION} Compress Ratio200pgsql.cfs.compress_ratio[{#COMPRESSED_RELATION}]7365060000000100Mamonsu PostgreSQL LinuxPostgreSQL CFS: Relation {#COMPRESSED_RELATION} Compress Ratio9002000.0100.0110100.00.0000000A39B98020Mamonsu PostgreSQL Linuxpgsql.cfs.compress_ratio[{#COMPRESSED_RELATION}]PostgreSQL Databases Discovery260000007pgsql.database.discovery[]{#DATABASE}.*8A0PostgreSQL Databases {#DATABASE}: size200pgsql.database.size[{#DATABASE}]73650153b0000100Mamonsu PostgreSQL LinuxPostgreSQL Databases: Max datfrozenxid Age in: {#DATABASE}200pgsql.database.max_age[{#DATABASE}]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Databases: Count of Bloating Tables in {#DATABASE}200pgsql.database.bloating_tables[{#DATABASE}]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Databases: Count of Invalid Indexes in {#DATABASE}200pgsql.database.invalid_indexes[{#DATABASE}]736501500000100Mamonsu PostgreSQL Linux{Mamonsu PostgreSQL Linux:pgsql.database.invalid_indexes[{#DATABASE}].last()}>0PostgreSQL Databases: invalid indexes in {#DATABASE} (hostname={HOSTNAME} value={ITEM.LASTVALUE})030PostgreSQL Databases: {#DATABASE} size9002000.0100.0111100.00.0000002A39B98020Mamonsu PostgreSQL Linuxpgsql.database.size[{#DATABASE}]PostgreSQL Databases: {#DATABASE} Bloating Overview9002000.0100.0110100.00.000000287C2B9020Mamonsu PostgreSQL Linuxpgsql.database.bloating_tables[{#DATABASE}]12793F5D120Mamonsu PostgreSQL Linuxpgsql.autovacumm.count[]PostgreSQL Databases: {#DATABASE} Max age(datfrozenxid)9002000.0100.0110100.00.000000287C2B9020Mamonsu PostgreSQL Linuxpgsql.database.max_age[{#DATABASE}]12793F5D120Mamonsu PostgreSQL Linuxpgsql.autovacumm.count[]VFS Discovery260000007system.vfs.discovery[]{#MOUNTPOINT}.*8A0System: Mount Point {#MOUNTPOINT} Used200system.vfs.used[{#MOUNTPOINT}]73650153b0000100Mamonsu PostgreSQL LinuxSystem: Mount Point {#MOUNTPOINT} Free200system.vfs.free[{#MOUNTPOINT}]73650153b0000100Mamonsu PostgreSQL LinuxSystem: Mount Point {#MOUNTPOINT} Free in Percents200system.vfs.percent_free[{#MOUNTPOINT}]73650150%0000100Mamonsu PostgreSQL LinuxSystem: Mount Point {#MOUNTPOINT} Free Inodes in Percent200system.vfs.percent_inode_free[{#MOUNTPOINT}]73650150%0000100Mamonsu PostgreSQL Linux{Mamonsu PostgreSQL Linux:system.vfs.percent_free[{#MOUNTPOINT}].last()}<10Free disk space less than 10% on mountpoint {#MOUNTPOINT} (hostname={HOSTNAME} value={ITEM.LASTVALUE})030{Mamonsu PostgreSQL Linux:system.vfs.percent_inode_free[{#MOUNTPOINT}].last()}<10Free inode space less than 10% on mountpoint {#MOUNTPOINT} (hostname={HOSTNAME} value={ITEM.LASTVALUE})030System: Mount Point Overview {#MOUNTPOINT}9002000.0100.0111100.00.0000002FF5656020Mamonsu PostgreSQL Linuxsystem.vfs.used[{#MOUNTPOINT}]1200CC00020Mamonsu PostgreSQL Linuxsystem.vfs.free[{#MOUNTPOINT}]System: Block Devices Discovery260000007system.disk.discovery[]{#BLOCKDEVICE}.*8A0System: Block Device {#BLOCKDEVICE} Utilization200system.disk.utilization[{#BLOCKDEVICE}]73650150%0000100Mamonsu PostgreSQL LinuxSystem: Block Device {#BLOCKDEVICE} Read Operations200system.disk.read[{#BLOCKDEVICE}]736501500000100Mamonsu PostgreSQL LinuxSystem: Block Device {#BLOCKDEVICE} Write Operations200system.disk.write[{#BLOCKDEVICE}]736501500000100Mamonsu PostgreSQL LinuxSystem: Block Device {#BLOCKDEVICE} Read byte/s200system.disk.read_b[{#BLOCKDEVICE}]73650150b0000100Mamonsu PostgreSQL LinuxSystem: Block Device {#BLOCKDEVICE} Write byte/s200system.disk.write_b[{#BLOCKDEVICE}]73650150b0000100Mamonsu PostgreSQL LinuxSystem: Block Device Overview {#BLOCKDEVICE} operations9002000.0100.0110100.00.000000200CC00020Mamonsu PostgreSQL Linuxsystem.disk.read[{#BLOCKDEVICE}]12FF5656020Mamonsu PostgreSQL Linuxsystem.disk.write[{#BLOCKDEVICE}]22006AAE120Mamonsu PostgreSQL Linuxsystem.disk.utilization[{#BLOCKDEVICE}]System: Block Device Overview {#BLOCKDEVICE} byte/s9002000.0100.0110100.00.000000200CC00020Mamonsu PostgreSQL Linuxsystem.disk.read_b[{#BLOCKDEVICE}]12FF5656020Mamonsu PostgreSQL Linuxsystem.disk.write_b[{#BLOCKDEVICE}]22006AAE120Mamonsu PostgreSQL Linuxsystem.disk.utilization[{#BLOCKDEVICE}]Net Iface Discovery260000007system.net.discovery[]{#NETDEVICE}.*8A0System: Network Device {#NETDEVICE} RX bytes/s200system.net.rx_bytes[{#NETDEVICE}]73650150b0000100Mamonsu PostgreSQL LinuxSystem: Network Device {#NETDEVICE} RX errors/s200system.net.rx_errs[{#NETDEVICE}]736501500000100Mamonsu PostgreSQL LinuxSystem: Network Device {#NETDEVICE} RX drops/s200system.net.rx_drop[{#NETDEVICE}]736501500000100Mamonsu PostgreSQL LinuxSystem: Network Device {#NETDEVICE} TX bytes/s200system.net.tx_bytes[{#NETDEVICE}]73650150b0000100Mamonsu PostgreSQL LinuxSystem: Network Device {#NETDEVICE} TX errors/s200system.net.tx_errs[{#NETDEVICE}]736501500000100Mamonsu PostgreSQL LinuxSystem: Network Device {#NETDEVICE} TX drops/s200system.net.tx_drop[{#NETDEVICE}]736501500000100Mamonsu PostgreSQL LinuxSystem: Network Device {#NETDEVICE}9002000.0100.0110100.00.000000287C2B9020Mamonsu PostgreSQL Linuxsystem.net.rx_bytes[{#NETDEVICE}]12793F5D020Mamonsu PostgreSQL Linuxsystem.net.tx_bytes[{#NETDEVICE}]pg_probackup discovery260000007pg_probackup.discovery[]{#BACKUPDIR}.*8A0pg_probackup dir {#BACKUPDIR}: size200pg_probackup.dir.size[{#BACKUPDIR}]736503003b0000100Mamonsu PostgreSQL Linuxpg_probackup dir {#BACKUPDIR}: error200pg_probackup.dir.error[{#BACKUPDIR}]7365030040000100Mamonsu PostgreSQL Linux{Mamonsu PostgreSQL Linux:pg_probackup.dir.error[{#BACKUPDIR}].str(ok)}<>1Error in pg_probackup dir {#BACKUPDIR} (hostname={HOSTNAME} value={ITEM.LASTVALUE})030pg_probackup backup dir: {#BACKUPDIR} size9002000.0100.0111100.00.0000002A39B98020Mamonsu PostgreSQL Linuxpg_probackup.dir.size[{#BACKUPDIR}]PostgreSQL Relations Sizes Discovery260000007pgsql.relation.size[]{#RELATIONNAME}.*8A0PostgreSQL Relation Size: {#RELATIONNAME}200pgsql.relation.size[{#RELATIONNAME}]73650153b0000100Mamonsu PostgreSQL LinuxPostgreSQL Relation Size: {#RELATIONNAME}9002000.0100.0111100.00.0000002A39B98020Mamonsu PostgreSQL Linuxpgsql.relation.size[{#RELATIONNAME}]PostgreSQL Replication Lag Discovery260000007pgsql.replication.discovery[]{#APPLICATION_NAME}.*8A0PostgreSQL Replication: {#APPLICATION_NAME} Send Lag - Time elapsed sending recent WAL locally200pgsql.replication.send_lag[{#APPLICATION_NAME}]736506000000100Mamonsu PostgreSQL LinuxPostgreSQL Replication: {#APPLICATION_NAME} Receive Lag - Time elapsed between receiving recent WAL locally and receiving notification that this standby server has flushed it200pgsql.replication.receive_lag[{#APPLICATION_NAME}]736506000000100Mamonsu PostgreSQL LinuxPostgreSQL Replication: {#APPLICATION_NAME} Write Lag - Time elapsed between flushing recent WAL locally and receiving notification that this standby server has written it200pgsql.replication.write_lag[{#APPLICATION_NAME}]736506000000100Mamonsu PostgreSQL LinuxPostgreSQL Replication: {#APPLICATION_NAME} Flush Lag - Time elapsed between flushing recent WAL locally and receiving notification that this standby server has written and flushed it200pgsql.replication.flush_lag[{#APPLICATION_NAME}]736506000000100Mamonsu PostgreSQL LinuxPostgreSQL Replication: {#APPLICATION_NAME} Replay Lag - Time elapsed between flushing recent WAL locally and receiving notification that this standby server has written, flushed and applied200pgsql.replication.replay_lag[{#APPLICATION_NAME}]736506000000100Mamonsu PostgreSQL LinuxPostgreSQL Replication: {#APPLICATION_NAME} Delta of Total Lag200pgsql.replication.total_lag[{#APPLICATION_NAME}]736506000000100Mamonsu PostgreSQL LinuxPostgreSQL Replication: Delta of Total Lag for {#APPLICATION_NAME}9002000.0100.0110100.00.0000000A39B98020Mamonsu PostgreSQL Linuxpgsql.replication.total_lag[{#APPLICATION_NAME}] + PostgreSQL Archiver: Files in archive_status Need to Archive Count200pgsql.archive_command[count_files_to_archive]736506030000100Mamonsu PostgreSQL LinuxPostgreSQL Archiver: Files Need to Archive Size200pgsql.archive_command[size_files_to_archive]73650603b0000100Mamonsu PostgreSQL LinuxPostgreSQL Archiver: Archived Files Count200pgsql.archive_command[archived_files]736506032000100Mamonsu PostgreSQL LinuxPostgreSQL Archiver: Attempts to Archive Files Count200pgsql.archive_command[failed_trying_to_archive]736506032000100Mamonsu PostgreSQL LinuxPostgreSQL Autovacuum: Count of Autovacuum Workers200pgsql.autovacuum.count[]736503000000100Mamonsu PostgreSQL LinuxPostgreSQL Autovacuum: Utilization per 30 seconds200pgsql.autovacuum.utilization[]73650300%0000100Mamonsu PostgreSQL LinuxPostgreSQL Autovacuum: Average Utilization per 5 minutes1500pgsql.autovacuum.utilization.avg5[]73650300%00001avg(pgsql.autovacuum.utilization[], 5m)00Mamonsu PostgreSQL LinuxPostgreSQL Autovacuum: Average Utilization per 15 minutes1500pgsql.autovacuum.utilization.avg15[]73650300%00001avg(pgsql.autovacuum.utilization[], 15m)00Mamonsu PostgreSQL LinuxPostgreSQL Autovacuum: Average Utilization per 30 minutes1500pgsql.autovacuum.utilization.avg30[]73650300%00001avg(pgsql.autovacuum.utilization[], 30m)00Mamonsu PostgreSQL LinuxPostgreSQL bgwriter: Buffers Written During Checkpoints200pgsql.bgwriter[buffers_checkpoint]736506030000100Mamonsu PostgreSQL LinuxPostgreSQL bgwriter: Buffers Written200pgsql.bgwriter[buffers_clean]736506030000100Mamonsu PostgreSQL LinuxPostgreSQL bgwriter: Number of bgwriter Stopped by Max Write Count200pgsql.bgwriter[maxwritten_clean]736506030000100Mamonsu PostgreSQL LinuxPostgreSQL bgwriter: Buffers Written Directly by a Backend200pgsql.bgwriter[buffers_backend]736506030000100Mamonsu PostgreSQL LinuxPostgreSQL bgwriter: Times a Backend Execute Its Own Fsync200pgsql.bgwriter[buffers_backend_fsync]736506030000100Mamonsu PostgreSQL LinuxPostgreSQL bgwriter: Buffers Allocated200pgsql.bgwriter[buffers_alloc]736506030000100Mamonsu PostgreSQL LinuxPostgreSQL CFS: Written byte/s200pgsql.cfs.activity[written_bytes]73650600Bps0000100Mamonsu PostgreSQL LinuxPostgreSQL CFS: Scanned byte/s200pgsql.cfs.activity[scanned_bytes]73650600Bps0000100Mamonsu PostgreSQL LinuxPostgreSQL CFS: Compressed Files200pgsql.cfs.activity[compressed_files]736506000000100Mamonsu PostgreSQL LinuxPostgreSQL CFS: Scanned Files200pgsql.cfs.activity[scanned_files]736506000000100Mamonsu PostgreSQL LinuxPostgreSQL CFS: Current Ratio200pgsql.cfs.activity[current_compress_ratio]736506000000100Mamonsu PostgreSQL LinuxPostgreSQL CFS: Total Ratio200pgsql.cfs.activity[total_compress_ratio]736506000000100Mamonsu PostgreSQL LinuxPostgreSQL Checkpoints: by Timeout (in hour)200pgsql.checkpoint[count_timed]7365030000000100Mamonsu PostgreSQL LinuxPostgreSQL Checkpoints: by WAL (in hour)200pgsql.checkpoint[count_wal]7365030000000100Mamonsu PostgreSQL LinuxPostgreSQL Checkpoints: Write Time200pgsql.checkpoint[write_time]736503000ms0000100Mamonsu PostgreSQL LinuxPostgreSQL Checkpoints: Sync Time200pgsql.checkpoint[checkpoint_sync_time]736503000ms0000100Mamonsu PostgreSQL LinuxPostgreSQL Connections: Number of Total User Connections200pgsql.connections[total]736506000000100Mamonsu PostgreSQL LinuxPostgreSQL Connections: Number of Waiting User Connections200pgsql.connections[waiting]736506000000100Mamonsu PostgreSQL LinuxPostgreSQL Connections: Max Connections200pgsql.connections[max_connections]736506000000100Mamonsu PostgreSQL LinuxPostgreSQL Connections: Number of Active User Connections200pgsql.connections[active]736506000000100Mamonsu PostgreSQL LinuxPostgreSQL Connections: Number of Idle User Connections200pgsql.connections[idle]736506000000100Mamonsu PostgreSQL LinuxPostgreSQL Connections: Number of Idle in Transaction User Connections200pgsql.connections[idle_in_transaction]736506000000100Mamonsu PostgreSQL LinuxPostgreSQL Connections: Number of Idle in Transaction (Aborted) User Connections200pgsql.connections[idle_in_transaction_aborted]736506000000100Mamonsu PostgreSQL LinuxPostgreSQL Connections: Number of Fastpath Function Call User Connections200pgsql.connections[fastpath_function_call]736506000000100Mamonsu PostgreSQL LinuxPostgreSQL Connections: Number of Disabled User Connections200pgsql.connections[disabled]736506000000100Mamonsu PostgreSQL LinuxPostgreSQL Connections: Number of Other Connections200pgsql.connections[other]736506000000100Mamonsu PostgreSQL LinuxSystem: Block Devices Read Requests200system.disk.all_read[]736506000000100Mamonsu PostgreSQL LinuxSystem: Block Devices Write Requests200system.disk.all_write[]736506000000100Mamonsu PostgreSQL LinuxSystem: Block Devices Read byte/s200system.disk.all_read_b[]736506000000100Mamonsu PostgreSQL LinuxSystem: Block Devices Write byte/s200system.disk.all_write_b[]736506000000100Mamonsu PostgreSQL LinuxMamonsu: Plugin Errors200mamonsu.plugin.errors[]736506040000100Mamonsu PostgreSQL LinuxMamonsu: Plugin Keep Alive200mamonsu.plugin.keepalive[]736506000000100Mamonsu PostgreSQL LinuxMamonsu: RSS Memory Max Usage200mamonsu.memory.rss[max]73650600b0000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Transactions Committed200pgsql.transactions[committed]736506000000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Server Mode200pgsql.server_mode736506040000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Rollback Events200pgsql.events[xact_rollback]736506000000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Server Mode200pgsql.server_mode736506040000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Blocks Hit200pgsql.blocks[hit]736506000000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Server Mode200pgsql.server_mode736506040000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Blocks Read200pgsql.blocks[read]736506000000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Server Mode200pgsql.server_mode736506040000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Conflict Events200pgsql.events[conflicts]736506000000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Server Mode200pgsql.server_mode736506040000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Deadlock Events200pgsql.events[deadlocks]736506000000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Server Mode200pgsql.server_mode736506040000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Temp Bytes Written200pgsql.temp[bytes]73650600b0000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Server Mode200pgsql.server_mode736506040000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Temp Files Created200pgsql.temp[files]736506000000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Server Mode200pgsql.server_mode736506040000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Tuples Deleted200pgsql.tuples[deleted]736506000000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Server Mode200pgsql.server_mode736506040000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Tuples Fetched200pgsql.tuples[fetched]736506000000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Server Mode200pgsql.server_mode736506040000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Tuples Inserted200pgsql.tuples[inserted]736506000000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Server Mode200pgsql.server_mode736506040000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Tuples Returned200pgsql.tuples[returned]736506000000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Server Mode200pgsql.server_mode736506040000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Tuples Updated200pgsql.tuples[updated]736506000000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Server Mode200pgsql.server_mode736506040000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: checksum_failures Events200pgsql.events[checksum_failures]736506000000100Mamonsu PostgreSQL LinuxPostgreSQL Instance: Server Mode200pgsql.server_mode736506040000100Mamonsu PostgreSQL LinuxSystem: Load Average Over 1 Minute200system.la[1]736506000000100Mamonsu PostgreSQL LinuxSystem: Active - Memory Recently Used200system.memory[active]73650603b0000100Mamonsu PostgreSQL LinuxSystem: Available - Free Memory200system.memory[available]73650603b0000100Mamonsu PostgreSQL LinuxSystem: Buffers - Block Device Cache and Dirty200system.memory[buffers]73650603b0000100Mamonsu PostgreSQL LinuxSystem: Cached - Parked File Data (file content) Cache200system.memory[cached]73650603b0000100Mamonsu PostgreSQL LinuxSystem: Committed AS - Total Committed Memory200system.memory[committed]73650603b0000100Mamonsu PostgreSQL LinuxSystem: Inactive - Memory Not Currently Used200system.memory[inactive]73650603b0000100Mamonsu PostgreSQL LinuxSystem: Mapped - All mmap()ed Pages200system.memory[mapped]73650603b0000100Mamonsu PostgreSQL LinuxSystem: PageTables - Map bt Virtual and Physical200system.memory[page_tables]73650603b0000100Mamonsu PostgreSQL LinuxSystem: Slab - Kernel Used Memory (inode cache)200system.memory[slab]73650603b0000100Mamonsu PostgreSQL LinuxSystem: Swap - Swap Space Used200system.memory[swap]73650603b0000100Mamonsu PostgreSQL LinuxSystem: SwapCached - Fetched unmod Yet Swap Pages200system.memory[swap_cache]73650603b0000100Mamonsu PostgreSQL LinuxSystem: Total - All Memory200system.memory[total]73650603b0000100Mamonsu PostgreSQL LinuxSystem: Unused - Wasted Memory200system.memory[unused]73650603b0000100Mamonsu PostgreSQL LinuxSystem: Used - User-Space Applications200system.memory[used]73650603b0000100Mamonsu PostgreSQL LinuxSystem: VMallocUsed - vmaloc() Allocated by Kernel200system.memory[vmalloc_used]73650603b0000100Mamonsu PostgreSQL LinuxPostgreSQL Memory Leak: Number of Pids Which Private Anonymous Memory Exceeds private_anon_mem_threshold200pgsql.memory_leak_diagnostic.count_diff[]736501500000100Mamonsu PostgreSQL LinuxPostgreSQL Memory Leak: Number of Pids Which Private Anonymous Memory Exceeds private_anon_mem_threshold, text of message200pgsql.memory_leak_diagnostic.msg_text[]736501540000100Mamonsu PostgreSQL LinuxPostgreSQL Transactions: Age of the Oldest XID200pgsql.oldest[xid_age]736506030000100Mamonsu PostgreSQL LinuxPostgreSQL Transactions: the Oldest Transaction Running Time in sec200pgsql.oldest[transaction_time]73650600s0000100Mamonsu PostgreSQL LinuxPostgreSQL Transactions: Number of Parallel Queries Being Executed Now200pgsql.parallel[queries]736506030000100Mamonsu PostgreSQL LinuxSystem: Opened Files200system.open_files[]736506030000100Mamonsu PostgreSQL LinuxPostgreSQL pg_buffercache: Shared Buffer Size200pgsql.buffers[size]73650600b0000100Mamonsu PostgreSQL LinuxPostgreSQL pg_buffercache: Shared Buffer Twice Used Size200pgsql.buffers[twice_used]73650600b0000100Mamonsu PostgreSQL LinuxPostgreSQL pg_buffercache: Shared Buffer Dirty Size200pgsql.buffers[dirty]73650600b0000100Mamonsu PostgreSQL LinuxPostgreSQL Health: Ping200pgsql.ping[]73650600ms0000100Mamonsu PostgreSQL LinuxPostgreSQL Health: Cache Hit Ratio1500pgsql.cache[hit]73650600%00001last(pgsql.blocks[hit])*100/(last(pgsql.blocks[hit])+last(pgsql.blocks[read]))00Mamonsu PostgreSQL LinuxPostgreSQL Health: Service Uptime200pgsql.uptime[]73650603unixtime0000100Mamonsu PostgreSQL LinuxPostgreSQL Health: Server Version200pgsql.version[]736506040000100Mamonsu PostgreSQL LinuxPostgreSQL Locks: Read Only Queries200pgsql.pg_locks[accessshare]736506030000100Mamonsu PostgreSQL LinuxPostgreSQL Locks: SELECT FOR SHARE and SELECT FOR UPDATE200pgsql.pg_locks[rowshare]736506030000100Mamonsu PostgreSQL LinuxPostgreSQL Locks: Write Queries200pgsql.pg_locks[rowexclusive]736506030000100Mamonsu PostgreSQL LinuxPostgreSQL Locks: VACUUM, ANALYZE, CREATE INDEX CONCURRENTLY200pgsql.pg_locks[shareupdateexclusive]736506030000100Mamonsu PostgreSQL LinuxPostgreSQL Locks: CREATE INDEX200pgsql.pg_locks[share]736506030000100Mamonsu PostgreSQL LinuxPostgreSQL Locks: Locks from Application200pgsql.pg_locks[sharerowexclusive]736506030000100Mamonsu PostgreSQL LinuxPostgreSQL Locks: Locks from Application or Some Operations on System Catalogs200pgsql.pg_locks[exclusive]736506030000100Mamonsu PostgreSQL LinuxPostgreSQL Locks: ALTER TABLE, DROP TABLE, TRUNCATE, REINDEX, CLUSTER, VACUUM FULL, LOCK TABLE200pgsql.pg_locks[accessexclusive]736506030000100Mamonsu PostgreSQL LinuxPostgreSQL Prepared Transactions: Number of Prepared Transactions200pgsql.prepared.count736506000000100Mamonsu PostgreSQL LinuxPostgreSQL Prepared Transactions: the Oldest Prepared Transaction Running Time in sec200pgsql.prepared.oldest736506000000100Mamonsu PostgreSQL LinuxSystem: Processes in State Running200system.processes[running]736506000000100Mamonsu PostgreSQL LinuxSystem: Processes in State Blocked200system.processes[blocked]736506000000100Mamonsu PostgreSQL LinuxSystem: Processes Forkrate200system.processes[forkrate]736506000000100Mamonsu PostgreSQL LinuxSystem: CPU Time Spent by Normal Programs and Daemons200system.cpu[user]736506000000100Mamonsu PostgreSQL LinuxSystem: CPU Time Spent by nice(1)d Programs200system.cpu[nice]736506000000100Mamonsu PostgreSQL LinuxSystem: CPU Time Spent by the Kernel in System Activities200system.cpu[system]736506000000100Mamonsu PostgreSQL LinuxSystem: CPU Time Spent Idle200system.cpu[idle]736506000000100Mamonsu PostgreSQL LinuxSystem: CPU Time Spent Waiting for I/O Operations200system.cpu[iowait]736506000000100Mamonsu PostgreSQL LinuxSystem: CPU Time Spent Handling Interrupts200system.cpu[irq]736506000000100Mamonsu PostgreSQL LinuxSystem: CPU Time Spent Handling Batched Interrupts200system.cpu[softirq]736506000000100Mamonsu PostgreSQL LinuxPostgreSQL Replication: Streaming Replication Lag200pgsql.replication_lag[sec]736506000000100Mamonsu PostgreSQL LinuxPostgreSQL Replication: Count Non-Active Replication Slots200pgsql.replication.non_active_slots[]736506030000100Mamonsu PostgreSQL LinuxPostgreSQL Statements: Read bytes/s200pgsql.stat[read_bytes]73650600Bps0000100Mamonsu PostgreSQL LinuxPostgreSQL Statements: Write bytes/s200pgsql.stat[write_bytes]73650600Bps0000100Mamonsu PostgreSQL LinuxPostgreSQL Statements: Dirty bytes/s200pgsql.stat[dirty_bytes]73650600Bps0000100Mamonsu PostgreSQL LinuxPostgreSQL Statements: Read IO Time200pgsql.stat[read_time]73650600s0000100Mamonsu PostgreSQL LinuxPostgreSQL Statements: Write IO Time200pgsql.stat[write_time]73650600s0000100Mamonsu PostgreSQL LinuxPostgreSQL Statements: Other (mostly CPU) Time200pgsql.stat[other_time]73650600s0000100Mamonsu PostgreSQL LinuxPostgreSQL Statements: Amount of WAL Files200pgsql.stat[wal_bytes]73650600Bps0000100Mamonsu PostgreSQL LinuxPostgreSQL Statements: Amount of WAL Records200pgsql.stat[wal_records]736506000000100Mamonsu PostgreSQL LinuxPostgreSQL Statements: Full Page Writes200pgsql.stat[wal_fpi]736506000000100Mamonsu PostgreSQL LinuxPostgreSQL Statements: Nnumber of Times pg_stat_statements.max Was Exceeded200pgsql.stat_info[dealloc]736506000000100Mamonsu PostgreSQL LinuxPostgreSQL Statements: Last Statistics Reset Time200pgsql.stat_info[stats_reset]73650600unixtime0000100Mamonsu PostgreSQL LinuxSystem: Uptime200system.uptime[]73650603uptime0000100Mamonsu PostgreSQL LinuxPostgreSQL Wait Sampling: Lightweight Locks200pgsql.all_lock[lwlock]736506000000100Mamonsu PostgreSQL LinuxPostgreSQL Wait Sampling: Heavyweight Locks200pgsql.all_lock[hwlock]736506000000100Mamonsu PostgreSQL LinuxPostgreSQL Wait Sampling: Buffer Locks200pgsql.all_lock[buffer]736506000000100Mamonsu PostgreSQL LinuxPostgreSQL Wait Sampling: Extension Locks200pgsql.all_lock[extension]736506000000100Mamonsu PostgreSQL LinuxPostgreSQL Wait Sampling: Client Locks200pgsql.all_lock[client]736506000000100Mamonsu PostgreSQL LinuxPostgreSQL Wait Sampling: Other Locks (e.g. IPC, Timeout, IO)200pgsql.all_lock[other]736506000000100Mamonsu PostgreSQL LinuxPostgreSQL Wait Sampling LWLocks: XID Access Locks200pgsql.lwlock[xid]736506000000100Mamonsu PostgreSQL LinuxPostgreSQL Wait Sampling LWLocks: Autovacuum Locks200pgsql.lwlock[autovacuum]736506000000100Mamonsu PostgreSQL LinuxPostgreSQL Wait Sampling LWLocks: WAL Access Locks200pgsql.lwlock[wal]736506000000100Mamonsu PostgreSQL LinuxPostgreSQL Wait Sampling LWLocks: CLOG Access Locks200pgsql.lwlock[clog]736506000000100Mamonsu PostgreSQL LinuxPostgreSQL Wait Sampling LWLocks: Replication Locks200pgsql.lwlock[replication]736506000000100Mamonsu PostgreSQL LinuxPostgreSQL Wait Sampling LWLocks: Logical Replication Locks200pgsql.lwlock[logical_replication]736506000000100Mamonsu PostgreSQL LinuxPostgreSQL Wait Sampling LWLocks: Buffer Operations Locks200pgsql.lwlock[buffer]736506000000100Mamonsu PostgreSQL LinuxPostgreSQL Wait Sampling LWLocks: Other Operations Lightweight Locks200pgsql.lwlock[other]736506000000100Mamonsu PostgreSQL LinuxPostgreSQL Wait Sampling HWLocks: Locks on a Relation200pgsql.hwlock[relation]736506000000100Mamonsu PostgreSQL LinuxPostgreSQL Wait Sampling HWLocks: Extend a Relation Locks200pgsql.hwlock[extend]736506000000100Mamonsu PostgreSQL LinuxPostgreSQL Wait Sampling HWLocks: Locks on a Page200pgsql.hwlock[page]736506000000100Mamonsu PostgreSQL LinuxPostgreSQL Wait Sampling HWLocks: Locks on a Tuple200pgsql.hwlock[tuple]736506000000100Mamonsu PostgreSQL LinuxPostgreSQL Wait Sampling HWLocks: Transaction to Finish Locks200pgsql.hwlock[transactionid]736506000000100Mamonsu PostgreSQL LinuxPostgreSQL Wait Sampling HWLocks: Virtual XID Locks200pgsql.hwlock[virtualxid]736506000000100Mamonsu PostgreSQL LinuxPostgreSQL Wait Sampling HWLocks: Speculative Insertion Locks200pgsql.hwlock[speculative_token]736506000000100Mamonsu PostgreSQL LinuxPostgreSQL Wait Sampling HWLocks: Locks on Database Object200pgsql.hwlock[object]736506000000100Mamonsu PostgreSQL LinuxPostgreSQL Wait Sampling HWLocks: Userlocks200pgsql.hwlock[userlock]736506000000100Mamonsu PostgreSQL LinuxPostgreSQL Wait Sampling HWLocks: Advisory User Locks200pgsql.hwlock[advisory]736506000000100Mamonsu PostgreSQL LinuxPostgreSQL WAL: Write Speed200pgsql.wal.write[]73650600Bps0000100Mamonsu PostgreSQL LinuxPostgreSQL WAL: Count of WAL Files200pgsql.wal.count[]736506000000100Mamonsu PostgreSQL LinuxPostgreSQL WAL: Records Generated200pgsql.wal.records.count[]736506000000100Mamonsu PostgreSQL LinuxPostgreSQL WAL: Full Page Images Generated200pgsql.wal.fpi.count[]736506000000100Mamonsu PostgreSQL LinuxPostgreSQL WAL: Buffers Full200pgsql.wal.buffers_full736506000000100Mamonsu PostgreSQL LinuxPostgreSQL WAL: Write Time (ms)200pgsql.wal.write_time736506000000100Mamonsu PostgreSQL LinuxPostgreSQL WAL: Sync Time (ms)200pgsql.wal.sync_time736506000000100Mamonsu PostgreSQL LinuxPostgreSQL WAL: Sync Duty (%)1500pgsql.wal.sync_duty73650600%00001last(pgsql.wal.sync_time)/1000Mamonsu PostgreSQL Linux + PostgreSQL CFS Discovery260000007pgsql.cfs.discovery_compressed_relations[]{#COMPRESSED_RELATION}.*8A0PostgreSQL CFS: Relation {#COMPRESSED_RELATION} Compress Ratio200pgsql.cfs.compress_ratio[{#COMPRESSED_RELATION}]7365060000000100Mamonsu PostgreSQL LinuxPostgreSQL CFS: Relation {#COMPRESSED_RELATION} Compress Ratio9002000.0100.0110100.00.0000000A39B98020Mamonsu PostgreSQL Linuxpgsql.cfs.compress_ratio[{#COMPRESSED_RELATION}]PostgreSQL Databases Discovery260000007pgsql.database.discovery[]{#DATABASE}.*8A0PostgreSQL Databases: {#DATABASE} size200pgsql.database.size[{#DATABASE}]736503003b0000100Mamonsu PostgreSQL LinuxPostgreSQL Databases: Max datfrozenxid Age in: {#DATABASE}200pgsql.database.max_age[{#DATABASE}]7365030000000100Mamonsu PostgreSQL LinuxPostgreSQL Databases: Count of Bloating Tables in {#DATABASE}200pgsql.database.bloating_tables[{#DATABASE}]7365030000000100Mamonsu PostgreSQL LinuxPostgreSQL Databases: Count of Invalid Indexes in {#DATABASE}200pgsql.database.invalid_indexes[{#DATABASE}]7365030000000100Mamonsu PostgreSQL Linux{Mamonsu PostgreSQL Linux:pgsql.database.invalid_indexes[{#DATABASE}].last()}>0PostgreSQL Databases: invalid indexes in {#DATABASE} (hostname={HOSTNAME} value={ITEM.LASTVALUE})030PostgreSQL Databases: {#DATABASE} size9002000.0100.0111100.00.0000002A39B98020Mamonsu PostgreSQL Linuxpgsql.database.size[{#DATABASE}]PostgreSQL Databases: {#DATABASE} Bloating Overview9002000.0100.0110100.00.000000287C2B9020Mamonsu PostgreSQL Linuxpgsql.database.bloating_tables[{#DATABASE}]12793F5D120Mamonsu PostgreSQL Linuxpgsql.autovacuum.count[]PostgreSQL Databases: {#DATABASE} Max age(datfrozenxid)9002000.0100.0110100.00.000000287C2B9020Mamonsu PostgreSQL Linuxpgsql.database.max_age[{#DATABASE}]12793F5D120Mamonsu PostgreSQL Linuxpgsql.autovacuum.count[]System: VFS Discovery260000007system.vfs.discovery[]{#MOUNTPOINT}.*8A0System: Mount Point {#MOUNTPOINT} Used200system.vfs.used[{#MOUNTPOINT}]73650603b0000100Mamonsu PostgreSQL LinuxSystem: Mount Point {#MOUNTPOINT} Free200system.vfs.free[{#MOUNTPOINT}]73650603b0000100Mamonsu PostgreSQL LinuxSystem: Mount Point {#MOUNTPOINT} Free in Percents200system.vfs.percent_free[{#MOUNTPOINT}]73650600%0000100Mamonsu PostgreSQL LinuxSystem: Mount Point {#MOUNTPOINT} Free Inodes in Percent200system.vfs.percent_inode_free[{#MOUNTPOINT}]73650600%0000100Mamonsu PostgreSQL Linux{Mamonsu PostgreSQL Linux:system.vfs.percent_free[{#MOUNTPOINT}].last()}<{$VFS_PERCENT_FREE}System: free disk space less than 10% on mountpoint {#MOUNTPOINT} (hostname={HOSTNAME} value={ITEM.LASTVALUE})030{Mamonsu PostgreSQL Linux:system.vfs.percent_inode_free[{#MOUNTPOINT}].last()}<{$VFS_INODE_PERCENT_FREE}System: free inode space less than 10% on mountpoint {#MOUNTPOINT} (hostname={HOSTNAME} value={ITEM.LASTVALUE})030System: Mount Point Overview {#MOUNTPOINT}9002000.0100.0111100.00.0000002FF5656020Mamonsu PostgreSQL Linuxsystem.vfs.used[{#MOUNTPOINT}]1200CC00020Mamonsu PostgreSQL Linuxsystem.vfs.free[{#MOUNTPOINT}]System: Block Devices Discovery260000007system.disk.discovery[]{#BLOCKDEVICE}.*8A0System: Block Device {#BLOCKDEVICE} Utilization200system.disk.utilization[{#BLOCKDEVICE}]73650600%0000100Mamonsu PostgreSQL LinuxSystem: Block Device {#BLOCKDEVICE} Read Operations200system.disk.read[{#BLOCKDEVICE}]736506000000100Mamonsu PostgreSQL LinuxSystem: Block Device {#BLOCKDEVICE} Write Operations200system.disk.write[{#BLOCKDEVICE}]736506000000100Mamonsu PostgreSQL LinuxSystem: Block Device {#BLOCKDEVICE} Read byte/s200system.disk.read_b[{#BLOCKDEVICE}]73650600b0000100Mamonsu PostgreSQL LinuxSystem: Block Device {#BLOCKDEVICE} Write byte/s200system.disk.write_b[{#BLOCKDEVICE}]73650600b0000100Mamonsu PostgreSQL LinuxSystem: Block Device Overview {#BLOCKDEVICE} operations9002000.0100.0110100.00.000000200CC00020Mamonsu PostgreSQL Linuxsystem.disk.read[{#BLOCKDEVICE}]12FF5656020Mamonsu PostgreSQL Linuxsystem.disk.write[{#BLOCKDEVICE}]22006AAE120Mamonsu PostgreSQL Linuxsystem.disk.utilization[{#BLOCKDEVICE}]System: Block Device Overview {#BLOCKDEVICE} byte/s9002000.0100.0110100.00.000000200CC00020Mamonsu PostgreSQL Linuxsystem.disk.read_b[{#BLOCKDEVICE}]12FF5656020Mamonsu PostgreSQL Linuxsystem.disk.write_b[{#BLOCKDEVICE}]22006AAE120Mamonsu PostgreSQL Linuxsystem.disk.utilization[{#BLOCKDEVICE}]System: net Iface Discovery260000007system.net.discovery[]{#NETDEVICE}.*8A0System: Network Device {#NETDEVICE} RX bytes/s200system.net.rx_bytes[{#NETDEVICE}]73650600b0000100Mamonsu PostgreSQL LinuxSystem: Network Device {#NETDEVICE} RX errors/s200system.net.rx_errs[{#NETDEVICE}]736506000000100Mamonsu PostgreSQL LinuxSystem: Network Device {#NETDEVICE} RX drops/s200system.net.rx_drop[{#NETDEVICE}]736506000000100Mamonsu PostgreSQL LinuxSystem: Network Device {#NETDEVICE} TX bytes/s200system.net.tx_bytes[{#NETDEVICE}]73650600b0000100Mamonsu PostgreSQL LinuxSystem: Network Device {#NETDEVICE} TX errors/s200system.net.tx_errs[{#NETDEVICE}]736506000000100Mamonsu PostgreSQL LinuxSystem: Network Device {#NETDEVICE} TX drops/s200system.net.tx_drop[{#NETDEVICE}]736506000000100Mamonsu PostgreSQL LinuxSystem: Network Device {#NETDEVICE}9002000.0100.0110100.00.000000287C2B9020Mamonsu PostgreSQL Linuxsystem.net.rx_bytes[{#NETDEVICE}]12793F5D020Mamonsu PostgreSQL Linuxsystem.net.tx_bytes[{#NETDEVICE}]pg_probackup Discovery260000007pg_probackup.discovery[]{#BACKUPDIR}.*8A0pg_probackup dir {#BACKUPDIR}: Size200pg_probackup.dir.size[{#BACKUPDIR}]736503003b0000100Mamonsu PostgreSQL Linuxpg_probackup dir {#BACKUPDIR}: Error200pg_probackup.dir.error[{#BACKUPDIR}]7365030040000100Mamonsu PostgreSQL Linux{Mamonsu PostgreSQL Linux:pg_probackup.dir.error[{#BACKUPDIR}].str(ok)}<>1pg_probackup: error in dir {#BACKUPDIR} (hostname={HOSTNAME} value={ITEM.LASTVALUE})030pg_probackup Backup dir: {#BACKUPDIR} Size9002000.0100.0111100.00.0000002A39B98020Mamonsu PostgreSQL Linuxpg_probackup.dir.size[{#BACKUPDIR}]PostgreSQL Relations Sizes Discovery260000007pgsql.relation.size[]{#RELATIONNAME}.*8A0PostgreSQL Relation Size: {#RELATIONNAME}200pgsql.relation.size[{#RELATIONNAME}]73650153b0000100Mamonsu PostgreSQL LinuxPostgreSQL Relation Size: {#RELATIONNAME}9002000.0100.0111100.00.0000002A39B98020Mamonsu PostgreSQL Linuxpgsql.relation.size[{#RELATIONNAME}]PostgreSQL Replication Lag Discovery260000007pgsql.replication.discovery[]{#APPLICATION_NAME}.*8A0PostgreSQL Replication: {#APPLICATION_NAME} Send Lag - Time elapsed sending recent WAL locally200pgsql.replication.send_lag[{#APPLICATION_NAME}]736506000000100Mamonsu PostgreSQL LinuxPostgreSQL Replication: {#APPLICATION_NAME} Receive Lag - Time elapsed between receiving recent WAL locally and receiving notification that this standby server has flushed it200pgsql.replication.receive_lag[{#APPLICATION_NAME}]736506000000100Mamonsu PostgreSQL LinuxPostgreSQL Replication: {#APPLICATION_NAME} Write Lag - Time elapsed between flushing recent WAL locally and receiving notification that this standby server has written it200pgsql.replication.write_lag[{#APPLICATION_NAME}]736506000000100Mamonsu PostgreSQL LinuxPostgreSQL Replication: {#APPLICATION_NAME} Flush Lag - Time elapsed between flushing recent WAL locally and receiving notification that this standby server has written and flushed it200pgsql.replication.flush_lag[{#APPLICATION_NAME}]736506000000100Mamonsu PostgreSQL LinuxPostgreSQL Replication: {#APPLICATION_NAME} Replay Lag - Time elapsed between flushing recent WAL locally and receiving notification that this standby server has written, flushed and applied200pgsql.replication.replay_lag[{#APPLICATION_NAME}]736506000000100Mamonsu PostgreSQL LinuxPostgreSQL Replication: {#APPLICATION_NAME} Delta of Total Lag200pgsql.replication.total_lag[{#APPLICATION_NAME}]736506000000100Mamonsu PostgreSQL LinuxPostgreSQL Replication: Delta of Total Lag for {#APPLICATION_NAME}9002000.0100.0110100.00.0000000A39B98020Mamonsu PostgreSQL Linuxpgsql.replication.total_lag[{#APPLICATION_NAME}] + {$ARCHIVE_QUEUE_FILES}2{$MAX_CHECKPOINT_BY_WAL_IN_HOUR}12{$CONNECTIONS_PERCENT}90{$VFS_PERCENT_FREE}10{$VFS_INODE_PERCENT_FREE}10{$MAMONSU_MAX_MEMORY_USAGE}41943040{$MAX_XID_AGE}18000000{$MAX_TRANSACTION_TIME}18000{$PG_UPTIME}600{$CACHE_HIT_RATIO_PERCENT}80{$MAX_PREPARED_TRANSACTION_TIME}18000{$CRITICAL_LAG_SECONDS}300{$SYSTEM_UPTIME}300 Mamonsu Overview2505001500011010003PostgreSQL Connections: OverviewMamonsu PostgreSQL Linux05001501011010003PostgreSQL Instance: Transactions RateMamonsu PostgreSQL Linux05001500111010003System: CPU Time SpentMamonsu PostgreSQL Linux05001501111010003System: Server Free/Used Memory OverviewMamonsu PostgreSQL Linux05001500211010003PostgreSQL Autovacuum: Count of Autovacuum WorkersMamonsu PostgreSQL Linux05001501211010003PostgreSQL Instance: TuplesMamonsu PostgreSQL Linux05001500311010003PostgreSQL bgwriter: BuffersMamonsu PostgreSQL Linux05001501311010003PostgreSQL bgwriter: EventsMamonsu PostgreSQL Linux05001500411010003PostgreSQL Checkpoints: Count (in hour)Mamonsu PostgreSQL Linux05001501411010003PostgreSQL Checkpoints: Write/SyncMamonsu PostgreSQL LinuxMamonsu PostgreSQL Instance2515001500011010003pgsql.ping[]Mamonsu PostgreSQL Linux15001501011010003pgsql.uptime[]Mamonsu PostgreSQL Linux15001500111010003pgsql.cache[hit]Mamonsu PostgreSQL Linux05001501111010003PostgreSQL Instance: EventsMamonsu PostgreSQL Linux15001500211010003pgsql.temp[bytes]Mamonsu PostgreSQL Linux15001501211010003pgsql.temp[files]Mamonsu PostgreSQL LinuxMamonsu PostgreSQL WAL2505001500011010003PostgreSQL Archiver: Archive StatusMamonsu PostgreSQL Linux15001501011010003pgsql.wal.write[]Mamonsu PostgreSQL Linux15001500111010003pgsql.archive_command[size_files_to_archive]Mamonsu PostgreSQL Linux15001501111010003pgsql.archive_command[archived_files]Mamonsu PostgreSQL Linux15001500211010003pgsql.wal.write_timeMamonsu PostgreSQL Linux15001501211010003pgsql.wal.sync_timeMamonsu PostgreSQL LinuxMamonsu PostgreSQL Locks3513301000011010003pgsql.events[conflicts]Mamonsu PostgreSQL Linux13301001011010003pgsql.pg_locks[accessshare]Mamonsu PostgreSQL Linux13301002011010003pgsql.pg_locks[rowshare]Mamonsu PostgreSQL Linux13301000111010003pgsql.pg_locks[rowexclusive]Mamonsu PostgreSQL Linux13301001111010003pgsql.pg_locks[shareupdateexclusive]Mamonsu PostgreSQL Linux13301002111010003pgsql.pg_locks[share]Mamonsu PostgreSQL Linux13301000211010003pgsql.pg_locks[sharerowexclusive]Mamonsu PostgreSQL Linux13301001211010003pgsql.pg_locks[exclusive]Mamonsu PostgreSQL Linux13301002211010003pgsql.pg_locks[accessexclusive]Mamonsu PostgreSQL LinuxMamonsu PostgreSQL Transactions2515001500011010003pgsql.oldest[xid_age]Mamonsu PostgreSQL Linux15001501011010003pgsql.oldest[transaction_time]Mamonsu PostgreSQL Linux15001500111010003pgsql.prepared.countMamonsu PostgreSQL Linux15001501111010003pgsql.prepared.oldestMamonsu PostgreSQL LinuxMamonsu System (Linux)2505001500011010003System: Block Devices Read/Write BytesMamonsu PostgreSQL Linux05001501011010003System: Block Devices Read/Write OperationsMamonsu PostgreSQL Linux05001500111010003System: Processes OverviewMamonsu PostgreSQL Linux - - {Mamonsu PostgreSQL Linux:pgsql.archive_command[count_files_to_archive].last()}>2PostgreSQL Archiver: count files need to archive on {HOSTNAME} more than 2030{Mamonsu PostgreSQL Linux:pgsql.checkpoint[count_wal].last()}>12PostgreSQL Checkpoints: required checkpoints occurs too frequently on {HOSTNAME}030 {Mamonsu PostgreSQL Linux:pgsql.connections[total].last()}/{Mamonsu PostgreSQL Linux:pgsql.connections[max_connections].last()}*100 >90PostgreSQL Connections: too many connections on {HOSTNAME} (total connections more than 90% of max_connections)030{Mamonsu PostgreSQL Linux:mamonsu.plugin.errors[].strlen()}>1Mamonsu plugin errors on {HOSTNAME}. {ITEM.LASTVALUE}030{Mamonsu PostgreSQL Linux:mamonsu.plugin.keepalive[].nodata(180)}=1Mamonsu nodata from {HOSTNAME}030{Mamonsu PostgreSQL Linux:mamonsu.memory.rss[max].last()}>41943040Mamonsu agent memory usage alert on {HOSTNAME}: {ITEM.LASTVALUE} bytes030{Mamonsu PostgreSQL Linux:pgsql.server_mode.change()}>0PostgreSQL Instance: server mode has been changed on {HOSTNAME} to {ITEM.LASTVALUE}030{Mamonsu PostgreSQL Linux:pgsql.memory_leak_diagnostic.msg_text[].strlen()}>1PostgreSQL Memory Leak: Number of Pids Which Private Anonymous Memory Exceeds private_anon_mem_threshold on {HOSTNAME}. {ITEM.LASTVALUE}030{Mamonsu PostgreSQL Linux:pgsql.oldest[xid_age].last()}>18000000PostgreSQL Transactions: the oldest XID is too big on {HOSTNAME}030{Mamonsu PostgreSQL Linux:pgsql.oldest[transaction_time].last()}>18000PostgreSQL Transactions: running transaction is too old on {HOSTNAME}030{Mamonsu PostgreSQL Linux:pgsql.uptime[].change()}>600PostgreSQL Health: service has been restarted on {HOSTNAME} (uptime={ITEM.LASTVALUE})030{Mamonsu PostgreSQL Linux:pgsql.cache[hit].last()}<80PostgreSQL Health: cache hit ratio too low on {HOSTNAME} ({ITEM.LASTVALUE})030{Mamonsu PostgreSQL Linux:pgsql.ping[].nodata(180)}=1PostgreSQL Health: no ping from PostgreSQL for 3 minutes on {HOSTNAME}030{Mamonsu PostgreSQL Linux:pgsql.prepared.oldest.last()}>60PostgreSQL Prepared Transactions: prepared transaction is too old on {HOSTNAME}030{Mamonsu PostgreSQL Linux:system.processes[forkrate].min(5m)}>500Process fork-rate too frequently on {HOSTNAME}030{Mamonsu PostgreSQL Linux:pgsql.replication_lag[sec].last()}>300PostgreSQL streaming lag too high on {HOSTNAME} (value={ITEM.LASTVALUE})030{Mamonsu PostgreSQL Linux:pgsql.replication.non_active_slots[].last()}>0PostgreSQL number of non-active replication slots on {HOSTNAME} (value={ITEM.LASTVALUE})030{Mamonsu PostgreSQL Linux:system.uptime[].last()}<300System was restarted on {HOSTNAME} (uptime={ITEM.LASTVALUE})030 - PostgreSQL Archiver: Archive Status9002000.0100.0110100.00.0000002006AAE020Mamonsu PostgreSQL Linuxpgsql.archive_command[count_files_to_archive]1200CC00020Mamonsu PostgreSQL Linuxpgsql.archive_command[archived_files]22FF5656020Mamonsu PostgreSQL Linuxpgsql.archive_command[failed_trying_to_archive]PostgreSQL bgwriter: Buffers9002000.0100.0110100.00.0000002006AAE020Mamonsu PostgreSQL Linuxpgsql.bgwriter[buffers_checkpoint]1200CC00020Mamonsu PostgreSQL Linuxpgsql.bgwriter[buffers_clean]229C8A4E020Mamonsu PostgreSQL Linuxpgsql.bgwriter[buffers_backend]32FF5656020Mamonsu PostgreSQL Linuxpgsql.bgwriter[buffers_alloc]PostgreSQL bgwriter: Events9002000.0100.0110100.00.0000002FF5656020Mamonsu PostgreSQL Linuxpgsql.bgwriter[maxwritten_clean]1200CC00020Mamonsu PostgreSQL Linuxpgsql.bgwriter[buffers_backend_fsync]PostgreSQL Checkpoints: Count (in hour)9002000.0100.0110100.00.000000200CC00020Mamonsu PostgreSQL Linuxpgsql.checkpoint[count_timed]12FF5656020Mamonsu PostgreSQL Linuxpgsql.checkpoint[count_wal]PostgreSQL Checkpoints: Write/Sync9002000.0100.0110100.00.000000200CC00020Mamonsu PostgreSQL Linuxpgsql.checkpoint[write_time]12FF5656020Mamonsu PostgreSQL Linuxpgsql.checkpoint[checkpoint_sync_time]PostgreSQL Connections: Overview9002000.0100.0111100.00.000000200CC00020Mamonsu PostgreSQL Linuxpgsql.connections[active]12A39B98020Mamonsu PostgreSQL Linuxpgsql.connections[idle]229C8A4E020Mamonsu PostgreSQL Linuxpgsql.connections[idle_in_transaction]32F6CB93020Mamonsu PostgreSQL Linuxpgsql.connections[idle_in_transaction_aborted]4200B0B8020Mamonsu PostgreSQL Linuxpgsql.connections[fastpath_function_call]523B415A020Mamonsu PostgreSQL Linuxpgsql.connections[disabled]62FF5656020Mamonsu PostgreSQL Linuxpgsql.connections[total]72006AAE020Mamonsu PostgreSQL Linuxpgsql.connections[waiting]8287C2B9020Mamonsu PostgreSQL Linuxpgsql.connections[other]PostgreSQL Autovacuum: Count of Autovacuum Workers9002000.0100.0110100.00.000000287C2B9020Mamonsu PostgreSQL Linuxpgsql.autovacumm.count[]System: Block Devices Read/Write Operations9002000.0100.0110100.00.000000200CC00020Mamonsu PostgreSQL Linuxsystem.disk.all_read[]12FF5656020Mamonsu PostgreSQL Linuxsystem.disk.all_write[]System: Block Devices Read/Write Bytes9002000.0100.0110100.00.000000200CC00020Mamonsu PostgreSQL Linuxsystem.disk.all_read_b[]12FF5656020Mamonsu PostgreSQL Linuxsystem.disk.all_write_b[]PostgreSQL Instance: Blocks Rate9002000.0100.0110100.00.000000287C2B9020Mamonsu PostgreSQL Linuxpgsql.blocks[hit]12793F5D020Mamonsu PostgreSQL Linuxpgsql.blocks[read]PostgreSQL Instance: Transactions Rate9002000.0100.0110100.00.000000200CC00020Mamonsu PostgreSQL Linuxpgsql.transactions[committed]12FF5656020Mamonsu PostgreSQL Linuxpgsql.events[xact_rollback]PostgreSQL Instance: Events9002000.0100.0110100.00.000000200CC00020Mamonsu PostgreSQL Linuxpgsql.events[conflicts]12FF5656020Mamonsu PostgreSQL Linuxpgsql.events[deadlocks]22006AAE020Mamonsu PostgreSQL Linuxpgsql.events[checksum_failures]PostgreSQL Instance: Temp Files9002000.0100.0110100.00.000000200B0B8020Mamonsu PostgreSQL Linuxpgsql.temp[bytes]12006AAE120Mamonsu PostgreSQL Linuxpgsql.temp[files]PostgreSQL Instance: Tuples9002000.0100.0110100.00.0000002FF5656020Mamonsu PostgreSQL Linuxpgsql.tuples[deleted]12006AAE020Mamonsu PostgreSQL Linuxpgsql.tuples[fetched]2200CC00020Mamonsu PostgreSQL Linuxpgsql.tuples[inserted]32001219120Mamonsu PostgreSQL Linuxpgsql.tuples[returned]429C8A4E020Mamonsu PostgreSQL Linuxpgsql.tuples[updated]System: Server Memory Detailed Overview9004000.0100.0111100.00.0000000BAEB6B020Mamonsu PostgreSQL Linuxsystem.memory[active]1000CC00020Mamonsu PostgreSQL Linuxsystem.memory[available]2000B0B8020Mamonsu PostgreSQL Linuxsystem.memory[buffers]3052768F020Mamonsu PostgreSQL Linuxsystem.memory[cached]409C8A4E020Mamonsu PostgreSQL Linuxsystem.memory[committed]50A39B98020Mamonsu PostgreSQL Linuxsystem.memory[inactive]609F1E28020Mamonsu PostgreSQL Linuxsystem.memory[mapped]70793F5D020Mamonsu PostgreSQL Linuxsystem.memory[page_tables]80F6CB93020Mamonsu PostgreSQL Linuxsystem.memory[slab]90006AAE020Mamonsu PostgreSQL Linuxsystem.memory[swap]10087C2B9020Mamonsu PostgreSQL Linuxsystem.memory[swap_cache]1103B415A020Mamonsu PostgreSQL Linuxsystem.memory[unused]120001219020Mamonsu PostgreSQL Linuxsystem.memory[used]130CF6518020Mamonsu PostgreSQL Linuxsystem.memory[vmalloc_used]System: Server Free/Used Memory Overview9004000.0100.0110100.00.0000001001219020Mamonsu PostgreSQL Linuxsystem.memory[used]1152768F020Mamonsu PostgreSQL Linuxsystem.memory[cached]2100CC00020Mamonsu PostgreSQL Linuxsystem.memory[available]34FF5656020Mamonsu PostgreSQL Linuxsystem.memory[total]PostgreSQL pg_buffercache: Shared Buffer9002000.0100.0110100.00.000000200CC00020Mamonsu PostgreSQL Linuxpgsql.buffers[size]12006AAE020Mamonsu PostgreSQL Linuxpgsql.buffers[twice_used]22FF5656020Mamonsu PostgreSQL Linuxpgsql.buffers[dirty]PostgreSQL: Locks Sampling9002000.0100.0110100.00.000000200CC00020Mamonsu PostgreSQL Linuxpgsql.pg_locks[accessshare]123B415A020Mamonsu PostgreSQL Linuxpgsql.pg_locks[rowshare]22FF5656020Mamonsu PostgreSQL Linuxpgsql.pg_locks[rowexclusive]32F6CB93020Mamonsu PostgreSQL Linuxpgsql.pg_locks[shareupdateexclusive]42006AAE020Mamonsu PostgreSQL Linuxpgsql.pg_locks[share]5200B0B8020Mamonsu PostgreSQL Linuxpgsql.pg_locks[sharerowexclusive]629C8A4E020Mamonsu PostgreSQL Linuxpgsql.pg_locks[exclusive]72793F5D020Mamonsu PostgreSQL Linuxpgsql.pg_locks[accessexclusive]PostgreSQL Prepared Transactions: Overview9002000.0100.0110100.00.0000002A39B98020Mamonsu PostgreSQL Linuxpgsql.prepared.count129C8A4E120Mamonsu PostgreSQL Linuxpgsql.prepared.oldestSystem: Processes Overview9002000.0100.0110100.00.000000200CC00020Mamonsu PostgreSQL Linuxsystem.processes[running]12FF5656020Mamonsu PostgreSQL Linuxsystem.processes[blocked]22006AAE120Mamonsu PostgreSQL Linuxsystem.processes[forkrate]System: CPU Time Spent9002000.0100.0111100.00.000000200CC00020Mamonsu PostgreSQL Linuxsystem.cpu[user]12793F5D020Mamonsu PostgreSQL Linuxsystem.cpu[nice]229C8A4E020Mamonsu PostgreSQL Linuxsystem.cpu[system]32A39B98020Mamonsu PostgreSQL Linuxsystem.cpu[idle]42006AAE020Mamonsu PostgreSQL Linuxsystem.cpu[iowait]52FF5656020Mamonsu PostgreSQL Linuxsystem.cpu[irq]62F6CB93020Mamonsu PostgreSQL Linuxsystem.cpu[softirq]PostgreSQL Statements: Bytes9002000.0100.0110100.00.000000287C2B9020Mamonsu PostgreSQL Linuxpgsql.stat[read_bytes]12793F5D020Mamonsu PostgreSQL Linuxpgsql.stat[write_bytes]229C8A4E020Mamonsu PostgreSQL Linuxpgsql.stat[dirty_bytes]PostgreSQL Statements: Spent Time9002000.0100.0111100.00.000000287C2B9020Mamonsu PostgreSQL Linuxpgsql.stat[read_time]12793F5D020Mamonsu PostgreSQL Linuxpgsql.stat[write_time]229C8A4E020Mamonsu PostgreSQL Linuxpgsql.stat[other_time]PostgreSQL Statements: WAL Statistics9002000.0100.0110100.00.000000200B0B8020Mamonsu PostgreSQL Linuxpgsql.stat[wal_bytes]12006AAE020Mamonsu PostgreSQL Linuxpgsql.stat[wal_records]229C8A4E020Mamonsu PostgreSQL Linuxpgsql.stat[wal_fpi]PostgreSQL Wait Sampling: Locks by Type9002000.0100.0111100.00.000000287C2B9020Mamonsu PostgreSQL Linuxpgsql.all_lock[lwlock]12793F5D020Mamonsu PostgreSQL Linuxpgsql.all_lock[hwlock]2200B0B8020Mamonsu PostgreSQL Linuxpgsql.all_lock[buffer]329C8A4E020Mamonsu PostgreSQL Linuxpgsql.all_lock[extension]42F6CB93020Mamonsu PostgreSQL Linuxpgsql.all_lock[client]523B415A020Mamonsu PostgreSQL Linuxpgsql.all_lock[other]PostgreSQL Wait Sampling: Heavyweight Locks9002000.0100.0111100.00.000000287C2B9020Mamonsu PostgreSQL Linuxpgsql.hwlock[relation]123B415A020Mamonsu PostgreSQL Linuxpgsql.hwlock[extend]22F6CB93020Mamonsu PostgreSQL Linuxpgsql.hwlock[page]32006AAE020Mamonsu PostgreSQL Linuxpgsql.hwlock[tuple]4200B0B8020Mamonsu PostgreSQL Linuxpgsql.hwlock[transactionid]52793F5D020Mamonsu PostgreSQL Linuxpgsql.hwlock[virtualxid]629C8A4E020Mamonsu PostgreSQL Linuxpgsql.hwlock[speculative_token]72A39B98020Mamonsu PostgreSQL Linuxpgsql.hwlock[object]8252768F020Mamonsu PostgreSQL Linuxpgsql.hwlock[userlock]92FE9430020Mamonsu PostgreSQL Linuxpgsql.hwlock[advisory]PostgreSQL Wait Sampling: Lightweight Locks9002000.0100.0111100.00.0000002793F5D020Mamonsu PostgreSQL Linuxpgsql.lwlock[xid]1200B0B8020Mamonsu PostgreSQL Linuxpgsql.lwlock[autovacuum]2287C2B9020Mamonsu PostgreSQL Linuxpgsql.lwlock[wal]32006AAE020Mamonsu PostgreSQL Linuxpgsql.lwlock[clog]423B415A020Mamonsu PostgreSQL Linuxpgsql.lwlock[replication]529C8A4E020Mamonsu PostgreSQL Linuxpgsql.lwlock[logical_replication]62F6CB93020Mamonsu PostgreSQL Linuxpgsql.lwlock[buffer]72A39B98020Mamonsu PostgreSQL Linuxpgsql.lwlock[other] + {Mamonsu PostgreSQL Linux:pgsql.archive_command[count_files_to_archive].last()}>{$ARCHIVE_QUEUE_FILES}PostgreSQL Archiver: count files need to archive on {HOSTNAME} more than 2030{Mamonsu PostgreSQL Linux:pgsql.checkpoint[count_wal].last()}>{$MAX_CHECKPOINT_BY_WAL_IN_HOUR}PostgreSQL Checkpoints: required checkpoints occurs too frequently on {HOSTNAME}030 {Mamonsu PostgreSQL Linux:pgsql.connections[total].last()}/{Mamonsu PostgreSQL Linux:pgsql.connections[max_connections].last()}*100 >{$CONNECTIONS_PERCENT}PostgreSQL Connections: too many connections on {HOSTNAME} (total connections more than {$CONNECTIONS_PERCENT}% of max_connections)030{Mamonsu PostgreSQL Linux:mamonsu.plugin.errors[].strlen()}>1Mamonsu health: plugin errors on {HOSTNAME}. {ITEM.LASTVALUE}030{Mamonsu PostgreSQL Linux:mamonsu.plugin.keepalive[].nodata(180)}=1Mamonsu health: nodata from {HOSTNAME}030{Mamonsu PostgreSQL Linux:mamonsu.memory.rss[max].last()}>{$MAMONSU_MAX_MEMORY_USAGE}Mamonsu health: agent memory usage alert on {HOSTNAME}: {ITEM.LASTVALUE} bytes030{Mamonsu PostgreSQL Linux:pgsql.server_mode.change()}>0PostgreSQL Instance: server mode has been changed on {HOSTNAME} to {ITEM.LASTVALUE}030{Mamonsu PostgreSQL Linux:pgsql.memory_leak_diagnostic.msg_text[].strlen()}>1PostgreSQL Memory Leak: Number of Pids Which Private Anonymous Memory Exceeds private_anon_mem_threshold on {HOSTNAME}. {ITEM.LASTVALUE}030{Mamonsu PostgreSQL Linux:pgsql.oldest[xid_age].last()}>{$MAX_XID_AGE}PostgreSQL Transactions: the oldest XID is too big on {HOSTNAME}030{Mamonsu PostgreSQL Linux:pgsql.oldest[transaction_time].last()}>{$MAX_TRANSACTION_TIME}PostgreSQL Transactions: running transaction is too old on {HOSTNAME}030{Mamonsu PostgreSQL Linux:pgsql.uptime[].change()}>{$PG_UPTIME}PostgreSQL Health: service has been restarted on {HOSTNAME} (uptime={ITEM.LASTVALUE})030{Mamonsu PostgreSQL Linux:pgsql.cache[hit].last()}<{$CACHE_HIT_RATIO_PERCENT}PostgreSQL Health: cache hit ratio too low on {HOSTNAME} ({ITEM.LASTVALUE})030{Mamonsu PostgreSQL Linux:pgsql.ping[].nodata(180)}=1PostgreSQL Health: no ping from PostgreSQL for 3 minutes on {HOSTNAME}030{Mamonsu PostgreSQL Linux:pgsql.prepared.oldest.last()}>{$MAX_PREPARED_TRANSACTION_TIME}PostgreSQL Prepared Transactions: prepared transaction is too old on {HOSTNAME}030{Mamonsu PostgreSQL Linux:system.processes[forkrate].min(5m)}>500System: process fork-rate too frequently on {HOSTNAME}030{Mamonsu PostgreSQL Linux:pgsql.replication_lag[sec].last()}>{$CRITICAL_LAG_SECONDS}PostgreSQL Replication: streaming lag too high on {HOSTNAME} (value={ITEM.LASTVALUE})030{Mamonsu PostgreSQL Linux:pgsql.replication.non_active_slots[].last()}>0PostgreSQL Replication: number of non-active replication slots on {HOSTNAME} (value={ITEM.LASTVALUE})030{Mamonsu PostgreSQL Linux:system.uptime[].last()}<{$SYSTEM_UPTIME}System: {HOSTNAME} was restarted (start time={ITEM.LASTVALUE})030 + PostgreSQL Archiver: Archive Status9002000.0100.0110100.00.0000002006AAE020Mamonsu PostgreSQL Linuxpgsql.archive_command[count_files_to_archive]1200CC00020Mamonsu PostgreSQL Linuxpgsql.archive_command[archived_files]22FF5656020Mamonsu PostgreSQL Linuxpgsql.archive_command[failed_trying_to_archive]PostgreSQL Autovacuum: Count of Autovacuum Workers9002000.0100.0110100.00.000000287C2B9020Mamonsu PostgreSQL Linuxpgsql.autovacuum.count[]PostgreSQL bgwriter: Buffers9002000.0100.0110100.00.0000002006AAE020Mamonsu PostgreSQL Linuxpgsql.bgwriter[buffers_checkpoint]1200CC00020Mamonsu PostgreSQL Linuxpgsql.bgwriter[buffers_clean]229C8A4E020Mamonsu PostgreSQL Linuxpgsql.bgwriter[buffers_backend]32FF5656020Mamonsu PostgreSQL Linuxpgsql.bgwriter[buffers_alloc]PostgreSQL bgwriter: Events9002000.0100.0110100.00.0000002FF5656020Mamonsu PostgreSQL Linuxpgsql.bgwriter[maxwritten_clean]1200CC00020Mamonsu PostgreSQL Linuxpgsql.bgwriter[buffers_backend_fsync]PostgreSQL Checkpoints: Count (in hour)9002000.0100.0110100.00.000000200CC00020Mamonsu PostgreSQL Linuxpgsql.checkpoint[count_timed]12FF5656020Mamonsu PostgreSQL Linuxpgsql.checkpoint[count_wal]PostgreSQL Checkpoints: Write/Sync9002000.0100.0110100.00.000000200CC00020Mamonsu PostgreSQL Linuxpgsql.checkpoint[write_time]12FF5656020Mamonsu PostgreSQL Linuxpgsql.checkpoint[checkpoint_sync_time]PostgreSQL Connections: Overview9002000.0100.0111100.00.000000200CC00020Mamonsu PostgreSQL Linuxpgsql.connections[active]12A39B98020Mamonsu PostgreSQL Linuxpgsql.connections[idle]229C8A4E020Mamonsu PostgreSQL Linuxpgsql.connections[idle_in_transaction]32F6CB93020Mamonsu PostgreSQL Linuxpgsql.connections[idle_in_transaction_aborted]4200B0B8020Mamonsu PostgreSQL Linuxpgsql.connections[fastpath_function_call]523B415A020Mamonsu PostgreSQL Linuxpgsql.connections[disabled]62FF5656020Mamonsu PostgreSQL Linuxpgsql.connections[total]72006AAE020Mamonsu PostgreSQL Linuxpgsql.connections[waiting]8287C2B9020Mamonsu PostgreSQL Linuxpgsql.connections[other]System: Block Devices Read/Write Operations9002000.0100.0110100.00.000000200CC00020Mamonsu PostgreSQL Linuxsystem.disk.all_read[]12FF5656020Mamonsu PostgreSQL Linuxsystem.disk.all_write[]System: Block Devices Read/Write Bytes9002000.0100.0110100.00.000000200CC00020Mamonsu PostgreSQL Linuxsystem.disk.all_read_b[]12FF5656020Mamonsu PostgreSQL Linuxsystem.disk.all_write_b[]PostgreSQL Instance: Blocks Rate9002000.0100.0110100.00.000000287C2B9020Mamonsu PostgreSQL Linuxpgsql.blocks[hit]12793F5D020Mamonsu PostgreSQL Linuxpgsql.blocks[read]PostgreSQL Instance: Transactions Rate9002000.0100.0110100.00.000000200CC00020Mamonsu PostgreSQL Linuxpgsql.transactions[committed]12FF5656020Mamonsu PostgreSQL Linuxpgsql.events[xact_rollback]PostgreSQL Instance: Events9002000.0100.0110100.00.000000200CC00020Mamonsu PostgreSQL Linuxpgsql.events[conflicts]12FF5656020Mamonsu PostgreSQL Linuxpgsql.events[deadlocks]22006AAE020Mamonsu PostgreSQL Linuxpgsql.events[checksum_failures]PostgreSQL Instance: Temp Files9002000.0100.0110100.00.000000200B0B8020Mamonsu PostgreSQL Linuxpgsql.temp[bytes]12006AAE120Mamonsu PostgreSQL Linuxpgsql.temp[files]PostgreSQL Instance: Tuples9002000.0100.0110100.00.0000002FF5656020Mamonsu PostgreSQL Linuxpgsql.tuples[deleted]12006AAE020Mamonsu PostgreSQL Linuxpgsql.tuples[fetched]2200CC00020Mamonsu PostgreSQL Linuxpgsql.tuples[inserted]32001219120Mamonsu PostgreSQL Linuxpgsql.tuples[returned]429C8A4E020Mamonsu PostgreSQL Linuxpgsql.tuples[updated]System: Server Memory Detailed Overview9004000.0100.0111100.00.0000000BAEB6B020Mamonsu PostgreSQL Linuxsystem.memory[active]1000CC00020Mamonsu PostgreSQL Linuxsystem.memory[available]2000B0B8020Mamonsu PostgreSQL Linuxsystem.memory[buffers]3052768F020Mamonsu PostgreSQL Linuxsystem.memory[cached]409C8A4E020Mamonsu PostgreSQL Linuxsystem.memory[committed]50A39B98020Mamonsu PostgreSQL Linuxsystem.memory[inactive]609F1E28020Mamonsu PostgreSQL Linuxsystem.memory[mapped]70793F5D020Mamonsu PostgreSQL Linuxsystem.memory[page_tables]80F6CB93020Mamonsu PostgreSQL Linuxsystem.memory[slab]90006AAE020Mamonsu PostgreSQL Linuxsystem.memory[swap]10087C2B9020Mamonsu PostgreSQL Linuxsystem.memory[swap_cache]1103B415A020Mamonsu PostgreSQL Linuxsystem.memory[unused]120001219020Mamonsu PostgreSQL Linuxsystem.memory[used]130CF6518020Mamonsu PostgreSQL Linuxsystem.memory[vmalloc_used]System: Server Free/Used Memory Overview9004000.0100.0110100.00.0000001001219020Mamonsu PostgreSQL Linuxsystem.memory[used]1152768F020Mamonsu PostgreSQL Linuxsystem.memory[cached]2100CC00020Mamonsu PostgreSQL Linuxsystem.memory[available]34FF5656020Mamonsu PostgreSQL Linuxsystem.memory[total]PostgreSQL pg_buffercache: Shared Buffer9002000.0100.0110100.00.000000200CC00020Mamonsu PostgreSQL Linuxpgsql.buffers[size]12006AAE020Mamonsu PostgreSQL Linuxpgsql.buffers[twice_used]22FF5656020Mamonsu PostgreSQL Linuxpgsql.buffers[dirty]PostgreSQL: Locks Sampling9002000.0100.0110100.00.000000200CC00020Mamonsu PostgreSQL Linuxpgsql.pg_locks[accessshare]123B415A020Mamonsu PostgreSQL Linuxpgsql.pg_locks[rowshare]22FF5656020Mamonsu PostgreSQL Linuxpgsql.pg_locks[rowexclusive]32F6CB93020Mamonsu PostgreSQL Linuxpgsql.pg_locks[shareupdateexclusive]42006AAE020Mamonsu PostgreSQL Linuxpgsql.pg_locks[share]5200B0B8020Mamonsu PostgreSQL Linuxpgsql.pg_locks[sharerowexclusive]629C8A4E020Mamonsu PostgreSQL Linuxpgsql.pg_locks[exclusive]72793F5D020Mamonsu PostgreSQL Linuxpgsql.pg_locks[accessexclusive]PostgreSQL Prepared Transactions: Overview9002000.0100.0110100.00.0000002A39B98020Mamonsu PostgreSQL Linuxpgsql.prepared.count129C8A4E120Mamonsu PostgreSQL Linuxpgsql.prepared.oldestSystem: Processes Overview9002000.0100.0110100.00.000000200CC00020Mamonsu PostgreSQL Linuxsystem.processes[running]12FF5656020Mamonsu PostgreSQL Linuxsystem.processes[blocked]22006AAE120Mamonsu PostgreSQL Linuxsystem.processes[forkrate]System: CPU Time Spent9002000.0100.0111100.00.000000200CC00020Mamonsu PostgreSQL Linuxsystem.cpu[user]12793F5D020Mamonsu PostgreSQL Linuxsystem.cpu[nice]229C8A4E020Mamonsu PostgreSQL Linuxsystem.cpu[system]32A39B98020Mamonsu PostgreSQL Linuxsystem.cpu[idle]42006AAE020Mamonsu PostgreSQL Linuxsystem.cpu[iowait]52FF5656020Mamonsu PostgreSQL Linuxsystem.cpu[irq]62F6CB93020Mamonsu PostgreSQL Linuxsystem.cpu[softirq]PostgreSQL Statements: Bytes9002000.0100.0110100.00.000000287C2B9020Mamonsu PostgreSQL Linuxpgsql.stat[read_bytes]12793F5D020Mamonsu PostgreSQL Linuxpgsql.stat[write_bytes]229C8A4E020Mamonsu PostgreSQL Linuxpgsql.stat[dirty_bytes]PostgreSQL Statements: Spent Time9002000.0100.0111100.00.000000287C2B9020Mamonsu PostgreSQL Linuxpgsql.stat[read_time]12793F5D020Mamonsu PostgreSQL Linuxpgsql.stat[write_time]229C8A4E020Mamonsu PostgreSQL Linuxpgsql.stat[other_time]PostgreSQL Statements: WAL Statistics9002000.0100.0110100.00.000000200B0B8020Mamonsu PostgreSQL Linuxpgsql.stat[wal_bytes]12006AAE020Mamonsu PostgreSQL Linuxpgsql.stat[wal_records]229C8A4E020Mamonsu PostgreSQL Linuxpgsql.stat[wal_fpi]PostgreSQL Wait Sampling: Locks by Type9002000.0100.0111100.00.000000287C2B9020Mamonsu PostgreSQL Linuxpgsql.all_lock[lwlock]12793F5D020Mamonsu PostgreSQL Linuxpgsql.all_lock[hwlock]2200B0B8020Mamonsu PostgreSQL Linuxpgsql.all_lock[buffer]329C8A4E020Mamonsu PostgreSQL Linuxpgsql.all_lock[extension]42F6CB93020Mamonsu PostgreSQL Linuxpgsql.all_lock[client]523B415A020Mamonsu PostgreSQL Linuxpgsql.all_lock[other]PostgreSQL Wait Sampling: Heavyweight Locks9002000.0100.0111100.00.000000287C2B9020Mamonsu PostgreSQL Linuxpgsql.hwlock[relation]123B415A020Mamonsu PostgreSQL Linuxpgsql.hwlock[extend]22F6CB93020Mamonsu PostgreSQL Linuxpgsql.hwlock[page]32006AAE020Mamonsu PostgreSQL Linuxpgsql.hwlock[tuple]4200B0B8020Mamonsu PostgreSQL Linuxpgsql.hwlock[transactionid]52793F5D020Mamonsu PostgreSQL Linuxpgsql.hwlock[virtualxid]629C8A4E020Mamonsu PostgreSQL Linuxpgsql.hwlock[speculative_token]72A39B98020Mamonsu PostgreSQL Linuxpgsql.hwlock[object]8252768F020Mamonsu PostgreSQL Linuxpgsql.hwlock[userlock]92FE9430020Mamonsu PostgreSQL Linuxpgsql.hwlock[advisory]PostgreSQL Wait Sampling: Lightweight Locks9002000.0100.0111100.00.0000002793F5D020Mamonsu PostgreSQL Linuxpgsql.lwlock[xid]1200B0B8020Mamonsu PostgreSQL Linuxpgsql.lwlock[autovacuum]2287C2B9020Mamonsu PostgreSQL Linuxpgsql.lwlock[wal]32006AAE020Mamonsu PostgreSQL Linuxpgsql.lwlock[clog]423B415A020Mamonsu PostgreSQL Linuxpgsql.lwlock[replication]529C8A4E020Mamonsu PostgreSQL Linuxpgsql.lwlock[logical_replication]62F6CB93020Mamonsu PostgreSQL Linuxpgsql.lwlock[buffer]72A39B98020Mamonsu PostgreSQL Linuxpgsql.lwlock[other] \ No newline at end of file From 749d7339974816ca04b6c1bd099d05850e11c483 Mon Sep 17 00:00:00 2001 From: cuprumtan Date: Tue, 16 Aug 2022 14:00:34 +0300 Subject: [PATCH 018/106] build: upgraded to 3.5.2 --- .github/workflows/mamonsu-tests-dev.yml | 2 +- .github/workflows/mamonsu-tests-master.yml | 2 +- github-actions-tests/mamonsu_build.sh | 4 ++-- .../sources/{agent_3.5.1.conf => agent_3.5.2.conf} | 0 mamonsu/__init__.py | 2 +- packaging/debian/changelog | 7 +++++++ packaging/rpm/SPECS/mamonsu.spec | 9 ++++++++- packaging/win/mamonsu.def.nsh | 2 +- 8 files changed, 21 insertions(+), 7 deletions(-) rename github-actions-tests/sources/{agent_3.5.1.conf => agent_3.5.2.conf} (100%) diff --git a/.github/workflows/mamonsu-tests-dev.yml b/.github/workflows/mamonsu-tests-dev.yml index ac9e8a1..b5e1ac4 100644 --- a/.github/workflows/mamonsu-tests-dev.yml +++ b/.github/workflows/mamonsu-tests-dev.yml @@ -61,7 +61,7 @@ jobs: echo "::set-output name=zabbix_address::$(hostname -I | awk '{print $1}')" id: zabbix_address - name: Edit Zabbix address in agent.conf - run: sed -i "s/\(address *= *\).*/\1 ${{ steps.zabbix_address.outputs.zabbix_address }}/" ${{ env.MAMONSU_PATH }}/github-actions-tests/sources/agent_3.5.1.conf + run: sed -i "s/\(address *= *\).*/\1 ${{ steps.zabbix_address.outputs.zabbix_address }}/" ${{ env.MAMONSU_PATH }}/github-actions-tests/sources/agent_3.5.2.conf - name: Copy test scripts to container run: docker exec $( echo "${{ matrix.docker_os }}" | sed 's/://' | sed 's/\.//' ) mkdir -p -m 755 /mamonsu/ diff --git a/.github/workflows/mamonsu-tests-master.yml b/.github/workflows/mamonsu-tests-master.yml index 7670e24..a30d886 100644 --- a/.github/workflows/mamonsu-tests-master.yml +++ b/.github/workflows/mamonsu-tests-master.yml @@ -65,7 +65,7 @@ jobs: echo "::set-output name=zabbix_address::$(hostname -I | awk '{print $1}')" id: zabbix_address - name: Edit Zabbix address in agent.conf - run: sed -i "s/\(address *= *\).*/\1 ${{ steps.zabbix_address.outputs.zabbix_address }}/" ${{ env.MAMONSU_PATH }}/github-actions-tests/sources/agent_3.5.1.conf + run: sed -i "s/\(address *= *\).*/\1 ${{ steps.zabbix_address.outputs.zabbix_address }}/" ${{ env.MAMONSU_PATH }}/github-actions-tests/sources/agent_3.5.2.conf - name: Copy test scripts to container run: docker exec $( echo "${{ matrix.docker_os }}" | sed 's/://' | sed 's/\.//' ) mkdir -p -m 755 /mamonsu/ diff --git a/github-actions-tests/mamonsu_build.sh b/github-actions-tests/mamonsu_build.sh index b0057d4..58ede3d 100644 --- a/github-actions-tests/mamonsu_build.sh +++ b/github-actions-tests/mamonsu_build.sh @@ -41,7 +41,7 @@ if [ "${OS%:*}" = "centos" ]; then python3 setup.py build && python3 setup.py install make rpm sudo rpm -i ./mamonsu*.rpm - cat /mamonsu/github-actions-tests/sources/agent_3.5.1.conf > /etc/mamonsu/agent.conf + cat /mamonsu/github-actions-tests/sources/agent_3.5.2.conf > /etc/mamonsu/agent.conf systemctl daemon-reload systemctl restart mamonsu sleep 5 @@ -64,7 +64,7 @@ elif [ "${OS%:*}" = "ubuntu" ]; then python3 setup.py build && python3 setup.py install make deb sudo dpkg -i ./mamonsu*.deb - cat /mamonsu/github-actions-tests/sources/agent_3.5.1.conf > /etc/mamonsu/agent.conf + cat /mamonsu/github-actions-tests/sources/agent_3.5.2.conf > /etc/mamonsu/agent.conf service mamonsu restart sleep 5 echo && echo && echo "mamonsu version:" diff --git a/github-actions-tests/sources/agent_3.5.1.conf b/github-actions-tests/sources/agent_3.5.2.conf similarity index 100% rename from github-actions-tests/sources/agent_3.5.1.conf rename to github-actions-tests/sources/agent_3.5.2.conf diff --git a/mamonsu/__init__.py b/mamonsu/__init__.py index 627505b..86d1925 100644 --- a/mamonsu/__init__.py +++ b/mamonsu/__init__.py @@ -1,7 +1,7 @@ __author__ = 'Dmitry Vasilyev' __author_email__ = 'info@postgrespro.ru' __description__ = 'Monitoring agent for PostgreSQL' -__version__ = '3.5.1' +__version__ = '3.5.2' __licence__ = 'BSD' __url__ = 'https://github.com/postgrespro/mamonsu' diff --git a/packaging/debian/changelog b/packaging/debian/changelog index 6f9cb2a..9adbaa3 100644 --- a/packaging/debian/changelog +++ b/packaging/debian/changelog @@ -1,3 +1,10 @@ +mamonsu (3.5.2-1) stable; urgency=low + * fixed Statements plugin list of metrics creation; + * fixed Zabbix API requests to fit new Dashboard Template section rules; + * fixed Replication plugin metrics - null values are now taken into account; + * added new autovacuum utilization metrics: instant and average per 5, 15 and 30 minutes; + * moved plugin custom parameters to Zabbix Macros; + mamonsu (3.5.1-1) stable; urgency=low * fixed delta speed metrics evaluation; diff --git a/packaging/rpm/SPECS/mamonsu.spec b/packaging/rpm/SPECS/mamonsu.spec index 0542722..adfe234 100644 --- a/packaging/rpm/SPECS/mamonsu.spec +++ b/packaging/rpm/SPECS/mamonsu.spec @@ -1,5 +1,5 @@ Name: mamonsu -Version: 3.5.1 +Version: 3.5.2 Release: 1%{?dist} Summary: Monitoring agent for PostgreSQL Group: Applications/Internet @@ -73,6 +73,13 @@ chown -R mamonsu.mamonsu /var/log/mamonsu chown -R mamonsu.mamonsu /etc/mamonsu %changelog +* Tue Aug 16 2022 Alexandra Kuznetsova - 3.5.2-1 + - fixed Statements plugin list of metrics creation; + - fixed Zabbix API requests to fit new Dashboard Template section rules; + - fixed Replication plugin metrics - null values are now taken into account; + - added new autovacuum utilization metrics: instant and average per 5, 15 and 30 minutes; + - moved plugin custom parameters to Zabbix Macros; + * Fri Jul 29 2022 Alexandra Kuznetsova - 3.5.1-1 - fixed delta speed metrics evaluation; diff --git a/packaging/win/mamonsu.def.nsh b/packaging/win/mamonsu.def.nsh index 75f33fc..67022cc 100644 --- a/packaging/win/mamonsu.def.nsh +++ b/packaging/win/mamonsu.def.nsh @@ -1,5 +1,5 @@ !define NAME Mamonsu -!define VERSION 3.5.1 +!define VERSION 3.5.2 !define MAMONSU_REG_PATH "Software\PostgresPro\Mamonsu" !define MAMONSU_REG_UNINSTALLER_PATH "Software\Microsoft\Windows\CurrentVersion\Uninstall" !define EDB_REG "SOFTWARE\Postgresql" From d9d885ba282e29aa0984756c0672254c7004cbb6 Mon Sep 17 00:00:00 2001 From: cuprumtan Date: Mon, 29 Aug 2022 10:05:13 +0300 Subject: [PATCH 019/106] doc: fixed script installation description --- README.md | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index f169533..23d5934 100644 --- a/README.md +++ b/README.md @@ -176,18 +176,19 @@ $ makensis packaging\win\mamonsu.nsis To use _mamonsu_, you must create a Zabbix account and set up a Zabbix server as explained in [Zabbix documentation](https://www.zabbix.com/documentation/current/). Naturally, you must also have a PostgreSQL instance up and running if you are going to monitor PostgreSQL metrics. A pre-built _mamonsu_ packages is provided in official Postgres Pro repository: [repo/mamonsu](https://repo.postgrespro.ru/mamonsu/) -**For Debian, Ubuntu, Astra:** +**Install from repository using script:** ```shell -$ wget https://repo.postgrespro.ru/mamonsu/keys/pgpro-repo-add.sh -$ sudo chmod 700 ./apt-repo-add.sh -$ sudo ./apt-repo-add.sh +$ wget https://repo.postgrespro.ru/mamonsu/keys/pgpro-repo-add.sh +$ sudo chmod 700 ./pgpro-repo-add.sh +$ sudo ./pgpro-repo-add.sh +# for Debian, Ubuntu, Astra: $ apt-get install mamonsu +# for RPM-based distros such as Centos, RHEL: +$ yum install mamonsu +# for SLES: +$ zypper install mamonsu ``` -**For RPM-based distros such as Centos, RHEL, Oraclelinux, SLES, AltLinux, AltLinux-spt:** -Install rpm from repository adding name of the specific distro such as: -```shell -$ rpm -i https://repo.postgrespro.ru/mamonsu/keys/pgpro-repo-add.sh -``` + Install package - for RH-like: ```shell From 7341f36c5f1f026663e3e33ca4cac0311fac4507 Mon Sep 17 00:00:00 2001 From: cuprumtan Date: Mon, 29 Aug 2022 10:07:35 +0300 Subject: [PATCH 020/106] doc: fixed script installation description --- README.md | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/README.md b/README.md index 23d5934..cf20676 100644 --- a/README.md +++ b/README.md @@ -181,12 +181,6 @@ A pre-built _mamonsu_ packages is provided in official Postgres Pro repository: $ wget https://repo.postgrespro.ru/mamonsu/keys/pgpro-repo-add.sh $ sudo chmod 700 ./pgpro-repo-add.sh $ sudo ./pgpro-repo-add.sh -# for Debian, Ubuntu, Astra: -$ apt-get install mamonsu -# for RPM-based distros such as Centos, RHEL: -$ yum install mamonsu -# for SLES: -$ zypper install mamonsu ``` Install package @@ -198,7 +192,7 @@ Install package ```shell $ zypper install mamonsu ``` -- for AltLinux, AltlLinux-spt: +- for Debian, Ubuntu, AltLinux, AltlLinux-spt: ```shell $ apt-get update $ apt-get install mamonsu From fc2c87517e0c46075e9b604b553552c53c08513e Mon Sep 17 00:00:00 2001 From: cuprumtan Date: Mon, 5 Sep 2022 14:16:56 +0300 Subject: [PATCH 021/106] build: fixed compat level --- packaging/debian/compat | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packaging/debian/compat b/packaging/debian/compat index 7ed6ff8..ec63514 100644 --- a/packaging/debian/compat +++ b/packaging/debian/compat @@ -1 +1 @@ -5 +9 From 17f123f72278e2332bc90d2dbbaef47662f4d78f Mon Sep 17 00:00:00 2001 From: cuprumtan Date: Mon, 5 Sep 2022 14:17:29 +0300 Subject: [PATCH 022/106] fix: added pgpro_stats temporary dirty hack --- mamonsu/plugins/pgsql/statements.py | 3 +-- mamonsu/tools/bootstrap/sql.py | 8 ++++---- mamonsu/tools/bootstrap/start.py | 13 +++++++------ 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/mamonsu/plugins/pgsql/statements.py b/mamonsu/plugins/pgsql/statements.py index 3a67f52..ca4e949 100644 --- a/mamonsu/plugins/pgsql/statements.py +++ b/mamonsu/plugins/pgsql/statements.py @@ -131,8 +131,7 @@ def run(self, zbx): columns = [x[1] for x in all_items] elif Pooler.server_version_greater("13"): self.Items[5][1] = self.Items[5][1].format("total_exec_time+total_plan_time") - if not Pooler.is_pgpro() or not Pooler.is_pgpro_ee(): - all_items += self.Items_pg_13 + all_items += self.Items_pg_13 columns = [x[1] for x in all_items] else: self.Items[5][1] = self.Items[5][1].format("total_time") diff --git a/mamonsu/tools/bootstrap/sql.py b/mamonsu/tools/bootstrap/sql.py index bcaeff5..344764f 100644 --- a/mamonsu/tools/bootstrap/sql.py +++ b/mamonsu/tools/bootstrap/sql.py @@ -292,7 +292,7 @@ json_data.value::int AS count FROM (SELECT key, value AS locktuple FROM jsonb_each((SELECT wait_stats - FROM ' || extension_schema || '.pgpro_stats_totals + FROM ' || extension_schema || '.pgpro_stats_totals() WHERE object_type = ''cluster''))) setoflocks, jsonb_each(setoflocks.locktuple) AS json_data) SELECT @@ -321,7 +321,7 @@ json_data.value::int AS count FROM (SELECT key, value AS locktuple FROM jsonb_each((SELECT wait_stats - FROM ' || extension_schema || '.pgpro_stats_totals + FROM ' || extension_schema || '.pgpro_stats_totals() WHERE object_type = ''cluster''))) setoflocks, jsonb_each(setoflocks.locktuple) AS json_data) SELECT @@ -341,7 +341,7 @@ json_data.value::int AS count FROM (SELECT key, value AS locktuple FROM jsonb_each((SELECT wait_stats - FROM ' || extension_schema || '.pgpro_stats_totals + FROM ' || extension_schema || '.pgpro_stats_totals() WHERE object_type = ''cluster''))) setoflocks, jsonb_each(setoflocks.locktuple) AS json_data WHERE setoflocks.key IN (''Lock'', ''LWLock'', ''LWLockTranche'', ''LWLockNamed'')) @@ -415,7 +415,7 @@ CREATE OR REPLACE FUNCTION mamonsu.statements_pro() RETURNS TABLE({columns}) AS $$ SELECT {metrics} - FROM ' || extension_schema || '.pgpro_stats_totals + FROM ' || extension_schema || '.pgpro_stats_totals() WHERE object_type = ''cluster''; $$ LANGUAGE SQL SECURITY DEFINER;'; ELSE diff --git a/mamonsu/tools/bootstrap/start.py b/mamonsu/tools/bootstrap/start.py index 62aae9f..3976de1 100644 --- a/mamonsu/tools/bootstrap/start.py +++ b/mamonsu/tools/bootstrap/start.py @@ -237,12 +237,13 @@ def run_deploy(): if Pooler.is_pgpro() or Pooler.is_pgpro_ee(): bootstrap_extension_queries = fill_query_params(CreateWaitSamplingFunctionsSQL) Pooler.query(bootstrap_extension_queries) - statements_items = [x[1] for x in Statements.Items] - statements_items[5] = statements_items[5].format("total_exec_time+total_plan_time") - statements_columns = [x[0][x[0].find("[")+1:x[0].find("]")] for x in Statements.Items] - bootstrap_extension_queries = CreateStatementsFunctionsSQL.format( - columns=" bigint, ".join(statements_columns) + " bigint", metrics=(", ".join(statements_items))) - Pooler.query(bootstrap_extension_queries) + if Pooler.server_version_greater("12"): + statements_items = [x[1] for x in Statements.Items] + ([x[1] for x in Statements.Items_pg_13] if Pooler.server_version_greater("13") else []) + statements_items[5] = statements_items[5].format("total_exec_time+total_plan_time") + statements_columns = [x[0][x[0].find("[")+1:x[0].find("]")] for x in Statements.Items] + ([x[0][x[0].find("[")+1:x[0].find("]")] for x in Statements.Items_pg_13] if Pooler.server_version_greater("13") else []) + bootstrap_extension_queries = CreateStatementsFunctionsSQL.format( + columns=" bigint, ".join(statements_columns) + " bigint", metrics=(", ".join(statements_items))) + Pooler.query(bootstrap_extension_queries) except Exception as e: sys.stderr.write( "Bootstrap failed to create auxiliary extensions and functions.\n" From 9bd4952b674a93d64459d8332fb350ca07a14495 Mon Sep 17 00:00:00 2001 From: cuprumtan Date: Fri, 9 Sep 2022 14:41:23 +0300 Subject: [PATCH 023/106] doc: added autovacuum metrics description --- documentation/metrics.md | 116 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 116 insertions(+) diff --git a/documentation/metrics.md b/documentation/metrics.md index 74557b5..5f2e045 100644 --- a/documentation/metrics.md +++ b/documentation/metrics.md @@ -1781,6 +1781,122 @@ Default config: +- **Autovacuum Utilization (instant)** + + + + + + + + + + + + + + + + + + + + + + + + + + +
NamePostgreSQL Autovacuum: Utilization per [MAMONSU_INTERVAL] seconds
Keypgsql.autovacumm.utilization[]
TypeNumeric (float)
Units
DeltaAs Is
Supported Version9.5+
+ +- **Autovacuum Utilization (average per 5 minutes)** + + + + + + + + + + + + + + + + + + + + + + + + + + +
NamePostgreSQL Autovacuum: Utilization per 5 minutes
Keypgsql.autovacumm.utilization.avg5[]
TypeNumeric (float)
Units
DeltaAs Is
Supported Version9.5+
+ +- **Autovacuum Utilization (average per 15 minutes)** + + + + + + + + + + + + + + + + + + + + + + + + + + +
NamePostgreSQL Autovacuum: Utilization per 15 minutes
Keypgsql.autovacumm.utilization.avg15[]
TypeNumeric (float)
Units
DeltaAs Is
Supported Version9.5+
+ +- **Autovacuum Utilization (average per 30 minutes)** + + + + + + + + + + + + + + + + + + + + + + + + + + +
NamePostgreSQL Autovacuum: Utilization per 30 minutes
Keypgsql.autovacumm.utilization.avg30[]
TypeNumeric (float)
Units
DeltaAs Is
Supported Version9.5+
+ *Autovacuum Workers* evaluates as count of `pg_stat_activity.backend_type = 'autovacuum worker'` for PG 10+ and as summa of avtovacuum queries with not idle state for PG 9.6 and lower. ## Background Writer From 4eb7fca7a7716708fa5fceee98a31f8e3b4c5674 Mon Sep 17 00:00:00 2001 From: Michael Zhilin Date: Tue, 4 Oct 2022 11:42:14 +0300 Subject: [PATCH 024/106] [cosmetic] transaction correction --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index cf20676..31d9fa7 100644 --- a/README.md +++ b/README.md @@ -174,7 +174,7 @@ $ makensis packaging\win\mamonsu.nsis ## Installation To use _mamonsu_, you must create a Zabbix account and set up a Zabbix server as explained in [Zabbix documentation](https://www.zabbix.com/documentation/current/). Naturally, you must also have a PostgreSQL instance up and running if you are going to monitor PostgreSQL metrics. -A pre-built _mamonsu_ packages is provided in official Postgres Pro repository: [repo/mamonsu](https://repo.postgrespro.ru/mamonsu/) +Pre-built _mamonsu_ packages are provided in official Postgres Pro repository: [repo/mamonsu](https://repo.postgrespro.ru/mamonsu/) **Install from repository using script:** ```shell From 3e768024012373cdf53d50b7e7c4abd98f81de03 Mon Sep 17 00:00:00 2001 From: cuprumtan Date: Mon, 10 Oct 2022 12:34:45 +0300 Subject: [PATCH 025/106] fix: fixed Statements plugin datatypes --- mamonsu/plugins/pgsql/statements.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/mamonsu/plugins/pgsql/statements.py b/mamonsu/plugins/pgsql/statements.py index ca4e949..899b6ba 100644 --- a/mamonsu/plugins/pgsql/statements.py +++ b/mamonsu/plugins/pgsql/statements.py @@ -34,29 +34,28 @@ class Statements(Plugin): # zbx_key, sql, desc, unit, delta, (Graph, color, side) Items = [ ("stat[read_bytes]", - "sum(shared_blks_read+local_blks_read+temp_blks_read)*8*1024", + "(sum(shared_blks_read+local_blks_read+temp_blks_read)*8*1024)::bigint", "Read bytes/s", Plugin.UNITS.bytes_per_second, Plugin.DELTA.speed_per_second, ("PostgreSQL Statements: Bytes", "87C2B9", 0)), ("stat[write_bytes]", - "sum(shared_blks_written+local_blks_written" - "+temp_blks_written)*8*1024", + "(sum(shared_blks_written+local_blks_written+temp_blks_written)*8*1024)::bigint", "Write bytes/s", Plugin.UNITS.bytes_per_second, Plugin.DELTA.speed_per_second, ("PostgreSQL Statements: Bytes", "793F5D", 0)), ("stat[dirty_bytes]", - "sum(shared_blks_dirtied+local_blks_dirtied)*8*1024", + "(sum(shared_blks_dirtied+local_blks_dirtied)*8*1024)::bigint", "Dirty bytes/s", Plugin.UNITS.bytes_per_second, Plugin.DELTA.speed_per_second, ("PostgreSQL Statements: Bytes", "9C8A4E", 0)), ("stat[read_time]", - "sum(blk_read_time)/float4(100)", + "(sum(blk_read_time)/float4(100))::bigint", "Read IO Time", Plugin.UNITS.s, Plugin.DELTA.speed_per_second, ("PostgreSQL Statements: Spent Time", "87C2B9", 0)), ("stat[write_time]", - "sum(blk_write_time)/float4(100)", + "(sum(blk_write_time)/float4(100))::bigint", "Write IO Time", Plugin.UNITS.s, Plugin.DELTA.speed_per_second, ("PostgreSQL Statements: Spent Time", "793F5D", 0)), ["stat[other_time]", - "sum({0}-blk_read_time-blk_write_time)/float4(100)", + "(sum({0}-blk_read_time-blk_write_time)/float4(100))::bigint", "Other (mostly CPU) Time", Plugin.UNITS.s, Plugin.DELTA.speed_per_second, ("PostgreSQL Statements: Spent Time", "9C8A4E", 0)]] From 25d80e2b5e74fd053e5297e06abccc7a38901164 Mon Sep 17 00:00:00 2001 From: cuprumtan Date: Mon, 10 Oct 2022 12:41:53 +0300 Subject: [PATCH 026/106] fix: fixed Statements plugin datatypes --- mamonsu/plugins/pgsql/statements.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mamonsu/plugins/pgsql/statements.py b/mamonsu/plugins/pgsql/statements.py index 899b6ba..c44e28f 100644 --- a/mamonsu/plugins/pgsql/statements.py +++ b/mamonsu/plugins/pgsql/statements.py @@ -61,7 +61,7 @@ class Statements(Plugin): Items_pg_13 = [ ("stat[wal_bytes]", - "sum(wal_bytes)", + "sum(wal_bytes)::bigint", "Amount of WAL Files", Plugin.UNITS.bytes_per_second, Plugin.DELTA.speed_per_second, ("PostgreSQL Statements: WAL Statistics", "00B0B8", 0)), ("stat[wal_records]", From 38d73f253d872d433f443b7d0e65d831552f5afd Mon Sep 17 00:00:00 2001 From: cuprumtan Date: Tue, 1 Nov 2022 09:04:33 +0300 Subject: [PATCH 027/106] fix: fixed bgwriter Write/Sync graph name --- mamonsu/plugins/pgsql/bgwriter.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mamonsu/plugins/pgsql/bgwriter.py b/mamonsu/plugins/pgsql/bgwriter.py index d24ffaa..b6805b1 100644 --- a/mamonsu/plugins/pgsql/bgwriter.py +++ b/mamonsu/plugins/pgsql/bgwriter.py @@ -48,7 +48,7 @@ class BgWriter(Plugin): ] graph_name_buffers = "PostgreSQL bgwriter: Buffers" - graph_name_ws = "PostgreSQL bgwriter: Events" + graph_name_ws = "PostgreSQL bgwriter: Write/Sync" def run(self, zbx): columns = [x[0] for x in self.Items] From 1e1bbbb8e10e348eb012774c02f7b20f6dd52822 Mon Sep 17 00:00:00 2001 From: Pavel Sinyaev Date: Tue, 20 Dec 2022 12:59:23 +0300 Subject: [PATCH 028/106] correct error in finction name for PG version less 10000 simply copy-paste --- mamonsu/tools/bootstrap/sql.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mamonsu/tools/bootstrap/sql.py b/mamonsu/tools/bootstrap/sql.py index 344764f..69752c8 100644 --- a/mamonsu/tools/bootstrap/sql.py +++ b/mamonsu/tools/bootstrap/sql.py @@ -102,8 +102,8 @@ FROM count_tb, settings_tb $$ LANGUAGE SQL SECURITY DEFINER; ELSE - DROP FUNCTION IF EXISTS mamonsu.count_autovacuum(); - CREATE OR REPLACE FUNCTION mamonsu.count_autovacuum() + DROP FUNCTION IF EXISTS mamonsu.autovacuum_utilization(); + CREATE OR REPLACE FUNCTION mamonsu.autovacuum_utilization() RETURNS FLOAT AS $$ WITH count_tb AS ( SELECT count(*)::float AS count From 6fb610f04107157fc24a9d58403169c9768fb4e8 Mon Sep 17 00:00:00 2001 From: Pavel Sinyaev Date: Tue, 20 Dec 2022 12:59:23 +0300 Subject: [PATCH 029/106] correct error in finction name for PG version less 10000 simply copy-paste (cherry picked from commit 1e1bbbb8e10e348eb012774c02f7b20f6dd52822) --- mamonsu/tools/bootstrap/sql.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mamonsu/tools/bootstrap/sql.py b/mamonsu/tools/bootstrap/sql.py index 344764f..69752c8 100644 --- a/mamonsu/tools/bootstrap/sql.py +++ b/mamonsu/tools/bootstrap/sql.py @@ -102,8 +102,8 @@ FROM count_tb, settings_tb $$ LANGUAGE SQL SECURITY DEFINER; ELSE - DROP FUNCTION IF EXISTS mamonsu.count_autovacuum(); - CREATE OR REPLACE FUNCTION mamonsu.count_autovacuum() + DROP FUNCTION IF EXISTS mamonsu.autovacuum_utilization(); + CREATE OR REPLACE FUNCTION mamonsu.autovacuum_utilization() RETURNS FLOAT AS $$ WITH count_tb AS ( SELECT count(*)::float AS count From 2a86f1565c1c605d18e23e7061b467232c35c959 Mon Sep 17 00:00:00 2001 From: cuprumtan Date: Mon, 23 Jan 2023 12:52:01 +0500 Subject: [PATCH 030/106] fix: removed config file owner check --- mamonsu/lib/config.py | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/mamonsu/lib/config.py b/mamonsu/lib/config.py index 5cc7590..4d358b8 100644 --- a/mamonsu/lib/config.py +++ b/mamonsu/lib/config.py @@ -81,17 +81,19 @@ def __init__(self, cfg_file=None, plugin_directories=None): sys.stderr.write('Config file is empty: {0}\n'.format(cfg_file)) sys.exit(1) if cfg_file is not None: - if platform.LINUX: - config_status = int(repr(oct(os.stat(cfg_file).st_mode))[:-1][-3:]) - config_owner = pwd.getpwuid(os.stat(cfg_file).st_uid).pw_name - if not (config_status == 600 and config_owner == "mamonsu"): - logging.info( - "Shut down because of incorrect config file {0} permissions. It must be r/w for mamonsu user only (600).".format( - cfg_file)) - sys.stderr.write( - "Please, check your config file {0} permissions. It must be r/w for mamonsu user only (600).\n".format( - cfg_file)) - sys.exit(1) + # TODO: instead of hardcoded "mamonsu" user get real mamonsu owner user + # and check if config file belongs to this user + # if platform.LINUX: + # config_status = int(repr(oct(os.stat(cfg_file).st_mode))[:-1][-3:]) + # config_owner = pwd.getpwuid(os.stat(cfg_file).st_uid).pw_name + # if not (config_status == 600 and config_owner == "mamonsu"): + # logging.info( + # "Shut down because of incorrect config file {0} permissions. It must be r/w for mamonsu user only (600).".format( + # cfg_file)) + # sys.stderr.write( + # "Please, check your config file {0} permissions. It must be r/w for mamonsu user only (600).\n".format( + # cfg_file)) + # sys.exit(1) self.config.read_file(open(cfg_file)) plugins = self.fetch('plugins', 'directory', str) From da87b8f72e6b10ff22d8cfe80a86ac6976acc213 Mon Sep 17 00:00:00 2001 From: cuprumtan Date: Mon, 23 Jan 2023 15:38:33 +0500 Subject: [PATCH 031/106] fix: fixed Invalid Indexes trigger generation for zabbix native agent template --- mamonsu/plugins/pgsql/databases.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mamonsu/plugins/pgsql/databases.py b/mamonsu/plugins/pgsql/databases.py index 9b01e94..d9cd7f6 100644 --- a/mamonsu/plugins/pgsql/databases.py +++ b/mamonsu/plugins/pgsql/databases.py @@ -147,7 +147,7 @@ def discovery_rules(self, template, dashboard=False): }] triggers = [{ "name": "PostgreSQL Databases: invalid indexes in {#DATABASE} (hostname={HOSTNAME} value={ITEM.LASTVALUE})", - "expression": "{#TEMPLATE:pgsql.database.invalid_indexes[{#DATABASE}].last()}>0"} + "expression": "{#TEMPLATE:" + items[3]['key'] + ".last()}>0"} ] return template.discovery_rule(rule=rule, conditions=conditions, items=items, graphs=graphs, triggers=triggers) From df1ceeb32627c8dfa038e2d02b65bd4733caed62 Mon Sep 17 00:00:00 2001 From: cuprumtan Date: Mon, 23 Jan 2023 16:47:48 +0500 Subject: [PATCH 032/106] fix: fixed native zabbix agent metrics format --- mamonsu/plugins/pgsql/archive_command.py | 38 +++++++++++--------- mamonsu/plugins/pgsql/autovacuum.py | 35 +++++++++--------- mamonsu/plugins/pgsql/bgwriter.py | 3 +- mamonsu/plugins/pgsql/checkpoint.py | 13 +++---- mamonsu/plugins/pgsql/connections.py | 25 ++++++------- mamonsu/plugins/pgsql/databases.py | 14 ++++---- mamonsu/plugins/pgsql/health.py | 17 +++++---- mamonsu/plugins/pgsql/instance.py | 24 ++++++------- mamonsu/plugins/pgsql/oldest.py | 6 ++-- mamonsu/plugins/pgsql/pg_buffercache.py | 2 +- mamonsu/plugins/pgsql/pg_locks.py | 4 +-- mamonsu/plugins/pgsql/replication.py | 45 +++++++++++++----------- mamonsu/plugins/pgsql/statements.py | 28 ++++++++------- mamonsu/plugins/pgsql/wal.py | 38 ++++++++++---------- 14 files changed, 158 insertions(+), 134 deletions(-) diff --git a/mamonsu/plugins/pgsql/archive_command.py b/mamonsu/plugins/pgsql/archive_command.py index 5d04a2d..95ccc19 100644 --- a/mamonsu/plugins/pgsql/archive_command.py +++ b/mamonsu/plugins/pgsql/archive_command.py @@ -59,10 +59,12 @@ class ArchiveCommand(Plugin): key = "pgsql.archive_command{0}" Items = [ # key, desc, color, side, graph, delta, units - ("count_files_to_archive", "Files in archive_status Need to Archive Count", "006AAE", 0, 1, Plugin.DELTA.as_is, Plugin.UNITS.none), + ("count_files_to_archive", "Files in archive_status Need to Archive Count", "006AAE", 0, 1, Plugin.DELTA.as_is, + Plugin.UNITS.none), ("size_files_to_archive", "Files Need to Archive Size", "793F5D", 0, 0, Plugin.DELTA.as_is, Plugin.UNITS.bytes), ("archived_files", "Archived Files Count", "00CC00", 0, 1, Plugin.DELTA.simple_change, Plugin.UNITS.none), - ("failed_trying_to_archive", "Attempts to Archive Files Count", "FF5656", 0, 1, Plugin.DELTA.simple_change, Plugin.UNITS.none), + ("failed_trying_to_archive", "Attempts to Archive Files Count", "FF5656", 0, 1, Plugin.DELTA.simple_change, + Plugin.UNITS.none), ] old_archived_count = None old_failed_count = None @@ -192,25 +194,27 @@ def triggers(self, template, dashboard=False): return template.trigger({ "name": "PostgreSQL Archiver: count files need to archive on {HOSTNAME} more than 2", "expression": "{#TEMPLATE:" + self.right_type(self.key, - self.Items[0][0]) + ".last()}>" + self.plugin_macros["archive_queue_files"][0][1] + self.Items[0][0]) + ".last()}>" + + self.plugin_macros["archive_queue_files"][0][1] }) def keys_and_queries(self, template_zabbix): result = [] if LooseVersion(self.VersionPG) >= LooseVersion("10"): - result.append("{0}[*],$2 $1 -c \"{1}\"".format(self.key.format("." + self.Items[0][0]), - self.query_agent_count_files.format("wal_lsn", "walfile"))) - result.append("{0}[*],$2 $1 -c \"{1}\"".format(self.key.format("." + self.Items[1][0]), - self.query_agent_size_files.format("wal_lsn", "walfile"))) + result.append("{0}[*],$2 $1 -Aqtc \"{1}\"".format(self.key.format("." + self.Items[0][0]), + self.query_agent_count_files.format("wal_lsn", + "walfile"))) + result.append("{0}[*],$2 $1 -Aqtc \"{1}\"".format(self.key.format("." + self.Items[1][0]), + self.query_agent_size_files.format("wal_lsn", "walfile"))) else: - result.append("{0}[*],$2 $1 -c \"{1}\"".format(self.key.format("." + self.Items[0][0]), - self.query_agent_count_files.format("xlog_location", - "xlogfile"))) - result.append("{0}[*],$2 $1 -c \"{1}\"".format(self.key.format("." + self.Items[1][0]), - self.query_agent_size_files.format("xlog_location", - "xlogfile"))) - result.append("{0}[*],$2 $1 -c \"{1}\"".format(self.key.format("." + self.Items[2][0]), - self.query_agent_archived_count)) - result.append("{0}[*],$2 $1 -c \"{1}\"".format(self.key.format("." + self.Items[3][0]), - self.query_agent_failed_count)) + result.append("{0}[*],$2 $1 -Aqtc \"{1}\"".format(self.key.format("." + self.Items[0][0]), + self.query_agent_count_files.format("xlog_location", + "xlogfile"))) + result.append("{0}[*],$2 $1 -Aqtc \"{1}\"".format(self.key.format("." + self.Items[1][0]), + self.query_agent_size_files.format("xlog_location", + "xlogfile"))) + result.append("{0}[*],$2 $1 -Aqtc \"{1}\"".format(self.key.format("." + self.Items[2][0]), + self.query_agent_archived_count)) + result.append("{0}[*],$2 $1 -Aqtc \"{1}\"".format(self.key.format("." + self.Items[3][0]), + self.query_agent_failed_count)) return template_zabbix.key_and_query(result) diff --git a/mamonsu/plugins/pgsql/autovacuum.py b/mamonsu/plugins/pgsql/autovacuum.py index 80df791..1781800 100644 --- a/mamonsu/plugins/pgsql/autovacuum.py +++ b/mamonsu/plugins/pgsql/autovacuum.py @@ -4,8 +4,8 @@ from .pool import Pooler from mamonsu.lib.zbx_template import ZbxTemplate + class Autovacuum(Plugin): - AgentPluginType = "pg" # TODO: unify keys and remove its direct mentioning in zbx.send() functions key_count = "pgsql.autovacuum.count{0}" @@ -21,7 +21,8 @@ class Autovacuum(Plugin): def run(self, zbx): if Pooler.server_version_greater("10.0"): result_count = Pooler.run_sql_type("count_autovacuum", args=["backend_type = 'autovacuum worker'"]) - result_utilization = Pooler.run_sql_type("autovacuum_utilization", args=["backend_type = 'autovacuum worker'"]) + result_utilization = Pooler.run_sql_type("autovacuum_utilization", + args=["backend_type = 'autovacuum worker'"]) else: result_count = Pooler.run_sql_type("count_autovacuum", args=[ "query LIKE '%%autovacuum%%' AND state <> 'idle' AND pid <> pg_catalog.pg_backend_pid()"]) @@ -51,7 +52,7 @@ def items(self, template, dashboard=False): "value_type": Plugin.VALUE_TYPE.numeric_float, "units": Plugin.UNITS.percent, "type": Plugin.TYPE.CALCULATED, - "params": "avg(pgsql.autovacuum.utilization[], 5m)", + "params": "avg({item}, 5m)".format(item=self.key_utilization.format("[]")), "delay": self.plugin_config("interval") })) result += (template.item({ @@ -60,7 +61,7 @@ def items(self, template, dashboard=False): "value_type": Plugin.VALUE_TYPE.numeric_float, "units": Plugin.UNITS.percent, "type": Plugin.TYPE.CALCULATED, - "params": "avg(pgsql.autovacuum.utilization[], 15m)", + "params": "avg({item}, 15m)".format(item=self.key_utilization.format("[]")), "delay": self.plugin_config("interval") })) result += (template.item({ @@ -69,13 +70,13 @@ def items(self, template, dashboard=False): "value_type": Plugin.VALUE_TYPE.numeric_float, "units": Plugin.UNITS.percent, "type": Plugin.TYPE.CALCULATED, - "params": "avg(pgsql.autovacuum.utilization[], 30m)", + "params": "avg({item}, 30m)".format(item=self.key_utilization.format("[]")), "delay": self.plugin_config("interval") })) return result else: return [] - + def graphs(self, template, dashboard=False): result = template.graph({ "name": "PostgreSQL Autovacuum: Count of Autovacuum Workers", @@ -98,15 +99,17 @@ def graphs(self, template, dashboard=False): def keys_and_queries(self, template_zabbix): result = [] if LooseVersion(self.VersionPG) >= LooseVersion("10"): - result.append("{0},$2 $1 -c \"{1}\"".format(self.key_count.format("[*]"), - Pooler.SQL["count_autovacuum"][0].format("backend_type = 'autovacuum worker'"))) - result.append("{0},$2 $1 -c \"{1}\"".format(self.key_utilization.format("[*]"), - Pooler.SQL["autovacuum_utilization"][0].format( - "backend_type = 'autovacuum worker'"))) + result.append("{0},$2 $1 -Aqtc \"{1}\"".format(self.key_count.format("[*]"), + Pooler.SQL["count_autovacuum"][0].format( + "backend_type = 'autovacuum worker'"))) + result.append("{0},$2 $1 -Aqtc \"{1}\"".format(self.key_utilization.format("[*]"), + Pooler.SQL["autovacuum_utilization"][0].format( + "backend_type = 'autovacuum worker'"))) else: - result.append("{0},$2 $1 -c \"{1}\"".format(self.key_count.format("[*]"), - Pooler.SQL["count_autovacuum"][0].format("query LIKE '%%autovacuum%%' AND state <> 'idle' AND pid <> pg_catalog.pg_backend_pid()"))) - result.append("{0},$2 $1 -c \"{1}\"".format(self.key_utilization.format("[*]"), - Pooler.SQL["autovacuum_utilization"][0].format( - "query LIKE '%%autovacuum%%' AND state <> 'idle' AND pid <> pg_catalog.pg_backend_pid()"))) + result.append("{0},$2 $1 -Aqtc \"{1}\"".format(self.key_count.format("[*]"), + Pooler.SQL["count_autovacuum"][0].format( + "query LIKE '%%autovacuum%%' AND state <> 'idle' AND pid <> pg_catalog.pg_backend_pid()"))) + result.append("{0},$2 $1 -Aqtc \"{1}\"".format(self.key_utilization.format("[*]"), + Pooler.SQL["autovacuum_utilization"][0].format( + "query LIKE '%%autovacuum%%' AND state <> 'idle' AND pid <> pg_catalog.pg_backend_pid()"))) return template_zabbix.key_and_query(result) diff --git a/mamonsu/plugins/pgsql/bgwriter.py b/mamonsu/plugins/pgsql/bgwriter.py index b6805b1..b2d56b8 100644 --- a/mamonsu/plugins/pgsql/bgwriter.py +++ b/mamonsu/plugins/pgsql/bgwriter.py @@ -119,5 +119,6 @@ def keys_and_queries(self, template_zabbix): result = [] for item in self.Items: # delete from key '[' and ']' in Item for zabbix agent - result.append("{0}[*],$2 $1 -c \"{1}\"".format(self.key.format("." + item[0]), self.query.format(item[0]))) + result.append( + "{0}[*],$2 $1 -Aqtc \"{1}\"".format(self.key.format("." + item[0]), self.query.format(item[0]))) return template_zabbix.key_and_query(result) diff --git a/mamonsu/plugins/pgsql/checkpoint.py b/mamonsu/plugins/pgsql/checkpoint.py index 698cf4b..7f9bc88 100644 --- a/mamonsu/plugins/pgsql/checkpoint.py +++ b/mamonsu/plugins/pgsql/checkpoint.py @@ -101,8 +101,8 @@ def graphs(self, template, dashboard=False): "name": self.graph_name_count, "items": items_checkpoints }) + template.graph({ - "name": self.graph_name_ws, - "items": items_checkpoints_write_sync + "name": self.graph_name_ws, + "items": items_checkpoints_write_sync }) if not dashboard: return result @@ -133,7 +133,8 @@ def triggers(self, template, dashboard=False): return template.trigger({ "name": "PostgreSQL Checkpoints: required checkpoints occurs too frequently on {HOSTNAME}", "expression": "{#TEMPLATE:" + self.right_type(self.key, - self.Items[1][1]) + ".last()}>" + self.plugin_macros["max_checkpoint_by_wal_in_hour"][0][1] + self.Items[1][1]) + ".last()}>" + + self.plugin_macros["max_checkpoint_by_wal_in_hour"][0][1] }) def keys_and_queries(self, template_zabbix): @@ -141,9 +142,9 @@ def keys_and_queries(self, template_zabbix): for num, item in enumerate(self.Items): if num > 1: result.append( - "{0}[*],$2 $1 -c \"{1}\"".format(self.key.format("." + item[1]), self.query.format(item[0]))) + "{0}[*],$2 $1 -Aqtc \"{1}\"".format(self.key.format("." + item[1]), self.query.format(item[0]))) else: result.append( - "{0}[*],$2 $1 -c \"{1}\"".format(self.key.format("." + item[1]), - self.query_interval.format(item[0]))) + "{0}[*],$2 $1 -Aqtc \"{1}\"".format(self.key.format("." + item[1]), + self.query_interval.format(item[0]))) return template_zabbix.key_and_query(result) diff --git a/mamonsu/plugins/pgsql/connections.py b/mamonsu/plugins/pgsql/connections.py index 04998b4..ad31dc8 100644 --- a/mamonsu/plugins/pgsql/connections.py +++ b/mamonsu/plugins/pgsql/connections.py @@ -239,30 +239,31 @@ def triggers(self, template, dashboard=False): def keys_and_queries(self, template_zabbix): result = [] for item in self.Items: - result.append("{0}[*],$2 $1 -c \"{1}\"".format(self.key.format("." + item[1]), - self.query_agent.format(item[1], - "AND (backend_type = 'client backend' OR backend_type = 'parallel worker')" if LooseVersion( - self.VersionPG) >= LooseVersion( - "10") else ""))) - result.append("{0}[*],$2 $1 -c \"{1}\"".format(self.key.format(".total"), self.query_agent_total.format( + result.append("{0}[*],$2 $1 -Aqtc \"{1}\"".format(self.key.format("." + item[1]), + self.query_agent.format(item[1], + "AND (backend_type = 'client backend' OR backend_type = 'parallel worker')" if LooseVersion( + self.VersionPG) >= LooseVersion( + "10") else ""))) + result.append("{0}[*],$2 $1 -Aqtc \"{1}\"".format(self.key.format(".total"), self.query_agent_total.format( "(backend_type = 'client backend' OR backend_type = 'parallel worker')" if LooseVersion( self.VersionPG) >= LooseVersion( "10") else "state IS NOT NULL"))) if LooseVersion(self.VersionPG) < LooseVersion("9.6"): result.append( - "{0}[*],$2 $1 -c \"{1}\"".format(self.key.format(".waiting"), self.query_agent_waiting_old_v.format( + "{0}[*],$2 $1 -Aqtc \"{1}\"".format(self.key.format(".waiting"), self.query_agent_waiting_old_v.format( "(backend_type = 'client backend' OR backend_type = 'parallel worker')" if LooseVersion( self.VersionPG) >= LooseVersion( "10") else "state IS NOT NULL"))) else: result.append( - "{0}[*],$2 $1 -c \"{1}\"".format(self.key.format(".waiting"), self.query_agent_waiting_new_v.format( + "{0}[*],$2 $1 -Aqtc \"{1}\"".format(self.key.format(".waiting"), self.query_agent_waiting_new_v.format( "(backend_type = 'client backend' OR backend_type = 'parallel worker')" if LooseVersion( self.VersionPG) >= LooseVersion( "10") else "state IS NOT NULL"))) if LooseVersion(self.VersionPG) >= LooseVersion("10"): - result.append("{0}[*],$2 $1 -c \"{1}\"".format(self.key.format(".other"), - self.query_other_connections.format( - "', '".join(self.default_backend_types)))) - result.append("{0}[*],$2 $1 -c \"{1}\"".format(self.key.format(".max_connections"), self.query_agent_max_conn)) + result.append("{0}[*],$2 $1 -Aqtc \"{1}\"".format(self.key.format(".other"), + self.query_other_connections.format( + "', '".join(self.default_backend_types)))) + result.append( + "{0}[*],$2 $1 -Aqtc \"{1}\"".format(self.key.format(".max_connections"), self.query_agent_max_conn)) return template_zabbix.key_and_query(result) diff --git a/mamonsu/plugins/pgsql/databases.py b/mamonsu/plugins/pgsql/databases.py index d9cd7f6..ad3ac73 100644 --- a/mamonsu/plugins/pgsql/databases.py +++ b/mamonsu/plugins/pgsql/databases.py @@ -152,13 +152,13 @@ def discovery_rules(self, template, dashboard=False): return template.discovery_rule(rule=rule, conditions=conditions, items=items, graphs=graphs, triggers=triggers) def keys_and_queries(self, template_zabbix): - result = ["{0},$2 $1 -c \"{1}\"".format(self.key_db_discovery.format("[*]"), self.query_agent_discovery), + result = ["{0},$2 $1 -Aqtc \"{1}\"".format(self.key_db_discovery.format("[*]"), self.query_agent_discovery), "{0},echo \"{1}\" | $3 $2 -v p1=\"$1\"".format(self.key_db_size.format("[*]"), self.query_size), "{0},echo \"{1}\" | $3 $2 -v p1=\"$1\"".format(self.key_db_age.format("[*]"), self.query_age), - "{0},$3 $2 -d \"$1\" -c \"{1}\"".format(self.key_db_bloating_tables.format("[*]"), - self.query_bloating_tables.format( - self.plugin_config("bloat_scale"), - self.plugin_config("min_rows"))), - "{0},$3 $2 -d \"$1\" -c \"{1}\"".format(self.key_invalid_indexes.format("[*]"), - self.query_invalid_indexes)] + "{0},$3 $2 -d \"$1\" -Aqtc \"{1}\"".format(self.key_db_bloating_tables.format("[*]"), + self.query_bloating_tables.format( + self.plugin_config("bloat_scale"), + self.plugin_config("min_rows"))), + "{0},$3 $2 -d \"$1\" -Aqtc \"{1}\"".format(self.key_invalid_indexes.format("[*]"), + self.query_invalid_indexes)] return template_zabbix.key_and_query(result) diff --git a/mamonsu/plugins/pgsql/health.py b/mamonsu/plugins/pgsql/health.py index fb4968d..5ed9db2 100644 --- a/mamonsu/plugins/pgsql/health.py +++ b/mamonsu/plugins/pgsql/health.py @@ -4,6 +4,7 @@ from .pool import Pooler import time from mamonsu.lib.zbx_template import ZbxTemplate +from mamonsu.plugins.pgsql.instance import Instance class PgHealth(Plugin): @@ -58,7 +59,9 @@ def items(self, template, dashboard=False): "value_type": Plugin.VALUE_TYPE.numeric_float, "units": Plugin.UNITS.percent, "type": Plugin.TYPE.CALCULATED, - "params": "last(pgsql.blocks[hit])*100/(last(pgsql.blocks[hit])+last(pgsql.blocks[read]))" + "params": "last({blocks_hit})*100/(last({blocks_hit})+last({blocks_read}))".format( + blocks_hit=Instance.key + Instance.Items[2][1], + blocks_read=Instance.key + Instance.Items[3][1]) }) + template.item({ "name": "PostgreSQL Health: Service Uptime", "key": self.right_type(self.key_uptime), @@ -106,10 +109,12 @@ def macros(self, template, dashboard=False): def triggers(self, template, dashboard=False): result = template.trigger({ "name": "PostgreSQL Health: service has been restarted on {HOSTNAME} (uptime={ITEM.LASTVALUE})", - "expression": "{#TEMPLATE:" + self.right_type(self.key_uptime) + ".change()}>" + self.plugin_macros["pg_uptime"][0][1] + "expression": "{#TEMPLATE:" + self.right_type(self.key_uptime) + ".change()}>" + + self.plugin_macros["pg_uptime"][0][1] }) + template.trigger({ "name": "PostgreSQL Health: cache hit ratio too low on {HOSTNAME} ({ITEM.LASTVALUE})", - "expression": "{#TEMPLATE:" + self.right_type(self.key_cache, "hit") + ".last()}<" + self.plugin_macros["cache_hit_ratio_percent"][0][1] + "expression": "{#TEMPLATE:" + self.right_type(self.key_cache, "hit") + ".last()}<" + + self.plugin_macros["cache_hit_ratio_percent"][0][1] }) + template.trigger({ "name": "PostgreSQL Health: no ping from PostgreSQL for 3 minutes on {HOSTNAME}", "expression": "{#TEMPLATE:" + self.right_type(self.key_ping) + ".nodata(180)}=1" @@ -117,7 +122,7 @@ def triggers(self, template, dashboard=False): return result def keys_and_queries(self, template_zabbix): - result = ["{0}[*],$2 $1 -c \"{1}\"".format(self.key_ping.format(""), self.query_health), - "{0}[*],$2 $1 -c \"{1}\"".format(self.key_uptime.format(""), self.query_uptime), - "{0}[*],$2 $1 -c \"{1}\"".format(self.key_version.format(""), self.query_version)] + result = ["{0}[*],$2 $1 -Aqtc \"{1}\"".format(self.key_ping.format(""), self.query_health), + "{0}[*],$2 $1 -Aqtc \"{1}\"".format(self.key_uptime.format(""), self.query_uptime), + "{0}[*],$2 $1 -Aqtc \"{1}\"".format(self.key_version.format(""), self.query_version)] return template_zabbix.key_and_query(result) diff --git a/mamonsu/plugins/pgsql/instance.py b/mamonsu/plugins/pgsql/instance.py index c1070b2..8972ce2 100644 --- a/mamonsu/plugins/pgsql/instance.py +++ b/mamonsu/plugins/pgsql/instance.py @@ -118,14 +118,14 @@ def items(self, template, dashboard=False): "delay": self.plugin_config("interval"), "delta": delta }) - result += template.item({ - "key": self.key_server_mode, - "name": "PostgreSQL Instance: Server Mode", - "value_type": self.VALUE_TYPE.text, - "units": self.UNITS.none, - "delay": self.plugin_config("interval"), - "delta": Plugin.DELTA.as_is - }) + result += template.item({ + "key": self.right_type(self.key_server_mode), + "name": "PostgreSQL Instance: Server Mode", + "value_type": self.VALUE_TYPE.text, + "units": self.UNITS.none, + "delay": self.plugin_config("interval"), + "delta": Plugin.DELTA.as_is + }) if not dashboard: return result else: @@ -197,7 +197,7 @@ def graphs(self, template, dashboard=False): def triggers(self, template, dashboard=False): return template.trigger({ "name": "PostgreSQL Instance: server mode has been changed on {HOSTNAME} to {ITEM.LASTVALUE}", - "expression": "{#TEMPLATE:" + self.key_server_mode + ".change()}>0" + "expression": "{#TEMPLATE:" + self.right_type(self.key_server_mode) + ".change()}>0" }) def keys_and_queries(self, template_zabbix): @@ -209,7 +209,7 @@ def keys_and_queries(self, template_zabbix): for item in all_items: # split each item to get values for keys of both agent type and mamonsu type keys = item[1].split("[") - result.append("{0}[*],$2 $1 -c \"{1}\"".format("{0}{1}.{2}".format(self.key, keys[0], keys[1][:-1]), - self.query_agent.format(format(item[0])))) - result.append("{0}[*],$2 $1 -c \"{1}\"".format(self.key_server_mode, self.query_server_mode)) + result.append("{0}[*],$2 $1 -Aqtc \"{1}\"".format("{0}{1}.{2}".format(self.key, keys[0], keys[1][:-1]), + self.query_agent.format(format(item[0])))) + result.append("{0}[*],$2 $1 -Aqtc \"{1}\"".format(self.key_server_mode, self.query_server_mode)) return template_zabbix.key_and_query(result) diff --git a/mamonsu/plugins/pgsql/oldest.py b/mamonsu/plugins/pgsql/oldest.py index 2a335d4..3de0bf5 100644 --- a/mamonsu/plugins/pgsql/oldest.py +++ b/mamonsu/plugins/pgsql/oldest.py @@ -108,7 +108,7 @@ def triggers(self, template, dashboard=False): }) def keys_and_queries(self, template_zabbix): - result = ["{0}[*],$2 $1 -c \"{1}\"".format(self.key.format(".xid_age"), self.OldestXidSql), - "{0}[*],$2 $1 -c \"{1}\"".format(self.key.format(".transaction_time"), self.OldestTransactionSql), - "{0}[*],$2 $1 -c \"{1}\"".format("pgsql.parallel{0}".format(".queries"), self.ParallelQueries)] + result = ["{0}[*],$2 $1 -Aqtc \"{1}\"".format(self.key.format(".xid_age"), self.OldestXidSql), + "{0}[*],$2 $1 -Aqtc \"{1}\"".format(self.key.format(".transaction_time"), self.OldestTransactionSql), + "{0}[*],$2 $1 -Aqtc \"{1}\"".format("pgsql.parallel{0}".format(".queries"), self.ParallelQueries)] return template_zabbix.key_and_query(result) diff --git a/mamonsu/plugins/pgsql/pg_buffercache.py b/mamonsu/plugins/pgsql/pg_buffercache.py index 39d302d..715f64b 100644 --- a/mamonsu/plugins/pgsql/pg_buffercache.py +++ b/mamonsu/plugins/pgsql/pg_buffercache.py @@ -68,7 +68,7 @@ def keys_and_queries(self, template_zabbix): if Pooler.extension_installed("pg_buffercache"): result = [] for i, item in enumerate(self.Items): - result.append("{0}[*],$2 $1 -c \"{1}\"".format(self.key.format("." + item[0]), self.query[i].format( + result.append("{0}[*],$2 $1 -Aqtc \"{1}\"".format(self.key.format("." + item[0]), self.query[i].format( self.extension_schema(extension="pg_buffercache")))) return template_zabbix.key_and_query(result) else: diff --git a/mamonsu/plugins/pgsql/pg_locks.py b/mamonsu/plugins/pgsql/pg_locks.py index 9713ec2..0373084 100644 --- a/mamonsu/plugins/pgsql/pg_locks.py +++ b/mamonsu/plugins/pgsql/pg_locks.py @@ -102,6 +102,6 @@ def graphs(self, template, dashboard=False): def keys_and_queries(self, template_zabbix): result = [] for item in self.Items: - result.append("{0}[*],$2 $1 -c \"{1}\"".format(self.key.format("." + item[0]), - self.query_agent.format("{0}lock".format(item[0])))) + result.append("{0}[*],$2 $1 -Aqtc \"{1}\"".format(self.key.format("." + item[0]), + self.query_agent.format("{0}lock".format(item[0])))) return template_zabbix.key_and_query(result) diff --git a/mamonsu/plugins/pgsql/replication.py b/mamonsu/plugins/pgsql/replication.py index ec164b8..9e18388 100644 --- a/mamonsu/plugins/pgsql/replication.py +++ b/mamonsu/plugins/pgsql/replication.py @@ -23,6 +23,12 @@ class Replication(Plugin): END; """ + query_non_active_slots = """ + SELECT count(*) + FROM pg_replication_slots + WHERE active = 'false'; + """ + # for discovery rule for name of each replica key_lsn_replication_discovery = "pgsql.replication.discovery{0}" key_total_lag = "pgsql.replication.total_lag{0}" @@ -52,13 +58,14 @@ def run(self, zbx): Pooler.run_sql_type("replication_lag_master_query") if Pooler.server_version_greater("10.0") and (Pooler.is_superuser() or Pooler.is_bootstraped()): result_lags = Pooler.run_sql_type("wal_lag_lsn", - args=[" coalesce((pg_wal_lsn_diff(pg_current_wal_lsn(), sent_lsn))::int, 0) AS send_lag, " - "coalesce((pg_wal_lsn_diff(sent_lsn, flush_lsn))::int, 0) AS receive_lag, " - "coalesce((pg_wal_lsn_diff(sent_lsn, write_lsn))::int, 0) AS write_lag, " - "coalesce((pg_wal_lsn_diff(write_lsn, flush_lsn))::int, 0) AS flush_lag, " - "coalesce((pg_wal_lsn_diff(flush_lsn, replay_lsn))::int, 0) AS replay_lag, " if not Pooler.is_bootstraped() else - " send_lag, receive_lag, write_lag, flush_lag, replay_lag, ", - "wal", "lsn"]) + args=[ + " coalesce((pg_wal_lsn_diff(pg_current_wal_lsn(), sent_lsn))::int, 0) AS send_lag, " + "coalesce((pg_wal_lsn_diff(sent_lsn, flush_lsn))::int, 0) AS receive_lag, " + "coalesce((pg_wal_lsn_diff(sent_lsn, write_lsn))::int, 0) AS write_lag, " + "coalesce((pg_wal_lsn_diff(write_lsn, flush_lsn))::int, 0) AS flush_lag, " + "coalesce((pg_wal_lsn_diff(flush_lsn, replay_lsn))::int, 0) AS replay_lag, " if not Pooler.is_bootstraped() else + " send_lag, receive_lag, write_lag, flush_lag, replay_lag, ", + "wal", "lsn"]) if result_lags: lags = [] for info in result_lags: @@ -83,11 +90,7 @@ def run(self, zbx): else: self.disable_and_exit_if_not_superuser() - non_active_slots = Pooler.query(""" - SELECT count(*) - FROM pg_replication_slots - WHERE active = 'false'; - """) + non_active_slots = Pooler.query(query_non_active_slots) zbx.send(self.key_non_active_slots.format("[]"), int(non_active_slots[0][0])) def items(self, template, dashboard=False): @@ -199,13 +202,15 @@ def discovery_rules(self, template, dashboard=False): def keys_and_queries(self, template_zabbix): result = [] if LooseVersion(self.VersionPG) < LooseVersion("10"): - result.append("{0},$2 $1 -c \"{1}\"".format("pgsql.replication_lag.sec[*]", - self.query_agent_replication_lag.format( - self.plugin_config("interval"), "xlog_receive_location", - "xlog_replay_location"))) + result.append("{0},$2 $1 -Aqtc \"{1}\"".format("pgsql.replication_lag.sec[*]", + self.query_agent_replication_lag.format( + self.plugin_config("interval"), "xlog_receive_location", + "xlog_replay_location"))) else: - result.append("{0},$2 $1 -c \"{1}\"".format("pgsql.replication_lag.sec[*]", - self.query_agent_replication_lag.format( - self.plugin_config("interval"), "wal_receive_lsn", - "wal_replay_lsn"))) + result.append("{0},$2 $1 -Aqtc \"{1}\"".format("pgsql.replication_lag.sec[*]", + self.query_agent_replication_lag.format( + self.plugin_config("interval"), "wal_receive_lsn", + "wal_replay_lsn"))) + result.append("{0},$2 $1 -Aqtc \"{1}\"".format("pgsql.replication.non_active_slots[*]", + self.query_non_active_slots)) return template_zabbix.key_and_query(result) diff --git a/mamonsu/plugins/pgsql/statements.py b/mamonsu/plugins/pgsql/statements.py index c44e28f..04fcaf0 100644 --- a/mamonsu/plugins/pgsql/statements.py +++ b/mamonsu/plugins/pgsql/statements.py @@ -175,7 +175,7 @@ def graphs(self, template, dashboard=False): "key": self.right_type(self.key + keys[0] + "{0}", keys[1][:-1]), "color": item[5][1], "yaxisside": item[5][2], - "drawtype": 2}) + "drawtype": 2}) # create graph graph = { "name": graph_item[0], @@ -215,24 +215,26 @@ def keys_and_queries(self, template_zabbix): for i, item in enumerate(all_items): keys = item[0].split("[") - result.append("{0}[*],$2 $1 -c \"{1}\"".format("{0}{1}.{2}".format(self.key, keys[0], keys[1][:-1]), - self.query[extension + "_bootstrap"].format( - columns=", ".join( - [x[0][x[0].find("[") + 1:x[0].find("]")] for x in - all_items]), metrics=(", ".join(columns)), - extension_schema=extension_schema) if Pooler.is_bootstraped() else - self.query[extension].format( - metrics=(", ".join(columns)), - extension_schema=extension_schema))) + result.append("{0}[*],$2 $1 -Aqtc \"{1}\"".format("{0}{1}.{2}".format(self.key, keys[0], keys[1][:-1]), + self.query[extension + "_bootstrap"].format( + columns=", ".join( + [x[0][x[0].find("[") + 1:x[0].find("]")] for x + in + all_items]), metrics=(", ".join(columns)), + extension_schema=extension_schema) if Pooler.is_bootstraped() else + self.query[extension].format( + metrics=(", ".join(columns)), + extension_schema=extension_schema))) if LooseVersion(self.VersionPG) >= LooseVersion("14"): if Pooler.is_pgpro() or Pooler.is_pgpro_ee(): all_items += self.Items_pg_14 for i, item in enumerate(all_items): keys = item[0].split("[") - result.append("{0}[*],$2 $1 -c \"{1}\"".format("{0}{1}.{2}".format(self.key, keys[0], keys[1][:-1]), - self.query_info.format(metrics=(item[1]), - extension_schema=extension_schema))) + result.append( + "{0}[*],$2 $1 -Aqtc \"{1}\"".format("{0}{1}.{2}".format(self.key, keys[0], keys[1][:-1]), + self.query_info.format(metrics=(item[1]), + extension_schema=extension_schema))) return template_zabbix.key_and_query(result) else: return diff --git a/mamonsu/plugins/pgsql/wal.py b/mamonsu/plugins/pgsql/wal.py index 37caf30..8235996 100644 --- a/mamonsu/plugins/pgsql/wal.py +++ b/mamonsu/plugins/pgsql/wal.py @@ -49,7 +49,8 @@ class Wal(Plugin): def run(self, zbx): # count of WAL files - result = Pooler.run_sql_type("count_wal_files", args=["wal" if Pooler.server_version_greater("10.0") else "xlog"]) + result = Pooler.run_sql_type("count_wal_files", + args=["wal" if Pooler.server_version_greater("10.0") else "xlog"]) zbx.send(self.key_count_wall.format("[]"), int(result[0][0])) if Pooler.server_version_greater("10"): @@ -110,26 +111,26 @@ def items(self, template, dashboard=False): "delta": delta, }) + template.item({ "name": "PostgreSQL WAL: Buffers Full", - "key": self.key_wal_buffers_full, + "key": self.right_type(self.key_wal_buffers_full), "value_type": self.VALUE_TYPE.numeric_float, "delta": delta, }) + template.item({ "name": "PostgreSQL WAL: Write Time (ms)", - "key": self.key_wal_write_time, + "key": self.right_type(self.key_wal_write_time), "value_type": self.VALUE_TYPE.numeric_float, "delta": delta, }) + template.item({ "name": "PostgreSQL WAL: Sync Time (ms)", - "key": self.key_wal_sync_time, + "key": self.right_type(self.key_wal_sync_time), "value_type": self.VALUE_TYPE.numeric_float, "delta": delta, }) + template.item({ "name": "PostgreSQL WAL: Sync Duty (%)", - "key": self.key_wal_sync_duty, + "key": self.right_type(self.key_wal_sync_duty), "value_type": Plugin.VALUE_TYPE.numeric_float, "units": Plugin.UNITS.percent, "type": Plugin.TYPE.CALCULATED, - "params": "last(" + self.key_wal_sync_time + ")/10" + "params": "last({item})/10".format(item=self.key_wal_sync_time) }) if not dashboard: return result @@ -151,26 +152,27 @@ def items(self, template, dashboard=False): "page": ZbxTemplate.dashboard_page_wal["name"], "size": ZbxTemplate.dashboard_widget_size_medium, "position": 6} - }] + }] def keys_and_queries(self, template_zabbix): result = [] if LooseVersion(self.VersionPG) < LooseVersion("10"): - result.append("{0},$2 $1 -c \"{1}\"".format(self.key_wall.format("[*]"), self.query_xlog_lsn_diff)) + result.append("{0},$2 $1 -Aqtc \"{1}\"".format(self.key_wall.format("[*]"), self.query_xlog_lsn_diff)) result.append( - "{0},$2 $1 -c \"{1}\"".format(self.key_count_wall.format("[*]"), - Pooler.SQL["count_wal_files"][0].format("xlog"))) + "{0},$2 $1 -Aqtc \"{1}\"".format(self.key_count_wall.format("[*]"), + Pooler.SQL["count_wal_files"][0].format("xlog"))) else: - result.append("{0},$2 $1 -c \"{1}\"".format(self.key_wall.format("[*]"), self.query_wal_lsn_diff)) - result.append("{0},$2 $1 -c \"{1}\"".format(self.key_count_wall.format("[*]"), - Pooler.SQL["count_wal_files"][0].format("wal"))) + result.append("{0},$2 $1 -Aqtc \"{1}\"".format(self.key_wall.format("[*]"), self.query_wal_lsn_diff)) + result.append("{0},$2 $1 -Aqtc \"{1}\"".format(self.key_count_wall.format("[*]"), + Pooler.SQL["count_wal_files"][0].format("wal"))) if LooseVersion(self.VersionPG) >= LooseVersion("14"): - result.append("{0},$2 $1 -c \"{1}\"".format(self.key_wal_records.format("[*]"), self.query_wal_records)) - result.append("{0},$2 $1 -c \"{1}\"".format(self.key_wal_fpi.format("[*]"), self.query_wal_fpi)) + result.append("{0},$2 $1 -Aqtc \"{1}\"".format(self.key_wal_records.format("[*]"), self.query_wal_records)) + result.append("{0},$2 $1 -Aqtc \"{1}\"".format(self.key_wal_fpi.format("[*]"), self.query_wal_fpi)) result.append( - "{0},$2 $1 -c \"{1}\"".format(self.key_wal_buffers_full.format("[*]"), self.query_wal_buffers_full)) + "{0},$2 $1 -Aqtc \"{1}\"".format(self.key_wal_buffers_full.format("[*]"), self.query_wal_buffers_full)) result.append( - "{0},$2 $1 -c \"{1}\"".format(self.key_wal_write_time.format("[*]"), self.query_wal_write_time)) - result.append("{0},$2 $1 -c \"{1}\"".format(self.key_wal_sync_time.format("[*]"), self.query_wal_sync_time)) + "{0},$2 $1 -Aqtc \"{1}\"".format(self.key_wal_write_time.format("[*]"), self.query_wal_write_time)) + result.append( + "{0},$2 $1 -Aqtc \"{1}\"".format(self.key_wal_sync_time.format("[*]"), self.query_wal_sync_time)) return template_zabbix.key_and_query(result) From ac42b041b124f7c874385121375bf304a2f2d08c Mon Sep 17 00:00:00 2001 From: cuprumtan Date: Tue, 24 Jan 2023 11:47:02 +0500 Subject: [PATCH 033/106] fix: fixed Archive query syntax --- mamonsu/plugins/pgsql/archive_command.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mamonsu/plugins/pgsql/archive_command.py b/mamonsu/plugins/pgsql/archive_command.py index 95ccc19..d9870a5 100644 --- a/mamonsu/plugins/pgsql/archive_command.py +++ b/mamonsu/plugins/pgsql/archive_command.py @@ -46,7 +46,7 @@ class ArchiveCommand(Plugin): ('x' || substring(pg_{1}_name(pg_current_{0}()) from 17 for 8))::bit(32)::int END AS current_wal_mod FROM pg_settings, pg_stat_archiver WHERE pg_settings.name = 'wal_segment_size') - greatest(coalesce(((segment_parts_count - last_wal_mod) + ((current_wal_div - last_wal_div - 1) * segment_parts_count) + current_wal_mod - 1) * segment_size, 0), 0)::bigint AS size_files + SELECT greatest(coalesce(((segment_parts_count - last_wal_mod) + ((current_wal_div - last_wal_div - 1) * segment_parts_count) + current_wal_mod - 1) * segment_size, 0), 0)::bigint AS size_files FROM values; """ From 8d008f445bc5baa502682afe84fbcf31faa1e2ef Mon Sep 17 00:00:00 2001 From: cuprumtan Date: Tue, 24 Jan 2023 11:54:15 +0500 Subject: [PATCH 034/106] cicd: updated versions --- .github/workflows/mamonsu-tests-dev.yml | 4 ++-- .github/workflows/mamonsu-tests-master.yml | 8 ++------ 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/.github/workflows/mamonsu-tests-dev.yml b/.github/workflows/mamonsu-tests-dev.yml index b5e1ac4..4ec65ff 100644 --- a/.github/workflows/mamonsu-tests-dev.yml +++ b/.github/workflows/mamonsu-tests-dev.yml @@ -27,8 +27,8 @@ jobs: strategy: matrix: docker_os: ['centos:7'] - zabbix_version: ['6.0.4'] - pg_version: ['10', '11', '12', '13', '14'] + zabbix_version: ['6.2.6'] + pg_version: ['11', '12', '13', '14', '15'] steps: - name: Checkout mamonsu repo diff --git a/.github/workflows/mamonsu-tests-master.yml b/.github/workflows/mamonsu-tests-master.yml index a30d886..4afd5a2 100644 --- a/.github/workflows/mamonsu-tests-master.yml +++ b/.github/workflows/mamonsu-tests-master.yml @@ -27,12 +27,8 @@ jobs: strategy: matrix: docker_os: ['ubuntu:20.04', 'centos:7'] - zabbix_version: ['4.0.40', '5.0.23', '5.4.12', '6.0.4'] - pg_version: ['10', '11', '12', '13', '14'] - exclude: - # excludes PG 9.6 on CentOS 8 - - docker_os: 'centos:8' - pg_version: '9.6' + zabbix_version: ['4.0.44', '4.4.10', '5.0.30', '5.4.12', '6.0.12', '6.2.6'] + pg_version: ['11', '12', '13', '14', '15'] steps: - name: Checkout mamonsu repo From 41ddfd8e834d80a298345d1d24c4c813e727c0c9 Mon Sep 17 00:00:00 2001 From: cuprumtan Date: Tue, 24 Jan 2023 12:00:18 +0500 Subject: [PATCH 035/106] fix: added recovery status check (WAL plugin) --- mamonsu/plugins/pgsql/wal.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/mamonsu/plugins/pgsql/wal.py b/mamonsu/plugins/pgsql/wal.py index 8235996..23b834d 100644 --- a/mamonsu/plugins/pgsql/wal.py +++ b/mamonsu/plugins/pgsql/wal.py @@ -53,12 +53,13 @@ def run(self, zbx): args=["wal" if Pooler.server_version_greater("10.0") else "xlog"]) zbx.send(self.key_count_wall.format("[]"), int(result[0][0])) - if Pooler.server_version_greater("10"): - result = Pooler.query(self.query_wal_lsn_diff) - zbx.send(self.key_wall.format("[]"), float(result[0][0]), self.DELTA_SPEED) - else: - result = Pooler.query(self.query_xlog_lsn_diff) - zbx.send(self.key_wall.format("[]"), float(result[0][0]), self.DELTA_SPEED) + if not Pooler.in_recovery(): + if Pooler.server_version_greater("10"): + result = Pooler.query(self.query_wal_lsn_diff) + zbx.send(self.key_wall.format("[]"), float(result[0][0]), self.DELTA_SPEED) + else: + result = Pooler.query(self.query_xlog_lsn_diff) + zbx.send(self.key_wall.format("[]"), float(result[0][0]), self.DELTA_SPEED) # PG 14 pg_stat_wal metrics if Pooler.server_version_greater("14"): From 8b416bfb95f118dce3399a08d7ef1d7998b98298 Mon Sep 17 00:00:00 2001 From: cuprumtan Date: Tue, 24 Jan 2023 12:01:40 +0500 Subject: [PATCH 036/106] fix: fixed spelling (Statements plugin) --- mamonsu/plugins/pgsql/statements.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mamonsu/plugins/pgsql/statements.py b/mamonsu/plugins/pgsql/statements.py index 04fcaf0..d5bea8d 100644 --- a/mamonsu/plugins/pgsql/statements.py +++ b/mamonsu/plugins/pgsql/statements.py @@ -77,7 +77,7 @@ class Statements(Plugin): Items_pg_14 = [ ("stat_info[dealloc]", "dealloc", - "Nnumber of Times pg_stat_statements.max Was Exceeded", + "Number of Times pg_stat_statements.max Was Exceeded", Plugin.UNITS.none, Plugin.DELTA.simple_change, ("PostgreSQL Statements Info: Number of Times pg_stat_statements.max Was Exceeded", "793F5D", 0)), From 3aa424e79a704a444183c24c7b529a3e50102066 Mon Sep 17 00:00:00 2001 From: cuprumtan Date: Tue, 24 Jan 2023 12:08:51 +0500 Subject: [PATCH 037/106] cicd: excluded pg15 for centos7 --- .github/workflows/mamonsu-tests-dev.yml | 2 +- .github/workflows/mamonsu-tests-master.yml | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/mamonsu-tests-dev.yml b/.github/workflows/mamonsu-tests-dev.yml index 4ec65ff..0afbca7 100644 --- a/.github/workflows/mamonsu-tests-dev.yml +++ b/.github/workflows/mamonsu-tests-dev.yml @@ -28,7 +28,7 @@ jobs: matrix: docker_os: ['centos:7'] zabbix_version: ['6.2.6'] - pg_version: ['11', '12', '13', '14', '15'] + pg_version: ['11', '12', '13', '14'] steps: - name: Checkout mamonsu repo diff --git a/.github/workflows/mamonsu-tests-master.yml b/.github/workflows/mamonsu-tests-master.yml index 4afd5a2..4109e3c 100644 --- a/.github/workflows/mamonsu-tests-master.yml +++ b/.github/workflows/mamonsu-tests-master.yml @@ -29,6 +29,10 @@ jobs: docker_os: ['ubuntu:20.04', 'centos:7'] zabbix_version: ['4.0.44', '4.4.10', '5.0.30', '5.4.12', '6.0.12', '6.2.6'] pg_version: ['11', '12', '13', '14', '15'] + exclude: + # excludes PG 15 on CentOS + - docker_os: 'centos:7' + pg_version: '15' steps: - name: Checkout mamonsu repo From a03b5dbca87dc449e6308718a5fdf9dc4684a0dd Mon Sep 17 00:00:00 2001 From: cuprumtan Date: Tue, 24 Jan 2023 16:00:45 +0500 Subject: [PATCH 038/106] fix: fixed replication query variable --- mamonsu/plugins/pgsql/replication.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mamonsu/plugins/pgsql/replication.py b/mamonsu/plugins/pgsql/replication.py index 9e18388..1b5491b 100644 --- a/mamonsu/plugins/pgsql/replication.py +++ b/mamonsu/plugins/pgsql/replication.py @@ -90,7 +90,7 @@ def run(self, zbx): else: self.disable_and_exit_if_not_superuser() - non_active_slots = Pooler.query(query_non_active_slots) + non_active_slots = Pooler.query(self.query_non_active_slots) zbx.send(self.key_non_active_slots.format("[]"), int(non_active_slots[0][0])) def items(self, template, dashboard=False): From 182950237d8e000d70b788f5ebd2555d2203aca4 Mon Sep 17 00:00:00 2001 From: cuprumtan Date: Tue, 24 Jan 2023 16:01:28 +0500 Subject: [PATCH 039/106] fix: fixed pg edition check and pg_stat_statements check --- mamonsu/plugins/pgsql/statements.py | 38 ++++++++++++++--------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/mamonsu/plugins/pgsql/statements.py b/mamonsu/plugins/pgsql/statements.py index d5bea8d..7af19e8 100644 --- a/mamonsu/plugins/pgsql/statements.py +++ b/mamonsu/plugins/pgsql/statements.py @@ -1,4 +1,5 @@ # -*- coding: utf-8 -*- +import logging from mamonsu.plugins.pgsql.plugin import PgsqlPlugin as Plugin from distutils.version import LooseVersion @@ -16,7 +17,7 @@ class Statements(Plugin): "pgpro_stats": """ SELECT {metrics} - FROM {extension_schema}.pgpro_stats_totals + FROM {extension_schema}.pgpro_stats_totals() WHERE object_type = 'cluster'; """, "pgpro_stats_bootstrap": @@ -94,31 +95,32 @@ class Statements(Plugin): ("PostgreSQL Statements: Spent Time", 1), ("PostgreSQL Statements: WAL Statistics", None)] + extension = "" + # pgpro_stats работает только для PGPRO 12+ в режиме bootstrap и/или если в конфиге указан суперпользователь mamonsu def run(self, zbx): - extension = "" if (Pooler.is_pgpro() or Pooler.is_pgpro_ee()) and Pooler.server_version_greater("12"): if Pooler.extension_installed("pgpro_stats"): if not Pooler.is_bootstraped(): self.disable_and_exit_if_not_superuser() - extension = "pgpro_stats" + self.extension = "pgpro_stats" elif Pooler.extension_installed("pg_stat_statements"): - extension = "pg_stat_statements" + self.extension = "pg_stat_statements" else: self.disable_and_exit_if_extension_is_not_installed(ext="pgpro_stats") else: if not Pooler.extension_installed("pg_stat_statements"): self.disable_and_exit_if_extension_is_not_installed(ext="pg_stat_statements") - extension = "pg_stat_statements" + self.extension = "pg_stat_statements" - extension_schema = self.extension_schema(extension=extension) + extension_schema = self.extension_schema(extension=self.extension) # TODO: add 13 and 14 items when pgpro_stats added new WAL metrics all_items = self.Items.copy() if Pooler.server_version_greater("14"): self.Items[5][1] = self.Items[5][1].format("total_exec_time+total_plan_time") - if not Pooler.is_pgpro() or not Pooler.is_pgpro_ee(): - all_items += self.Items_pg_13 + all_items += self.Items_pg_13 + if self.extension == "pg_stat_statements": info_items = self.Items_pg_14 info_params = [x[1] for x in info_items] info_result = Pooler.query( @@ -127,18 +129,16 @@ def run(self, zbx): zbx_key, value = "pgsql.{0}".format( info_items[key][0]), int(value) zbx.send(zbx_key, value, info_items[key][4]) - columns = [x[1] for x in all_items] elif Pooler.server_version_greater("13"): self.Items[5][1] = self.Items[5][1].format("total_exec_time+total_plan_time") all_items += self.Items_pg_13 - columns = [x[1] for x in all_items] else: self.Items[5][1] = self.Items[5][1].format("total_time") - columns = [x[1] for x in all_items] - result = Pooler.query(self.query[extension + "_bootstrap"].format( + columns = [x[1] for x in all_items] + result = Pooler.query(self.query[self.extension + "_bootstrap"].format( columns=", ".join([x[0][x[0].find("[") + 1:x[0].find("]")] for x in all_items]), metrics=(", ".join(columns)), extension_schema=extension_schema) if Pooler.is_bootstraped() else self.query[ - extension].format(metrics=(", ".join(columns)), extension_schema=extension_schema)) + self.extension].format(metrics=(", ".join(columns)), extension_schema=extension_schema)) for key, value in enumerate(result[0]): zbx_key, value = "pgsql.{0}".format(all_items[key][0]), int(value) zbx.send(zbx_key, value, all_items[key][4]) @@ -191,16 +191,16 @@ def graphs(self, template, dashboard=False): def keys_and_queries(self, template_zabbix): if (Pooler.is_pgpro() or Pooler.is_pgpro_ee()) and Pooler.server_version_greater("12"): if Pooler.extension_installed("pgpro_stats"): - extension = "pgpro_stats" + self.extension = "pgpro_stats" elif Pooler.extension_installed("pg_stat_statements"): - extension = "pg_stat_statements" + self.extension = "pg_stat_statements" else: if Pooler.extension_installed("pg_stat_statements"): - extension = "pg_stat_statements" + self.extension = "pg_stat_statements" if Pooler.extension_installed("pgpro_stats") or Pooler.extension_installed("pg_stat_statements"): - extension_schema = self.extension_schema(extension=extension) + extension_schema = self.extension_schema(extension=self.extension) result = [] all_items = self.Items.copy() @@ -216,13 +216,13 @@ def keys_and_queries(self, template_zabbix): for i, item in enumerate(all_items): keys = item[0].split("[") result.append("{0}[*],$2 $1 -Aqtc \"{1}\"".format("{0}{1}.{2}".format(self.key, keys[0], keys[1][:-1]), - self.query[extension + "_bootstrap"].format( + self.query[self.extension + "_bootstrap"].format( columns=", ".join( [x[0][x[0].find("[") + 1:x[0].find("]")] for x in all_items]), metrics=(", ".join(columns)), extension_schema=extension_schema) if Pooler.is_bootstraped() else - self.query[extension].format( + self.query[self.extension].format( metrics=(", ".join(columns)), extension_schema=extension_schema))) From 43357248eeca6a44ee0ced997f605d612c79b078 Mon Sep 17 00:00:00 2001 From: cuprumtan Date: Wed, 25 Jan 2023 15:09:39 +0500 Subject: [PATCH 040/106] fix: temporary excluded some metrics from config file for zabbix native agent --- mamonsu/plugins/pgsql/autovacuum.py | 14 ++++++++------ mamonsu/plugins/pgsql/health.py | 8 +++++--- mamonsu/plugins/system/linux/uptime.py | 7 ++++--- 3 files changed, 17 insertions(+), 12 deletions(-) diff --git a/mamonsu/plugins/pgsql/autovacuum.py b/mamonsu/plugins/pgsql/autovacuum.py index 1781800..35c9d6f 100644 --- a/mamonsu/plugins/pgsql/autovacuum.py +++ b/mamonsu/plugins/pgsql/autovacuum.py @@ -99,16 +99,18 @@ def graphs(self, template, dashboard=False): def keys_and_queries(self, template_zabbix): result = [] if LooseVersion(self.VersionPG) >= LooseVersion("10"): - result.append("{0},$2 $1 -Aqtc \"{1}\"".format(self.key_count.format("[*]"), - Pooler.SQL["count_autovacuum"][0].format( - "backend_type = 'autovacuum worker'"))) + # TODO: define another metric key because it duplicates native zabbix agents keys + # result.append("{0},$2 $1 -Aqtc \"{1}\"".format(self.key_count.format("[*]"), + # Pooler.SQL["count_autovacuum"][0].format( + # "backend_type = 'autovacuum worker'"))) result.append("{0},$2 $1 -Aqtc \"{1}\"".format(self.key_utilization.format("[*]"), Pooler.SQL["autovacuum_utilization"][0].format( "backend_type = 'autovacuum worker'"))) else: - result.append("{0},$2 $1 -Aqtc \"{1}\"".format(self.key_count.format("[*]"), - Pooler.SQL["count_autovacuum"][0].format( - "query LIKE '%%autovacuum%%' AND state <> 'idle' AND pid <> pg_catalog.pg_backend_pid()"))) + # TODO: define another metric key because it duplicates native zabbix agents keys + # result.append("{0},$2 $1 -Aqtc \"{1}\"".format(self.key_count.format("[*]"), + # Pooler.SQL["count_autovacuum"][0].format( + # "query LIKE '%%autovacuum%%' AND state <> 'idle' AND pid <> pg_catalog.pg_backend_pid()"))) result.append("{0},$2 $1 -Aqtc \"{1}\"".format(self.key_utilization.format("[*]"), Pooler.SQL["autovacuum_utilization"][0].format( "query LIKE '%%autovacuum%%' AND state <> 'idle' AND pid <> pg_catalog.pg_backend_pid()"))) diff --git a/mamonsu/plugins/pgsql/health.py b/mamonsu/plugins/pgsql/health.py index 5ed9db2..ffa428e 100644 --- a/mamonsu/plugins/pgsql/health.py +++ b/mamonsu/plugins/pgsql/health.py @@ -122,7 +122,9 @@ def triggers(self, template, dashboard=False): return result def keys_and_queries(self, template_zabbix): - result = ["{0}[*],$2 $1 -Aqtc \"{1}\"".format(self.key_ping.format(""), self.query_health), - "{0}[*],$2 $1 -Aqtc \"{1}\"".format(self.key_uptime.format(""), self.query_uptime), - "{0}[*],$2 $1 -Aqtc \"{1}\"".format(self.key_version.format(""), self.query_version)] + # TODO: define another metric key because it duplicates native zabbix agents keys + # result = ["{0}[*],$2 $1 -Aqtc \"{1}\"".format(self.key_ping.format(""), self.query_health), + # "{0}[*],$2 $1 -Aqtc \"{1}\"".format(self.key_uptime.format(""), self.query_uptime), + # "{0}[*],$2 $1 -Aqtc \"{1}\"".format(self.key_version.format(""), self.query_version)] + result = ["{0}[*],$2 $1 -Aqtc \"{1}\"".format(self.key_version.format(""), self.query_version)] return template_zabbix.key_and_query(result) diff --git a/mamonsu/plugins/system/linux/uptime.py b/mamonsu/plugins/system/linux/uptime.py index 7f228e6..5cfabdb 100644 --- a/mamonsu/plugins/system/linux/uptime.py +++ b/mamonsu/plugins/system/linux/uptime.py @@ -44,6 +44,7 @@ def triggers(self, template, dashboard=False): } ) - def keys_and_queries(self, template_zabbix): - result = ["system.uptime,{0}".format(self.query_agent)] - return template_zabbix.key_and_query(result) + # TODO: define another metric key because it duplicates native zabbix agents keys + # def keys_and_queries(self, template_zabbix): + # result = ["system.uptime,{0}".format(self.query_agent)] + # return template_zabbix.key_and_query(result) From 5d4b70dba85d39325f363f148d6980543f76541a Mon Sep 17 00:00:00 2001 From: cuprumtan Date: Wed, 25 Jan 2023 15:25:51 +0500 Subject: [PATCH 041/106] fix: fixed hostgroup api --- mamonsu/tools/zabbix_cli/operations.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/mamonsu/tools/zabbix_cli/operations.py b/mamonsu/tools/zabbix_cli/operations.py index 9eb1df4..e12db8a 100644 --- a/mamonsu/tools/zabbix_cli/operations.py +++ b/mamonsu/tools/zabbix_cli/operations.py @@ -62,20 +62,20 @@ def _generic_delete(self, typ, ids): sys.exit(3) def _generic_list(self, typ): + name, fltr = '', '' if typ == 'template': name, fltr = 'name', 'host' elif typ == 'hostgroup': - name, fltr = 'name', 'host' + name = 'name' elif typ == 'host': - fltr, name = 'host', 'host' + name, fltr = 'host', 'host' else: sys.stderr.write('Unknown type: {0} for listing'.format(typ)) sys.exit(4) try: for x in self.req.post( method='{0}.get'.format(typ), - params={ - 'filter': {fltr: []}}): + params={'filter': {fltr: []}} if fltr != '' else {'filter': []}): print(x[name]) except Exception as e: sys.stderr.write('List error: {0}\n'.format(e)) From bd3965d5a000747186a76438fdc53becffd0c576 Mon Sep 17 00:00:00 2001 From: cuprumtan Date: Wed, 25 Jan 2023 15:33:46 +0500 Subject: [PATCH 042/106] fix: fixed hostgroup api test --- github-actions-tests/tools/zabbix_cli.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/github-actions-tests/tools/zabbix_cli.sh b/github-actions-tests/tools/zabbix_cli.sh index a744fe7..cc806f2 100644 --- a/github-actions-tests/tools/zabbix_cli.sh +++ b/github-actions-tests/tools/zabbix_cli.sh @@ -99,7 +99,7 @@ mamonsu zabbix $OPTIONS host delete ${HOST_ID} | grep "hostids.*${HOST_ID}" || e # test 'mamonsu hostgroup' echo && echo "------> mamonsu zabbix hostgroup list" -mamonsu zabbix $OPTIONS hostgroup list | grep Templates || exit 11 +mamonsu zabbix $OPTIONS hostgroup list | grep Linux || exit 11 echo && echo "------> mamonsu zabbix hostgroup show" mamonsu zabbix $OPTIONS hostgroup show "Linux servers" | grep Linux || exit 11 echo && echo "------> mamonsu zabbix hostgroup id" From be40e757507c6ff2cef7b5a250ef2151bab33b07 Mon Sep 17 00:00:00 2001 From: cuprumtan Date: Wed, 25 Jan 2023 17:10:37 +0500 Subject: [PATCH 043/106] fix: fixed default agent macros and returned default psql command options to plugins --- mamonsu/lib/zbx_template.py | 9 ++++---- mamonsu/plugins/pgsql/archive_command.py | 12 +++++----- mamonsu/plugins/pgsql/autovacuum.py | 14 ++++++------ mamonsu/plugins/pgsql/bgwriter.py | 2 +- mamonsu/plugins/pgsql/checkpoint.py | 4 ++-- mamonsu/plugins/pgsql/connections.py | 12 +++++----- mamonsu/plugins/pgsql/databases.py | 6 ++--- mamonsu/plugins/pgsql/health.py | 17 +++++++------- mamonsu/plugins/pgsql/instance.py | 10 ++++----- mamonsu/plugins/pgsql/oldest.py | 6 ++--- mamonsu/plugins/pgsql/pg_buffercache.py | 2 +- mamonsu/plugins/pgsql/pg_locks.py | 2 +- mamonsu/plugins/pgsql/replication.py | 6 ++--- mamonsu/plugins/pgsql/statements.py | 4 ++-- mamonsu/plugins/pgsql/wal.py | 28 ++++++++++++------------ 15 files changed, 67 insertions(+), 67 deletions(-) diff --git a/mamonsu/lib/zbx_template.py b/mamonsu/lib/zbx_template.py index 3ccc910..4b6fe26 100644 --- a/mamonsu/lib/zbx_template.py +++ b/mamonsu/lib/zbx_template.py @@ -1,5 +1,6 @@ # -*- coding: utf-8 -*- import re + import mamonsu.lib.platform as platform from mamonsu.lib.const import Template from mamonsu.lib.plugin import Plugin @@ -174,9 +175,9 @@ def xml(self, plg_type, plugins=None): template_data = {'template': self.Template, 'application': self.Application} template_data['items'] = self._get_all('items', plugins) template_data['discovery_rules'] = self._get_all('discovery_rules', plugins) - if Plugin.Type == 'agent': - template_data['macros'] = self.agent_macro() template_data['macros'] = self._get_all('macros', plugins) + if Plugin.Type == 'agent': + template_data['macros'] += self.agent_macro() template_data['screens'] = self.screen(plugins) template_data['triggers'] = self._get_all('triggers', plugins) template_data['graphs'] = self._get_all('graphs', plugins) @@ -301,9 +302,9 @@ def screen(self, plugins=None, xml_key='screen'): def agent_macro(self, xml_key='macro'): result = '' - value = {'value': '-qAt -p 5433 -U postgres ', 'macro': "{$PG_CONNINFO}"} + value = {'value': '-qAt -p 5432 -U postgres ', 'macro': "{$PG_CONNINFO}"} result += '<{1}>{0}'.format(self._format_args(self.macro_defaults, value), xml_key) - value = {'value': '/opt/pgpro/std-10/bin/psql', 'macro': "{$PG_PATH}"} + value = {'value': '/usr/bin/psql', 'macro': "{$PG_PATH}"} result += '<{1}>{0}'.format(self._format_args(self.macro_defaults, value), xml_key) return result diff --git a/mamonsu/plugins/pgsql/archive_command.py b/mamonsu/plugins/pgsql/archive_command.py index d9870a5..c3b58df 100644 --- a/mamonsu/plugins/pgsql/archive_command.py +++ b/mamonsu/plugins/pgsql/archive_command.py @@ -201,20 +201,20 @@ def triggers(self, template, dashboard=False): def keys_and_queries(self, template_zabbix): result = [] if LooseVersion(self.VersionPG) >= LooseVersion("10"): - result.append("{0}[*],$2 $1 -Aqtc \"{1}\"".format(self.key.format("." + self.Items[0][0]), + result.append("{0}[*],$2 $1 -c \"{1}\"".format(self.key.format("." + self.Items[0][0]), self.query_agent_count_files.format("wal_lsn", "walfile"))) - result.append("{0}[*],$2 $1 -Aqtc \"{1}\"".format(self.key.format("." + self.Items[1][0]), + result.append("{0}[*],$2 $1 -c \"{1}\"".format(self.key.format("." + self.Items[1][0]), self.query_agent_size_files.format("wal_lsn", "walfile"))) else: - result.append("{0}[*],$2 $1 -Aqtc \"{1}\"".format(self.key.format("." + self.Items[0][0]), + result.append("{0}[*],$2 $1 -c \"{1}\"".format(self.key.format("." + self.Items[0][0]), self.query_agent_count_files.format("xlog_location", "xlogfile"))) - result.append("{0}[*],$2 $1 -Aqtc \"{1}\"".format(self.key.format("." + self.Items[1][0]), + result.append("{0}[*],$2 $1 -c \"{1}\"".format(self.key.format("." + self.Items[1][0]), self.query_agent_size_files.format("xlog_location", "xlogfile"))) - result.append("{0}[*],$2 $1 -Aqtc \"{1}\"".format(self.key.format("." + self.Items[2][0]), + result.append("{0}[*],$2 $1 -c \"{1}\"".format(self.key.format("." + self.Items[2][0]), self.query_agent_archived_count)) - result.append("{0}[*],$2 $1 -Aqtc \"{1}\"".format(self.key.format("." + self.Items[3][0]), + result.append("{0}[*],$2 $1 -c \"{1}\"".format(self.key.format("." + self.Items[3][0]), self.query_agent_failed_count)) return template_zabbix.key_and_query(result) diff --git a/mamonsu/plugins/pgsql/autovacuum.py b/mamonsu/plugins/pgsql/autovacuum.py index 35c9d6f..a9c4b54 100644 --- a/mamonsu/plugins/pgsql/autovacuum.py +++ b/mamonsu/plugins/pgsql/autovacuum.py @@ -52,7 +52,7 @@ def items(self, template, dashboard=False): "value_type": Plugin.VALUE_TYPE.numeric_float, "units": Plugin.UNITS.percent, "type": Plugin.TYPE.CALCULATED, - "params": "avg({item}, 5m)".format(item=self.key_utilization.format("[]")), + "params": "avg(//{item}, 5m)".format(item=self.right_type(self.key_utilization)), "delay": self.plugin_config("interval") })) result += (template.item({ @@ -61,7 +61,7 @@ def items(self, template, dashboard=False): "value_type": Plugin.VALUE_TYPE.numeric_float, "units": Plugin.UNITS.percent, "type": Plugin.TYPE.CALCULATED, - "params": "avg({item}, 15m)".format(item=self.key_utilization.format("[]")), + "params": "avg(//{item}, 15m)".format(item=self.right_type(self.key_utilization)), "delay": self.plugin_config("interval") })) result += (template.item({ @@ -70,7 +70,7 @@ def items(self, template, dashboard=False): "value_type": Plugin.VALUE_TYPE.numeric_float, "units": Plugin.UNITS.percent, "type": Plugin.TYPE.CALCULATED, - "params": "avg({item}, 30m)".format(item=self.key_utilization.format("[]")), + "params": "avg(//{item}, 30m)".format(item=self.right_type(self.key_utilization)), "delay": self.plugin_config("interval") })) return result @@ -100,18 +100,18 @@ def keys_and_queries(self, template_zabbix): result = [] if LooseVersion(self.VersionPG) >= LooseVersion("10"): # TODO: define another metric key because it duplicates native zabbix agents keys - # result.append("{0},$2 $1 -Aqtc \"{1}\"".format(self.key_count.format("[*]"), + # result.append("{0},$2 $1 -c \"{1}\"".format(self.key_count.format("[*]"), # Pooler.SQL["count_autovacuum"][0].format( # "backend_type = 'autovacuum worker'"))) - result.append("{0},$2 $1 -Aqtc \"{1}\"".format(self.key_utilization.format("[*]"), + result.append("{0},$2 $1 -c \"{1}\"".format(self.key_utilization.format("[*]"), Pooler.SQL["autovacuum_utilization"][0].format( "backend_type = 'autovacuum worker'"))) else: # TODO: define another metric key because it duplicates native zabbix agents keys - # result.append("{0},$2 $1 -Aqtc \"{1}\"".format(self.key_count.format("[*]"), + # result.append("{0},$2 $1 -c \"{1}\"".format(self.key_count.format("[*]"), # Pooler.SQL["count_autovacuum"][0].format( # "query LIKE '%%autovacuum%%' AND state <> 'idle' AND pid <> pg_catalog.pg_backend_pid()"))) - result.append("{0},$2 $1 -Aqtc \"{1}\"".format(self.key_utilization.format("[*]"), + result.append("{0},$2 $1 -c \"{1}\"".format(self.key_utilization.format("[*]"), Pooler.SQL["autovacuum_utilization"][0].format( "query LIKE '%%autovacuum%%' AND state <> 'idle' AND pid <> pg_catalog.pg_backend_pid()"))) return template_zabbix.key_and_query(result) diff --git a/mamonsu/plugins/pgsql/bgwriter.py b/mamonsu/plugins/pgsql/bgwriter.py index b2d56b8..6d95013 100644 --- a/mamonsu/plugins/pgsql/bgwriter.py +++ b/mamonsu/plugins/pgsql/bgwriter.py @@ -120,5 +120,5 @@ def keys_and_queries(self, template_zabbix): for item in self.Items: # delete from key '[' and ']' in Item for zabbix agent result.append( - "{0}[*],$2 $1 -Aqtc \"{1}\"".format(self.key.format("." + item[0]), self.query.format(item[0]))) + "{0}[*],$2 $1 -c \"{1}\"".format(self.key.format("." + item[0]), self.query.format(item[0]))) return template_zabbix.key_and_query(result) diff --git a/mamonsu/plugins/pgsql/checkpoint.py b/mamonsu/plugins/pgsql/checkpoint.py index 7f9bc88..f4a5324 100644 --- a/mamonsu/plugins/pgsql/checkpoint.py +++ b/mamonsu/plugins/pgsql/checkpoint.py @@ -142,9 +142,9 @@ def keys_and_queries(self, template_zabbix): for num, item in enumerate(self.Items): if num > 1: result.append( - "{0}[*],$2 $1 -Aqtc \"{1}\"".format(self.key.format("." + item[1]), self.query.format(item[0]))) + "{0}[*],$2 $1 -c \"{1}\"".format(self.key.format("." + item[1]), self.query.format(item[0]))) else: result.append( - "{0}[*],$2 $1 -Aqtc \"{1}\"".format(self.key.format("." + item[1]), + "{0}[*],$2 $1 -c \"{1}\"".format(self.key.format("." + item[1]), self.query_interval.format(item[0]))) return template_zabbix.key_and_query(result) diff --git a/mamonsu/plugins/pgsql/connections.py b/mamonsu/plugins/pgsql/connections.py index ad31dc8..742a008 100644 --- a/mamonsu/plugins/pgsql/connections.py +++ b/mamonsu/plugins/pgsql/connections.py @@ -239,31 +239,31 @@ def triggers(self, template, dashboard=False): def keys_and_queries(self, template_zabbix): result = [] for item in self.Items: - result.append("{0}[*],$2 $1 -Aqtc \"{1}\"".format(self.key.format("." + item[1]), + result.append("{0}[*],$2 $1 -c \"{1}\"".format(self.key.format("." + item[1]), self.query_agent.format(item[1], "AND (backend_type = 'client backend' OR backend_type = 'parallel worker')" if LooseVersion( self.VersionPG) >= LooseVersion( "10") else ""))) - result.append("{0}[*],$2 $1 -Aqtc \"{1}\"".format(self.key.format(".total"), self.query_agent_total.format( + result.append("{0}[*],$2 $1 -c \"{1}\"".format(self.key.format(".total"), self.query_agent_total.format( "(backend_type = 'client backend' OR backend_type = 'parallel worker')" if LooseVersion( self.VersionPG) >= LooseVersion( "10") else "state IS NOT NULL"))) if LooseVersion(self.VersionPG) < LooseVersion("9.6"): result.append( - "{0}[*],$2 $1 -Aqtc \"{1}\"".format(self.key.format(".waiting"), self.query_agent_waiting_old_v.format( + "{0}[*],$2 $1 -c \"{1}\"".format(self.key.format(".waiting"), self.query_agent_waiting_old_v.format( "(backend_type = 'client backend' OR backend_type = 'parallel worker')" if LooseVersion( self.VersionPG) >= LooseVersion( "10") else "state IS NOT NULL"))) else: result.append( - "{0}[*],$2 $1 -Aqtc \"{1}\"".format(self.key.format(".waiting"), self.query_agent_waiting_new_v.format( + "{0}[*],$2 $1 -c \"{1}\"".format(self.key.format(".waiting"), self.query_agent_waiting_new_v.format( "(backend_type = 'client backend' OR backend_type = 'parallel worker')" if LooseVersion( self.VersionPG) >= LooseVersion( "10") else "state IS NOT NULL"))) if LooseVersion(self.VersionPG) >= LooseVersion("10"): - result.append("{0}[*],$2 $1 -Aqtc \"{1}\"".format(self.key.format(".other"), + result.append("{0}[*],$2 $1 -c \"{1}\"".format(self.key.format(".other"), self.query_other_connections.format( "', '".join(self.default_backend_types)))) result.append( - "{0}[*],$2 $1 -Aqtc \"{1}\"".format(self.key.format(".max_connections"), self.query_agent_max_conn)) + "{0}[*],$2 $1 -c \"{1}\"".format(self.key.format(".max_connections"), self.query_agent_max_conn)) return template_zabbix.key_and_query(result) diff --git a/mamonsu/plugins/pgsql/databases.py b/mamonsu/plugins/pgsql/databases.py index ad3ac73..7127237 100644 --- a/mamonsu/plugins/pgsql/databases.py +++ b/mamonsu/plugins/pgsql/databases.py @@ -152,13 +152,13 @@ def discovery_rules(self, template, dashboard=False): return template.discovery_rule(rule=rule, conditions=conditions, items=items, graphs=graphs, triggers=triggers) def keys_and_queries(self, template_zabbix): - result = ["{0},$2 $1 -Aqtc \"{1}\"".format(self.key_db_discovery.format("[*]"), self.query_agent_discovery), + result = ["{0},$2 $1 -c \"{1}\"".format(self.key_db_discovery.format("[*]"), self.query_agent_discovery), "{0},echo \"{1}\" | $3 $2 -v p1=\"$1\"".format(self.key_db_size.format("[*]"), self.query_size), "{0},echo \"{1}\" | $3 $2 -v p1=\"$1\"".format(self.key_db_age.format("[*]"), self.query_age), - "{0},$3 $2 -d \"$1\" -Aqtc \"{1}\"".format(self.key_db_bloating_tables.format("[*]"), + "{0},$3 $2 -d \"$1\" -c \"{1}\"".format(self.key_db_bloating_tables.format("[*]"), self.query_bloating_tables.format( self.plugin_config("bloat_scale"), self.plugin_config("min_rows"))), - "{0},$3 $2 -d \"$1\" -Aqtc \"{1}\"".format(self.key_invalid_indexes.format("[*]"), + "{0},$3 $2 -d \"$1\" -c \"{1}\"".format(self.key_invalid_indexes.format("[*]"), self.query_invalid_indexes)] return template_zabbix.key_and_query(result) diff --git a/mamonsu/plugins/pgsql/health.py b/mamonsu/plugins/pgsql/health.py index ffa428e..dac3dff 100644 --- a/mamonsu/plugins/pgsql/health.py +++ b/mamonsu/plugins/pgsql/health.py @@ -4,8 +4,6 @@ from .pool import Pooler import time from mamonsu.lib.zbx_template import ZbxTemplate -from mamonsu.plugins.pgsql.instance import Instance - class PgHealth(Plugin): AgentPluginType = "pg" @@ -59,9 +57,10 @@ def items(self, template, dashboard=False): "value_type": Plugin.VALUE_TYPE.numeric_float, "units": Plugin.UNITS.percent, "type": Plugin.TYPE.CALCULATED, - "params": "last({blocks_hit})*100/(last({blocks_hit})+last({blocks_read}))".format( - blocks_hit=Instance.key + Instance.Items[2][1], - blocks_read=Instance.key + Instance.Items[3][1]) + "params": "last(//{blocks_hit})*100/(last(//{blocks_hit})+last(//{blocks_read}))".format( + # TODO: hardcoded params + blocks_hit=self.right_type("pgsql.blocks.hit{0}"), + blocks_read=self.right_type("pgsql.blocks.read{0}")) }) + template.item({ "name": "PostgreSQL Health: Service Uptime", "key": self.right_type(self.key_uptime), @@ -123,8 +122,8 @@ def triggers(self, template, dashboard=False): def keys_and_queries(self, template_zabbix): # TODO: define another metric key because it duplicates native zabbix agents keys - # result = ["{0}[*],$2 $1 -Aqtc \"{1}\"".format(self.key_ping.format(""), self.query_health), - # "{0}[*],$2 $1 -Aqtc \"{1}\"".format(self.key_uptime.format(""), self.query_uptime), - # "{0}[*],$2 $1 -Aqtc \"{1}\"".format(self.key_version.format(""), self.query_version)] - result = ["{0}[*],$2 $1 -Aqtc \"{1}\"".format(self.key_version.format(""), self.query_version)] + # result = ["{0}[*],$2 $1 -c \"{1}\"".format(self.key_ping.format(""), self.query_health), + # "{0}[*],$2 $1 -c \"{1}\"".format(self.key_uptime.format(""), self.query_uptime), + # "{0}[*],$2 $1 -c \"{1}\"".format(self.key_version.format(""), self.query_version)] + result = ["{0}[*],$2 $1 -c \"{1}\"".format(self.key_version.format(""), self.query_version)] return template_zabbix.key_and_query(result) diff --git a/mamonsu/plugins/pgsql/instance.py b/mamonsu/plugins/pgsql/instance.py index 8972ce2..e09ddae 100644 --- a/mamonsu/plugins/pgsql/instance.py +++ b/mamonsu/plugins/pgsql/instance.py @@ -70,7 +70,7 @@ class Instance(Plugin): Plugin.UNITS.none, Plugin.DELTA.simple_change) ] - key_server_mode = "pgsql.server_mode" + key_server_mode = "pgsql.server_mode{0}" query_server_mode = """ SELECT CASE WHEN pg_is_in_recovery() THEN 'STANDBY' ELSE 'MASTER' @@ -98,7 +98,7 @@ def run(self, zbx): zbx_key, value = "pgsql.{0}".format(all_items[key][1]), int(value) zbx.send(zbx_key, value, all_items[key][5], only_positive_speed=True) result_server_mode = Pooler.query(self.query_server_mode)[0][0] - zbx.send(self.key_server_mode, result_server_mode) + zbx.send(self.right_type(self.key_server_mode), result_server_mode) del columns, result, result_server_mode def items(self, template, dashboard=False): @@ -209,7 +209,7 @@ def keys_and_queries(self, template_zabbix): for item in all_items: # split each item to get values for keys of both agent type and mamonsu type keys = item[1].split("[") - result.append("{0}[*],$2 $1 -Aqtc \"{1}\"".format("{0}{1}.{2}".format(self.key, keys[0], keys[1][:-1]), - self.query_agent.format(format(item[0])))) - result.append("{0}[*],$2 $1 -Aqtc \"{1}\"".format(self.key_server_mode, self.query_server_mode)) + result.append("{0}[*],$2 $1 -c \"{1}\"".format("{0}{1}.{2}".format(self.key, keys[0], keys[1][:-1]), + self.query_agent.format(format(item[0])))) + result.append("{0},$2 $1 -c \"{1}\"".format(self.key_server_mode.format("[*]"), self.query_server_mode)) return template_zabbix.key_and_query(result) diff --git a/mamonsu/plugins/pgsql/oldest.py b/mamonsu/plugins/pgsql/oldest.py index 3de0bf5..2a335d4 100644 --- a/mamonsu/plugins/pgsql/oldest.py +++ b/mamonsu/plugins/pgsql/oldest.py @@ -108,7 +108,7 @@ def triggers(self, template, dashboard=False): }) def keys_and_queries(self, template_zabbix): - result = ["{0}[*],$2 $1 -Aqtc \"{1}\"".format(self.key.format(".xid_age"), self.OldestXidSql), - "{0}[*],$2 $1 -Aqtc \"{1}\"".format(self.key.format(".transaction_time"), self.OldestTransactionSql), - "{0}[*],$2 $1 -Aqtc \"{1}\"".format("pgsql.parallel{0}".format(".queries"), self.ParallelQueries)] + result = ["{0}[*],$2 $1 -c \"{1}\"".format(self.key.format(".xid_age"), self.OldestXidSql), + "{0}[*],$2 $1 -c \"{1}\"".format(self.key.format(".transaction_time"), self.OldestTransactionSql), + "{0}[*],$2 $1 -c \"{1}\"".format("pgsql.parallel{0}".format(".queries"), self.ParallelQueries)] return template_zabbix.key_and_query(result) diff --git a/mamonsu/plugins/pgsql/pg_buffercache.py b/mamonsu/plugins/pgsql/pg_buffercache.py index 715f64b..39d302d 100644 --- a/mamonsu/plugins/pgsql/pg_buffercache.py +++ b/mamonsu/plugins/pgsql/pg_buffercache.py @@ -68,7 +68,7 @@ def keys_and_queries(self, template_zabbix): if Pooler.extension_installed("pg_buffercache"): result = [] for i, item in enumerate(self.Items): - result.append("{0}[*],$2 $1 -Aqtc \"{1}\"".format(self.key.format("." + item[0]), self.query[i].format( + result.append("{0}[*],$2 $1 -c \"{1}\"".format(self.key.format("." + item[0]), self.query[i].format( self.extension_schema(extension="pg_buffercache")))) return template_zabbix.key_and_query(result) else: diff --git a/mamonsu/plugins/pgsql/pg_locks.py b/mamonsu/plugins/pgsql/pg_locks.py index 0373084..5799b51 100644 --- a/mamonsu/plugins/pgsql/pg_locks.py +++ b/mamonsu/plugins/pgsql/pg_locks.py @@ -102,6 +102,6 @@ def graphs(self, template, dashboard=False): def keys_and_queries(self, template_zabbix): result = [] for item in self.Items: - result.append("{0}[*],$2 $1 -Aqtc \"{1}\"".format(self.key.format("." + item[0]), + result.append("{0}[*],$2 $1 -c \"{1}\"".format(self.key.format("." + item[0]), self.query_agent.format("{0}lock".format(item[0])))) return template_zabbix.key_and_query(result) diff --git a/mamonsu/plugins/pgsql/replication.py b/mamonsu/plugins/pgsql/replication.py index 1b5491b..3aa2ba4 100644 --- a/mamonsu/plugins/pgsql/replication.py +++ b/mamonsu/plugins/pgsql/replication.py @@ -202,15 +202,15 @@ def discovery_rules(self, template, dashboard=False): def keys_and_queries(self, template_zabbix): result = [] if LooseVersion(self.VersionPG) < LooseVersion("10"): - result.append("{0},$2 $1 -Aqtc \"{1}\"".format("pgsql.replication_lag.sec[*]", + result.append("{0},$2 $1 -c \"{1}\"".format("pgsql.replication_lag.sec[*]", self.query_agent_replication_lag.format( self.plugin_config("interval"), "xlog_receive_location", "xlog_replay_location"))) else: - result.append("{0},$2 $1 -Aqtc \"{1}\"".format("pgsql.replication_lag.sec[*]", + result.append("{0},$2 $1 -c \"{1}\"".format("pgsql.replication_lag.sec[*]", self.query_agent_replication_lag.format( self.plugin_config("interval"), "wal_receive_lsn", "wal_replay_lsn"))) - result.append("{0},$2 $1 -Aqtc \"{1}\"".format("pgsql.replication.non_active_slots[*]", + result.append("{0},$2 $1 -c \"{1}\"".format("pgsql.replication.non_active_slots[*]", self.query_non_active_slots)) return template_zabbix.key_and_query(result) diff --git a/mamonsu/plugins/pgsql/statements.py b/mamonsu/plugins/pgsql/statements.py index 7af19e8..dfd0793 100644 --- a/mamonsu/plugins/pgsql/statements.py +++ b/mamonsu/plugins/pgsql/statements.py @@ -215,7 +215,7 @@ def keys_and_queries(self, template_zabbix): for i, item in enumerate(all_items): keys = item[0].split("[") - result.append("{0}[*],$2 $1 -Aqtc \"{1}\"".format("{0}{1}.{2}".format(self.key, keys[0], keys[1][:-1]), + result.append("{0}[*],$2 $1 -c \"{1}\"".format("{0}{1}.{2}".format(self.key, keys[0], keys[1][:-1]), self.query[self.extension + "_bootstrap"].format( columns=", ".join( [x[0][x[0].find("[") + 1:x[0].find("]")] for x @@ -232,7 +232,7 @@ def keys_and_queries(self, template_zabbix): for i, item in enumerate(all_items): keys = item[0].split("[") result.append( - "{0}[*],$2 $1 -Aqtc \"{1}\"".format("{0}{1}.{2}".format(self.key, keys[0], keys[1][:-1]), + "{0}[*],$2 $1 -c \"{1}\"".format("{0}{1}.{2}".format(self.key, keys[0], keys[1][:-1]), self.query_info.format(metrics=(item[1]), extension_schema=extension_schema))) return template_zabbix.key_and_query(result) diff --git a/mamonsu/plugins/pgsql/wal.py b/mamonsu/plugins/pgsql/wal.py index 23b834d..4670d54 100644 --- a/mamonsu/plugins/pgsql/wal.py +++ b/mamonsu/plugins/pgsql/wal.py @@ -38,10 +38,10 @@ class Wal(Plugin): # keys for PG 14 and higher key_wal_records = "pgsql.wal.records.count{0}" key_wal_fpi = "pgsql.wal.fpi.count{0}" - key_wal_buffers_full = "pgsql.wal.buffers_full" - key_wal_write_time = "pgsql.wal.write_time" - key_wal_sync_time = "pgsql.wal.sync_time" - key_wal_sync_duty = "pgsql.wal.sync_duty" + key_wal_buffers_full = "pgsql.wal.buffers_full{0}" + key_wal_write_time = "pgsql.wal.write_time{0}" + key_wal_sync_time = "pgsql.wal.sync_time{0}" + key_wal_sync_duty = "pgsql.wal.sync_duty{0}" key_wall = "pgsql.wal.write{0}" key_count_wall = "pgsql.wal.count{0}" @@ -131,7 +131,7 @@ def items(self, template, dashboard=False): "value_type": Plugin.VALUE_TYPE.numeric_float, "units": Plugin.UNITS.percent, "type": Plugin.TYPE.CALCULATED, - "params": "last({item})/10".format(item=self.key_wal_sync_time) + "params": "last(//{item})/10".format(item=self.right_type(self.key_wal_sync_time)) }) if not dashboard: return result @@ -158,22 +158,22 @@ def items(self, template, dashboard=False): def keys_and_queries(self, template_zabbix): result = [] if LooseVersion(self.VersionPG) < LooseVersion("10"): - result.append("{0},$2 $1 -Aqtc \"{1}\"".format(self.key_wall.format("[*]"), self.query_xlog_lsn_diff)) + result.append("{0},$2 $1 -c \"{1}\"".format(self.key_wall.format("[*]"), self.query_xlog_lsn_diff)) result.append( - "{0},$2 $1 -Aqtc \"{1}\"".format(self.key_count_wall.format("[*]"), + "{0},$2 $1 -c \"{1}\"".format(self.key_count_wall.format("[*]"), Pooler.SQL["count_wal_files"][0].format("xlog"))) else: - result.append("{0},$2 $1 -Aqtc \"{1}\"".format(self.key_wall.format("[*]"), self.query_wal_lsn_diff)) - result.append("{0},$2 $1 -Aqtc \"{1}\"".format(self.key_count_wall.format("[*]"), + result.append("{0},$2 $1 -c \"{1}\"".format(self.key_wall.format("[*]"), self.query_wal_lsn_diff)) + result.append("{0},$2 $1 -c \"{1}\"".format(self.key_count_wall.format("[*]"), Pooler.SQL["count_wal_files"][0].format("wal"))) if LooseVersion(self.VersionPG) >= LooseVersion("14"): - result.append("{0},$2 $1 -Aqtc \"{1}\"".format(self.key_wal_records.format("[*]"), self.query_wal_records)) - result.append("{0},$2 $1 -Aqtc \"{1}\"".format(self.key_wal_fpi.format("[*]"), self.query_wal_fpi)) + result.append("{0},$2 $1 -c \"{1}\"".format(self.key_wal_records.format("[*]"), self.query_wal_records)) + result.append("{0},$2 $1 -c \"{1}\"".format(self.key_wal_fpi.format("[*]"), self.query_wal_fpi)) result.append( - "{0},$2 $1 -Aqtc \"{1}\"".format(self.key_wal_buffers_full.format("[*]"), self.query_wal_buffers_full)) + "{0},$2 $1 -c \"{1}\"".format(self.key_wal_buffers_full.format("[*]"), self.query_wal_buffers_full)) result.append( - "{0},$2 $1 -Aqtc \"{1}\"".format(self.key_wal_write_time.format("[*]"), self.query_wal_write_time)) + "{0},$2 $1 -c \"{1}\"".format(self.key_wal_write_time.format("[*]"), self.query_wal_write_time)) result.append( - "{0},$2 $1 -Aqtc \"{1}\"".format(self.key_wal_sync_time.format("[*]"), self.query_wal_sync_time)) + "{0},$2 $1 -c \"{1}\"".format(self.key_wal_sync_time.format("[*]"), self.query_wal_sync_time)) return template_zabbix.key_and_query(result) From 171890a6d9be7a2c481f56f0d918365732ce06b0 Mon Sep 17 00:00:00 2001 From: cuprumtan Date: Wed, 25 Jan 2023 18:18:53 +0500 Subject: [PATCH 044/106] refactoring --- mamonsu/lib/plugin.py | 2 +- mamonsu/lib/runner.py | 2 +- mamonsu/plugins/pgsql/archive_command.py | 3 +-- mamonsu/plugins/pgsql/autovacuum.py | 3 +-- mamonsu/plugins/pgsql/connections.py | 21 ++++++--------------- mamonsu/plugins/pgsql/databases.py | 2 -- mamonsu/plugins/pgsql/instance.py | 3 +-- mamonsu/plugins/pgsql/statements.py | 21 +++++++++------------ mamonsu/plugins/pgsql/wal.py | 23 +++++++++++------------ 9 files changed, 31 insertions(+), 49 deletions(-) diff --git a/mamonsu/lib/plugin.py b/mamonsu/lib/plugin.py index c5bc6ca..0e074d7 100644 --- a/mamonsu/lib/plugin.py +++ b/mamonsu/lib/plugin.py @@ -24,7 +24,7 @@ class Plugin(object): AgentPluginType = 'all' # PG version - VersionPG = '10' + VersionPG = '14' # Macros for run as agent type or as mamonsu Macros = {"mamonsu": "", "agent": "{$PG_CONNINFO},{$PG_PATH}"} diff --git a/mamonsu/lib/runner.py b/mamonsu/lib/runner.py index dfad59f..67135b8 100644 --- a/mamonsu/lib/runner.py +++ b/mamonsu/lib/runner.py @@ -224,7 +224,7 @@ def is_any_equal(array): # extract pg version from input def define_pg_version(version_args): if len(version_args) < 4: - if version_args == "14" or version_args == "11" or version_args == "12" or version_args == "13" or version_args == "10" \ + if version_args == "15" or version_args == "14" or version_args == "11" or version_args == "12" or version_args == "13" or version_args == "10" \ or version_args == "9.6" or version_args == "9.5": version_number = version_args[0].split('.') for num in version_number: diff --git a/mamonsu/plugins/pgsql/archive_command.py b/mamonsu/plugins/pgsql/archive_command.py index c3b58df..50009da 100644 --- a/mamonsu/plugins/pgsql/archive_command.py +++ b/mamonsu/plugins/pgsql/archive_command.py @@ -1,7 +1,6 @@ # -*- coding: utf-8 -*- from mamonsu.plugins.pgsql.plugin import PgsqlPlugin as Plugin -from distutils.version import LooseVersion from .pool import Pooler from mamonsu.lib.zbx_template import ZbxTemplate import re @@ -200,7 +199,7 @@ def triggers(self, template, dashboard=False): def keys_and_queries(self, template_zabbix): result = [] - if LooseVersion(self.VersionPG) >= LooseVersion("10"): + if Pooler.server_version_greater("10"): result.append("{0}[*],$2 $1 -c \"{1}\"".format(self.key.format("." + self.Items[0][0]), self.query_agent_count_files.format("wal_lsn", "walfile"))) diff --git a/mamonsu/plugins/pgsql/autovacuum.py b/mamonsu/plugins/pgsql/autovacuum.py index a9c4b54..01266ac 100644 --- a/mamonsu/plugins/pgsql/autovacuum.py +++ b/mamonsu/plugins/pgsql/autovacuum.py @@ -1,5 +1,4 @@ # -*- coding: utf-8 -*- -from distutils.version import LooseVersion from mamonsu.plugins.pgsql.plugin import PgsqlPlugin as Plugin from .pool import Pooler from mamonsu.lib.zbx_template import ZbxTemplate @@ -98,7 +97,7 @@ def graphs(self, template, dashboard=False): def keys_and_queries(self, template_zabbix): result = [] - if LooseVersion(self.VersionPG) >= LooseVersion("10"): + if Pooler.server_version_greater("10"): # TODO: define another metric key because it duplicates native zabbix agents keys # result.append("{0},$2 $1 -c \"{1}\"".format(self.key_count.format("[*]"), # Pooler.SQL["count_autovacuum"][0].format( diff --git a/mamonsu/plugins/pgsql/connections.py b/mamonsu/plugins/pgsql/connections.py index 742a008..992adf8 100644 --- a/mamonsu/plugins/pgsql/connections.py +++ b/mamonsu/plugins/pgsql/connections.py @@ -1,7 +1,6 @@ # -*- coding: utf-8 -*- from mamonsu.plugins.pgsql.plugin import PgsqlPlugin as Plugin -from distutils.version import LooseVersion from .pool import Pooler from mamonsu.lib.zbx_template import ZbxTemplate @@ -241,26 +240,18 @@ def keys_and_queries(self, template_zabbix): for item in self.Items: result.append("{0}[*],$2 $1 -c \"{1}\"".format(self.key.format("." + item[1]), self.query_agent.format(item[1], - "AND (backend_type = 'client backend' OR backend_type = 'parallel worker')" if LooseVersion( - self.VersionPG) >= LooseVersion( - "10") else ""))) + "AND (backend_type = 'client backend' OR backend_type = 'parallel worker')" if Pooler.server_version_greater("10") else ""))) result.append("{0}[*],$2 $1 -c \"{1}\"".format(self.key.format(".total"), self.query_agent_total.format( - "(backend_type = 'client backend' OR backend_type = 'parallel worker')" if LooseVersion( - self.VersionPG) >= LooseVersion( - "10") else "state IS NOT NULL"))) - if LooseVersion(self.VersionPG) < LooseVersion("9.6"): + "(backend_type = 'client backend' OR backend_type = 'parallel worker')" if Pooler.server_version_greater("10") else "state IS NOT NULL"))) + if Pooler.server_version_less("9.5"): result.append( "{0}[*],$2 $1 -c \"{1}\"".format(self.key.format(".waiting"), self.query_agent_waiting_old_v.format( - "(backend_type = 'client backend' OR backend_type = 'parallel worker')" if LooseVersion( - self.VersionPG) >= LooseVersion( - "10") else "state IS NOT NULL"))) + "(backend_type = 'client backend' OR backend_type = 'parallel worker')" if Pooler.server_version_greater("10") else "state IS NOT NULL"))) else: result.append( "{0}[*],$2 $1 -c \"{1}\"".format(self.key.format(".waiting"), self.query_agent_waiting_new_v.format( - "(backend_type = 'client backend' OR backend_type = 'parallel worker')" if LooseVersion( - self.VersionPG) >= LooseVersion( - "10") else "state IS NOT NULL"))) - if LooseVersion(self.VersionPG) >= LooseVersion("10"): + "(backend_type = 'client backend' OR backend_type = 'parallel worker')" if Pooler.server_version_greater("10") else "state IS NOT NULL"))) + if Pooler.server_version_greater("10"): result.append("{0}[*],$2 $1 -c \"{1}\"".format(self.key.format(".other"), self.query_other_connections.format( "', '".join(self.default_backend_types)))) diff --git a/mamonsu/plugins/pgsql/databases.py b/mamonsu/plugins/pgsql/databases.py index 7127237..15db1c3 100644 --- a/mamonsu/plugins/pgsql/databases.py +++ b/mamonsu/plugins/pgsql/databases.py @@ -1,9 +1,7 @@ # -*- coding: utf-8 -*- -from distutils.version import LooseVersion from mamonsu.plugins.pgsql.plugin import PgsqlPlugin as Plugin from .pool import Pooler -from mamonsu.lib.zbx_template import ZbxTemplate from mamonsu.plugins.pgsql.autovacuum import Autovacuum diff --git a/mamonsu/plugins/pgsql/instance.py b/mamonsu/plugins/pgsql/instance.py index e09ddae..c0a3a9c 100644 --- a/mamonsu/plugins/pgsql/instance.py +++ b/mamonsu/plugins/pgsql/instance.py @@ -1,7 +1,6 @@ # -*- coding: utf-8 -*- from mamonsu.plugins.pgsql.plugin import PgsqlPlugin as Plugin -from distutils.version import LooseVersion from .pool import Pooler from mamonsu.lib.zbx_template import ZbxTemplate @@ -202,7 +201,7 @@ def triggers(self, template, dashboard=False): def keys_and_queries(self, template_zabbix): result = [] - if LooseVersion(self.VersionPG) < LooseVersion("12"): + if Pooler.server_version_less("11"): all_items = self.Items else: all_items = self.Items + self.Items_pg_12 diff --git a/mamonsu/plugins/pgsql/statements.py b/mamonsu/plugins/pgsql/statements.py index dfd0793..60e5b43 100644 --- a/mamonsu/plugins/pgsql/statements.py +++ b/mamonsu/plugins/pgsql/statements.py @@ -1,8 +1,6 @@ # -*- coding: utf-8 -*- -import logging from mamonsu.plugins.pgsql.plugin import PgsqlPlugin as Plugin -from distutils.version import LooseVersion from .pool import Pooler @@ -204,7 +202,7 @@ def keys_and_queries(self, template_zabbix): result = [] all_items = self.Items.copy() - if LooseVersion(self.VersionPG) < LooseVersion("13"): + if Pooler.server_version_less("12"): self.Items[5][1] = self.Items[5][1].format("total_time") else: self.Items[5][1] = self.Items[5][1].format("total_exec_time+total_plan_time") @@ -226,15 +224,14 @@ def keys_and_queries(self, template_zabbix): metrics=(", ".join(columns)), extension_schema=extension_schema))) - if LooseVersion(self.VersionPG) >= LooseVersion("14"): - if Pooler.is_pgpro() or Pooler.is_pgpro_ee(): - all_items += self.Items_pg_14 - for i, item in enumerate(all_items): - keys = item[0].split("[") - result.append( - "{0}[*],$2 $1 -c \"{1}\"".format("{0}{1}.{2}".format(self.key, keys[0], keys[1][:-1]), - self.query_info.format(metrics=(item[1]), - extension_schema=extension_schema))) + if Pooler.server_version_greater("14"): + if self.extension == "pg_stat_statements": + for i, item in enumerate(self.Items_pg_14): + keys = item[0].split("[") + result.append( + "{0}[*],$2 $1 -c \"{1}\"".format("{0}{1}.{2}".format(self.key, keys[0], keys[1][:-1]), + self.query_info.format(metrics=(item[1]), + extension_schema=extension_schema))) return template_zabbix.key_and_query(result) else: return diff --git a/mamonsu/plugins/pgsql/wal.py b/mamonsu/plugins/pgsql/wal.py index 4670d54..6f62165 100644 --- a/mamonsu/plugins/pgsql/wal.py +++ b/mamonsu/plugins/pgsql/wal.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- +import sys from mamonsu.plugins.pgsql.plugin import PgsqlPlugin as Plugin -from distutils.version import LooseVersion from .pool import Pooler from mamonsu.lib.zbx_template import ZbxTemplate @@ -157,7 +157,7 @@ def items(self, template, dashboard=False): def keys_and_queries(self, template_zabbix): result = [] - if LooseVersion(self.VersionPG) < LooseVersion("10"): + if Pooler.server_version_less("9.6"): result.append("{0},$2 $1 -c \"{1}\"".format(self.key_wall.format("[*]"), self.query_xlog_lsn_diff)) result.append( "{0},$2 $1 -c \"{1}\"".format(self.key_count_wall.format("[*]"), @@ -166,14 +166,13 @@ def keys_and_queries(self, template_zabbix): result.append("{0},$2 $1 -c \"{1}\"".format(self.key_wall.format("[*]"), self.query_wal_lsn_diff)) result.append("{0},$2 $1 -c \"{1}\"".format(self.key_count_wall.format("[*]"), Pooler.SQL["count_wal_files"][0].format("wal"))) - - if LooseVersion(self.VersionPG) >= LooseVersion("14"): - result.append("{0},$2 $1 -c \"{1}\"".format(self.key_wal_records.format("[*]"), self.query_wal_records)) - result.append("{0},$2 $1 -c \"{1}\"".format(self.key_wal_fpi.format("[*]"), self.query_wal_fpi)) - result.append( - "{0},$2 $1 -c \"{1}\"".format(self.key_wal_buffers_full.format("[*]"), self.query_wal_buffers_full)) - result.append( - "{0},$2 $1 -c \"{1}\"".format(self.key_wal_write_time.format("[*]"), self.query_wal_write_time)) - result.append( - "{0},$2 $1 -c \"{1}\"".format(self.key_wal_sync_time.format("[*]"), self.query_wal_sync_time)) + if Pooler.server_version_greater("14"): + result.append("{0},$2 $1 -c \"{1}\"".format(self.key_wal_records.format("[*]"), self.query_wal_records)) + result.append("{0},$2 $1 -c \"{1}\"".format(self.key_wal_fpi.format("[*]"), self.query_wal_fpi)) + result.append( + "{0},$2 $1 -c \"{1}\"".format(self.key_wal_buffers_full.format("[*]"), self.query_wal_buffers_full)) + result.append( + "{0},$2 $1 -c \"{1}\"".format(self.key_wal_write_time.format("[*]"), self.query_wal_write_time)) + result.append( + "{0},$2 $1 -c \"{1}\"".format(self.key_wal_sync_time.format("[*]"), self.query_wal_sync_time)) return template_zabbix.key_and_query(result) From 28e8714b687504f63f997fcf38bd4ef5e8b36948 Mon Sep 17 00:00:00 2001 From: cuprumtan Date: Thu, 26 Jan 2023 10:19:25 +0500 Subject: [PATCH 045/106] fix: fixed dashboard syntax --- mamonsu/tools/zabbix_cli/dashboard.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mamonsu/tools/zabbix_cli/dashboard.py b/mamonsu/tools/zabbix_cli/dashboard.py index e3d585e..6d20ba9 100644 --- a/mamonsu/tools/zabbix_cli/dashboard.py +++ b/mamonsu/tools/zabbix_cli/dashboard.py @@ -1083,6 +1083,6 @@ def generate_dashboard(template, uuid): Instance.key + Instance.Items[11][1], PgHealth.key_uptime.format("[]"), Wal.key_wal_records.format("[]"), - Wal.key_wal_sync_duty, + Wal.key_wal_sync_duty.format("[]"), Wal.key_count_wall.format("[]"), uuid).replace("\\r\\n", " ").split()) From f8b16a8df916542788e2dbbbebd57d372b3d0889 Mon Sep 17 00:00:00 2001 From: cuprumtan Date: Thu, 26 Jan 2023 10:31:17 +0500 Subject: [PATCH 046/106] cicd: fixed metric keys --- github-actions-tests/sources/metrics-linux-14.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/github-actions-tests/sources/metrics-linux-14.txt b/github-actions-tests/sources/metrics-linux-14.txt index 407ff17..fcc168b 100644 --- a/github-actions-tests/sources/metrics-linux-14.txt +++ b/github-actions-tests/sources/metrics-linux-14.txt @@ -87,13 +87,13 @@ pgsql.tuples[inserted] pgsql.tuples[returned] pgsql.tuples[updated] pgsql.uptime[] -pgsql.wal.buffers_full +pgsql.wal.buffers_full[] pgsql.wal.count[] pgsql.wal.fpi.count[] pgsql.wal.records.count[] -pgsql.wal.sync_time +pgsql.wal.sync_time[] pgsql.wal.write[] -pgsql.wal.write_time +pgsql.wal.write_time[] system.cpu[idle] system.cpu[iowait] system.cpu[irq] From bd54f247b263a384388df61296f9763a7615ddf2 Mon Sep 17 00:00:00 2001 From: cuprumtan Date: Thu, 26 Jan 2023 13:05:18 +0500 Subject: [PATCH 047/106] cicd: fixed deprecated set-output syntax --- .github/workflows/mamonsu-tests-dev.yml | 2 +- .github/workflows/mamonsu-tests-master.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/mamonsu-tests-dev.yml b/.github/workflows/mamonsu-tests-dev.yml index 0afbca7..73b0442 100644 --- a/.github/workflows/mamonsu-tests-dev.yml +++ b/.github/workflows/mamonsu-tests-dev.yml @@ -58,7 +58,7 @@ jobs: run: bash ./github-actions-tests/zbx_install.sh --zbx-version="${{ matrix.zabbix_version }}" - name: Retrieve Zabbix address run: | - echo "::set-output name=zabbix_address::$(hostname -I | awk '{print $1}')" + echo "zabbix_address=$(hostname -I | awk '{print $1}')" >> $GITHUB_OUTPUT id: zabbix_address - name: Edit Zabbix address in agent.conf run: sed -i "s/\(address *= *\).*/\1 ${{ steps.zabbix_address.outputs.zabbix_address }}/" ${{ env.MAMONSU_PATH }}/github-actions-tests/sources/agent_3.5.2.conf diff --git a/.github/workflows/mamonsu-tests-master.yml b/.github/workflows/mamonsu-tests-master.yml index 4109e3c..43df7bd 100644 --- a/.github/workflows/mamonsu-tests-master.yml +++ b/.github/workflows/mamonsu-tests-master.yml @@ -62,7 +62,7 @@ jobs: run: bash ./github-actions-tests/zbx_install.sh --zbx-version="${{ matrix.zabbix_version }}" - name: Retrieve Zabbix address run: | - echo "::set-output name=zabbix_address::$(hostname -I | awk '{print $1}')" + echo "zabbix_address=$(hostname -I | awk '{print $1}')" >> $GITHUB_OUTPUT id: zabbix_address - name: Edit Zabbix address in agent.conf run: sed -i "s/\(address *= *\).*/\1 ${{ steps.zabbix_address.outputs.zabbix_address }}/" ${{ env.MAMONSU_PATH }}/github-actions-tests/sources/agent_3.5.2.conf From 52ab1c8897ceffc0c80a43f270a25ef28bb9410f Mon Sep 17 00:00:00 2001 From: cuprumtan Date: Thu, 26 Jan 2023 13:06:18 +0500 Subject: [PATCH 048/106] cicd: fixed spelling --- .github/workflows/mamonsu-tests-dev.yml | 2 +- .github/workflows/mamonsu-tests-master.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/mamonsu-tests-dev.yml b/.github/workflows/mamonsu-tests-dev.yml index 73b0442..79417e1 100644 --- a/.github/workflows/mamonsu-tests-dev.yml +++ b/.github/workflows/mamonsu-tests-dev.yml @@ -66,7 +66,7 @@ jobs: - name: Copy test scripts to container run: docker exec $( echo "${{ matrix.docker_os }}" | sed 's/://' | sed 's/\.//' ) mkdir -p -m 755 /mamonsu/ - run: docker cp . $( echo "${{ matrix.docker_os }}" | sed 's/://' | sed 's/\.//' ):/mamonsu - - name: Install prequisites + - name: Install prerequisites run: docker exec $( echo "${{ matrix.docker_os }}" | sed 's/://' | sed 's/\.//' ) bash /mamonsu/github-actions-tests/tests.sh --os="${{ matrix.docker_os }}" --pg-version="${{ matrix.pg_version }}" - name: Build and install mamonsu diff --git a/.github/workflows/mamonsu-tests-master.yml b/.github/workflows/mamonsu-tests-master.yml index 43df7bd..a8e4571 100644 --- a/.github/workflows/mamonsu-tests-master.yml +++ b/.github/workflows/mamonsu-tests-master.yml @@ -70,7 +70,7 @@ jobs: - name: Copy test scripts to container run: docker exec $( echo "${{ matrix.docker_os }}" | sed 's/://' | sed 's/\.//' ) mkdir -p -m 755 /mamonsu/ - run: docker cp . $( echo "${{ matrix.docker_os }}" | sed 's/://' | sed 's/\.//' ):/mamonsu - - name: Install prequisites + - name: Install prerequisites run: docker exec $( echo "${{ matrix.docker_os }}" | sed 's/://' | sed 's/\.//' ) bash /mamonsu/github-actions-tests/tests.sh --os="${{ matrix.docker_os }}" --pg-version="${{ matrix.pg_version }}" - name: Build and install mamonsu From 4ee719e9a2c671c8c0c6303531efefa83ac39f57 Mon Sep 17 00:00:00 2001 From: cuprumtan Date: Tue, 14 Mar 2023 11:40:35 +0500 Subject: [PATCH 049/106] fix: removed pgsql health triggers from native zabbix agent template --- mamonsu/plugins/pgsql/health.py | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/mamonsu/plugins/pgsql/health.py b/mamonsu/plugins/pgsql/health.py index dac3dff..e5ea5ac 100644 --- a/mamonsu/plugins/pgsql/health.py +++ b/mamonsu/plugins/pgsql/health.py @@ -106,19 +106,22 @@ def macros(self, template, dashboard=False): return [] def triggers(self, template, dashboard=False): - result = template.trigger({ - "name": "PostgreSQL Health: service has been restarted on {HOSTNAME} (uptime={ITEM.LASTVALUE})", - "expression": "{#TEMPLATE:" + self.right_type(self.key_uptime) + ".change()}>" + - self.plugin_macros["pg_uptime"][0][1] - }) + template.trigger({ - "name": "PostgreSQL Health: cache hit ratio too low on {HOSTNAME} ({ITEM.LASTVALUE})", - "expression": "{#TEMPLATE:" + self.right_type(self.key_cache, "hit") + ".last()}<" + - self.plugin_macros["cache_hit_ratio_percent"][0][1] - }) + template.trigger({ - "name": "PostgreSQL Health: no ping from PostgreSQL for 3 minutes on {HOSTNAME}", - "expression": "{#TEMPLATE:" + self.right_type(self.key_ping) + ".nodata(180)}=1" - }) - return result + if self.Type == 'mamonsu': + result = template.trigger({ + "name": "PostgreSQL Health: service has been restarted on {HOSTNAME} (uptime={ITEM.LASTVALUE})", + "expression": "{#TEMPLATE:" + self.right_type(self.key_uptime) + ".change()}>" + + self.plugin_macros["pg_uptime"][0][1] + }) + template.trigger({ + "name": "PostgreSQL Health: cache hit ratio too low on {HOSTNAME} ({ITEM.LASTVALUE})", + "expression": "{#TEMPLATE:" + self.right_type(self.key_cache, "hit") + ".last()}<" + + self.plugin_macros["cache_hit_ratio_percent"][0][1] + }) + template.trigger({ + "name": "PostgreSQL Health: no ping from PostgreSQL for 3 minutes on {HOSTNAME}", + "expression": "{#TEMPLATE:" + self.right_type(self.key_ping) + ".nodata(180)}=1" + }) + return result + else: + return "" def keys_and_queries(self, template_zabbix): # TODO: define another metric key because it duplicates native zabbix agents keys From 37b967234d98926710fb0c887bd1e9602809aeb4 Mon Sep 17 00:00:00 2001 From: cuprumtan Date: Tue, 14 Mar 2023 11:57:41 +0500 Subject: [PATCH 050/106] fix: removed Cache Hit Ratio formula --- mamonsu/plugins/pgsql/health.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mamonsu/plugins/pgsql/health.py b/mamonsu/plugins/pgsql/health.py index e5ea5ac..d0a9697 100644 --- a/mamonsu/plugins/pgsql/health.py +++ b/mamonsu/plugins/pgsql/health.py @@ -59,8 +59,8 @@ def items(self, template, dashboard=False): "type": Plugin.TYPE.CALCULATED, "params": "last(//{blocks_hit})*100/(last(//{blocks_hit})+last(//{blocks_read}))".format( # TODO: hardcoded params - blocks_hit=self.right_type("pgsql.blocks.hit{0}"), - blocks_read=self.right_type("pgsql.blocks.read{0}")) + blocks_hit=self.right_type("pgsql.blocks{0}", "hit"), + blocks_read=self.right_type("pgsql.blocks{0}", "read")) }) + template.item({ "name": "PostgreSQL Health: Service Uptime", "key": self.right_type(self.key_uptime), From e1013ef302ec63172f8484da71aec439953901c6 Mon Sep 17 00:00:00 2001 From: cuprumtan Date: Tue, 14 Mar 2023 12:18:25 +0500 Subject: [PATCH 051/106] fix: fixed Statements userparameters for zabbix native agent --- mamonsu/plugins/pgsql/statements.py | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/mamonsu/plugins/pgsql/statements.py b/mamonsu/plugins/pgsql/statements.py index 60e5b43..4cebcd6 100644 --- a/mamonsu/plugins/pgsql/statements.py +++ b/mamonsu/plugins/pgsql/statements.py @@ -213,25 +213,26 @@ def keys_and_queries(self, template_zabbix): for i, item in enumerate(all_items): keys = item[0].split("[") - result.append("{0}[*],$2 $1 -c \"{1}\"".format("{0}{1}.{2}".format(self.key, keys[0], keys[1][:-1]), - self.query[self.extension + "_bootstrap"].format( - columns=", ".join( - [x[0][x[0].find("[") + 1:x[0].find("]")] for x - in - all_items]), metrics=(", ".join(columns)), - extension_schema=extension_schema) if Pooler.is_bootstraped() else - self.query[self.extension].format( - metrics=(", ".join(columns)), - extension_schema=extension_schema))) + result.append("{0}[*],$2 $1 -c \"{1}\" | awk -F '|' '{{print ${2}}}'".format( + "{0}{1}.{2}".format(self.key, keys[0], keys[1][:-1]), + self.query[self.extension + "_bootstrap"].format( + columns=", ".join([x[0][x[0].find("[") + 1:x[0].find("]")] for x in all_items]), + metrics=(", ".join(columns)), + extension_schema=extension_schema) if Pooler.is_bootstraped() else + self.query[self.extension].format( + metrics=(", ".join(columns)), + extension_schema=extension_schema), + i + 1)) if Pooler.server_version_greater("14"): if self.extension == "pg_stat_statements": for i, item in enumerate(self.Items_pg_14): keys = item[0].split("[") result.append( - "{0}[*],$2 $1 -c \"{1}\"".format("{0}{1}.{2}".format(self.key, keys[0], keys[1][:-1]), - self.query_info.format(metrics=(item[1]), - extension_schema=extension_schema))) + "{0}[*],$2 $1 -c \"{1}\" | awk -F '|' '{{print ${2}}}'".format( + "{0}{1}.{2}".format(self.key, keys[0], keys[1][:-1]), + self.query_info.format(metrics=(item[1]), extension_schema=extension_schema), + i + 1)) return template_zabbix.key_and_query(result) else: return From 59a48d9c1ca8b137c9eb1e21d5ac98c6fb34cc3e Mon Sep 17 00:00:00 2001 From: cuprumtan Date: Thu, 16 Mar 2023 13:23:26 +0500 Subject: [PATCH 052/106] build: upgraded to 3.5.3 --- .github/workflows/mamonsu-tests-dev.yml | 2 +- .github/workflows/mamonsu-tests-master.yml | 2 +- github-actions-tests/mamonsu_build.sh | 4 +- github-actions-tests/sources/agent_3.5.2.conf | 210 ------------------ mamonsu/__init__.py | 2 +- packaging/conf/example_linux.conf | 6 +- packaging/debian/changelog | 6 + packaging/rpm/SPECS/mamonsu.spec | 8 +- packaging/win/mamonsu.def.nsh | 2 +- 9 files changed, 22 insertions(+), 220 deletions(-) delete mode 100644 github-actions-tests/sources/agent_3.5.2.conf diff --git a/.github/workflows/mamonsu-tests-dev.yml b/.github/workflows/mamonsu-tests-dev.yml index 79417e1..6c6f7f2 100644 --- a/.github/workflows/mamonsu-tests-dev.yml +++ b/.github/workflows/mamonsu-tests-dev.yml @@ -61,7 +61,7 @@ jobs: echo "zabbix_address=$(hostname -I | awk '{print $1}')" >> $GITHUB_OUTPUT id: zabbix_address - name: Edit Zabbix address in agent.conf - run: sed -i "s/\(address *= *\).*/\1 ${{ steps.zabbix_address.outputs.zabbix_address }}/" ${{ env.MAMONSU_PATH }}/github-actions-tests/sources/agent_3.5.2.conf + run: sed -i "s/\(address *= *\).*/\1 ${{ steps.zabbix_address.outputs.zabbix_address }}/" ${{ env.MAMONSU_PATH }}/github-actions-tests/sources/agent_3.5.3.conf - name: Copy test scripts to container run: docker exec $( echo "${{ matrix.docker_os }}" | sed 's/://' | sed 's/\.//' ) mkdir -p -m 755 /mamonsu/ diff --git a/.github/workflows/mamonsu-tests-master.yml b/.github/workflows/mamonsu-tests-master.yml index a8e4571..9815a16 100644 --- a/.github/workflows/mamonsu-tests-master.yml +++ b/.github/workflows/mamonsu-tests-master.yml @@ -65,7 +65,7 @@ jobs: echo "zabbix_address=$(hostname -I | awk '{print $1}')" >> $GITHUB_OUTPUT id: zabbix_address - name: Edit Zabbix address in agent.conf - run: sed -i "s/\(address *= *\).*/\1 ${{ steps.zabbix_address.outputs.zabbix_address }}/" ${{ env.MAMONSU_PATH }}/github-actions-tests/sources/agent_3.5.2.conf + run: sed -i "s/\(address *= *\).*/\1 ${{ steps.zabbix_address.outputs.zabbix_address }}/" ${{ env.MAMONSU_PATH }}/github-actions-tests/sources/agent_3.5.3.conf - name: Copy test scripts to container run: docker exec $( echo "${{ matrix.docker_os }}" | sed 's/://' | sed 's/\.//' ) mkdir -p -m 755 /mamonsu/ diff --git a/github-actions-tests/mamonsu_build.sh b/github-actions-tests/mamonsu_build.sh index 58ede3d..eea3e3d 100644 --- a/github-actions-tests/mamonsu_build.sh +++ b/github-actions-tests/mamonsu_build.sh @@ -41,7 +41,7 @@ if [ "${OS%:*}" = "centos" ]; then python3 setup.py build && python3 setup.py install make rpm sudo rpm -i ./mamonsu*.rpm - cat /mamonsu/github-actions-tests/sources/agent_3.5.2.conf > /etc/mamonsu/agent.conf + cat /mamonsu/github-actions-tests/sources/agent_3.5.3.conf > /etc/mamonsu/agent.conf systemctl daemon-reload systemctl restart mamonsu sleep 5 @@ -64,7 +64,7 @@ elif [ "${OS%:*}" = "ubuntu" ]; then python3 setup.py build && python3 setup.py install make deb sudo dpkg -i ./mamonsu*.deb - cat /mamonsu/github-actions-tests/sources/agent_3.5.2.conf > /etc/mamonsu/agent.conf + cat /mamonsu/github-actions-tests/sources/agent_3.5.3.conf > /etc/mamonsu/agent.conf service mamonsu restart sleep 5 echo && echo && echo "mamonsu version:" diff --git a/github-actions-tests/sources/agent_3.5.2.conf b/github-actions-tests/sources/agent_3.5.2.conf deleted file mode 100644 index 076419e..0000000 --- a/github-actions-tests/sources/agent_3.5.2.conf +++ /dev/null @@ -1,210 +0,0 @@ -# This is a configuration file for mamonsu -# To get more information about mamonsu, visit https://postgrespro.ru/docs/postgrespro/12/mamonsu - -######### Connection parameters sections ############## - -# specify connection parameters for the Postgres cluster -# in the user, password, and database fields, you must specify the mamonsu_user, mamonsu_password, -# and the mamonsu_database used for bootstrap, respectively. -# if you skipped the bootstrap, specify a superuser credentials and the database to connect to. - -[postgres] -enabled = True -user = mamonsu -password = mamonsu -database = mamonsu_test_db -host = localhost -port = 5432 -application_name = mamonsu -query_timeout = 10 - -# the address field must point to the running Zabbix server, while the client field must provide the name of -# the Zabbix host. You can find the list of hosts available for your account in the Zabbix web -# interface under Configuration > Hosts. -# re_send - True - in case of transmission error, mamonsu repeats sending metrics one by one to look in log metrics with error - -[zabbix] -enabled = True -client = pg-master -address = 127.0.0.1 -port = 10051 -timeout = 15 -re_send = False - -######### General parameters sections ############ - -# enable or disable collection of system metrics. - -[system] -enabled = True - -# control the queue size of the data to be sent to the Zabbix server - -[sender] -queue = 2048 - -# specify the location of mamonsu and whether it is allowed to access metrics from the command line - -[agent] -enabled = True -host = 127.0.0.1 -port = 10052 - -# specify custom plugins to be added for metrics collection - -[plugins] -enabled = False -directory = /etc/mamonsu/plugins - -# enable storing the collected metric data in text files locally. - -[metric_log] -enabled = False -directory = /var/log/mamonsu -max_size_mb = 1024 - -# specify logging settings for mamonsu - -[log] -file = /var/log/mamonsu/mamonsu.log -level = DEBUG -format = [%(levelname)s] %(asctime)s - %(name)s - %(message)s - -######### Individual Plugin Sections ############ - -# to disable any plugin set the enabled option to False. -# modify collection interval for each plugin in the interval field. -# set customer parameters for some plugins in the individual section. -# below listed all available parameters for each plugin to modify. - -[health] -interval = 60 - -[archivecommand] -interval = 60 - -# Besides standard autovacuum workers count, mamonsu also counts autovacuum utilization. -# But this metric is instantaneous, so recommended to run this plugin frequently -# to get a complete picture of autovacuum utilization. -[autovacuum] -interval = 30 - -[bgwriter] -interval = 60 - -[cfs] -force_enable = False -interval = 60 - -[checkpoint] -interval = 300 - -[connections] -interval = 60 - -[databases] -interval = 300 - -[pghealth] -interval = 60 - -[instance] -interval = 60 - -# This plugin allows detects possible memory leaks while working with PostgreSQL using /proc/pid/status and /proc/pid/statm -# We use RES and SHR difference to calculate approximate volume of private anonymous backend memory. -# If it exceeds private_anon_mem_threshold then that pid will be added to a message. An example is presented below -# statm - 'pid: {pid}, RES {RES} - SHR {SHR} more then {private_anon_mem_threshold}\n' -# Since Linux 4.5 RssAnon, RssFile and RssShmem have been added. -# They allows to distinguish types of memory such as private anonymous, file-backed, and shared anonymous memory. -# We are interested in RssAnon. If its value exceeds private_anon_mem_threshold then that pid will also be added to a message. -# By default this plugin disabled. To enable this plugin - set bellow "enabled = False" -# #interval - (onitoring frequency in seconds. 60 seconds by default -# private_anon_mem_threshold - memory volume threshold after which we need an investigation about memory leak. 1GB by default. -# Possible values MB, GB, TB. For example 1GB -[memoryleakdiagnostic] -enabled = True -interval = 15 -private_anon_mem_threshold = 1GB - -[oldest] -interval = 60 - -[pgbuffercache] -interval = 60 - -[pglocks] -interval = 60 - -# Get age (in seconds) of the oldest running prepared transaction and number of all prepared transactions for two-phase commit. -# https://www.postgresql.org/docs/current/sql-prepare-transaction.html -# https://www.postgresql.org/docs/12/view-pg-prepared-xacts.html -# max_prepared_transaction_time - age of prepared transaction in seconds. -# If pgsql.prepared.oldest exceeds max_prepared_transaction_time the trigger fires. -[preparedtransaction] -interval = 60 - -# Get size of relations defined in this section -# Relations - comma separated list of objects - tables and endexes (database_name.schema.relation) used to calculate relations size. -# Example: -# relations=postgres.pg_catalog.pg_class,postgres.pg_catalog.pg_user -# If the relation is blocked by some process such as vacuum full or create index, the result will be -1 -# by default this plugin disabled. To enable this plugin - set bellow "enabled = False" and define a list of relations. -[relationssize] -enabled = True -relations=postgres.pg_catalog.pg_class,mamonsu_test_db.mamonsu.config -interval = 15 - -[replication] -interval = 60 - -[statstatements] -interval = 60 - -[waitsampling] -interval = 60 - -[wal] -interval = 60 - -[disksizes] -interval = 60 - -[diskstats] -interval = 60 - -[la] -interval = 60 - -[memory] -interval = 60 - -[net] -interval = 60 - -[openfiles] -interval = 60 - -# Get size of backup catalogs stroring all WAL and backup files using pg_probackup -# (https://github.com/postgrespro/pg_probackup) -# Trigger fires if some backup has bad status e.g. (ERROR,CORRUPT,ORPHAN). -[pgprobackup] -enabled = False -interval = 300 -backup_dirs = /backup_dir1,/backup_dir2 -pg_probackup_path = /usr/bin/pg_probackup-11 - -[procstat] -interval = 60 - -[systemuptime] -interval = 60 - -[agentapi] -interval = 60 - -[logsender] -interval = 2 - -[zbxsender] -interval = 10 diff --git a/mamonsu/__init__.py b/mamonsu/__init__.py index 86d1925..ef2fa50 100644 --- a/mamonsu/__init__.py +++ b/mamonsu/__init__.py @@ -1,7 +1,7 @@ __author__ = 'Dmitry Vasilyev' __author_email__ = 'info@postgrespro.ru' __description__ = 'Monitoring agent for PostgreSQL' -__version__ = '3.5.2' +__version__ = '3.5.3' __licence__ = 'BSD' __url__ = 'https://github.com/postgrespro/mamonsu' diff --git a/packaging/conf/example_linux.conf b/packaging/conf/example_linux.conf index ddd0f2f..c3234a6 100644 --- a/packaging/conf/example_linux.conf +++ b/packaging/conf/example_linux.conf @@ -66,8 +66,8 @@ max_size_mb = 1024 # specify logging settings for mamonsu [log] -file = None -level = INFO +file = /var/log/mamonsu/mamonsu.log +level = DEBUG format = [%(levelname)s] %(asctime)s - %(name)s - %(message)s ######### Individual Plugin Sections ############ @@ -207,4 +207,4 @@ interval = 60 interval = 2 [zbxsender] -interval = 10 \ No newline at end of file +interval = 10 diff --git a/packaging/debian/changelog b/packaging/debian/changelog index 9adbaa3..e4bea13 100644 --- a/packaging/debian/changelog +++ b/packaging/debian/changelog @@ -1,3 +1,9 @@ +mamonsu (3.5.3-1) stable; urgency=low + * removed the owner check for the mamonsu agent.conf file (previously this was not flexible and only required the user "mamonsu"); + * removed metrics that conflict with the native Zabbix agent metrics (only in agent mode, in regular mode it works as usual); + * added pg_stat_wal queries for native Zabbix agent; + * fixed native Zabbix agent queries; + mamonsu (3.5.2-1) stable; urgency=low * fixed Statements plugin list of metrics creation; * fixed Zabbix API requests to fit new Dashboard Template section rules; diff --git a/packaging/rpm/SPECS/mamonsu.spec b/packaging/rpm/SPECS/mamonsu.spec index adfe234..3d8d983 100644 --- a/packaging/rpm/SPECS/mamonsu.spec +++ b/packaging/rpm/SPECS/mamonsu.spec @@ -1,5 +1,5 @@ Name: mamonsu -Version: 3.5.2 +Version: 3.5.3 Release: 1%{?dist} Summary: Monitoring agent for PostgreSQL Group: Applications/Internet @@ -73,6 +73,12 @@ chown -R mamonsu.mamonsu /var/log/mamonsu chown -R mamonsu.mamonsu /etc/mamonsu %changelog +* Thu Mar 16 2023 Alexandra Kuznetsova - 3.5.3-1 + - removed the owner check for the mamonsu agent.conf file (previously this was not flexible and only required the user "mamonsu"); + - removed metrics that conflict with the native Zabbix agent metrics (only in agent mode, in regular mode it works as usual); + - added pg_stat_wal queries for native Zabbix agent; + - fixed native Zabbix agent queries; + * Tue Aug 16 2022 Alexandra Kuznetsova - 3.5.2-1 - fixed Statements plugin list of metrics creation; - fixed Zabbix API requests to fit new Dashboard Template section rules; diff --git a/packaging/win/mamonsu.def.nsh b/packaging/win/mamonsu.def.nsh index 67022cc..fe069a9 100644 --- a/packaging/win/mamonsu.def.nsh +++ b/packaging/win/mamonsu.def.nsh @@ -1,5 +1,5 @@ !define NAME Mamonsu -!define VERSION 3.5.2 +!define VERSION 3.5.3 !define MAMONSU_REG_PATH "Software\PostgresPro\Mamonsu" !define MAMONSU_REG_UNINSTALLER_PATH "Software\Microsoft\Windows\CurrentVersion\Uninstall" !define EDB_REG "SOFTWARE\Postgresql" From 70105c026f5690c4d734bd7db5163bf2d537b5f2 Mon Sep 17 00:00:00 2001 From: cuprumtan Date: Thu, 16 Mar 2023 13:34:48 +0500 Subject: [PATCH 053/106] build: upgraded to 3.5.3 --- github-actions-tests/sources/agent_3.5.3.conf | 210 ++++++++++++++++++ 1 file changed, 210 insertions(+) create mode 100644 github-actions-tests/sources/agent_3.5.3.conf diff --git a/github-actions-tests/sources/agent_3.5.3.conf b/github-actions-tests/sources/agent_3.5.3.conf new file mode 100644 index 0000000..076419e --- /dev/null +++ b/github-actions-tests/sources/agent_3.5.3.conf @@ -0,0 +1,210 @@ +# This is a configuration file for mamonsu +# To get more information about mamonsu, visit https://postgrespro.ru/docs/postgrespro/12/mamonsu + +######### Connection parameters sections ############## + +# specify connection parameters for the Postgres cluster +# in the user, password, and database fields, you must specify the mamonsu_user, mamonsu_password, +# and the mamonsu_database used for bootstrap, respectively. +# if you skipped the bootstrap, specify a superuser credentials and the database to connect to. + +[postgres] +enabled = True +user = mamonsu +password = mamonsu +database = mamonsu_test_db +host = localhost +port = 5432 +application_name = mamonsu +query_timeout = 10 + +# the address field must point to the running Zabbix server, while the client field must provide the name of +# the Zabbix host. You can find the list of hosts available for your account in the Zabbix web +# interface under Configuration > Hosts. +# re_send - True - in case of transmission error, mamonsu repeats sending metrics one by one to look in log metrics with error + +[zabbix] +enabled = True +client = pg-master +address = 127.0.0.1 +port = 10051 +timeout = 15 +re_send = False + +######### General parameters sections ############ + +# enable or disable collection of system metrics. + +[system] +enabled = True + +# control the queue size of the data to be sent to the Zabbix server + +[sender] +queue = 2048 + +# specify the location of mamonsu and whether it is allowed to access metrics from the command line + +[agent] +enabled = True +host = 127.0.0.1 +port = 10052 + +# specify custom plugins to be added for metrics collection + +[plugins] +enabled = False +directory = /etc/mamonsu/plugins + +# enable storing the collected metric data in text files locally. + +[metric_log] +enabled = False +directory = /var/log/mamonsu +max_size_mb = 1024 + +# specify logging settings for mamonsu + +[log] +file = /var/log/mamonsu/mamonsu.log +level = DEBUG +format = [%(levelname)s] %(asctime)s - %(name)s - %(message)s + +######### Individual Plugin Sections ############ + +# to disable any plugin set the enabled option to False. +# modify collection interval for each plugin in the interval field. +# set customer parameters for some plugins in the individual section. +# below listed all available parameters for each plugin to modify. + +[health] +interval = 60 + +[archivecommand] +interval = 60 + +# Besides standard autovacuum workers count, mamonsu also counts autovacuum utilization. +# But this metric is instantaneous, so recommended to run this plugin frequently +# to get a complete picture of autovacuum utilization. +[autovacuum] +interval = 30 + +[bgwriter] +interval = 60 + +[cfs] +force_enable = False +interval = 60 + +[checkpoint] +interval = 300 + +[connections] +interval = 60 + +[databases] +interval = 300 + +[pghealth] +interval = 60 + +[instance] +interval = 60 + +# This plugin allows detects possible memory leaks while working with PostgreSQL using /proc/pid/status and /proc/pid/statm +# We use RES and SHR difference to calculate approximate volume of private anonymous backend memory. +# If it exceeds private_anon_mem_threshold then that pid will be added to a message. An example is presented below +# statm - 'pid: {pid}, RES {RES} - SHR {SHR} more then {private_anon_mem_threshold}\n' +# Since Linux 4.5 RssAnon, RssFile and RssShmem have been added. +# They allows to distinguish types of memory such as private anonymous, file-backed, and shared anonymous memory. +# We are interested in RssAnon. If its value exceeds private_anon_mem_threshold then that pid will also be added to a message. +# By default this plugin disabled. To enable this plugin - set bellow "enabled = False" +# #interval - (onitoring frequency in seconds. 60 seconds by default +# private_anon_mem_threshold - memory volume threshold after which we need an investigation about memory leak. 1GB by default. +# Possible values MB, GB, TB. For example 1GB +[memoryleakdiagnostic] +enabled = True +interval = 15 +private_anon_mem_threshold = 1GB + +[oldest] +interval = 60 + +[pgbuffercache] +interval = 60 + +[pglocks] +interval = 60 + +# Get age (in seconds) of the oldest running prepared transaction and number of all prepared transactions for two-phase commit. +# https://www.postgresql.org/docs/current/sql-prepare-transaction.html +# https://www.postgresql.org/docs/12/view-pg-prepared-xacts.html +# max_prepared_transaction_time - age of prepared transaction in seconds. +# If pgsql.prepared.oldest exceeds max_prepared_transaction_time the trigger fires. +[preparedtransaction] +interval = 60 + +# Get size of relations defined in this section +# Relations - comma separated list of objects - tables and endexes (database_name.schema.relation) used to calculate relations size. +# Example: +# relations=postgres.pg_catalog.pg_class,postgres.pg_catalog.pg_user +# If the relation is blocked by some process such as vacuum full or create index, the result will be -1 +# by default this plugin disabled. To enable this plugin - set bellow "enabled = False" and define a list of relations. +[relationssize] +enabled = True +relations=postgres.pg_catalog.pg_class,mamonsu_test_db.mamonsu.config +interval = 15 + +[replication] +interval = 60 + +[statstatements] +interval = 60 + +[waitsampling] +interval = 60 + +[wal] +interval = 60 + +[disksizes] +interval = 60 + +[diskstats] +interval = 60 + +[la] +interval = 60 + +[memory] +interval = 60 + +[net] +interval = 60 + +[openfiles] +interval = 60 + +# Get size of backup catalogs stroring all WAL and backup files using pg_probackup +# (https://github.com/postgrespro/pg_probackup) +# Trigger fires if some backup has bad status e.g. (ERROR,CORRUPT,ORPHAN). +[pgprobackup] +enabled = False +interval = 300 +backup_dirs = /backup_dir1,/backup_dir2 +pg_probackup_path = /usr/bin/pg_probackup-11 + +[procstat] +interval = 60 + +[systemuptime] +interval = 60 + +[agentapi] +interval = 60 + +[logsender] +interval = 2 + +[zbxsender] +interval = 10 From bf6d56758074f81d8b623d631e94401a43a24940 Mon Sep 17 00:00:00 2001 From: cuprumtan Date: Tue, 2 May 2023 15:48:21 +0500 Subject: [PATCH 054/106] fix: added to mamonsu bootstrap user pg_monitor role --- mamonsu/tools/bootstrap/sql.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/mamonsu/tools/bootstrap/sql.py b/mamonsu/tools/bootstrap/sql.py index 69752c8..cc3b65b 100644 --- a/mamonsu/tools/bootstrap/sql.py +++ b/mamonsu/tools/bootstrap/sql.py @@ -10,6 +10,11 @@ SELECT FROM pg_catalog.pg_roles WHERE rolname = '{0}') THEN CREATE ROLE {0} LOGIN PASSWORD '{0}'; + IF EXISTS ( + SELECT FROM pg_catalog.pg_roles + WHERE rolname = 'pg_monitor') THEN + GRANT pg_monitor TO {0}; + END IF; END IF; END $do$; From fd2e3cb066c196b4b1c208112c90822eec82dadc Mon Sep 17 00:00:00 2001 From: cuprumtan Date: Wed, 17 May 2023 14:22:02 +0500 Subject: [PATCH 055/106] build: updated to 3.5.4 --- .github/workflows/mamonsu-tests-dev.yml | 2 +- .github/workflows/mamonsu-tests-master.yml | 2 +- github-actions-tests/mamonsu_build.sh | 4 ++-- .../sources/{agent_3.5.3.conf => agent_3.5.4.conf} | 0 mamonsu/__init__.py | 2 +- packaging/debian/changelog | 3 +++ packaging/rpm/SPECS/mamonsu.spec | 5 ++++- packaging/win/mamonsu.def.nsh | 2 +- 8 files changed, 13 insertions(+), 7 deletions(-) rename github-actions-tests/sources/{agent_3.5.3.conf => agent_3.5.4.conf} (100%) diff --git a/.github/workflows/mamonsu-tests-dev.yml b/.github/workflows/mamonsu-tests-dev.yml index 6c6f7f2..9a14744 100644 --- a/.github/workflows/mamonsu-tests-dev.yml +++ b/.github/workflows/mamonsu-tests-dev.yml @@ -61,7 +61,7 @@ jobs: echo "zabbix_address=$(hostname -I | awk '{print $1}')" >> $GITHUB_OUTPUT id: zabbix_address - name: Edit Zabbix address in agent.conf - run: sed -i "s/\(address *= *\).*/\1 ${{ steps.zabbix_address.outputs.zabbix_address }}/" ${{ env.MAMONSU_PATH }}/github-actions-tests/sources/agent_3.5.3.conf + run: sed -i "s/\(address *= *\).*/\1 ${{ steps.zabbix_address.outputs.zabbix_address }}/" ${{ env.MAMONSU_PATH }}/github-actions-tests/sources/agent_3.5.4.conf - name: Copy test scripts to container run: docker exec $( echo "${{ matrix.docker_os }}" | sed 's/://' | sed 's/\.//' ) mkdir -p -m 755 /mamonsu/ diff --git a/.github/workflows/mamonsu-tests-master.yml b/.github/workflows/mamonsu-tests-master.yml index 9815a16..6abe2aa 100644 --- a/.github/workflows/mamonsu-tests-master.yml +++ b/.github/workflows/mamonsu-tests-master.yml @@ -65,7 +65,7 @@ jobs: echo "zabbix_address=$(hostname -I | awk '{print $1}')" >> $GITHUB_OUTPUT id: zabbix_address - name: Edit Zabbix address in agent.conf - run: sed -i "s/\(address *= *\).*/\1 ${{ steps.zabbix_address.outputs.zabbix_address }}/" ${{ env.MAMONSU_PATH }}/github-actions-tests/sources/agent_3.5.3.conf + run: sed -i "s/\(address *= *\).*/\1 ${{ steps.zabbix_address.outputs.zabbix_address }}/" ${{ env.MAMONSU_PATH }}/github-actions-tests/sources/agent_3.5.4.conf - name: Copy test scripts to container run: docker exec $( echo "${{ matrix.docker_os }}" | sed 's/://' | sed 's/\.//' ) mkdir -p -m 755 /mamonsu/ diff --git a/github-actions-tests/mamonsu_build.sh b/github-actions-tests/mamonsu_build.sh index eea3e3d..f1ecf89 100644 --- a/github-actions-tests/mamonsu_build.sh +++ b/github-actions-tests/mamonsu_build.sh @@ -41,7 +41,7 @@ if [ "${OS%:*}" = "centos" ]; then python3 setup.py build && python3 setup.py install make rpm sudo rpm -i ./mamonsu*.rpm - cat /mamonsu/github-actions-tests/sources/agent_3.5.3.conf > /etc/mamonsu/agent.conf + cat /mamonsu/github-actions-tests/sources/agent_3.5.4.conf > /etc/mamonsu/agent.conf systemctl daemon-reload systemctl restart mamonsu sleep 5 @@ -64,7 +64,7 @@ elif [ "${OS%:*}" = "ubuntu" ]; then python3 setup.py build && python3 setup.py install make deb sudo dpkg -i ./mamonsu*.deb - cat /mamonsu/github-actions-tests/sources/agent_3.5.3.conf > /etc/mamonsu/agent.conf + cat /mamonsu/github-actions-tests/sources/agent_3.5.4.conf > /etc/mamonsu/agent.conf service mamonsu restart sleep 5 echo && echo && echo "mamonsu version:" diff --git a/github-actions-tests/sources/agent_3.5.3.conf b/github-actions-tests/sources/agent_3.5.4.conf similarity index 100% rename from github-actions-tests/sources/agent_3.5.3.conf rename to github-actions-tests/sources/agent_3.5.4.conf diff --git a/mamonsu/__init__.py b/mamonsu/__init__.py index ef2fa50..338e4cb 100644 --- a/mamonsu/__init__.py +++ b/mamonsu/__init__.py @@ -1,7 +1,7 @@ __author__ = 'Dmitry Vasilyev' __author_email__ = 'info@postgrespro.ru' __description__ = 'Monitoring agent for PostgreSQL' -__version__ = '3.5.3' +__version__ = '3.5.4' __licence__ = 'BSD' __url__ = 'https://github.com/postgrespro/mamonsu' diff --git a/packaging/debian/changelog b/packaging/debian/changelog index e4bea13..61cc24a 100644 --- a/packaging/debian/changelog +++ b/packaging/debian/changelog @@ -1,3 +1,6 @@ +mamonsu (3.5.4-1) stable; urgency=low + * fixed privileges for mamonsu role created by bootstrap; + mamonsu (3.5.3-1) stable; urgency=low * removed the owner check for the mamonsu agent.conf file (previously this was not flexible and only required the user "mamonsu"); * removed metrics that conflict with the native Zabbix agent metrics (only in agent mode, in regular mode it works as usual); diff --git a/packaging/rpm/SPECS/mamonsu.spec b/packaging/rpm/SPECS/mamonsu.spec index 3d8d983..a8c86fa 100644 --- a/packaging/rpm/SPECS/mamonsu.spec +++ b/packaging/rpm/SPECS/mamonsu.spec @@ -1,5 +1,5 @@ Name: mamonsu -Version: 3.5.3 +Version: 3.5.4 Release: 1%{?dist} Summary: Monitoring agent for PostgreSQL Group: Applications/Internet @@ -73,6 +73,9 @@ chown -R mamonsu.mamonsu /var/log/mamonsu chown -R mamonsu.mamonsu /etc/mamonsu %changelog +* Wed May 17 2023 Alexandra Kuznetsova - 3.5.4-1 + - fixed privileges for mamonsu role created by bootstrap; + * Thu Mar 16 2023 Alexandra Kuznetsova - 3.5.3-1 - removed the owner check for the mamonsu agent.conf file (previously this was not flexible and only required the user "mamonsu"); - removed metrics that conflict with the native Zabbix agent metrics (only in agent mode, in regular mode it works as usual); diff --git a/packaging/win/mamonsu.def.nsh b/packaging/win/mamonsu.def.nsh index fe069a9..0bfaf75 100644 --- a/packaging/win/mamonsu.def.nsh +++ b/packaging/win/mamonsu.def.nsh @@ -1,5 +1,5 @@ !define NAME Mamonsu -!define VERSION 3.5.3 +!define VERSION 3.5.4 !define MAMONSU_REG_PATH "Software\PostgresPro\Mamonsu" !define MAMONSU_REG_UNINSTALLER_PATH "Software\Microsoft\Windows\CurrentVersion\Uninstall" !define EDB_REG "SOFTWARE\Postgresql" From 777ecd51b0f9d7882b25694a5513ed27b15d196d Mon Sep 17 00:00:00 2001 From: cuprumtan Date: Thu, 25 May 2023 15:41:00 +0500 Subject: [PATCH 056/106] fix: fixed types mismatch --- mamonsu/tools/bootstrap/sql.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mamonsu/tools/bootstrap/sql.py b/mamonsu/tools/bootstrap/sql.py index cc3b65b..fb56a9d 100644 --- a/mamonsu/tools/bootstrap/sql.py +++ b/mamonsu/tools/bootstrap/sql.py @@ -294,7 +294,7 @@ WITH lock_table AS ( SELECT setoflocks.key, json_data.key AS lock_type, - json_data.value::int AS count + json_data.value::bigint AS count FROM (SELECT key, value AS locktuple FROM jsonb_each((SELECT wait_stats FROM ' || extension_schema || '.pgpro_stats_totals() @@ -323,7 +323,7 @@ WITH lock_table AS ( SELECT setoflocks.key, json_data.key AS lock_type, - json_data.value::int AS count + json_data.value::bigint AS count FROM (SELECT key, value AS locktuple FROM jsonb_each((SELECT wait_stats FROM ' || extension_schema || '.pgpro_stats_totals() @@ -343,7 +343,7 @@ WITH lock_table AS ( SELECT setoflocks.key, json_data.key AS lock_type, - json_data.value::int AS count + json_data.value::bigint AS count FROM (SELECT key, value AS locktuple FROM jsonb_each((SELECT wait_stats FROM ' || extension_schema || '.pgpro_stats_totals() From 0f3738da1d0a1dd4b2d3e82fc6fd8731c531e753 Mon Sep 17 00:00:00 2001 From: cuprumtan Date: Fri, 9 Jun 2023 13:17:54 +0500 Subject: [PATCH 057/106] fix: fixed types mismatch --- mamonsu/plugins/pgsql/wait_sampling.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mamonsu/plugins/pgsql/wait_sampling.py b/mamonsu/plugins/pgsql/wait_sampling.py index 51c498b..81b3a18 100644 --- a/mamonsu/plugins/pgsql/wait_sampling.py +++ b/mamonsu/plugins/pgsql/wait_sampling.py @@ -44,7 +44,7 @@ class WaitSampling(Plugin): WITH lock_table AS ( SELECT setoflocks.key, json_data.key AS lock_type, - json_data.value::int AS count + json_data.value::bigint AS count FROM (SELECT key, value AS locktuple FROM jsonb_each((SELECT wait_stats FROM {extension_schema}.pgpro_stats_totals @@ -106,7 +106,7 @@ class WaitSampling(Plugin): WITH lock_table AS ( SELECT setoflocks.key, json_data.key AS lock_type, - json_data.value::int AS count + json_data.value::bigint AS count FROM (SELECT key, value AS locktuple FROM jsonb_each((SELECT wait_stats FROM {extension_schema}.pgpro_stats_totals @@ -181,7 +181,7 @@ class WaitSampling(Plugin): WITH lock_table AS ( SELECT setoflocks.key, json_data.key AS lock_type, - json_data.value::int AS count + json_data.value::bigint AS count FROM (SELECT key, value AS locktuple FROM jsonb_each((SELECT wait_stats FROM {extension_schema}.pgpro_stats_totals From db18519c77fd31f6c9c54c5e86361007eea06c0a Mon Sep 17 00:00:00 2001 From: cuprumtan Date: Tue, 13 Jun 2023 13:23:59 +0500 Subject: [PATCH 058/106] build: upgrade to 5.3.5 --- .github/workflows/mamonsu-tests-dev.yml | 2 +- .github/workflows/mamonsu-tests-master.yml | 2 +- github-actions-tests/mamonsu_build.sh | 4 ++-- .../sources/{agent_3.5.4.conf => agent_3.5.5.conf} | 0 mamonsu/__init__.py | 2 +- packaging/debian/changelog | 3 +++ packaging/rpm/SPECS/mamonsu.spec | 5 ++++- packaging/win/mamonsu.def.nsh | 2 +- 8 files changed, 13 insertions(+), 7 deletions(-) rename github-actions-tests/sources/{agent_3.5.4.conf => agent_3.5.5.conf} (100%) diff --git a/.github/workflows/mamonsu-tests-dev.yml b/.github/workflows/mamonsu-tests-dev.yml index 9a14744..6a09598 100644 --- a/.github/workflows/mamonsu-tests-dev.yml +++ b/.github/workflows/mamonsu-tests-dev.yml @@ -61,7 +61,7 @@ jobs: echo "zabbix_address=$(hostname -I | awk '{print $1}')" >> $GITHUB_OUTPUT id: zabbix_address - name: Edit Zabbix address in agent.conf - run: sed -i "s/\(address *= *\).*/\1 ${{ steps.zabbix_address.outputs.zabbix_address }}/" ${{ env.MAMONSU_PATH }}/github-actions-tests/sources/agent_3.5.4.conf + run: sed -i "s/\(address *= *\).*/\1 ${{ steps.zabbix_address.outputs.zabbix_address }}/" ${{ env.MAMONSU_PATH }}/github-actions-tests/sources/agent_3.5.5.conf - name: Copy test scripts to container run: docker exec $( echo "${{ matrix.docker_os }}" | sed 's/://' | sed 's/\.//' ) mkdir -p -m 755 /mamonsu/ diff --git a/.github/workflows/mamonsu-tests-master.yml b/.github/workflows/mamonsu-tests-master.yml index 6abe2aa..e10ecec 100644 --- a/.github/workflows/mamonsu-tests-master.yml +++ b/.github/workflows/mamonsu-tests-master.yml @@ -65,7 +65,7 @@ jobs: echo "zabbix_address=$(hostname -I | awk '{print $1}')" >> $GITHUB_OUTPUT id: zabbix_address - name: Edit Zabbix address in agent.conf - run: sed -i "s/\(address *= *\).*/\1 ${{ steps.zabbix_address.outputs.zabbix_address }}/" ${{ env.MAMONSU_PATH }}/github-actions-tests/sources/agent_3.5.4.conf + run: sed -i "s/\(address *= *\).*/\1 ${{ steps.zabbix_address.outputs.zabbix_address }}/" ${{ env.MAMONSU_PATH }}/github-actions-tests/sources/agent_3.5.5.conf - name: Copy test scripts to container run: docker exec $( echo "${{ matrix.docker_os }}" | sed 's/://' | sed 's/\.//' ) mkdir -p -m 755 /mamonsu/ diff --git a/github-actions-tests/mamonsu_build.sh b/github-actions-tests/mamonsu_build.sh index f1ecf89..f96d2b2 100644 --- a/github-actions-tests/mamonsu_build.sh +++ b/github-actions-tests/mamonsu_build.sh @@ -41,7 +41,7 @@ if [ "${OS%:*}" = "centos" ]; then python3 setup.py build && python3 setup.py install make rpm sudo rpm -i ./mamonsu*.rpm - cat /mamonsu/github-actions-tests/sources/agent_3.5.4.conf > /etc/mamonsu/agent.conf + cat /mamonsu/github-actions-tests/sources/agent_3.5.5.conf > /etc/mamonsu/agent.conf systemctl daemon-reload systemctl restart mamonsu sleep 5 @@ -64,7 +64,7 @@ elif [ "${OS%:*}" = "ubuntu" ]; then python3 setup.py build && python3 setup.py install make deb sudo dpkg -i ./mamonsu*.deb - cat /mamonsu/github-actions-tests/sources/agent_3.5.4.conf > /etc/mamonsu/agent.conf + cat /mamonsu/github-actions-tests/sources/agent_3.5.5.conf > /etc/mamonsu/agent.conf service mamonsu restart sleep 5 echo && echo && echo "mamonsu version:" diff --git a/github-actions-tests/sources/agent_3.5.4.conf b/github-actions-tests/sources/agent_3.5.5.conf similarity index 100% rename from github-actions-tests/sources/agent_3.5.4.conf rename to github-actions-tests/sources/agent_3.5.5.conf diff --git a/mamonsu/__init__.py b/mamonsu/__init__.py index 338e4cb..458c253 100644 --- a/mamonsu/__init__.py +++ b/mamonsu/__init__.py @@ -1,7 +1,7 @@ __author__ = 'Dmitry Vasilyev' __author_email__ = 'info@postgrespro.ru' __description__ = 'Monitoring agent for PostgreSQL' -__version__ = '3.5.4' +__version__ = '3.5.5' __licence__ = 'BSD' __url__ = 'https://github.com/postgrespro/mamonsu' diff --git a/packaging/debian/changelog b/packaging/debian/changelog index 61cc24a..64a6fdc 100644 --- a/packaging/debian/changelog +++ b/packaging/debian/changelog @@ -1,3 +1,6 @@ +mamonsu (3.5.5-1) stable; urgency=low + * fixed types mismatch for pgpro_stats and pg_wait_sampling; + mamonsu (3.5.4-1) stable; urgency=low * fixed privileges for mamonsu role created by bootstrap; diff --git a/packaging/rpm/SPECS/mamonsu.spec b/packaging/rpm/SPECS/mamonsu.spec index a8c86fa..37d3e98 100644 --- a/packaging/rpm/SPECS/mamonsu.spec +++ b/packaging/rpm/SPECS/mamonsu.spec @@ -1,5 +1,5 @@ Name: mamonsu -Version: 3.5.4 +Version: 3.5.5 Release: 1%{?dist} Summary: Monitoring agent for PostgreSQL Group: Applications/Internet @@ -73,6 +73,9 @@ chown -R mamonsu.mamonsu /var/log/mamonsu chown -R mamonsu.mamonsu /etc/mamonsu %changelog +* Tue Jun 13 2023 Alexandra Kuznetsova - 3.5.5-1 + - fixed types mismatch for pgpro_stats and pg_wait_sampling; + * Wed May 17 2023 Alexandra Kuznetsova - 3.5.4-1 - fixed privileges for mamonsu role created by bootstrap; diff --git a/packaging/win/mamonsu.def.nsh b/packaging/win/mamonsu.def.nsh index 0bfaf75..91851a7 100644 --- a/packaging/win/mamonsu.def.nsh +++ b/packaging/win/mamonsu.def.nsh @@ -1,5 +1,5 @@ !define NAME Mamonsu -!define VERSION 3.5.4 +!define VERSION 3.5.5 !define MAMONSU_REG_PATH "Software\PostgresPro\Mamonsu" !define MAMONSU_REG_UNINSTALLER_PATH "Software\Microsoft\Windows\CurrentVersion\Uninstall" !define EDB_REG "SOFTWARE\Postgresql" From c5bbf3f2e0e2d82c29a78c2375523039563c3fbc Mon Sep 17 00:00:00 2001 From: cuprumtan Date: Tue, 9 Jan 2024 11:24:57 +0500 Subject: [PATCH 059/106] doc: expand pg_locks metrics documentation --- documentation/metrics.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/documentation/metrics.md b/documentation/metrics.md index 5f2e045..acbcda8 100644 --- a/documentation/metrics.md +++ b/documentation/metrics.md @@ -3274,7 +3274,7 @@ Default config: - *Access Exclusive* calculates as summa of locks from `pg_locks` with mode `Access Exclusive`. + *Access Exclusive* calculates as summa of locks from `pg_locks` with mode `Access Exclusive`. Metric describes a total number of locks acquired (or waiting) by all queries like DROP TABLE, TRUNCATE, REINDEX, CLUSTER, VACUUM FULL, REFRESH MATERIALIZED VIEW, LOCK TABLE and some forms of ALTER INDEX and ALTER TABLE. - **Access Share** @@ -3307,7 +3307,7 @@ Default config: - *Access Share* calculates as summa of locks from `pg_locks` with mode `Access Share`. + *Access Share* calculates as summa of locks from `pg_locks` with mode `Access Share`. Metric describes a total number of locks acquired (or waiting) by queries that only reads tables and do not modify. - **Exclusive** @@ -3340,7 +3340,7 @@ Default config: - *Exclusive* calculates as summa of locks from `pg_locks` with mode `Exclusive`. + *Exclusive* calculates as summa of locks from `pg_locks` with mode `Exclusive`. Metric describes a total number of locks acquired (or waiting) by all queries like REFRESH MATERIALIZED VIEW CONCURRENTLY. - **Row Exclusive** @@ -3373,7 +3373,7 @@ Default config: - *Row Exclusive* calculates as summa of locks from `pg_locks` with mode `Row Exclusive`. + *Row Exclusive* calculates as summa of locks from `pg_locks` with mode `Row Exclusive`. Metric describes a total number of locks acquired (or waiting) by all queries like UPDATE, DELETE, INSERT and MERGE. - **Row Share** @@ -3406,7 +3406,7 @@ Default config: - *Row Share* calculates as summa of locks from `pg_locks` with mode `Row Share`. + *Row Share* calculates as summa of locks from `pg_locks` with mode `Row Share`. Metric describes a total number of locks acquired (or waiting) by all queries like SELECT FOR SHARE and SELECT FOR UPDATE. - **Share Row Exclusive** @@ -3439,7 +3439,7 @@ Default config: - *Share Row Exclusive* calculates as summa of locks from `pg_locks` with mode `Share Row Exclusive`. + *Share Row Exclusive* calculates as summa of locks from `pg_locks` with mode `Share Row Exclusive`. Metric describes a total number of locks acquired (or waiting) by all queries like CREATE TRIGGER and some forms of ALTER TABLE. - **Share Update Exclusive** @@ -3472,7 +3472,7 @@ Default config: - *Share Update Exclusive* calculates as summa of locks from `pg_locks` with mode `Share Update Exclusive`. + *Share Update Exclusive* calculates as summa of locks from `pg_locks` with mode `Share Update Exclusive`. Metric describes a total number of locks acquired (or waiting) by all queries like VACUUM, ANALYZE, CREATE INDEX CONCURRENTLY, CREATE STATISTICS, COMMENT ON, REINDEX CONCURRENTLY, and some forms of ALTER INDEX and ALTER TABLE. - **Share** @@ -3505,7 +3505,7 @@ Default config: - *Share* calculates as summa of locks from `pg_locks` with mode `Share`. + *Share* calculates as summa of locks from `pg_locks` with mode `Share`. Metric describes a total number of locks acquired (or waiting) by all queries like CREATE INDEX. ### Graphs From cf0205e499147607df0b1aeeb3f9adcf77b6b724 Mon Sep 17 00:00:00 2001 From: cuprumtan Date: Thu, 11 Jan 2024 13:13:09 +0500 Subject: [PATCH 060/106] fix: set new pg_locks metrics names --- documentation/metrics.md | 16 ++++++++-------- mamonsu/plugins/pgsql/pg_locks.py | 16 ++++++++-------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/documentation/metrics.md b/documentation/metrics.md index acbcda8..a157eab 100644 --- a/documentation/metrics.md +++ b/documentation/metrics.md @@ -3250,7 +3250,7 @@ Default config: - + @@ -3283,7 +3283,7 @@ Default config:
NamePostgreSQL Locks: ALTER TABLE, DROP TABLE, TRUNCATE, REINDEX, CLUSTER, VACUUM FULL, LOCK TABLEPostgreSQL Locks: total number of locks acquired (or waiting) by all queries like DROP TABLE, TRUNCATE, REINDEX, CLUSTER, VACUUM FULL, REFRESH MATERIALIZED VIEW, LOCK TABLE and some forms of ALTER INDEX and ALTER TABLE
Key
- + @@ -3316,7 +3316,7 @@ Default config:
NamePostgreSQL Locks: Read Only QueriesPostgreSQL Locks: total number of locks acquired (or waiting) by queries that only reads tables and do not modify
Key
- + @@ -3349,7 +3349,7 @@ Default config:
NamePostgreSQL Locks: Locks From Application or Some Operations on System CatalogsPostgreSQL Locks: total number of locks acquired (or waiting) by all queries like REFRESH MATERIALIZED VIEW CONCURRENTLY
Key
- + @@ -3382,7 +3382,7 @@ Default config:
NamePostgreSQL Locks: Write QueriesPostgreSQL Locks: total number of locks acquired (or waiting) by all queries like UPDATE, DELETE, INSERT and MERGE
Key
- + @@ -3415,7 +3415,7 @@ Default config:
NamePostgreSQL Locks: SELECT FOR SHARE and SELECT FOR UPDATEPostgreSQL Locks: total number of locks acquired (or waiting) by all queries like SELECT FOR SHARE and SELECT FOR UPDATE
Key
- + @@ -3448,7 +3448,7 @@ Default config:
NamePostgreSQL Locks: Locks From ApplicationPostgreSQL Locks: total number of locks acquired (or waiting) by all queries like CREATE TRIGGER and some forms of ALTER TABLE
Key
- + @@ -3481,7 +3481,7 @@ Default config:
NamePostgreSQL Locks: VACUUM, ANALYZE, CREATE INDEX CONCURRENTLYPostgreSQL Locks: total number of locks acquired (or waiting) by all queries like VACUUM, ANALYZE, CREATE INDEX CONCURRENTLY, CREATE STATISTICS, COMMENT ON, REINDEX CONCURRENTLY, and some forms of ALTER INDEX and ALTER TABLE
Key
- + diff --git a/mamonsu/plugins/pgsql/pg_locks.py b/mamonsu/plugins/pgsql/pg_locks.py index 5799b51..63a3be4 100644 --- a/mamonsu/plugins/pgsql/pg_locks.py +++ b/mamonsu/plugins/pgsql/pg_locks.py @@ -22,28 +22,28 @@ class PgLocks(Plugin): Items = [ # key, desc, color ("accessshare", - "Read Only Queries", + "total number of locks acquired (or waiting) by queries that only reads tables and do not modify", "00CC00"), ("rowshare", - "SELECT FOR SHARE and SELECT FOR UPDATE", + "total number of locks acquired (or waiting) by all queries like SELECT FOR SHARE and SELECT FOR UPDATE", "3B415A"), ("rowexclusive", - "Write Queries", + "total number of locks acquired (or waiting) by all queries like UPDATE, DELETE, INSERT and MERGE", "FF5656"), ("shareupdateexclusive", - "VACUUM, ANALYZE, CREATE INDEX CONCURRENTLY", + "total number of locks acquired (or waiting) by all queries like VACUUM, ANALYZE, CREATE INDEX CONCURRENTLY, CREATE STATISTICS, COMMENT ON, REINDEX CONCURRENTLY, and some forms of ALTER INDEX and ALTER TABLE", "F6CB93"), ("share", - "CREATE INDEX", + "total number of locks acquired (or waiting) by all queries like CREATE INDEX", "006AAE"), ("sharerowexclusive", - "Locks from Application", + "total number of locks acquired (or waiting) by all queries like CREATE TRIGGER and some forms of ALTER TABLE", "00B0B8"), ("exclusive", - "Locks from Application or Some Operations on System Catalogs", + "total number of locks acquired (or waiting) by all queries like REFRESH MATERIALIZED VIEW CONCURRENTLY", "9C8A4E"), ("accessexclusive", - "ALTER TABLE, DROP TABLE, TRUNCATE, REINDEX, CLUSTER, VACUUM FULL, LOCK TABLE", + "total number of locks acquired (or waiting) by all queries like DROP TABLE, TRUNCATE, REINDEX, CLUSTER, VACUUM FULL, REFRESH MATERIALIZED VIEW, LOCK TABLE and some forms of ALTER INDEX and ALTER TABLE", "793F5D") ] From b1e53cfc1ca8dfb27fa4779c524c75ae9dafe96d Mon Sep 17 00:00:00 2001 From: cuprumtan Date: Thu, 11 Jan 2024 14:14:20 +0500 Subject: [PATCH 061/106] build: upgrade to 3.5.6 --- .github/workflows/mamonsu-tests-dev.yml | 2 +- .github/workflows/mamonsu-tests-master.yml | 2 +- github-actions-tests/mamonsu_build.sh | 4 ++-- .../sources/{agent_3.5.5.conf => agent_3.5.6.conf} | 0 mamonsu/__init__.py | 2 +- packaging/debian/changelog | 3 +++ packaging/rpm/SPECS/mamonsu.spec | 5 ++++- packaging/win/mamonsu.def.nsh | 2 +- 8 files changed, 13 insertions(+), 7 deletions(-) rename github-actions-tests/sources/{agent_3.5.5.conf => agent_3.5.6.conf} (100%) diff --git a/.github/workflows/mamonsu-tests-dev.yml b/.github/workflows/mamonsu-tests-dev.yml index 6a09598..3f68f9b 100644 --- a/.github/workflows/mamonsu-tests-dev.yml +++ b/.github/workflows/mamonsu-tests-dev.yml @@ -61,7 +61,7 @@ jobs: echo "zabbix_address=$(hostname -I | awk '{print $1}')" >> $GITHUB_OUTPUT id: zabbix_address - name: Edit Zabbix address in agent.conf - run: sed -i "s/\(address *= *\).*/\1 ${{ steps.zabbix_address.outputs.zabbix_address }}/" ${{ env.MAMONSU_PATH }}/github-actions-tests/sources/agent_3.5.5.conf + run: sed -i "s/\(address *= *\).*/\1 ${{ steps.zabbix_address.outputs.zabbix_address }}/" ${{ env.MAMONSU_PATH }}/github-actions-tests/sources/agent_3.5.6.conf - name: Copy test scripts to container run: docker exec $( echo "${{ matrix.docker_os }}" | sed 's/://' | sed 's/\.//' ) mkdir -p -m 755 /mamonsu/ diff --git a/.github/workflows/mamonsu-tests-master.yml b/.github/workflows/mamonsu-tests-master.yml index e10ecec..bdc9b87 100644 --- a/.github/workflows/mamonsu-tests-master.yml +++ b/.github/workflows/mamonsu-tests-master.yml @@ -65,7 +65,7 @@ jobs: echo "zabbix_address=$(hostname -I | awk '{print $1}')" >> $GITHUB_OUTPUT id: zabbix_address - name: Edit Zabbix address in agent.conf - run: sed -i "s/\(address *= *\).*/\1 ${{ steps.zabbix_address.outputs.zabbix_address }}/" ${{ env.MAMONSU_PATH }}/github-actions-tests/sources/agent_3.5.5.conf + run: sed -i "s/\(address *= *\).*/\1 ${{ steps.zabbix_address.outputs.zabbix_address }}/" ${{ env.MAMONSU_PATH }}/github-actions-tests/sources/agent_3.5.6.conf - name: Copy test scripts to container run: docker exec $( echo "${{ matrix.docker_os }}" | sed 's/://' | sed 's/\.//' ) mkdir -p -m 755 /mamonsu/ diff --git a/github-actions-tests/mamonsu_build.sh b/github-actions-tests/mamonsu_build.sh index f96d2b2..9bc41a8 100644 --- a/github-actions-tests/mamonsu_build.sh +++ b/github-actions-tests/mamonsu_build.sh @@ -41,7 +41,7 @@ if [ "${OS%:*}" = "centos" ]; then python3 setup.py build && python3 setup.py install make rpm sudo rpm -i ./mamonsu*.rpm - cat /mamonsu/github-actions-tests/sources/agent_3.5.5.conf > /etc/mamonsu/agent.conf + cat /mamonsu/github-actions-tests/sources/agent_3.5.6.conf > /etc/mamonsu/agent.conf systemctl daemon-reload systemctl restart mamonsu sleep 5 @@ -64,7 +64,7 @@ elif [ "${OS%:*}" = "ubuntu" ]; then python3 setup.py build && python3 setup.py install make deb sudo dpkg -i ./mamonsu*.deb - cat /mamonsu/github-actions-tests/sources/agent_3.5.5.conf > /etc/mamonsu/agent.conf + cat /mamonsu/github-actions-tests/sources/agent_3.5.6.conf > /etc/mamonsu/agent.conf service mamonsu restart sleep 5 echo && echo && echo "mamonsu version:" diff --git a/github-actions-tests/sources/agent_3.5.5.conf b/github-actions-tests/sources/agent_3.5.6.conf similarity index 100% rename from github-actions-tests/sources/agent_3.5.5.conf rename to github-actions-tests/sources/agent_3.5.6.conf diff --git a/mamonsu/__init__.py b/mamonsu/__init__.py index 458c253..fd51313 100644 --- a/mamonsu/__init__.py +++ b/mamonsu/__init__.py @@ -1,7 +1,7 @@ __author__ = 'Dmitry Vasilyev' __author_email__ = 'info@postgrespro.ru' __description__ = 'Monitoring agent for PostgreSQL' -__version__ = '3.5.5' +__version__ = '3.5.6' __licence__ = 'BSD' __url__ = 'https://github.com/postgrespro/mamonsu' diff --git a/packaging/debian/changelog b/packaging/debian/changelog index 64a6fdc..572ab19 100644 --- a/packaging/debian/changelog +++ b/packaging/debian/changelog @@ -1,3 +1,6 @@ +mamonsu (3.5.6-1) stable; urgency=low + * changed pg_locks plugin metrics names. Warning: custom user-defined triggers and processing functions may be broken if they use item.name parameter.; + mamonsu (3.5.5-1) stable; urgency=low * fixed types mismatch for pgpro_stats and pg_wait_sampling; diff --git a/packaging/rpm/SPECS/mamonsu.spec b/packaging/rpm/SPECS/mamonsu.spec index 37d3e98..bfd0df7 100644 --- a/packaging/rpm/SPECS/mamonsu.spec +++ b/packaging/rpm/SPECS/mamonsu.spec @@ -1,5 +1,5 @@ Name: mamonsu -Version: 3.5.5 +Version: 3.5.6 Release: 1%{?dist} Summary: Monitoring agent for PostgreSQL Group: Applications/Internet @@ -73,6 +73,9 @@ chown -R mamonsu.mamonsu /var/log/mamonsu chown -R mamonsu.mamonsu /etc/mamonsu %changelog +* Thu Jan 11 2024 Alexandra Kuznetsova - 3.5.6-1 + - changed pg_locks plugin metrics names. Warning: custom user-defined triggers and processing functions may be broken if they use item.name parameter.; + * Tue Jun 13 2023 Alexandra Kuznetsova - 3.5.5-1 - fixed types mismatch for pgpro_stats and pg_wait_sampling; diff --git a/packaging/win/mamonsu.def.nsh b/packaging/win/mamonsu.def.nsh index 91851a7..22b5c68 100644 --- a/packaging/win/mamonsu.def.nsh +++ b/packaging/win/mamonsu.def.nsh @@ -1,5 +1,5 @@ !define NAME Mamonsu -!define VERSION 3.5.5 +!define VERSION 3.5.6 !define MAMONSU_REG_PATH "Software\PostgresPro\Mamonsu" !define MAMONSU_REG_UNINSTALLER_PATH "Software\Microsoft\Windows\CurrentVersion\Uninstall" !define EDB_REG "SOFTWARE\Postgresql" From 7fa00edf7e3acd226cb8365121c5808a25f75f88 Mon Sep 17 00:00:00 2001 From: cuprumtan Date: Thu, 11 Jan 2024 14:17:41 +0500 Subject: [PATCH 062/106] cicd: fix pg_version parameter --- .github/workflows/mamonsu-tests-dev.yml | 2 +- .github/workflows/mamonsu-tests-master.yml | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/mamonsu-tests-dev.yml b/.github/workflows/mamonsu-tests-dev.yml index 3f68f9b..270771a 100644 --- a/.github/workflows/mamonsu-tests-dev.yml +++ b/.github/workflows/mamonsu-tests-dev.yml @@ -28,7 +28,7 @@ jobs: matrix: docker_os: ['centos:7'] zabbix_version: ['6.2.6'] - pg_version: ['11', '12', '13', '14'] + pg_version: ['12', '13', '14', '15', '16'] steps: - name: Checkout mamonsu repo diff --git a/.github/workflows/mamonsu-tests-master.yml b/.github/workflows/mamonsu-tests-master.yml index bdc9b87..dacb866 100644 --- a/.github/workflows/mamonsu-tests-master.yml +++ b/.github/workflows/mamonsu-tests-master.yml @@ -28,11 +28,11 @@ jobs: matrix: docker_os: ['ubuntu:20.04', 'centos:7'] zabbix_version: ['4.0.44', '4.4.10', '5.0.30', '5.4.12', '6.0.12', '6.2.6'] - pg_version: ['11', '12', '13', '14', '15'] + pg_version: ['12', '13', '14', '15', '16'] exclude: - # excludes PG 15 on CentOS + # excludes PG 15, 16 on CentOS - docker_os: 'centos:7' - pg_version: '15' + pg_version: ['15', '16'] steps: - name: Checkout mamonsu repo From 41144d16d5d41710beb81a3e41cec37c2fb09589 Mon Sep 17 00:00:00 2001 From: cuprumtan Date: Thu, 11 Jan 2024 14:27:32 +0500 Subject: [PATCH 063/106] cicd: fix pg_version parameter --- .github/workflows/mamonsu-tests-master.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/mamonsu-tests-master.yml b/.github/workflows/mamonsu-tests-master.yml index dacb866..17c8998 100644 --- a/.github/workflows/mamonsu-tests-master.yml +++ b/.github/workflows/mamonsu-tests-master.yml @@ -32,7 +32,9 @@ jobs: exclude: # excludes PG 15, 16 on CentOS - docker_os: 'centos:7' - pg_version: ['15', '16'] + pg_version: '15' + - docker_os: 'centos:7' + pg_version: '16' steps: - name: Checkout mamonsu repo From 268a2b40be25eeb08c44e48d1b1e1498667a6c2d Mon Sep 17 00:00:00 2001 From: cuprumtan Date: Thu, 11 Jan 2024 14:14:20 +0500 Subject: [PATCH 064/106] build: upgrade to 3.5.6 --- .github/workflows/mamonsu-tests-dev.yml | 2 +- .github/workflows/mamonsu-tests-master.yml | 2 +- github-actions-tests/mamonsu_build.sh | 4 ++-- .../sources/{agent_3.5.5.conf => agent_3.5.6.conf} | 0 mamonsu/__init__.py | 2 +- packaging/debian/changelog | 3 +++ packaging/rpm/SPECS/mamonsu.spec | 5 ++++- packaging/win/mamonsu.def.nsh | 2 +- 8 files changed, 13 insertions(+), 7 deletions(-) rename github-actions-tests/sources/{agent_3.5.5.conf => agent_3.5.6.conf} (100%) diff --git a/.github/workflows/mamonsu-tests-dev.yml b/.github/workflows/mamonsu-tests-dev.yml index 6a09598..3f68f9b 100644 --- a/.github/workflows/mamonsu-tests-dev.yml +++ b/.github/workflows/mamonsu-tests-dev.yml @@ -61,7 +61,7 @@ jobs: echo "zabbix_address=$(hostname -I | awk '{print $1}')" >> $GITHUB_OUTPUT id: zabbix_address - name: Edit Zabbix address in agent.conf - run: sed -i "s/\(address *= *\).*/\1 ${{ steps.zabbix_address.outputs.zabbix_address }}/" ${{ env.MAMONSU_PATH }}/github-actions-tests/sources/agent_3.5.5.conf + run: sed -i "s/\(address *= *\).*/\1 ${{ steps.zabbix_address.outputs.zabbix_address }}/" ${{ env.MAMONSU_PATH }}/github-actions-tests/sources/agent_3.5.6.conf - name: Copy test scripts to container run: docker exec $( echo "${{ matrix.docker_os }}" | sed 's/://' | sed 's/\.//' ) mkdir -p -m 755 /mamonsu/ diff --git a/.github/workflows/mamonsu-tests-master.yml b/.github/workflows/mamonsu-tests-master.yml index e10ecec..bdc9b87 100644 --- a/.github/workflows/mamonsu-tests-master.yml +++ b/.github/workflows/mamonsu-tests-master.yml @@ -65,7 +65,7 @@ jobs: echo "zabbix_address=$(hostname -I | awk '{print $1}')" >> $GITHUB_OUTPUT id: zabbix_address - name: Edit Zabbix address in agent.conf - run: sed -i "s/\(address *= *\).*/\1 ${{ steps.zabbix_address.outputs.zabbix_address }}/" ${{ env.MAMONSU_PATH }}/github-actions-tests/sources/agent_3.5.5.conf + run: sed -i "s/\(address *= *\).*/\1 ${{ steps.zabbix_address.outputs.zabbix_address }}/" ${{ env.MAMONSU_PATH }}/github-actions-tests/sources/agent_3.5.6.conf - name: Copy test scripts to container run: docker exec $( echo "${{ matrix.docker_os }}" | sed 's/://' | sed 's/\.//' ) mkdir -p -m 755 /mamonsu/ diff --git a/github-actions-tests/mamonsu_build.sh b/github-actions-tests/mamonsu_build.sh index f96d2b2..9bc41a8 100644 --- a/github-actions-tests/mamonsu_build.sh +++ b/github-actions-tests/mamonsu_build.sh @@ -41,7 +41,7 @@ if [ "${OS%:*}" = "centos" ]; then python3 setup.py build && python3 setup.py install make rpm sudo rpm -i ./mamonsu*.rpm - cat /mamonsu/github-actions-tests/sources/agent_3.5.5.conf > /etc/mamonsu/agent.conf + cat /mamonsu/github-actions-tests/sources/agent_3.5.6.conf > /etc/mamonsu/agent.conf systemctl daemon-reload systemctl restart mamonsu sleep 5 @@ -64,7 +64,7 @@ elif [ "${OS%:*}" = "ubuntu" ]; then python3 setup.py build && python3 setup.py install make deb sudo dpkg -i ./mamonsu*.deb - cat /mamonsu/github-actions-tests/sources/agent_3.5.5.conf > /etc/mamonsu/agent.conf + cat /mamonsu/github-actions-tests/sources/agent_3.5.6.conf > /etc/mamonsu/agent.conf service mamonsu restart sleep 5 echo && echo && echo "mamonsu version:" diff --git a/github-actions-tests/sources/agent_3.5.5.conf b/github-actions-tests/sources/agent_3.5.6.conf similarity index 100% rename from github-actions-tests/sources/agent_3.5.5.conf rename to github-actions-tests/sources/agent_3.5.6.conf diff --git a/mamonsu/__init__.py b/mamonsu/__init__.py index 458c253..fd51313 100644 --- a/mamonsu/__init__.py +++ b/mamonsu/__init__.py @@ -1,7 +1,7 @@ __author__ = 'Dmitry Vasilyev' __author_email__ = 'info@postgrespro.ru' __description__ = 'Monitoring agent for PostgreSQL' -__version__ = '3.5.5' +__version__ = '3.5.6' __licence__ = 'BSD' __url__ = 'https://github.com/postgrespro/mamonsu' diff --git a/packaging/debian/changelog b/packaging/debian/changelog index 64a6fdc..572ab19 100644 --- a/packaging/debian/changelog +++ b/packaging/debian/changelog @@ -1,3 +1,6 @@ +mamonsu (3.5.6-1) stable; urgency=low + * changed pg_locks plugin metrics names. Warning: custom user-defined triggers and processing functions may be broken if they use item.name parameter.; + mamonsu (3.5.5-1) stable; urgency=low * fixed types mismatch for pgpro_stats and pg_wait_sampling; diff --git a/packaging/rpm/SPECS/mamonsu.spec b/packaging/rpm/SPECS/mamonsu.spec index 37d3e98..bfd0df7 100644 --- a/packaging/rpm/SPECS/mamonsu.spec +++ b/packaging/rpm/SPECS/mamonsu.spec @@ -1,5 +1,5 @@ Name: mamonsu -Version: 3.5.5 +Version: 3.5.6 Release: 1%{?dist} Summary: Monitoring agent for PostgreSQL Group: Applications/Internet @@ -73,6 +73,9 @@ chown -R mamonsu.mamonsu /var/log/mamonsu chown -R mamonsu.mamonsu /etc/mamonsu %changelog +* Thu Jan 11 2024 Alexandra Kuznetsova - 3.5.6-1 + - changed pg_locks plugin metrics names. Warning: custom user-defined triggers and processing functions may be broken if they use item.name parameter.; + * Tue Jun 13 2023 Alexandra Kuznetsova - 3.5.5-1 - fixed types mismatch for pgpro_stats and pg_wait_sampling; diff --git a/packaging/win/mamonsu.def.nsh b/packaging/win/mamonsu.def.nsh index 91851a7..22b5c68 100644 --- a/packaging/win/mamonsu.def.nsh +++ b/packaging/win/mamonsu.def.nsh @@ -1,5 +1,5 @@ !define NAME Mamonsu -!define VERSION 3.5.5 +!define VERSION 3.5.6 !define MAMONSU_REG_PATH "Software\PostgresPro\Mamonsu" !define MAMONSU_REG_UNINSTALLER_PATH "Software\Microsoft\Windows\CurrentVersion\Uninstall" !define EDB_REG "SOFTWARE\Postgresql" From 2f157c364856cc0cefcd3d372800d4ce2d2f306c Mon Sep 17 00:00:00 2001 From: cuprumtan Date: Thu, 11 Jan 2024 14:17:41 +0500 Subject: [PATCH 065/106] cicd: fix pg_version parameter --- .github/workflows/mamonsu-tests-dev.yml | 2 +- .github/workflows/mamonsu-tests-master.yml | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/mamonsu-tests-dev.yml b/.github/workflows/mamonsu-tests-dev.yml index 3f68f9b..270771a 100644 --- a/.github/workflows/mamonsu-tests-dev.yml +++ b/.github/workflows/mamonsu-tests-dev.yml @@ -28,7 +28,7 @@ jobs: matrix: docker_os: ['centos:7'] zabbix_version: ['6.2.6'] - pg_version: ['11', '12', '13', '14'] + pg_version: ['12', '13', '14', '15', '16'] steps: - name: Checkout mamonsu repo diff --git a/.github/workflows/mamonsu-tests-master.yml b/.github/workflows/mamonsu-tests-master.yml index bdc9b87..dacb866 100644 --- a/.github/workflows/mamonsu-tests-master.yml +++ b/.github/workflows/mamonsu-tests-master.yml @@ -28,11 +28,11 @@ jobs: matrix: docker_os: ['ubuntu:20.04', 'centos:7'] zabbix_version: ['4.0.44', '4.4.10', '5.0.30', '5.4.12', '6.0.12', '6.2.6'] - pg_version: ['11', '12', '13', '14', '15'] + pg_version: ['12', '13', '14', '15', '16'] exclude: - # excludes PG 15 on CentOS + # excludes PG 15, 16 on CentOS - docker_os: 'centos:7' - pg_version: '15' + pg_version: ['15', '16'] steps: - name: Checkout mamonsu repo From 341d2f1891eaf428eede0b357e6589d7b59e0c04 Mon Sep 17 00:00:00 2001 From: cuprumtan Date: Thu, 11 Jan 2024 14:27:32 +0500 Subject: [PATCH 066/106] cicd: fix pg_version parameter --- .github/workflows/mamonsu-tests-master.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/mamonsu-tests-master.yml b/.github/workflows/mamonsu-tests-master.yml index dacb866..17c8998 100644 --- a/.github/workflows/mamonsu-tests-master.yml +++ b/.github/workflows/mamonsu-tests-master.yml @@ -32,7 +32,9 @@ jobs: exclude: # excludes PG 15, 16 on CentOS - docker_os: 'centos:7' - pg_version: ['15', '16'] + pg_version: '15' + - docker_os: 'centos:7' + pg_version: '16' steps: - name: Checkout mamonsu repo From 7f87b0aebd57da98c6e066674d1c2fbc0d9aa431 Mon Sep 17 00:00:00 2001 From: Maxim Styushin Date: Wed, 3 Apr 2024 22:17:43 +0400 Subject: [PATCH 067/106] cicd: fix failed builds - fix broken packages issue for Postgres 15 - add Postrges 16 to the test matrix - add CentOS 8 to the test matrix - bump Zabbix Server version from 6.2.6 to 6.2.9 --- .github/workflows/mamonsu-tests-dev.yml | 23 +++++++++++++++++----- .github/workflows/mamonsu-tests-master.yml | 22 ++++++++++++++++----- github-actions-tests/tests.sh | 6 +++++- 3 files changed, 40 insertions(+), 11 deletions(-) diff --git a/.github/workflows/mamonsu-tests-dev.yml b/.github/workflows/mamonsu-tests-dev.yml index 270771a..71e3769 100644 --- a/.github/workflows/mamonsu-tests-dev.yml +++ b/.github/workflows/mamonsu-tests-dev.yml @@ -26,9 +26,22 @@ jobs: MAMONSU_PATH: '/home/runner/work/mamonsu/mamonsu/' strategy: matrix: - docker_os: ['centos:7'] - zabbix_version: ['6.2.6'] - pg_version: ['12', '13', '14', '15', '16'] + docker_os: ['centos:7', 'centos:8'] + zabbix_version: ['6.2.9'] + pg_version: ['12', '13', '14', '15'] + include: + - docker_os: 'centos:8' + pg_version: '16' + zabbix_version: '6.2.9' + exclude: + - docker_os: 'centos:8' + pg_version: '12' + - docker_os: 'centos:8' + pg_version: '13' + - docker_os: 'centos:8' + pg_version: '14' + - docker_os: 'centos:8' + pg_version: '15' steps: - name: Checkout mamonsu repo @@ -36,7 +49,7 @@ jobs: - name: Install docker-compose run: sudo apt-get update - - run: sudo rm /usr/local/bin/docker-compose + - run: sudo rm -f /usr/local/bin/docker-compose - run: curl -L https://github.com/docker/compose/releases/download/${{ env.DOCKER_COMPOSE_VERSION }}/docker-compose-`uname -s`-`uname -m` > docker-compose - run: chmod +x docker-compose - run: sudo mv docker-compose /usr/local/bin @@ -91,4 +104,4 @@ jobs: run: docker exec $( echo "${{ matrix.docker_os }}" | sed 's/://' | sed 's/\.//' ) bash /mamonsu/github-actions-tests/metrics.sh --pg-version="${{ matrix.pg_version }}" --os="${{ matrix.docker_os }}" - name: Test Mamonsu removal - run: docker exec $( echo "${{ matrix.docker_os }}" | sed 's/://' | sed 's/\.//' ) bash /mamonsu/github-actions-tests/mamonsu_removal.sh --os="${{ matrix.docker_os }}" \ No newline at end of file + run: docker exec $( echo "${{ matrix.docker_os }}" | sed 's/://' | sed 's/\.//' ) bash /mamonsu/github-actions-tests/mamonsu_removal.sh --os="${{ matrix.docker_os }}" diff --git a/.github/workflows/mamonsu-tests-master.yml b/.github/workflows/mamonsu-tests-master.yml index 17c8998..cedc16e 100644 --- a/.github/workflows/mamonsu-tests-master.yml +++ b/.github/workflows/mamonsu-tests-master.yml @@ -26,15 +26,27 @@ jobs: MAMONSU_PATH: '/home/runner/work/mamonsu/mamonsu/' strategy: matrix: - docker_os: ['ubuntu:20.04', 'centos:7'] - zabbix_version: ['4.0.44', '4.4.10', '5.0.30', '5.4.12', '6.0.12', '6.2.6'] - pg_version: ['12', '13', '14', '15', '16'] + docker_os: ['ubuntu:20.04', 'centos:7', 'centos:8'] + zabbix_version: ['4.0.44', '4.4.10', '5.0.30', '5.4.12', '6.0.12', '6.2.9'] + pg_version: ['12', '13', '14', '15'] + include: + - docker_os: 'centos:8' + pg_version: '16' + zabbix_version: '6.2.9' exclude: # excludes PG 15, 16 on CentOS - docker_os: 'centos:7' pg_version: '15' - docker_os: 'centos:7' pg_version: '16' + - docker_os: 'centos:8' + pg_version: '12' + - docker_os: 'centos:8' + pg_version: '13' + - docker_os: 'centos:8' + pg_version: '14' + - docker_os: 'centos:8' + pg_version: '15' steps: - name: Checkout mamonsu repo @@ -42,7 +54,7 @@ jobs: - name: Install docker-compose run: sudo apt-get update - - run: sudo rm /usr/local/bin/docker-compose + - run: sudo rm -f /usr/local/bin/docker-compose - run: curl -L https://github.com/docker/compose/releases/download/${{ env.DOCKER_COMPOSE_VERSION }}/docker-compose-`uname -s`-`uname -m` > docker-compose - run: chmod +x docker-compose - run: sudo mv docker-compose /usr/local/bin @@ -97,4 +109,4 @@ jobs: run: docker exec $( echo "${{ matrix.docker_os }}" | sed 's/://' | sed 's/\.//' ) bash /mamonsu/github-actions-tests/metrics.sh --pg-version="${{ matrix.pg_version }}" --os="${{ matrix.docker_os }}" - name: Test Mamonsu removal - run: docker exec $( echo "${{ matrix.docker_os }}" | sed 's/://' | sed 's/\.//' ) bash /mamonsu/github-actions-tests/mamonsu_removal.sh --os="${{ matrix.docker_os }}" \ No newline at end of file + run: docker exec $( echo "${{ matrix.docker_os }}" | sed 's/://' | sed 's/\.//' ) bash /mamonsu/github-actions-tests/mamonsu_removal.sh --os="${{ matrix.docker_os }}" diff --git a/github-actions-tests/tests.sh b/github-actions-tests/tests.sh index 7f45371..8374448 100644 --- a/github-actions-tests/tests.sh +++ b/github-actions-tests/tests.sh @@ -43,13 +43,16 @@ if [ "${OS}" = "centos:7" ]; then eval "${PACKAGE_MANAGER_INSTALL} wget" eval "${PACKAGE_MANAGER_INSTALL} bc" eval "${PACKAGE_MANAGER_INSTALL} unzip" - REPO=${PACKAGE_MANAGER_INSTALL}" https://download.postgresql.org/pub/repos/yum/reporpms/EL-"$(echo ${OS} | sed -r 's/^[^0-9]*([0-9]+).*/\1/')"-x86_64/pgdg-redhat-repo-latest.noarch.rpm" + eval "${PACKAGE_MANAGER_INSTALL} https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm" + REPO=${PACKAGE_MANAGER_INSTALL}" https://download.postgresql.org/pub/repos/yum/reporpms/EL-"$(echo ${OS} | sed -r 's/^[^0-9]*([0-9]+).*/\1/')"-x86_64/pgdg-redhat-repo-latest.noarch.rpm"\ # run tests sudo bash /mamonsu/github-actions-tests/pg_install.sh --os="${OS}" --pmi="${PACKAGE_MANAGER_INSTALL}" --repo="${REPO}" --pg-version="${PG_VERSION}" elif [ "${OS}" = "centos:8" ]; then # install and set up components missing in docker image (sudo, wget, bc, unzip) + sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-* + sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-* dnf update -y dnf install -y sudo PACKAGE_MANAGER_INSTALL="sudo dnf -y install" @@ -57,6 +60,7 @@ elif [ "${OS}" = "centos:8" ]; then eval "${PACKAGE_MANAGER_INSTALL} wget" eval "${PACKAGE_MANAGER_INSTALL} bc" eval "${PACKAGE_MANAGER_INSTALL} unzip" + eval "${PACKAGE_MANAGER_INSTALL} https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm" REPO=${PACKAGE_MANAGER_INSTALL}" https://download.postgresql.org/pub/repos/yum/reporpms/EL-8-x86_64/pgdg-redhat-repo-latest.noarch.rpm; sudo dnf -qy module disable postgresql" # run tests From 718d958b938b5befd845e09b16f171fd1f2cdb4b Mon Sep 17 00:00:00 2001 From: Maxim Styushin Date: Thu, 4 Apr 2024 18:02:39 +0400 Subject: [PATCH 068/106] fix: don't cache max_connections value --- mamonsu/plugins/pgsql/connections.py | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/mamonsu/plugins/pgsql/connections.py b/mamonsu/plugins/pgsql/connections.py index 992adf8..6a214da 100644 --- a/mamonsu/plugins/pgsql/connections.py +++ b/mamonsu/plugins/pgsql/connections.py @@ -37,8 +37,6 @@ class Connections(Plugin): WHERE (backend_type NOT IN ('{0}')); """.format("', '".join(default_backend_types)) - Max_connections = None - query_agent = """ SELECT count(*) FROM pg_catalog.pg_stat_activity @@ -125,14 +123,13 @@ def run(self, zbx): "(backend_type = 'client backend' OR backend_type = 'parallel worker')" if Pooler.server_version_greater( "10.0") else "state IS NOT NULL")) zbx.send("pgsql.connections[waiting]", int(result[0][0])) - if self.Max_connections is None: - result = Pooler.query(""" - SELECT setting - FROM pg_settings - WHERE name = 'max_connections'; - """) - self.Max_connections = result[0][0] - zbx.send("pgsql.connections[max_connections]", int(self.Max_connections)) + + result = Pooler.query(""" + SELECT setting + FROM pg_settings + WHERE name = 'max_connections'; + """) + zbx.send("pgsql.connections[max_connections]", int(result[0][0])) if Pooler.server_version_greater("10.0"): result = Pooler.query(self.query_other_connections) From 42c3eb5eb6e04fc44ddff0069ce9ece1d448de46 Mon Sep 17 00:00:00 2001 From: Maxim Styushin Date: Thu, 4 Apr 2024 20:59:33 +0400 Subject: [PATCH 069/106] fix: add support for Zabbix API v6.4 --- .github/workflows/mamonsu-tests-dev.yml | 3 +++ .github/workflows/mamonsu-tests-master.yml | 9 +++++++++ mamonsu/tools/zabbix_cli/request.py | 11 +++++++---- 3 files changed, 19 insertions(+), 4 deletions(-) diff --git a/.github/workflows/mamonsu-tests-dev.yml b/.github/workflows/mamonsu-tests-dev.yml index 71e3769..5dda97b 100644 --- a/.github/workflows/mamonsu-tests-dev.yml +++ b/.github/workflows/mamonsu-tests-dev.yml @@ -33,6 +33,9 @@ jobs: - docker_os: 'centos:8' pg_version: '16' zabbix_version: '6.2.9' + - docker_os: 'centos:8' + pg_version: '16' + zabbix_version: '6.4.13' exclude: - docker_os: 'centos:8' pg_version: '12' diff --git a/.github/workflows/mamonsu-tests-master.yml b/.github/workflows/mamonsu-tests-master.yml index cedc16e..b1934a7 100644 --- a/.github/workflows/mamonsu-tests-master.yml +++ b/.github/workflows/mamonsu-tests-master.yml @@ -33,6 +33,15 @@ jobs: - docker_os: 'centos:8' pg_version: '16' zabbix_version: '6.2.9' + - docker_os: 'centos:8' + pg_version: '16' + zabbix_version: '6.4.13' + - docker_os: 'ubuntu:20.04' + pg_version: '16' + zabbix_version: '6.4.13' + - docker_os: 'ubuntu:20.04' + pg_version: '15' + zabbix_version: '6.4.13' exclude: # excludes PG 15, 16 on CentOS - docker_os: 'centos:7' diff --git a/mamonsu/tools/zabbix_cli/request.py b/mamonsu/tools/zabbix_cli/request.py index 01bb126..5b83427 100644 --- a/mamonsu/tools/zabbix_cli/request.py +++ b/mamonsu/tools/zabbix_cli/request.py @@ -5,6 +5,7 @@ from collections import OrderedDict +from distutils.version import LooseVersion import urllib.request as urllib2 @@ -13,20 +14,22 @@ class Request(object): def __init__(self, url, user, passwd): self._url, self._user, self._passwd = url, user, passwd self._id, self._auth_tocken = 0, None - + self._api_version = self.post(method='apiinfo.version', params=[]) + def set_user(self, user): self._user=user - + def set_passwd(self, passwd): self._passwd=passwd - + def _auth(self): if self._auth_tocken is None: if not self._user: return None + user_field = 'user' if LooseVersion(self._api_version) < LooseVersion('6.4') else 'username' self._auth_tocken = self.post( 'user.login', - {'user': self._user, 'password': self._passwd}) + {user_field: self._user, 'password': self._passwd}) return self._auth_tocken def _get_id(self): From 0190077cdb76defe3083223412ae1d10f54dc6ff Mon Sep 17 00:00:00 2001 From: Maxim Styushin Date: Thu, 4 Apr 2024 21:31:10 +0400 Subject: [PATCH 070/106] doc: update supported versions in README --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 31d9fa7..df7611c 100644 --- a/README.md +++ b/README.md @@ -17,8 +17,8 @@ Supported platforms: - FreeBSD; - Windows; -Supported Zabbix server versions: 3.0 - 6.0 -Supported PostgreSQL versions: 9.5 - 14 +Supported Zabbix server versions: 4.0.44 - 6.4.13 +Supported PostgreSQL versions: 12 - 16 *** ***Table of Contents*** From c85d5a41c8fd2d47a8cc51598c5176b97e295927 Mon Sep 17 00:00:00 2001 From: Maxim Styushin Date: Thu, 4 Apr 2024 21:32:47 +0400 Subject: [PATCH 071/106] build: update logrotate rules - fix mamonsu log path for default rule - remove deprecated rules --- packaging/rpm/SOURCES/mamonsu-logrotate.in | 27 ++++------------------ 1 file changed, 5 insertions(+), 22 deletions(-) diff --git a/packaging/rpm/SOURCES/mamonsu-logrotate.in b/packaging/rpm/SOURCES/mamonsu-logrotate.in index 22fee28..31bc8ac 100644 --- a/packaging/rpm/SOURCES/mamonsu-logrotate.in +++ b/packaging/rpm/SOURCES/mamonsu-logrotate.in @@ -1,16 +1,3 @@ -/var/log/mamonsu/agent.log { - daily - rotate 7 - compress - missingok - notifempty - create 0640 mamonsu mamonsu - sharedscripts - postrotate - [ -e /var/run/mamonsu/mamonsu.pid ] && /etc/init.d/mamonsu restart >/dev/null - endscript -} - /var/log/mamonsu/mamonsu.log { daily rotate 7 @@ -20,15 +7,11 @@ create 0640 mamonsu mamonsu sharedscripts postrotate - [ -e /var/run/mamonsu/mamonsu.pid ] && /etc/init.d/mamonsu restart >/dev/null + if [ -d "/run/systemd/system" -a -x "/bin/systemctl" ]; then + /bin/systemctl condrestart mamonsu >/dev/null + else + /etc/init.d/mamonsu condrestart >/dev/null + fi endscript } -/var/log/mamonsu/localhost.log { - daily - rotate 7 - compress - missingok - notifempty - create 0640 mamonsu mamonsu -} From 63c28873872f8bd15b4754bdb574d8cc32d6b36a Mon Sep 17 00:00:00 2001 From: Maxim Styushin Date: Fri, 5 Apr 2024 15:46:51 +0400 Subject: [PATCH 072/106] build: upgrade to 3.5.7 --- .github/workflows/mamonsu-tests-dev.yml | 2 +- .github/workflows/mamonsu-tests-master.yml | 2 +- github-actions-tests/mamonsu_build.sh | 4 ++-- .../sources/{agent_3.5.6.conf => agent_3.5.7.conf} | 0 mamonsu/__init__.py | 2 +- packaging/debian/changelog | 5 +++++ packaging/rpm/SPECS/mamonsu.spec | 7 ++++++- packaging/win/mamonsu.def.nsh | 2 +- 8 files changed, 17 insertions(+), 7 deletions(-) rename github-actions-tests/sources/{agent_3.5.6.conf => agent_3.5.7.conf} (100%) diff --git a/.github/workflows/mamonsu-tests-dev.yml b/.github/workflows/mamonsu-tests-dev.yml index 5dda97b..216aa5b 100644 --- a/.github/workflows/mamonsu-tests-dev.yml +++ b/.github/workflows/mamonsu-tests-dev.yml @@ -77,7 +77,7 @@ jobs: echo "zabbix_address=$(hostname -I | awk '{print $1}')" >> $GITHUB_OUTPUT id: zabbix_address - name: Edit Zabbix address in agent.conf - run: sed -i "s/\(address *= *\).*/\1 ${{ steps.zabbix_address.outputs.zabbix_address }}/" ${{ env.MAMONSU_PATH }}/github-actions-tests/sources/agent_3.5.6.conf + run: sed -i "s/\(address *= *\).*/\1 ${{ steps.zabbix_address.outputs.zabbix_address }}/" ${{ env.MAMONSU_PATH }}/github-actions-tests/sources/agent_3.5.7.conf - name: Copy test scripts to container run: docker exec $( echo "${{ matrix.docker_os }}" | sed 's/://' | sed 's/\.//' ) mkdir -p -m 755 /mamonsu/ diff --git a/.github/workflows/mamonsu-tests-master.yml b/.github/workflows/mamonsu-tests-master.yml index b1934a7..aaf2aec 100644 --- a/.github/workflows/mamonsu-tests-master.yml +++ b/.github/workflows/mamonsu-tests-master.yml @@ -88,7 +88,7 @@ jobs: echo "zabbix_address=$(hostname -I | awk '{print $1}')" >> $GITHUB_OUTPUT id: zabbix_address - name: Edit Zabbix address in agent.conf - run: sed -i "s/\(address *= *\).*/\1 ${{ steps.zabbix_address.outputs.zabbix_address }}/" ${{ env.MAMONSU_PATH }}/github-actions-tests/sources/agent_3.5.6.conf + run: sed -i "s/\(address *= *\).*/\1 ${{ steps.zabbix_address.outputs.zabbix_address }}/" ${{ env.MAMONSU_PATH }}/github-actions-tests/sources/agent_3.5.7.conf - name: Copy test scripts to container run: docker exec $( echo "${{ matrix.docker_os }}" | sed 's/://' | sed 's/\.//' ) mkdir -p -m 755 /mamonsu/ diff --git a/github-actions-tests/mamonsu_build.sh b/github-actions-tests/mamonsu_build.sh index 9bc41a8..ec2a427 100644 --- a/github-actions-tests/mamonsu_build.sh +++ b/github-actions-tests/mamonsu_build.sh @@ -41,7 +41,7 @@ if [ "${OS%:*}" = "centos" ]; then python3 setup.py build && python3 setup.py install make rpm sudo rpm -i ./mamonsu*.rpm - cat /mamonsu/github-actions-tests/sources/agent_3.5.6.conf > /etc/mamonsu/agent.conf + cat /mamonsu/github-actions-tests/sources/agent_3.5.7.conf > /etc/mamonsu/agent.conf systemctl daemon-reload systemctl restart mamonsu sleep 5 @@ -64,7 +64,7 @@ elif [ "${OS%:*}" = "ubuntu" ]; then python3 setup.py build && python3 setup.py install make deb sudo dpkg -i ./mamonsu*.deb - cat /mamonsu/github-actions-tests/sources/agent_3.5.6.conf > /etc/mamonsu/agent.conf + cat /mamonsu/github-actions-tests/sources/agent_3.5.7.conf > /etc/mamonsu/agent.conf service mamonsu restart sleep 5 echo && echo && echo "mamonsu version:" diff --git a/github-actions-tests/sources/agent_3.5.6.conf b/github-actions-tests/sources/agent_3.5.7.conf similarity index 100% rename from github-actions-tests/sources/agent_3.5.6.conf rename to github-actions-tests/sources/agent_3.5.7.conf diff --git a/mamonsu/__init__.py b/mamonsu/__init__.py index fd51313..1aebc34 100644 --- a/mamonsu/__init__.py +++ b/mamonsu/__init__.py @@ -1,7 +1,7 @@ __author__ = 'Dmitry Vasilyev' __author_email__ = 'info@postgrespro.ru' __description__ = 'Monitoring agent for PostgreSQL' -__version__ = '3.5.6' +__version__ = '3.5.7' __licence__ = 'BSD' __url__ = 'https://github.com/postgrespro/mamonsu' diff --git a/packaging/debian/changelog b/packaging/debian/changelog index 572ab19..8b5b7c2 100644 --- a/packaging/debian/changelog +++ b/packaging/debian/changelog @@ -1,3 +1,8 @@ +mamonsu (3.5.7-1) stable; urgency=low + * added support for Zabbix 6.4 API: handle deprecated parameters for auth request; + * removed caching of pgsql.connections[max_connections] metric; + * update default logrotate rules; + mamonsu (3.5.6-1) stable; urgency=low * changed pg_locks plugin metrics names. Warning: custom user-defined triggers and processing functions may be broken if they use item.name parameter.; diff --git a/packaging/rpm/SPECS/mamonsu.spec b/packaging/rpm/SPECS/mamonsu.spec index bfd0df7..8246349 100644 --- a/packaging/rpm/SPECS/mamonsu.spec +++ b/packaging/rpm/SPECS/mamonsu.spec @@ -1,5 +1,5 @@ Name: mamonsu -Version: 3.5.6 +Version: 3.5.7 Release: 1%{?dist} Summary: Monitoring agent for PostgreSQL Group: Applications/Internet @@ -73,6 +73,11 @@ chown -R mamonsu.mamonsu /var/log/mamonsu chown -R mamonsu.mamonsu /etc/mamonsu %changelog +* Fri Apr 5 2024 Maxim Styushin - 3.5.7-1 + - added support for Zabbix 6.4 API: handle deprecated parameters for auth request; + - removed caching of pgsql.connections[max_connections] metric; + - update default logrotate rules; + * Thu Jan 11 2024 Alexandra Kuznetsova - 3.5.6-1 - changed pg_locks plugin metrics names. Warning: custom user-defined triggers and processing functions may be broken if they use item.name parameter.; diff --git a/packaging/win/mamonsu.def.nsh b/packaging/win/mamonsu.def.nsh index 22b5c68..1d638c4 100644 --- a/packaging/win/mamonsu.def.nsh +++ b/packaging/win/mamonsu.def.nsh @@ -1,5 +1,5 @@ !define NAME Mamonsu -!define VERSION 3.5.6 +!define VERSION 3.5.7 !define MAMONSU_REG_PATH "Software\PostgresPro\Mamonsu" !define MAMONSU_REG_UNINSTALLER_PATH "Software\Microsoft\Windows\CurrentVersion\Uninstall" !define EDB_REG "SOFTWARE\Postgresql" From a2cd6b94ec19f652fdd271b2dc1c24285e49dce6 Mon Sep 17 00:00:00 2001 From: Maxim Styushin Date: Mon, 15 Apr 2024 20:10:38 +0400 Subject: [PATCH 073/106] fix: remove deprecated distutils imports --- mamonsu/plugins/pgsql/driver/pg8000/core.py | 8 ++-- mamonsu/plugins/pgsql/driver/pool.py | 38 +++++++++---------- .../plugins/pgsql/memory_leak_diagnostic.py | 4 +- mamonsu/plugins/pgsql/replication.py | 4 +- mamonsu/tools/zabbix_cli/operations.py | 8 ++-- mamonsu/tools/zabbix_cli/request.py | 4 +- 6 files changed, 33 insertions(+), 33 deletions(-) diff --git a/mamonsu/plugins/pgsql/driver/pg8000/core.py b/mamonsu/plugins/pgsql/driver/pg8000/core.py index d29c627..9e6d069 100755 --- a/mamonsu/plugins/pgsql/driver/pg8000/core.py +++ b/mamonsu/plugins/pgsql/driver/pg8000/core.py @@ -2,7 +2,7 @@ from collections import defaultdict, deque from datetime import datetime as Datetime from decimal import Decimal -from distutils.version import LooseVersion +from pkg_resources import packaging from hashlib import md5 from itertools import count, islice from struct import Struct @@ -1416,11 +1416,11 @@ def handle_PARAMETER_STATUS(self, data, ps): pass elif key == b"server_version": - self._server_version = LooseVersion(value.decode('ascii')) - if self._server_version < LooseVersion('8.2.0'): + self._server_version = packaging.version.parse(value.decode('ascii')) + if self._server_version < packaging.version.parse('8.2.0'): self._commands_with_count = ( b"INSERT", b"DELETE", b"UPDATE", b"MOVE") - elif self._server_version < LooseVersion('9.0.0'): + elif self._server_version < packaging.version.parse('9.0.0'): self._commands_with_count = ( b"INSERT", b"DELETE", b"UPDATE", b"MOVE", b"FETCH", b"COPY") diff --git a/mamonsu/plugins/pgsql/driver/pool.py b/mamonsu/plugins/pgsql/driver/pool.py index 1f39e52..7c402d5 100644 --- a/mamonsu/plugins/pgsql/driver/pool.py +++ b/mamonsu/plugins/pgsql/driver/pool.py @@ -1,4 +1,4 @@ -from distutils.version import LooseVersion +from pkg_resources import packaging from .connection import Connection, ConnectionInfo @@ -132,19 +132,19 @@ def server_version(self, db=None): def server_version_greater(self, version, db=None): db = self._normalize_db(db) - return self.server_version(db) >= LooseVersion(version) + return packaging.version.parse(self.server_version(db)) >= packaging.version.parse(version) def server_version_less(self, version, db=None): db = self._normalize_db(db) - return self.server_version(db) <= LooseVersion(version) + return packaging.version.parse(self.server_version(db)) <= packaging.version.parse(version) def bootstrap_version_greater(self, version): - return str( - self._cache["bootstrap"]["version"]) >= LooseVersion(version) + return packaging.version.parse( + str(self._cache["bootstrap"]["version"])) >= packaging.version.parse(version) def bootstrap_version_less(self, version): - return str( - self._cache["bootstrap"]["version"]) <= LooseVersion(version) + return packaging.version.parse( + str(self._cache["bootstrap"]["version"])) <= packaging.version.parse(version) def in_recovery(self, db=None): db = self._normalize_db(db) @@ -166,8 +166,8 @@ def is_bootstraped(self, db=None): self._cache["bootstrap"]["counter"] = 0 # TODO: изменить на нормальное название, 'config' слишком общее sql = """ - SELECT count(*) - FROM pg_catalog.pg_class + SELECT count(*) + FROM pg_catalog.pg_class WHERE relname = 'config'; """ result = int(self.query(sql, db)[0][0]) @@ -175,7 +175,7 @@ def is_bootstraped(self, db=None): if self._cache["bootstrap"]["storage"][db]: self._connections[db].log.info("Found mamonsu bootstrap") sql = """ - SELECT max(version) + SELECT max(version) FROM mamonsu.config; """ self._cache["bootstrap"]["version"] = self.query(sql, db)[0][0] @@ -227,8 +227,8 @@ def is_pgpro_ee(self, db=None): def extension_installed(self, ext, db=None): db = self._normalize_db(db) result = self.query(""" - SELECT count(*) - FROM pg_catalog.pg_extension + SELECT count(*) + FROM pg_catalog.pg_extension WHERE lower(extname) = lower('{0}'); """.format(ext), db) return (int(result[0][0])) == 1 @@ -239,9 +239,9 @@ def extension_schema(self, extension, db=None): return self._cache["extension_schema"][extension][db] try: self._cache["extension_schema"][extension][db] = self.query(""" - SELECT n.nspname - FROM pg_extension e - JOIN pg_namespace n ON e.extnamespace = n.oid + SELECT n.nspname + FROM pg_extension e + JOIN pg_namespace n ON e.extnamespace = n.oid WHERE e.extname = '{0}' """.format(extension), db)[0][0] return self._cache["extension_schema"][extension][db] @@ -250,7 +250,7 @@ def extension_schema(self, extension, db=None): def databases(self): result, databases = self.query(""" - SELECT datname + SELECT datname FROM pg_catalog.pg_database; """), [] for row in result: @@ -309,13 +309,13 @@ def get_sys_param(self, param, db=None): db = self._normalize_db(db) if self.is_bootstraped() and self.bootstrap_version_greater("2.3.4"): result = self.query(""" - SELECT * + SELECT * FROM mamonsu.get_sys_param('{0}'); """.format(param))[0][0] else: result = self.query(""" - SELECT setting - FROM pg_catalog.pg_settings + SELECT setting + FROM pg_catalog.pg_settings WHERE name = '{0}'; """.format(param), db)[0][0] return result diff --git a/mamonsu/plugins/pgsql/memory_leak_diagnostic.py b/mamonsu/plugins/pgsql/memory_leak_diagnostic.py index a9da0a1..cb368a9 100644 --- a/mamonsu/plugins/pgsql/memory_leak_diagnostic.py +++ b/mamonsu/plugins/pgsql/memory_leak_diagnostic.py @@ -4,7 +4,7 @@ import os from .pool import Pooler import re -from distutils.version import LooseVersion +from pkg_resources import packaging import mamonsu.lib.platform as platform import posix @@ -91,7 +91,7 @@ def run(self, zbx): for row in Pooler.query(query=self.query): pids.append(row[0]) - if (LooseVersion(self.os_release) < LooseVersion("4.5") + if (packaging.version.parse(self.os_release) < packaging.version.parse("4.5") and not (self.os_name == "centos" and self.os_version == "7")) \ or (not self.os_name and not self.os_version): for pid in pids: diff --git a/mamonsu/plugins/pgsql/replication.py b/mamonsu/plugins/pgsql/replication.py index 3aa2ba4..0c53f5b 100644 --- a/mamonsu/plugins/pgsql/replication.py +++ b/mamonsu/plugins/pgsql/replication.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- from mamonsu.plugins.pgsql.plugin import PgsqlPlugin as Plugin -from distutils.version import LooseVersion +from pkg_resources import packaging from .pool import Pooler from mamonsu.lib.zbx_template import ZbxTemplate @@ -201,7 +201,7 @@ def discovery_rules(self, template, dashboard=False): def keys_and_queries(self, template_zabbix): result = [] - if LooseVersion(self.VersionPG) < LooseVersion("10"): + if packaging.version.parse(self.VersionPG) < packaging.version.parse("10"): result.append("{0},$2 $1 -c \"{1}\"".format("pgsql.replication_lag.sec[*]", self.query_agent_replication_lag.format( self.plugin_config("interval"), "xlog_receive_location", diff --git a/mamonsu/tools/zabbix_cli/operations.py b/mamonsu/tools/zabbix_cli/operations.py index e12db8a..d3b25e4 100644 --- a/mamonsu/tools/zabbix_cli/operations.py +++ b/mamonsu/tools/zabbix_cli/operations.py @@ -5,7 +5,7 @@ import json from mamonsu.tools.zabbix_cli.request import Request from mamonsu.lib.parser import zabbix_msg -from distutils.version import LooseVersion +from pkg_resources import packaging from mamonsu.tools.zabbix_cli.dashboard import generate_dashboard @@ -171,10 +171,10 @@ def template(self, args): } }, 'source': open(file).read()} - if LooseVersion(zabbix_version) < LooseVersion('5.4'): + if packaging.version.parse(zabbix_version) < packaging.version.parse('5.4'): params['rules']['applications'] = {'createMissing': True, 'deleteMissing': True} - if LooseVersion(zabbix_version) < LooseVersion('5.2'): + if packaging.version.parse(zabbix_version) < packaging.version.parse('5.2'): params['rules']['templateScreens'] = {'createMissing': True, 'updateExisting': False, 'deleteMissing': True} @@ -329,7 +329,7 @@ def dashboard(self, args): if not len(args) == 2: return self._print_help() zabbix_version = str(self.req.post(method='apiinfo.version', params=[])) - if LooseVersion(zabbix_version) < LooseVersion('6.0'): + if packaging.version.parse(zabbix_version) < packaging.version.parse('6.0'): print("You can import Mamonsu dashboard only on Zabbix 6.0+.") return else: diff --git a/mamonsu/tools/zabbix_cli/request.py b/mamonsu/tools/zabbix_cli/request.py index 5b83427..566868f 100644 --- a/mamonsu/tools/zabbix_cli/request.py +++ b/mamonsu/tools/zabbix_cli/request.py @@ -5,7 +5,7 @@ from collections import OrderedDict -from distutils.version import LooseVersion +from pkg_resources import packaging import urllib.request as urllib2 @@ -26,7 +26,7 @@ def _auth(self): if self._auth_tocken is None: if not self._user: return None - user_field = 'user' if LooseVersion(self._api_version) < LooseVersion('6.4') else 'username' + user_field = 'user' if packaging.version.parse(self._api_version) < packaging.version.parse('6.4') else 'username' self._auth_tocken = self.post( 'user.login', {user_field: self._user, 'password': self._passwd}) From 37ddafeb70a9e4b9d98ed1d9fd75adac29881e1d Mon Sep 17 00:00:00 2001 From: Maxim Styushin Date: Wed, 17 Apr 2024 16:27:20 +0400 Subject: [PATCH 074/106] cicd: add ubuntu 24.04 to the dev tests --- .github/workflows/mamonsu-tests-dev.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/mamonsu-tests-dev.yml b/.github/workflows/mamonsu-tests-dev.yml index 216aa5b..58ae112 100644 --- a/.github/workflows/mamonsu-tests-dev.yml +++ b/.github/workflows/mamonsu-tests-dev.yml @@ -36,6 +36,9 @@ jobs: - docker_os: 'centos:8' pg_version: '16' zabbix_version: '6.4.13' + - docker_os: 'ubuntu:24.04' + pg_version: '16' + zabbix_version: '6.4.13' exclude: - docker_os: 'centos:8' pg_version: '12' From e1db914c52e401d06a62116b6e430c11312ef1b8 Mon Sep 17 00:00:00 2001 From: Maxim Styushin Date: Thu, 18 Apr 2024 22:23:18 +0400 Subject: [PATCH 075/106] fix: workaround for non-usual PG_VERSION string --- mamonsu/plugins/pgsql/driver/pg8000/core.py | 7 ++++++- mamonsu/plugins/pgsql/driver/pool.py | 4 +++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/mamonsu/plugins/pgsql/driver/pg8000/core.py b/mamonsu/plugins/pgsql/driver/pg8000/core.py index 9e6d069..7816bff 100755 --- a/mamonsu/plugins/pgsql/driver/pg8000/core.py +++ b/mamonsu/plugins/pgsql/driver/pg8000/core.py @@ -1416,7 +1416,12 @@ def handle_PARAMETER_STATUS(self, data, ps): pass elif key == b"server_version": - self._server_version = packaging.version.parse(value.decode('ascii')) + # LooseVersion() from distutils was able to handle non-relevant strings + # in version (like "16.2 (Ubuntu 16.2-1.pgdg20.04+1)") + # since distutils became deprecated we need this hack hoping that + # postgres package maintainers won't come up with something more exotic + string_version = value.decode('ascii').split(' ')[0] + self._server_version = packaging.version.parse(string_version) if self._server_version < packaging.version.parse('8.2.0'): self._commands_with_count = ( b"INSERT", b"DELETE", b"UPDATE", b"MOVE") diff --git a/mamonsu/plugins/pgsql/driver/pool.py b/mamonsu/plugins/pgsql/driver/pool.py index 7c402d5..b7ca620 100644 --- a/mamonsu/plugins/pgsql/driver/pool.py +++ b/mamonsu/plugins/pgsql/driver/pool.py @@ -124,8 +124,10 @@ def server_version(self, db=None): db = self._normalize_db(db) if db in self._cache["server_version"]["storage"]: return self._cache["server_version"]["storage"][db] + + version_string = self.query("show server_version", db)[0][0] result = bytes( - self.query("show server_version", db)[0][0], "utf-8") + version_string.split(" ")[0], "utf-8") self._cache["server_version"]["storage"][db] = "{0}".format( result.decode("ascii")) return self._cache["server_version"]["storage"][db] From 904046c2dfe6f1c04629d39297b14a80013e1f41 Mon Sep 17 00:00:00 2001 From: Maxim Styushin Date: Thu, 18 Apr 2024 22:25:34 +0400 Subject: [PATCH 076/106] fix: get rid of SyntaxWarnings in python3.12 --- mamonsu/plugins/system/linux/disk_stats.py | 4 +- mamonsu/plugins/system/linux/memory.py | 6 +- mamonsu/plugins/system/linux/proc_stat.py | 2 +- mamonsu/plugins/system/linux/scripts.py | 116 ++++++++++----------- 4 files changed, 64 insertions(+), 64 deletions(-) diff --git a/mamonsu/plugins/system/linux/disk_stats.py b/mamonsu/plugins/system/linux/disk_stats.py index 696b5f7..e5381ca 100644 --- a/mamonsu/plugins/system/linux/disk_stats.py +++ b/mamonsu/plugins/system/linux/disk_stats.py @@ -23,7 +23,7 @@ class DiskStats(Plugin): # Track only physical devices without logical partitions OnlyPhysicalDevices = True - re_stat = re.compile("^(?:\s+\d+){2}\s+([\w\d]+) (.*)$") + re_stat = re.compile(r"^(?:\s+\d+){2}\s+([\w\d]+) (.*)$") # rd_ios rd_merges rd_sectors rd_ticks # wr_ios wr_merges wr_sectors wr_ticks @@ -43,7 +43,7 @@ def run(self, zbx): if m is None: continue dev, val = m.group(1), m.group(2) - if self.OnlyPhysicalDevices and re.search("\d+$", dev): # get drive name without digits at the end + if self.OnlyPhysicalDevices and re.search(r"\d+$", dev): # get drive name without digits at the end continue val = [int(x) for x in val.split()] read_op, read_sc, write_op, write_sc, ticks = val[0], val[2], val[4], val[6], val[9] diff --git a/mamonsu/plugins/system/linux/memory.py b/mamonsu/plugins/system/linux/memory.py index ef95f62..c0906af 100644 --- a/mamonsu/plugins/system/linux/memory.py +++ b/mamonsu/plugins/system/linux/memory.py @@ -5,9 +5,9 @@ class Memory(Plugin): AgentPluginType = "sys" - query_agent = "cat /proc/meminfo | awk '/^{0}\:/ " - query_agent_used = "MemTotal=$(cat /proc/meminfo | awk '/MemTotal\:/ { print $2 }'); " \ - "SUM=$(cat /proc/meminfo | awk '/(MemFree|Buffers|(Swap)?Cached|Slab|PageTables)\:/ " \ + query_agent = r"cat /proc/meminfo | awk '/^{0}\:/ " + query_agent_used = r"MemTotal=$(cat /proc/meminfo | awk '/MemTotal\:/ { print $2 }'); " \ + r"SUM=$(cat /proc/meminfo | awk '/(MemFree|Buffers|(Swap)?Cached|Slab|PageTables)\:/ " \ "{ SUM += $2 } END {print SUM}'); echo $((($MemTotal-$SUM)*1024))" query_agent_swap = "expr `grep -Ei 'Swap(Total|Free)' /proc/meminfo | awk '{print $2 * 1024}' | paste -s -d '-' " \ "| sed -E 's/-/ - /g'` " diff --git a/mamonsu/plugins/system/linux/proc_stat.py b/mamonsu/plugins/system/linux/proc_stat.py index 4da3960..237e195 100644 --- a/mamonsu/plugins/system/linux/proc_stat.py +++ b/mamonsu/plugins/system/linux/proc_stat.py @@ -16,7 +16,7 @@ class ProcStat(Plugin): # alert fork-rate ForkRate = 500 # /proc/stat all cpu line - re_stat = re.compile("cpu\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)") + re_stat = re.compile(r"cpu\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)") ProcessItems = [ # key, zbx_key, name, delta, color, side diff --git a/mamonsu/plugins/system/linux/scripts.py b/mamonsu/plugins/system/linux/scripts.py index 1ab25e7..58c2ff6 100644 --- a/mamonsu/plugins/system/linux/scripts.py +++ b/mamonsu/plugins/system/linux/scripts.py @@ -14,13 +14,13 @@ class Scripts(object): while getopts "s::a:sj:uphvt:" OPTION; do case ${OPTION} in - + j) JSON=1 JSON_ATTR=(${OPTARG}) IFS="${IFS_DEFAULT}" ;; - + esac done @@ -46,10 +46,10 @@ class Scripts(object): count=1 while read line; do values=(${line}) - if [ $(contains "${list_str}" "," "${values[8]}") -eq 0 ]; then + if [ $(contains "${list_str}" "," "${values[8]}") -eq 0 ]; then if [[ ${output} != " " ]]; then echo " ${output}" - fi + fi output='{ ' output+='"'{#${JSON_ATTR[0]}}'"' output+=':' @@ -57,7 +57,7 @@ class Scripts(object): output+=' }' tmp="${output}" output="${output}," - fi + fi let "count=count+1" done <<< "${rval}" echo " ${tmp}" @@ -76,22 +76,22 @@ class Scripts(object): IFS_DEFAULT="${IFS}" # ################################################################################# - - + + while getopts "s::a:sj:uphvt:" OPTION; do case ${OPTION} in - + j) JSON=1 JSON_ATTR=(${OPTARG}) IFS="${IFS_DEFAULT}" ;; - + esac done - + ################################################################################# - + output=" " rval=`cat /proc/diskstats` if [[ ${JSON} -eq 1 ]]; then @@ -102,9 +102,9 @@ class Scripts(object): while read line; do if [[ ${line} != '' ]]; then IFS="|" values=(${line}) - - if [[ $count == 1 ]]; then # for loop0 case - new_value2=`echo ${values[0]} | sed -n '/[0-9]/s/ \+/ /gp'` + + if [[ $count == 1 ]]; then # for loop0 case + new_value2=`echo ${values[0]} | sed -n '/[0-9]/s/ \\+/ /gp'` new_value3=`echo "$new_value2" | cut -d " " -f 3` read_op=`echo "$new_value2" | cut -d " " -f 4` read_sc=`echo "$new_value2" | cut -d " " -f 6` @@ -112,7 +112,7 @@ class Scripts(object): write_sc=`echo "$new_value2" | cut -d " " -f 10` ticks=`echo "$new_value2" | cut -d " " -f 13` else - new_value2=`echo ${values[0]} | sed -n '/[0-9]/s/ \+/ /gp'` + new_value2=`echo ${values[0]} | sed -n '/[0-9]/s/ \\+/ /gp'` new_value3=`echo "$new_value2" | cut -d " " -f 4` read_op=`echo "$new_value2" | cut -d " " -f 5` read_sc=`echo "$new_value2" | cut -d " " -f 7` @@ -123,8 +123,8 @@ class Scripts(object): if [[ $new_value3 != *"loop"* ]] && [[ $new_value3 != *"ram"* ]] && [[ $new_value3 != *[0-9]* ]]; then if [[ ${output} != " " ]]; then echo " ${output}" - fi - value=$(($read_op+$value)) + fi + value=$(($read_op+$value)) output='{ ' output+='"'{#${JSON_ATTR[0]}}'"' output+=':' @@ -142,7 +142,7 @@ class Scripts(object): else echo "${rval:-0}" fi - + exit ${rcode} """, @@ -156,26 +156,26 @@ class Scripts(object): if [[ ${line} != '' ]]; then IFS="|" values=(${line}) - if [[ $count == 1 ]]; then # for loop0 case - new_value2=`echo ${values[0]} | sed -n '/[0-9]/s/ \+/ /gp'` + if [[ $count == 1 ]]; then # for loop0 case + new_value2=`echo ${values[0]} | sed -n '/[0-9]/s/ \\+/ /gp'` # echo $new_value2 new_value3=`echo "$new_value2" | cut -d " " -f 3` read_op=`echo "$new_value2" | cut -d " " -f 4` - + else - new_value2=`echo ${values[0]} | sed -n '/[0-9]/s/ \+/ /gp'` + new_value2=`echo ${values[0]} | sed -n '/[0-9]/s/ \\+/ /gp'` new_value3=`echo "$new_value2" | cut -d " " -f 4` read_op=`echo "$new_value2" | cut -d " " -f 5` - + fi re='^[0-9]+$' - has_digits='no' + has_digits='no' if [[ "${new_value3: -1}" =~ $re ]]; then has_digits='yes' fi if [[ $new_value3 != *"loop"* ]] && [[ $new_value3 != *"ram"* ]] && [[ $has_digits == 'no' ]]; then - value=$(($read_op+$value)) - + value=$(($read_op+$value)) + fi fi @@ -195,23 +195,23 @@ class Scripts(object): if [[ ${line} != '' ]]; then IFS="|" values=(${line}) - if [[ $count == 1 ]]; then # for loop0 case - new_value2=`echo ${values[0]} | sed -n '/[0-9]/s/ \+/ /gp'` + if [[ $count == 1 ]]; then # for loop0 case + new_value2=`echo ${values[0]} | sed -n '/[0-9]/s/ \\+/ /gp'` # echo $new_value2 - new_value3=`echo "$new_value2" | cut -d " " -f 3` + new_value3=`echo "$new_value2" | cut -d " " -f 3` read_sc=`echo "$new_value2" | cut -d " " -f 6` else - new_value2=`echo ${values[0]} | sed -n '/[0-9]/s/ \+/ /gp'` + new_value2=`echo ${values[0]} | sed -n '/[0-9]/s/ \\+/ /gp'` new_value3=`echo "$new_value2" | cut -d " " -f 4` - read_sc=`echo "$new_value2" | cut -d " " -f 7` + read_sc=`echo "$new_value2" | cut -d " " -f 7` fi re='^[0-9]+$' - has_digits='no' + has_digits='no' if [[ "${new_value3: -1}" =~ $re ]]; then has_digits='yes' fi if [[ $new_value3 != *"loop"* ]] && [[ $new_value3 != *"ram"* ]] && [[ $has_digits == 'no' ]]; then - value=$(($read_sc+$value)) + value=$(($read_sc+$value)) fi fi let "count=count+1" @@ -230,28 +230,28 @@ class Scripts(object): if [[ ${line} != '' ]]; then IFS="|" values=(${line}) - if [[ $count == 1 ]]; then # for loop0 case - new_value2=`echo ${values[0]} | sed -n '/[0-9]/s/ \+/ /gp'` - new_value3=`echo "$new_value2" | cut -d " " -f 3` + if [[ $count == 1 ]]; then # for loop0 case + new_value2=`echo ${values[0]} | sed -n '/[0-9]/s/ \\+/ /gp'` + new_value3=`echo "$new_value2" | cut -d " " -f 3` write_op=`echo "$new_value2" | cut -d " " -f 8` - + else - new_value2=`echo ${values[0]} | sed -n '/[0-9]/s/ \+/ /gp'` + new_value2=`echo ${values[0]} | sed -n '/[0-9]/s/ \\+/ /gp'` new_value3=`echo "$new_value2" | cut -d " " -f 4` - + write_op=`echo "$new_value2" | cut -d " " -f 9` - + fi re='^[0-9]+$' - has_digits='no' + has_digits='no' if [[ "${new_value3: -1}" =~ $re ]]; then has_digits='yes' fi if [[ $new_value3 != *"loop"* ]] && [[ $new_value3 != *"ram"* ]] && [[ $has_digits == 'no' ]];then - #echo $write_op + #echo $write_op + + value=$(($write_op+$value)) - value=$(($write_op+$value)) - fi fi @@ -270,25 +270,25 @@ class Scripts(object): if [[ ${line} != '' ]]; then IFS="|" values=(${line}) - if [[ $count == 1 ]]; then # for loop0 case - new_value2=`echo ${values[0]} | sed -n '/[0-9]/s/ \+/ /gp'` + if [[ $count == 1 ]]; then # for loop0 case + new_value2=`echo ${values[0]} | sed -n '/[0-9]/s/ \\+/ /gp'` new_value3=`echo "$new_value2" | cut -d " " -f 3` write_sc=`echo "$new_value2" | cut -d " " -f 10` else - new_value2=`echo ${values[0]} | sed -n '/[0-9]/s/ \+/ /gp'` + new_value2=`echo ${values[0]} | sed -n '/[0-9]/s/ \\+/ /gp'` new_value3=`echo "$new_value2" | cut -d " " -f 4` write_sc=`echo "$new_value2" | cut -d " " -f 11` fi re='^[0-9]+$' - has_digits='no' + has_digits='no' if [[ "${new_value3: -1}" =~ $re ]]; then has_digits='yes' fi #echo $values if [[ $new_value3 != *"loop"* ]] && [[ $new_value3 != *"ram"* ]] && [[ $has_digits == 'no' ]]; then - #echo $write_sc + #echo $write_sc #echo $new_value3 - value=$(($write_sc+$value)) + value=$(($write_sc+$value)) fi fi let "count=count+1" @@ -302,7 +302,7 @@ class Scripts(object): ################################################################################# while getopts "s::a:sj:uphvt:" OPTION; do case ${OPTION} in - + j) JSON=1 JSON_ATTR=(${OPTARG}) @@ -323,7 +323,7 @@ class Scripts(object): if [[ "${values[0]}" != *"lo:"* ]] && [[ "${#values[@]}">1 ]]; then if [[ ${output} != " " ]] && [[ $count > 4 ]]; then echo " ${output}" - fi + fi output='{ ' output+='"'{#${JSON_ATTR[0]}}'"' output+=':' @@ -332,7 +332,7 @@ class Scripts(object): output+=' }' tmp="${output}" output="${output}," - fi + fi let "count=count+1" done <<< "${rval}" echo " ${tmp}" @@ -356,19 +356,19 @@ class Scripts(object): if [[ ${line} != '' ]]; then IFS="|" values=(${line}) - if [[ $count == 1 ]]; then # for loop0 case - new_value2=`echo ${values[0]} | sed -n '/[0-9]/s/ \+/ /gp'` + if [[ $count == 1 ]]; then # for loop0 case + new_value2=`echo ${values[0]} | sed -n '/[0-9]/s/ \\+/ /gp'` # echo $new_value2 new_value3=`echo "$new_value2" | cut -d " " -f 3` ticks=`echo "$new_value2" | cut -d " " -f 13` else - new_value2=`echo ${values[0]} | sed -n '/[0-9]/s/ \+/ /gp'` + new_value2=`echo ${values[0]} | sed -n '/[0-9]/s/ \\+/ /gp'` new_value3=`echo "$new_value2" | cut -d " " -f 4` ticks=`echo "$new_value2" | cut -d " " -f 14` fi if [[ $new_value3 != *"loop"* ]] && [[ $new_value3 != *"ram"* ]]; then - #echo $ticks - value=$(($ticks+$value)) + #echo $ticks + value=$(($ticks+$value)) fi fi let "count=count+1" From 3dc18b1b9b9c5218a66c7a75d3fc7e145f542126 Mon Sep 17 00:00:00 2001 From: Maxim Styushin Date: Thu, 18 Apr 2024 22:28:03 +0400 Subject: [PATCH 077/106] cicd: add ubuntu 24.04 to the master tests --- .github/workflows/mamonsu-tests-master.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/mamonsu-tests-master.yml b/.github/workflows/mamonsu-tests-master.yml index aaf2aec..bea887f 100644 --- a/.github/workflows/mamonsu-tests-master.yml +++ b/.github/workflows/mamonsu-tests-master.yml @@ -42,6 +42,9 @@ jobs: - docker_os: 'ubuntu:20.04' pg_version: '15' zabbix_version: '6.4.13' + - docker_os: 'ubuntu:24.04' + pg_version: '16' + zabbix_version: '6.4.13' exclude: # excludes PG 15, 16 on CentOS - docker_os: 'centos:7' From 5e1d9558a82ac6f06263ec807d2c1070dbfb7e4a Mon Sep 17 00:00:00 2001 From: Maxim Styushin Date: Thu, 18 Apr 2024 22:53:59 +0400 Subject: [PATCH 078/106] build: upgrade to 3.5.8 --- .github/workflows/mamonsu-tests-dev.yml | 2 +- .github/workflows/mamonsu-tests-master.yml | 2 +- github-actions-tests/mamonsu_build.sh | 4 ++-- .../sources/{agent_3.5.7.conf => agent_3.5.8.conf} | 0 mamonsu/__init__.py | 2 +- packaging/debian/changelog | 3 +++ packaging/rpm/SPECS/mamonsu.spec | 5 ++++- packaging/win/mamonsu.def.nsh | 2 +- 8 files changed, 13 insertions(+), 7 deletions(-) rename github-actions-tests/sources/{agent_3.5.7.conf => agent_3.5.8.conf} (100%) diff --git a/.github/workflows/mamonsu-tests-dev.yml b/.github/workflows/mamonsu-tests-dev.yml index 58ae112..22386fb 100644 --- a/.github/workflows/mamonsu-tests-dev.yml +++ b/.github/workflows/mamonsu-tests-dev.yml @@ -80,7 +80,7 @@ jobs: echo "zabbix_address=$(hostname -I | awk '{print $1}')" >> $GITHUB_OUTPUT id: zabbix_address - name: Edit Zabbix address in agent.conf - run: sed -i "s/\(address *= *\).*/\1 ${{ steps.zabbix_address.outputs.zabbix_address }}/" ${{ env.MAMONSU_PATH }}/github-actions-tests/sources/agent_3.5.7.conf + run: sed -i "s/\(address *= *\).*/\1 ${{ steps.zabbix_address.outputs.zabbix_address }}/" ${{ env.MAMONSU_PATH }}/github-actions-tests/sources/agent_3.5.8.conf - name: Copy test scripts to container run: docker exec $( echo "${{ matrix.docker_os }}" | sed 's/://' | sed 's/\.//' ) mkdir -p -m 755 /mamonsu/ diff --git a/.github/workflows/mamonsu-tests-master.yml b/.github/workflows/mamonsu-tests-master.yml index bea887f..2cdde54 100644 --- a/.github/workflows/mamonsu-tests-master.yml +++ b/.github/workflows/mamonsu-tests-master.yml @@ -91,7 +91,7 @@ jobs: echo "zabbix_address=$(hostname -I | awk '{print $1}')" >> $GITHUB_OUTPUT id: zabbix_address - name: Edit Zabbix address in agent.conf - run: sed -i "s/\(address *= *\).*/\1 ${{ steps.zabbix_address.outputs.zabbix_address }}/" ${{ env.MAMONSU_PATH }}/github-actions-tests/sources/agent_3.5.7.conf + run: sed -i "s/\(address *= *\).*/\1 ${{ steps.zabbix_address.outputs.zabbix_address }}/" ${{ env.MAMONSU_PATH }}/github-actions-tests/sources/agent_3.5.8.conf - name: Copy test scripts to container run: docker exec $( echo "${{ matrix.docker_os }}" | sed 's/://' | sed 's/\.//' ) mkdir -p -m 755 /mamonsu/ diff --git a/github-actions-tests/mamonsu_build.sh b/github-actions-tests/mamonsu_build.sh index ec2a427..bc7d5e4 100644 --- a/github-actions-tests/mamonsu_build.sh +++ b/github-actions-tests/mamonsu_build.sh @@ -41,7 +41,7 @@ if [ "${OS%:*}" = "centos" ]; then python3 setup.py build && python3 setup.py install make rpm sudo rpm -i ./mamonsu*.rpm - cat /mamonsu/github-actions-tests/sources/agent_3.5.7.conf > /etc/mamonsu/agent.conf + cat /mamonsu/github-actions-tests/sources/agent_3.5.8.conf > /etc/mamonsu/agent.conf systemctl daemon-reload systemctl restart mamonsu sleep 5 @@ -64,7 +64,7 @@ elif [ "${OS%:*}" = "ubuntu" ]; then python3 setup.py build && python3 setup.py install make deb sudo dpkg -i ./mamonsu*.deb - cat /mamonsu/github-actions-tests/sources/agent_3.5.7.conf > /etc/mamonsu/agent.conf + cat /mamonsu/github-actions-tests/sources/agent_3.5.8.conf > /etc/mamonsu/agent.conf service mamonsu restart sleep 5 echo && echo && echo "mamonsu version:" diff --git a/github-actions-tests/sources/agent_3.5.7.conf b/github-actions-tests/sources/agent_3.5.8.conf similarity index 100% rename from github-actions-tests/sources/agent_3.5.7.conf rename to github-actions-tests/sources/agent_3.5.8.conf diff --git a/mamonsu/__init__.py b/mamonsu/__init__.py index 1aebc34..0a9cadd 100644 --- a/mamonsu/__init__.py +++ b/mamonsu/__init__.py @@ -1,7 +1,7 @@ __author__ = 'Dmitry Vasilyev' __author_email__ = 'info@postgrespro.ru' __description__ = 'Monitoring agent for PostgreSQL' -__version__ = '3.5.7' +__version__ = '3.5.8' __licence__ = 'BSD' __url__ = 'https://github.com/postgrespro/mamonsu' diff --git a/packaging/debian/changelog b/packaging/debian/changelog index 8b5b7c2..0a0c778 100644 --- a/packaging/debian/changelog +++ b/packaging/debian/changelog @@ -1,3 +1,6 @@ +mamonsu (3.5.8-1) stable; urgency=low + * Prepare for python 3.12: remove deprecated distutils imports; + mamonsu (3.5.7-1) stable; urgency=low * added support for Zabbix 6.4 API: handle deprecated parameters for auth request; * removed caching of pgsql.connections[max_connections] metric; diff --git a/packaging/rpm/SPECS/mamonsu.spec b/packaging/rpm/SPECS/mamonsu.spec index 8246349..f35fbd9 100644 --- a/packaging/rpm/SPECS/mamonsu.spec +++ b/packaging/rpm/SPECS/mamonsu.spec @@ -1,5 +1,5 @@ Name: mamonsu -Version: 3.5.7 +Version: 3.5.8 Release: 1%{?dist} Summary: Monitoring agent for PostgreSQL Group: Applications/Internet @@ -73,6 +73,9 @@ chown -R mamonsu.mamonsu /var/log/mamonsu chown -R mamonsu.mamonsu /etc/mamonsu %changelog +* Thu Apr 18 2024 Maxim Styushin - 3.5.8-1 + - Prepare for python 3.12: remove deprecated distutils imports; + * Fri Apr 5 2024 Maxim Styushin - 3.5.7-1 - added support for Zabbix 6.4 API: handle deprecated parameters for auth request; - removed caching of pgsql.connections[max_connections] metric; diff --git a/packaging/win/mamonsu.def.nsh b/packaging/win/mamonsu.def.nsh index 1d638c4..1e32c88 100644 --- a/packaging/win/mamonsu.def.nsh +++ b/packaging/win/mamonsu.def.nsh @@ -1,5 +1,5 @@ !define NAME Mamonsu -!define VERSION 3.5.7 +!define VERSION 3.5.8 !define MAMONSU_REG_PATH "Software\PostgresPro\Mamonsu" !define MAMONSU_REG_UNINSTALLER_PATH "Software\Microsoft\Windows\CurrentVersion\Uninstall" !define EDB_REG "SOFTWARE\Postgresql" From c5434d842c85f0d44af210949411e22ca41f764d Mon Sep 17 00:00:00 2001 From: Maxim Styushin Date: Tue, 9 Jul 2024 14:03:58 +0400 Subject: [PATCH 079/106] feature: add grafana dashboard - Add Grafana Dashboard for Postgresql metrics emitted from mamonsu credits go to @konstantin-kornienko --- ...pro-postgresql-mamonsu-dashboard_rev1.json | 18843 ++++++++++++++++ 1 file changed, 18843 insertions(+) create mode 100644 grafana/dashboards/postgrespro-postgresql-mamonsu-dashboard_rev1.json diff --git a/grafana/dashboards/postgrespro-postgresql-mamonsu-dashboard_rev1.json b/grafana/dashboards/postgrespro-postgresql-mamonsu-dashboard_rev1.json new file mode 100644 index 0000000..698261f --- /dev/null +++ b/grafana/dashboards/postgrespro-postgresql-mamonsu-dashboard_rev1.json @@ -0,0 +1,18843 @@ +{ + "__inputs": [ + { + "name": "DS_ZABBIX", + "label": "Zabbix", + "description": "", + "type": "datasource", + "pluginId": "alexanderzobnin-zabbix-datasource", + "pluginName": "Zabbix" + } + ], + "__elements": {}, + "__requires": [ + { + "type": "datasource", + "id": "alexanderzobnin-zabbix-datasource", + "name": "Zabbix", + "version": "1.0.0" + }, + { + "type": "panel", + "id": "alexanderzobnin-zabbix-triggers-panel", + "name": "Zabbix Problems", + "version": "" + }, + { + "type": "panel", + "id": "gauge", + "name": "Gauge", + "version": "" + }, + { + "type": "grafana", + "id": "grafana", + "name": "Grafana", + "version": "11.0.0" + }, + { + "type": "panel", + "id": "stat", + "name": "Stat", + "version": "" + }, + { + "type": "panel", + "id": "state-timeline", + "name": "State timeline", + "version": "" + }, + { + "type": "panel", + "id": "table", + "name": "Table", + "version": "" + }, + { + "type": "panel", + "id": "text", + "name": "Text", + "version": "" + }, + { + "type": "panel", + "id": "timeseries", + "name": "Time series", + "version": "" + } + ], + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": { + "type": "grafana", + "uid": "-- Grafana --" + }, + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "type": "dashboard" + }, + { + "datasource": { + "type": "alexanderzobnin-zabbix-datasource", + "uid": "${DS_ZABBIX}" + }, + "enable": true, + "iconColor": "red", + "name": "PostgreSQL problems", + "target": { + "application": { + "filter": "" + }, + "fromAnnotations": true, + "group": { + "filter": "$group" + }, + "host": { + "filter": "$host" + }, + "options": { + "hideAcknowledged": false, + "minSeverity": 0, + "showHostname": true, + "showOkEvents": true + }, + "trigger": { + "filter": "/^PostgreSQL /" + } + } + }, + { + "datasource": { + "type": "alexanderzobnin-zabbix-datasource", + "uid": "${DS_ZABBIX}" + }, + "enable": true, + "iconColor": "yellow", + "name": "Mamonsu problems", + "target": { + "application": { + "filter": "" + }, + "fromAnnotations": true, + "group": { + "filter": "$group" + }, + "host": { + "filter": "$host" + }, + "options": { + "hideAcknowledged": false, + "minSeverity": 0, + "showHostname": true, + "showOkEvents": true + }, + "trigger": { + "filter": "/^Mamonsu /" + } + } + } + ] + }, + "description": "Version 1.0. Visualizes PostgreSQL metrics collected by Mamonsu.\n\nZabbix: https://zabbix.com\nMamonsu: https://github.com/postgrespro/mamonsu\n", + "editable": true, + "fiscalYearStartMonth": 0, + "graphTooltip": 1, + "id": null, + "links": [ + { + "asDropdown": false, + "icon": "info", + "includeVars": false, + "keepTime": false, + "tags": [], + "targetBlank": true, + "title": "Mamonsu metrics", + "tooltip": "", + "type": "link", + "url": "https://github.com/postgrespro/mamonsu/blob/master/documentation/metrics.md" + } + ], + "panels": [ + { + "collapsed": true, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 0 + }, + "id": 51, + "panels": [ + { + "datasource": { + "type": "alexanderzobnin-zabbix-datasource", + "uid": "${DS_ZABBIX}" + }, + "description": "", + "gridPos": { + "h": 7, + "w": 24, + "x": 0, + "y": 10 + }, + "id": 52, + "options": { + "ackEventColor": "rgb(56, 219, 156)", + "ackField": true, + "ageField": false, + "allowDangerousHTML": false, + "customLastChangeFormat": false, + "descriptionAtNewLine": false, + "descriptionField": true, + "fontSize": "100%", + "highlightBackground": false, + "highlightNewEvents": false, + "highlightNewerThan": "1h", + "hostField": true, + "hostGroups": false, + "hostProxy": false, + "hostTechNameField": false, + "lastChangeFormat": "", + "layout": "table", + "markAckEvents": false, + "okEventColor": "rgb(56, 189, 113)", + "opdataField": false, + "pageSize": 5, + "problemTimeline": true, + "severityField": true, + "showTags": true, + "sortProblems": "lastchange", + "statusField": true, + "statusIcon": false, + "triggerSeverity": [ + { + "color": "rgb(108, 108, 108)", + "priority": 0, + "severity": "Not classified", + "show": true + }, + { + "color": "rgb(120, 158, 183)", + "priority": 1, + "severity": "Information", + "show": true + }, + { + "color": "rgb(175, 180, 36)", + "priority": 2, + "severity": "Warning", + "show": true + }, + { + "color": "rgb(255, 137, 30)", + "priority": 3, + "severity": "Average", + "show": true + }, + { + "color": "rgb(255, 101, 72)", + "priority": 4, + "severity": "High", + "show": true + }, + { + "color": "rgb(215, 0, 0)", + "priority": 5, + "severity": "Disaster", + "show": true + } + ] + }, + "pluginVersion": "11.0.0", + "targets": [ + { + "application": { + "filter": "" + }, + "countTriggersBy": "", + "datasource": { + "type": "alexanderzobnin-zabbix-datasource", + "uid": "${DS_ZABBIX}" + }, + "evaltype": "0", + "functions": [], + "group": { + "filter": "$group" + }, + "host": { + "filter": "$host" + }, + "item": { + "filter": "" + }, + "itemTag": { + "filter": "" + }, + "macro": { + "filter": "" + }, + "options": { + "acknowledged": 2, + "count": false, + "disableDataAlignment": false, + "hostProxy": false, + "hostsInMaintenance": false, + "limit": 1001, + "minSeverity": 0, + "showDisabledItems": false, + "skipEmptyValues": false, + "sortProblems": "default", + "useTimeRange": false, + "useTrends": "default", + "useZabbixValueMapping": false + }, + "proxy": { + "filter": "" + }, + "queryType": "5", + "refId": "A", + "resultFormat": "time_series", + "schema": 12, + "showProblems": "problems", + "table": { + "skipEmptyValues": false + }, + "tags": { + "filter": "" + }, + "textFilter": "", + "trigger": { + "filter": "/^(PostgreSQL|Mamonsu) /" + } + } + ], + "type": "alexanderzobnin-zabbix-triggers-panel" + } + ], + "title": "Zabbix Problems", + "type": "row" + }, + { + "collapsed": true, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 1 + }, + "id": 54, + "panels": [ + { + "datasource": { + "type": "alexanderzobnin-zabbix-datasource", + "uid": "${DS_ZABBIX}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "fixed" + }, + "custom": { + "fillOpacity": 70, + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": 120000, + "lineWidth": 0, + "spanNulls": false + }, + "mappings": [ + { + "options": { + "0": { + "color": "dark-green", + "index": 0, + "text": "UP" + } + }, + "type": "value" + }, + { + "options": { + "match": "null", + "result": { + "color": "dark-red", + "index": 1, + "text": "DOWN" + } + }, + "type": "special" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "text" + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 4, + "w": 12, + "x": 0, + "y": 10 + }, + "hideTimeOverride": true, + "id": 57, + "options": { + "alignValue": "center", + "legend": { + "displayMode": "list", + "placement": "bottom", + "showLegend": false + }, + "mergeValues": true, + "rowHeight": 0.9, + "showValue": "always", + "tooltip": { + "maxHeight": 600, + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "11.0.0", + "targets": [ + { + "application": { + "filter": "" + }, + "countTriggersBy": "", + "datasource": { + "type": "alexanderzobnin-zabbix-datasource", + "uid": "${DS_ZABBIX}" + }, + "evaltype": "0", + "functions": [], + "group": { + "filter": "$group" + }, + "host": { + "filter": "$host" + }, + "item": { + "filter": "Mamonsu: Plugin Keep Alive" + }, + "itemTag": { + "filter": "" + }, + "macro": { + "filter": "" + }, + "options": { + "count": false, + "disableDataAlignment": false, + "showDisabledItems": false, + "skipEmptyValues": false, + "useTrends": "default", + "useZabbixValueMapping": false + }, + "proxy": { + "filter": "" + }, + "queryType": "0", + "refId": "A", + "resultFormat": "time_series", + "schema": 12, + "table": { + "skipEmptyValues": false + }, + "tags": { + "filter": "" + }, + "textFilter": "", + "trigger": { + "filter": "" + } + } + ], + "title": "Mamonsu plugin keepalive history", + "type": "state-timeline" + }, + { + "datasource": { + "type": "alexanderzobnin-zabbix-datasource", + "uid": "${DS_ZABBIX}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "text" + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 4, + "w": 12, + "x": 12, + "y": 10 + }, + "hideTimeOverride": true, + "id": 56, + "maxDataPoints": 3, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "textMode": "value", + "wideLayout": true + }, + "pluginVersion": "11.0.0", + "targets": [ + { + "application": { + "filter": "" + }, + "countTriggersBy": "", + "datasource": { + "type": "alexanderzobnin-zabbix-datasource", + "uid": "${DS_ZABBIX}" + }, + "evaltype": "0", + "functions": [], + "group": { + "filter": "$group" + }, + "host": { + "filter": "$host" + }, + "item": { + "filter": "Mamonsu: RSS Memory Max Usage" + }, + "itemTag": { + "filter": "" + }, + "macro": { + "filter": "" + }, + "options": { + "count": false, + "disableDataAlignment": false, + "showDisabledItems": false, + "skipEmptyValues": false, + "useTrends": "default", + "useZabbixValueMapping": false + }, + "proxy": { + "filter": "" + }, + "queryType": "0", + "refId": "A", + "resultFormat": "time_series", + "schema": 12, + "table": { + "skipEmptyValues": false + }, + "tags": { + "filter": "" + }, + "textFilter": "", + "trigger": { + "filter": "" + } + } + ], + "timeFrom": "1h", + "title": "Mamonsu plugin max used RSS memory", + "type": "stat" + }, + { + "datasource": { + "type": "alexanderzobnin-zabbix-datasource", + "uid": "${DS_ZABBIX}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "light-red" + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 5, + "w": 24, + "x": 0, + "y": 14 + }, + "hideTimeOverride": true, + "id": 55, + "maxDataPoints": 3, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "last" + ], + "fields": "/^Mamonsu: Plugin Errors$/", + "values": false + }, + "showPercentChange": false, + "textMode": "value", + "wideLayout": true + }, + "pluginVersion": "11.0.0", + "targets": [ + { + "application": { + "filter": "" + }, + "countTriggersBy": "", + "datasource": { + "type": "alexanderzobnin-zabbix-datasource", + "uid": "${DS_ZABBIX}" + }, + "evaltype": "0", + "functions": [], + "group": { + "filter": "$group" + }, + "host": { + "filter": "$host" + }, + "item": { + "filter": "Mamonsu: Plugin Errors" + }, + "itemTag": { + "filter": "" + }, + "macro": { + "filter": "" + }, + "options": { + "count": false, + "disableDataAlignment": false, + "showDisabledItems": false, + "skipEmptyValues": false, + "useTrends": "default", + "useZabbixValueMapping": false + }, + "proxy": { + "filter": "" + }, + "queryType": "2", + "refId": "A", + "resultFormat": "time_series", + "schema": 12, + "table": { + "skipEmptyValues": false + }, + "tags": { + "filter": "" + }, + "textFilter": "", + "trigger": { + "filter": "" + } + } + ], + "timeFrom": "1h", + "title": "Mamonsu plugin errors", + "type": "stat" + } + ], + "title": "Mamonsu", + "type": "row" + }, + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 2 + }, + "id": 7, + "panels": [], + "title": "Overview", + "type": "row" + }, + { + "datasource": { + "type": "alexanderzobnin-zabbix-datasource", + "uid": "${DS_ZABBIX}" + }, + "description": "Is Mamonsu plugin sending keepalives", + "fieldConfig": { + "defaults": { + "color": { + "mode": "fixed" + }, + "mappings": [ + { + "options": { + "0": { + "color": "dark-green", + "index": 0, + "text": "OK" + } + }, + "type": "value" + }, + { + "options": { + "match": "null", + "result": { + "color": "dark-red", + "index": 1, + "text": "DOWN" + } + }, + "type": "special" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "text", + "value": null + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 2, + "x": 0, + "y": 3 + }, + "hideTimeOverride": true, + "id": 58, + "interval": "1m", + "maxDataPoints": 1, + "options": { + "colorMode": "background", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "11.0.0", + "targets": [ + { + "application": { + "filter": "" + }, + "countTriggersBy": "", + "datasource": { + "type": "alexanderzobnin-zabbix-datasource", + "uid": "${DS_ZABBIX}" + }, + "evaltype": "0", + "functions": [], + "group": { + "filter": "$group" + }, + "hide": false, + "host": { + "filter": "$host" + }, + "item": { + "filter": "Mamonsu: Plugin Keep Alive" + }, + "itemTag": { + "filter": "" + }, + "macro": { + "filter": "" + }, + "options": { + "count": false, + "disableDataAlignment": false, + "showDisabledItems": false, + "skipEmptyValues": false, + "useTrends": "default", + "useZabbixValueMapping": false + }, + "proxy": { + "filter": "" + }, + "queryType": "0", + "refId": "B", + "resultFormat": "time_series", + "schema": 12, + "table": { + "skipEmptyValues": false + }, + "tags": { + "filter": "" + }, + "textFilter": "", + "trigger": { + "filter": "" + } + } + ], + "timeFrom": "3m", + "title": "Mamonsu", + "type": "stat" + }, + { + "datasource": { + "type": "alexanderzobnin-zabbix-datasource", + "uid": "${DS_ZABBIX}" + }, + "description": "Is Postgres database is accessible by Mamonsu", + "fieldConfig": { + "defaults": { + "color": { + "mode": "fixed" + }, + "mappings": [ + { + "options": { + "from": 0, + "result": { + "color": "dark-green", + "index": 0, + "text": "OK" + }, + "to": 99999999 + }, + "type": "range" + }, + { + "options": { + "match": "null", + "result": { + "color": "dark-red", + "index": 1, + "text": "DOWN" + } + }, + "type": "special" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "text", + "value": null + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 2, + "x": 2, + "y": 3 + }, + "hideTimeOverride": true, + "id": 59, + "interval": "1m", + "maxDataPoints": 1, + "options": { + "colorMode": "background", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "11.0.0", + "targets": [ + { + "application": { + "filter": "" + }, + "countTriggersBy": "", + "datasource": { + "type": "alexanderzobnin-zabbix-datasource", + "uid": "${DS_ZABBIX}" + }, + "evaltype": "0", + "functions": [], + "group": { + "filter": "$group" + }, + "hide": false, + "host": { + "filter": "$host" + }, + "item": { + "filter": "PostgreSQL Health: Ping" + }, + "itemTag": { + "filter": "" + }, + "macro": { + "filter": "" + }, + "options": { + "count": false, + "disableDataAlignment": false, + "showDisabledItems": false, + "skipEmptyValues": false, + "useTrends": "default", + "useZabbixValueMapping": false + }, + "proxy": { + "filter": "" + }, + "queryType": "0", + "refId": "B", + "resultFormat": "time_series", + "schema": 12, + "table": { + "skipEmptyValues": false + }, + "tags": { + "filter": "" + }, + "textFilter": "", + "trigger": { + "filter": "" + } + } + ], + "timeFrom": "3m", + "title": "DB ping", + "type": "stat" + }, + { + "datasource": { + "type": "alexanderzobnin-zabbix-datasource", + "uid": "${DS_ZABBIX}" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "dark-green", + "value": null + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 2, + "x": 4, + "y": 3 + }, + "hideTimeOverride": true, + "id": 1, + "maxDataPoints": 3, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "/^PostgreSQL Health: Server Version$/", + "values": false + }, + "showPercentChange": false, + "text": {}, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "11.0.0", + "targets": [ + { + "application": { + "filter": "" + }, + "countTriggersBy": "", + "datasource": { + "type": "alexanderzobnin-zabbix-datasource", + "uid": "${DS_ZABBIX}" + }, + "evaltype": "0", + "functions": [], + "group": { + "filter": "$group" + }, + "host": { + "filter": "$host" + }, + "item": { + "filter": "PostgreSQL Health: Server Version" + }, + "itemTag": { + "filter": "" + }, + "macro": { + "filter": "" + }, + "options": { + "count": false, + "disableDataAlignment": false, + "showDisabledItems": false, + "skipEmptyValues": false, + "useTrends": "default", + "useZabbixValueMapping": false + }, + "proxy": { + "filter": "" + }, + "queryType": "2", + "refId": "A", + "resultFormat": "time_series", + "schema": 12, + "table": { + "skipEmptyValues": false + }, + "tags": { + "filter": "" + }, + "textFilter": "", + "trigger": { + "filter": "" + } + } + ], + "timeFrom": "1h", + "title": "Server version", + "type": "stat" + }, + { + "datasource": { + "type": "alexanderzobnin-zabbix-datasource", + "uid": "${DS_ZABBIX}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [ + { + "options": { + "MASTER": { + "color": "dark-green", + "index": 0 + }, + "STANDBY": { + "color": "dark-yellow", + "index": 1 + } + }, + "type": "value" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "dark-green", + "value": null + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 2, + "x": 6, + "y": 3 + }, + "hideTimeOverride": true, + "id": 103, + "maxDataPoints": 3, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "last" + ], + "fields": "/^PostgreSQL Instance: Server Mode$/", + "values": false + }, + "showPercentChange": false, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "11.0.0", + "targets": [ + { + "application": { + "filter": "" + }, + "countTriggersBy": "", + "datasource": { + "type": "alexanderzobnin-zabbix-datasource", + "uid": "${DS_ZABBIX}" + }, + "evaltype": "0", + "functions": [], + "group": { + "filter": "$group" + }, + "host": { + "filter": "$host" + }, + "item": { + "filter": "PostgreSQL Instance: Server Mode" + }, + "itemTag": { + "filter": "" + }, + "macro": { + "filter": "" + }, + "options": { + "count": false, + "disableDataAlignment": false, + "showDisabledItems": false, + "skipEmptyValues": false, + "useTrends": "default", + "useZabbixValueMapping": false + }, + "proxy": { + "filter": "" + }, + "queryType": "2", + "refId": "A", + "resultFormat": "time_series", + "schema": 12, + "table": { + "skipEmptyValues": false + }, + "tags": { + "filter": "" + }, + "textFilter": "", + "trigger": { + "filter": "" + } + } + ], + "timeFrom": "1h", + "title": "Server mode", + "type": "stat" + }, + { + "datasource": { + "type": "alexanderzobnin-zabbix-datasource", + "uid": "${DS_ZABBIX}" + }, + "description": "Database uptime", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "dark-green", + "value": null + } + ] + }, + "unit": "dateTimeAsSystem" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 3, + "x": 8, + "y": 3 + }, + "hideTimeOverride": true, + "id": 2, + "maxDataPoints": 3, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "11.0.0", + "targets": [ + { + "application": { + "filter": "" + }, + "countTriggersBy": "", + "datasource": { + "type": "alexanderzobnin-zabbix-datasource", + "uid": "${DS_ZABBIX}" + }, + "evaltype": "0", + "functions": [ + { + "added": true, + "def": { + "category": "Transform", + "defaultParams": [ + 100 + ], + "name": "scale", + "params": [ + { + "name": "factor", + "options": [ + 100, + 0.01, + 10, + -1 + ], + "type": "float" + } + ] + }, + "params": [ + "1000" + ], + "text": "scale(100)" + } + ], + "group": { + "filter": "$group" + }, + "host": { + "filter": "$host" + }, + "item": { + "filter": "PostgreSQL Health: Service Uptime" + }, + "itemTag": { + "filter": "" + }, + "macro": { + "filter": "" + }, + "options": { + "count": false, + "disableDataAlignment": false, + "showDisabledItems": false, + "skipEmptyValues": false, + "useTrends": "default", + "useZabbixValueMapping": false + }, + "proxy": { + "filter": "" + }, + "queryType": "0", + "refId": "A", + "resultFormat": "time_series", + "schema": 12, + "table": { + "skipEmptyValues": false + }, + "tags": { + "filter": "" + }, + "textFilter": "", + "trigger": { + "filter": "" + } + } + ], + "timeFrom": "1h", + "title": "Database started", + "type": "stat" + }, + { + "datasource": { + "type": "alexanderzobnin-zabbix-datasource", + "uid": "${DS_ZABBIX}" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "dark-green", + "value": null + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 3, + "x": 11, + "y": 3 + }, + "hideTimeOverride": true, + "id": 13, + "maxDataPoints": 3, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "11.0.0", + "targets": [ + { + "application": { + "filter": "" + }, + "countTriggersBy": "", + "datasource": { + "type": "alexanderzobnin-zabbix-datasource", + "uid": "${DS_ZABBIX}" + }, + "evaltype": "0", + "functions": [ + { + "added": true, + "def": { + "category": "Special", + "defaultParams": [ + "avg" + ], + "name": "consolidateBy", + "params": [ + { + "name": "type", + "options": [ + "avg", + "min", + "max", + "sum", + "count" + ], + "type": "string" + } + ] + }, + "params": [ + "max" + ], + "text": "consolidateBy(avg)" + } + ], + "group": { + "filter": "$group" + }, + "host": { + "filter": "$host" + }, + "item": { + "filter": "PostgreSQL Connections: Number of Total User Connections" + }, + "itemTag": { + "filter": "" + }, + "macro": { + "filter": "" + }, + "options": { + "count": false, + "disableDataAlignment": false, + "showDisabledItems": false, + "skipEmptyValues": false, + "useTrends": "default", + "useZabbixValueMapping": false + }, + "proxy": { + "filter": "" + }, + "queryType": "0", + "refId": "A", + "resultFormat": "time_series", + "schema": 12, + "table": { + "skipEmptyValues": false + }, + "tags": { + "filter": "" + }, + "textFilter": "", + "trigger": { + "filter": "" + } + } + ], + "timeFrom": "1h", + "title": "User Connections", + "type": "stat" + }, + { + "datasource": { + "type": "alexanderzobnin-zabbix-datasource", + "uid": "${DS_ZABBIX}" + }, + "description": "Cache Hit Ratio calculates as ratio between last value of Blocks hit and summa of last values of Blocks hit and Blocks read.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "fieldMinMax": false, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "dark-red", + "value": null + }, + { + "color": "dark-orange", + "value": 95 + }, + { + "color": "dark-yellow", + "value": 98 + }, + { + "color": "dark-green", + "value": 99 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 2, + "x": 14, + "y": 3 + }, + "hideTimeOverride": true, + "id": 46, + "interval": "$interval", + "maxDataPoints": 3, + "options": { + "minVizHeight": 175, + "minVizWidth": 75, + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showThresholdLabels": false, + "showThresholdMarkers": false, + "sizing": "auto" + }, + "pluginVersion": "11.0.0", + "targets": [ + { + "application": { + "filter": "" + }, + "countTriggersBy": "", + "datasource": { + "type": "alexanderzobnin-zabbix-datasource", + "uid": "${DS_ZABBIX}" + }, + "evaltype": "0", + "functions": [ + { + "added": true, + "def": { + "category": "Alias", + "defaultParams": [ + "/(.*)/", + "$1" + ], + "name": "replaceAlias", + "params": [ + { + "name": "regexp", + "type": "string" + }, + { + "name": "newAlias", + "type": "string" + } + ] + }, + "params": [ + "/^.*: (.*)$/", + "$1" + ], + "text": "replaceAlias(/(.*)/, $1)" + } + ], + "group": { + "filter": "$group" + }, + "host": { + "filter": "$host" + }, + "item": { + "filter": "PostgreSQL Health: Cache Hit Ratio" + }, + "itemTag": { + "filter": "" + }, + "macro": { + "filter": "" + }, + "options": { + "count": false, + "disableDataAlignment": false, + "showDisabledItems": false, + "skipEmptyValues": false, + "useTrends": "default", + "useZabbixValueMapping": false + }, + "proxy": { + "filter": "" + }, + "queryType": "0", + "refId": "A", + "resultFormat": "time_series", + "schema": 12, + "table": { + "skipEmptyValues": false + }, + "tags": { + "filter": "" + }, + "textFilter": "", + "trigger": { + "filter": "" + } + } + ], + "timeFrom": "1h", + "title": "Cache hit", + "type": "gauge" + }, + { + "datasource": { + "type": "alexanderzobnin-zabbix-datasource", + "uid": "${DS_ZABBIX}" + }, + "description": "Shows the database with the highest number of bloated table", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "dark-green", + "value": null + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 4, + "x": 16, + "y": 3 + }, + "hideTimeOverride": true, + "id": 39, + "interval": "1m", + "maxDataPoints": 10, + "options": { + "colorMode": "none", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "textMode": "value_and_name", + "wideLayout": true + }, + "pluginVersion": "11.0.0", + "targets": [ + { + "application": { + "filter": "" + }, + "countTriggersBy": "", + "datasource": { + "type": "alexanderzobnin-zabbix-datasource", + "uid": "${DS_ZABBIX}" + }, + "evaltype": "0", + "functions": [ + { + "added": true, + "def": { + "category": "Filter", + "defaultParams": [ + 5, + "avg" + ], + "name": "top", + "params": [ + { + "name": "number", + "type": "int" + }, + { + "name": "value", + "options": [ + "avg", + "min", + "max", + "sum", + "count", + "median", + "first", + "last" + ], + "type": "string" + } + ] + }, + "params": [ + "1", + "max" + ], + "text": "top(5, avg)" + }, + { + "added": true, + "def": { + "category": "Special", + "defaultParams": [ + "avg" + ], + "name": "consolidateBy", + "params": [ + { + "name": "type", + "options": [ + "avg", + "min", + "max", + "sum", + "count" + ], + "type": "string" + } + ] + }, + "params": [ + "max" + ], + "text": "consolidateBy(avg)" + }, + { + "added": true, + "def": { + "category": "Trends", + "defaultParams": [ + "avg" + ], + "name": "trendValue", + "params": [ + { + "name": "type", + "options": [ + "avg", + "min", + "max", + "sum", + "count" + ], + "type": "string" + } + ] + }, + "params": [ + "max" + ], + "text": "trendValue(avg)" + }, + { + "added": true, + "def": { + "category": "Alias", + "defaultParams": [ + "/(.*)/", + "$1" + ], + "name": "replaceAlias", + "params": [ + { + "name": "regexp", + "type": "string" + }, + { + "name": "newAlias", + "type": "string" + } + ] + }, + "params": [ + "/^PostgreSQL Databases: (.+) size$/", + "$1" + ], + "text": "replaceAlias(/(.*)/, $1)" + } + ], + "group": { + "filter": "$group" + }, + "host": { + "filter": "$host" + }, + "item": { + "filter": "/^PostgreSQL Databases: $database size$/" + }, + "itemTag": { + "filter": "" + }, + "macro": { + "filter": "" + }, + "options": { + "count": false, + "disableDataAlignment": false, + "showDisabledItems": false, + "skipEmptyValues": false, + "useTrends": "default", + "useZabbixValueMapping": false + }, + "proxy": { + "filter": "" + }, + "queryType": "0", + "refId": "A", + "resultFormat": "time_series", + "schema": 12, + "table": { + "skipEmptyValues": false + }, + "tags": { + "filter": "" + }, + "textFilter": "", + "trigger": { + "filter": "" + } + } + ], + "title": "Largest database", + "type": "stat" + }, + { + "datasource": { + "type": "alexanderzobnin-zabbix-datasource", + "uid": "${DS_ZABBIX}" + }, + "description": "Shows the database with the highest number of bloated table", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "dark-green", + "value": null + }, + { + "color": "#EAB839", + "value": 1 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 4, + "x": 20, + "y": 3 + }, + "hideTimeOverride": true, + "id": 37, + "interval": "1m", + "maxDataPoints": 10, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "textMode": "value_and_name", + "wideLayout": true + }, + "pluginVersion": "11.0.0", + "targets": [ + { + "application": { + "filter": "" + }, + "countTriggersBy": "", + "datasource": { + "type": "alexanderzobnin-zabbix-datasource", + "uid": "${DS_ZABBIX}" + }, + "evaltype": "0", + "functions": [ + { + "added": true, + "def": { + "category": "Filter", + "defaultParams": [ + 5, + "avg" + ], + "name": "top", + "params": [ + { + "name": "number", + "type": "int" + }, + { + "name": "value", + "options": [ + "avg", + "min", + "max", + "sum", + "count", + "median", + "first", + "last" + ], + "type": "string" + } + ] + }, + "params": [ + "1", + "max" + ], + "text": "top(5, avg)" + }, + { + "added": true, + "def": { + "category": "Special", + "defaultParams": [ + "avg" + ], + "name": "consolidateBy", + "params": [ + { + "name": "type", + "options": [ + "avg", + "min", + "max", + "sum", + "count" + ], + "type": "string" + } + ] + }, + "params": [ + "max" + ], + "text": "consolidateBy(avg)" + }, + { + "added": true, + "def": { + "category": "Trends", + "defaultParams": [ + "avg" + ], + "name": "trendValue", + "params": [ + { + "name": "type", + "options": [ + "avg", + "min", + "max", + "sum", + "count" + ], + "type": "string" + } + ] + }, + "params": [ + "max" + ], + "text": "trendValue(avg)" + }, + { + "added": true, + "def": { + "category": "Alias", + "defaultParams": [ + "/(.*)/", + "$1" + ], + "name": "replaceAlias", + "params": [ + { + "name": "regexp", + "type": "string" + }, + { + "name": "newAlias", + "type": "string" + } + ] + }, + "params": [ + "/^.* Count of Bloating Tables in (.+)$/", + "$1" + ], + "text": "replaceAlias(/(.*)/, $1)" + } + ], + "group": { + "filter": "$group" + }, + "host": { + "filter": "$host" + }, + "item": { + "filter": "/^PostgreSQL Databases: Count of Bloating Tables in $database$/" + }, + "itemTag": { + "filter": "" + }, + "macro": { + "filter": "" + }, + "options": { + "count": false, + "disableDataAlignment": false, + "showDisabledItems": false, + "skipEmptyValues": false, + "useTrends": "default", + "useZabbixValueMapping": false + }, + "proxy": { + "filter": "" + }, + "queryType": "0", + "refId": "A", + "resultFormat": "time_series", + "schema": 12, + "table": { + "skipEmptyValues": false + }, + "tags": { + "filter": "" + }, + "textFilter": "", + "trigger": { + "filter": "" + } + } + ], + "title": "Max number of bloated tables", + "type": "stat" + }, + { + "datasource": { + "type": "alexanderzobnin-zabbix-datasource", + "uid": "${DS_ZABBIX}" + }, + "description": "1. Transactions committed rate\n2. Transaction rollback events per [$interval]", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "smooth", + "lineWidth": 1, + "pointSize": 3, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "dark-green", + "value": null + } + ] + }, + "unit": "ops" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Rollback Events" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "semi-dark-red", + "mode": "fixed" + } + }, + { + "id": "unit" + } + ] + } + ] + }, + "gridPos": { + "h": 7, + "w": 12, + "x": 0, + "y": 6 + }, + "hideTimeOverride": true, + "id": 4, + "interval": "$interval", + "options": { + "legend": { + "calcs": [ + "mean", + "max" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true, + "sortBy": "Mean", + "sortDesc": true + }, + "tooltip": { + "maxHeight": 600, + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "11.0.0", + "targets": [ + { + "application": { + "filter": "" + }, + "countTriggersBy": "", + "datasource": { + "type": "alexanderzobnin-zabbix-datasource", + "uid": "${DS_ZABBIX}" + }, + "evaltype": "0", + "functions": [ + { + "added": true, + "def": { + "category": "Transform", + "defaultParams": [ + "1m", + "avg" + ], + "name": "groupBy", + "params": [ + { + "name": "interval", + "type": "string" + }, + { + "name": "function", + "options": [ + "avg", + "min", + "max", + "sum", + "count", + "median", + "first", + "last" + ], + "type": "string" + } + ] + }, + "params": [ + "$interval", + "avg" + ], + "text": "groupBy(1m, avg)" + }, + { + "added": true, + "def": { + "category": "Alias", + "defaultParams": [], + "name": "setAlias", + "params": [ + { + "name": "alias", + "type": "string" + } + ] + }, + "params": [ + "Transactions Commited rate" + ], + "text": "setAlias()" + } + ], + "group": { + "filter": "$group" + }, + "host": { + "filter": "$host" + }, + "item": { + "filter": "PostgreSQL Instance: Transactions Committed" + }, + "itemTag": { + "filter": "" + }, + "macro": { + "filter": "" + }, + "options": { + "count": false, + "disableDataAlignment": false, + "showDisabledItems": false, + "skipEmptyValues": false, + "useTrends": "default", + "useZabbixValueMapping": false + }, + "proxy": { + "filter": "" + }, + "queryType": "0", + "refId": "A", + "resultFormat": "time_series", + "schema": 12, + "table": { + "skipEmptyValues": false + }, + "tags": { + "filter": "" + }, + "textFilter": "", + "trigger": { + "filter": "" + } + }, + { + "application": { + "filter": "" + }, + "countTriggersBy": "", + "datasource": { + "type": "alexanderzobnin-zabbix-datasource", + "uid": "${DS_ZABBIX}" + }, + "evaltype": "0", + "functions": [ + { + "added": true, + "def": { + "category": "Transform", + "defaultParams": [ + "1m", + "avg" + ], + "name": "groupBy", + "params": [ + { + "name": "interval", + "type": "string" + }, + { + "name": "function", + "options": [ + "avg", + "min", + "max", + "sum", + "count", + "median", + "first", + "last" + ], + "type": "string" + } + ] + }, + "params": [ + "$interval", + "avg" + ], + "text": "groupBy(1m, avg)" + }, + { + "added": true, + "def": { + "category": "Alias", + "defaultParams": [], + "name": "setAlias", + "params": [ + { + "name": "alias", + "type": "string" + } + ] + }, + "params": [ + "Rollback Events" + ], + "text": "setAlias()" + } + ], + "group": { + "filter": "$group" + }, + "hide": false, + "host": { + "filter": "$host" + }, + "item": { + "filter": "PostgreSQL Instance: Rollback Events" + }, + "itemTag": { + "filter": "" + }, + "macro": { + "filter": "" + }, + "options": { + "count": false, + "disableDataAlignment": false, + "showDisabledItems": false, + "skipEmptyValues": false, + "useTrends": "default", + "useZabbixValueMapping": false + }, + "proxy": { + "filter": "" + }, + "queryType": "0", + "refId": "B", + "resultFormat": "time_series", + "schema": 12, + "table": { + "skipEmptyValues": false + }, + "tags": { + "filter": "" + }, + "textFilter": "", + "trigger": { + "filter": "" + } + } + ], + "title": "Transactions rate", + "type": "timeseries" + }, + { + "datasource": { + "type": "alexanderzobnin-zabbix-datasource", + "uid": "${DS_ZABBIX}" + }, + "description": "Connections to the database by type", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "smooth", + "lineWidth": 1, + "pointSize": 3, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "area" + } + }, + "mappings": [], + "thresholds": { + "mode": "percentage", + "steps": [ + { + "color": "dark-green", + "value": null + }, + { + "color": "semi-dark-yellow", + "value": 75 + }, + { + "color": "red", + "value": 90 + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Max Connections" + }, + "properties": [ + { + "id": "custom.lineWidth", + "value": 2 + }, + { + "id": "color", + "value": { + "fixedColor": "semi-dark-red", + "mode": "fixed" + } + }, + { + "id": "custom.lineStyle", + "value": { + "dash": [ + 5, + 5 + ], + "fill": "dash" + } + }, + { + "id": "custom.showPoints", + "value": "never" + } + ] + } + ] + }, + "gridPos": { + "h": 7, + "w": 12, + "x": 12, + "y": 6 + }, + "hideTimeOverride": true, + "id": 3, + "interval": "$interval", + "options": { + "legend": { + "calcs": [ + "mean", + "max" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true, + "sortBy": "Mean", + "sortDesc": true + }, + "tooltip": { + "maxHeight": 600, + "mode": "multi", + "sort": "desc" + } + }, + "pluginVersion": "11.0.0", + "targets": [ + { + "application": { + "filter": "" + }, + "countTriggersBy": "", + "datasource": { + "type": "alexanderzobnin-zabbix-datasource", + "uid": "${DS_ZABBIX}" + }, + "evaltype": "0", + "functions": [ + { + "added": true, + "def": { + "category": "Transform", + "defaultParams": [ + "1m", + "avg" + ], + "name": "groupBy", + "params": [ + { + "name": "interval", + "type": "string" + }, + { + "name": "function", + "options": [ + "avg", + "min", + "max", + "sum", + "count", + "median", + "first", + "last" + ], + "type": "string" + } + ] + }, + "params": [ + "$interval", + "max" + ], + "text": "groupBy(1m, avg)" + }, + { + "added": true, + "def": { + "category": "Special", + "defaultParams": [ + "avg" + ], + "name": "consolidateBy", + "params": [ + { + "name": "type", + "options": [ + "avg", + "min", + "max", + "sum", + "count" + ], + "type": "string" + } + ] + }, + "params": [ + "max" + ], + "text": "consolidateBy(avg)" + }, + { + "added": true, + "def": { + "category": "Trends", + "defaultParams": [ + "avg" + ], + "name": "trendValue", + "params": [ + { + "name": "type", + "options": [ + "avg", + "min", + "max", + "sum", + "count" + ], + "type": "string" + } + ] + }, + "params": [ + "max" + ], + "text": "trendValue(avg)" + }, + { + "added": true, + "def": { + "category": "Alias", + "defaultParams": [ + "/(.*)/", + "$1" + ], + "name": "replaceAlias", + "params": [ + { + "name": "regexp", + "type": "string" + }, + { + "name": "newAlias", + "type": "string" + } + ] + }, + "params": [ + "/.*Number of (.*) Connections$/", + "$1" + ], + "text": "replaceAlias(/(.*)/, $1)" + } + ], + "group": { + "filter": "$group" + }, + "host": { + "filter": "$host" + }, + "item": { + "filter": "/Number of .* Connections$/" + }, + "itemTag": { + "filter": "" + }, + "macro": { + "filter": "" + }, + "options": { + "count": false, + "disableDataAlignment": false, + "showDisabledItems": false, + "skipEmptyValues": false, + "useTrends": "default", + "useZabbixValueMapping": false + }, + "proxy": { + "filter": "" + }, + "queryType": "0", + "refId": "A", + "resultFormat": "time_series", + "schema": 12, + "table": { + "skipEmptyValues": false + }, + "tags": { + "filter": "" + }, + "textFilter": "", + "trigger": { + "filter": "" + } + }, + { + "application": { + "filter": "" + }, + "countTriggersBy": "", + "datasource": { + "type": "alexanderzobnin-zabbix-datasource", + "uid": "${DS_ZABBIX}" + }, + "evaltype": "0", + "functions": [ + { + "added": true, + "def": { + "category": "Transform", + "defaultParams": [ + "1m", + "avg" + ], + "name": "groupBy", + "params": [ + { + "name": "interval", + "type": "string" + }, + { + "name": "function", + "options": [ + "avg", + "min", + "max", + "sum", + "count", + "median", + "first", + "last" + ], + "type": "string" + } + ] + }, + "params": [ + "$interval", + "max" + ], + "text": "groupBy(1m, avg)" + }, + { + "added": true, + "def": { + "category": "Trends", + "defaultParams": [ + "avg" + ], + "name": "trendValue", + "params": [ + { + "name": "type", + "options": [ + "avg", + "min", + "max", + "sum", + "count" + ], + "type": "string" + } + ] + }, + "params": [ + "max" + ], + "text": "trendValue(avg)" + }, + { + "added": true, + "def": { + "category": "Special", + "defaultParams": [ + "avg" + ], + "name": "consolidateBy", + "params": [ + { + "name": "type", + "options": [ + "avg", + "min", + "max", + "sum", + "count" + ], + "type": "string" + } + ] + }, + "params": [ + "max" + ], + "text": "consolidateBy(avg)" + }, + { + "added": true, + "def": { + "category": "Alias", + "defaultParams": [], + "name": "setAlias", + "params": [ + { + "name": "alias", + "type": "string" + } + ] + }, + "params": [ + "Max Connections" + ], + "text": "setAlias()" + } + ], + "group": { + "filter": "$group" + }, + "hide": false, + "host": { + "filter": "$host" + }, + "item": { + "filter": "PostgreSQL Connections: Max Connections" + }, + "itemTag": { + "filter": "" + }, + "macro": { + "filter": "" + }, + "options": { + "count": false, + "disableDataAlignment": false, + "showDisabledItems": false, + "skipEmptyValues": false, + "useTrends": "default", + "useZabbixValueMapping": false + }, + "proxy": { + "filter": "" + }, + "queryType": "0", + "refId": "B", + "resultFormat": "time_series", + "schema": 12, + "table": { + "skipEmptyValues": false + }, + "tags": { + "filter": "" + }, + "textFilter": "", + "trigger": { + "filter": "" + } + } + ], + "title": "Connections", + "type": "timeseries" + }, + { + "datasource": { + "type": "alexanderzobnin-zabbix-datasource", + "uid": "${DS_ZABBIX}" + }, + "description": "Tuples metrics use information from pg_stat_database.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 34, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "smooth", + "lineWidth": 1, + "pointSize": 3, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "normal" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "dark-green", + "value": null + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 12, + "x": 0, + "y": 13 + }, + "hideTimeOverride": true, + "id": 14, + "interval": "$interval", + "options": { + "legend": { + "calcs": [ + "mean", + "max" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true, + "sortBy": "Mean", + "sortDesc": true + }, + "tooltip": { + "maxHeight": 600, + "mode": "multi", + "sort": "desc" + } + }, + "pluginVersion": "11.0.0", + "targets": [ + { + "application": { + "filter": "" + }, + "countTriggersBy": "", + "datasource": { + "type": "alexanderzobnin-zabbix-datasource", + "uid": "${DS_ZABBIX}" + }, + "evaltype": "0", + "functions": [ + { + "added": true, + "def": { + "category": "Transform", + "defaultParams": [ + "1m", + "avg" + ], + "name": "groupBy", + "params": [ + { + "name": "interval", + "type": "string" + }, + { + "name": "function", + "options": [ + "avg", + "min", + "max", + "sum", + "count", + "median", + "first", + "last" + ], + "type": "string" + } + ] + }, + "params": [ + "$interval", + "avg" + ], + "text": "groupBy(1m, avg)" + }, + { + "added": true, + "def": { + "category": "Alias", + "defaultParams": [ + "/(.*)/", + "$1" + ], + "name": "replaceAlias", + "params": [ + { + "name": "regexp", + "type": "string" + }, + { + "name": "newAlias", + "type": "string" + } + ] + }, + "params": [ + "/^.*: (.+)$/", + "$1" + ], + "text": "replaceAlias(/(.*)/, $1)" + } + ], + "group": { + "filter": "$group" + }, + "host": { + "filter": "$host" + }, + "item": { + "filter": "/^PostgreSQL Instance: Tuples/" + }, + "itemTag": { + "filter": "" + }, + "macro": { + "filter": "" + }, + "options": { + "count": false, + "disableDataAlignment": false, + "showDisabledItems": false, + "skipEmptyValues": false, + "useTrends": "default", + "useZabbixValueMapping": false + }, + "proxy": { + "filter": "" + }, + "queryType": "0", + "refId": "A", + "resultFormat": "time_series", + "schema": 12, + "table": { + "skipEmptyValues": false + }, + "tags": { + "filter": "" + }, + "textFilter": "", + "trigger": { + "filter": "" + } + } + ], + "title": "Tuples rate", + "type": "timeseries" + }, + { + "datasource": { + "type": "alexanderzobnin-zabbix-datasource", + "uid": "${DS_ZABBIX}" + }, + "description": "Blocks Hit maps to blks_hit.\nBlocks Read maps to blks_read.\n\nBlocks metrics use information from pg_stat_database.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "smooth", + "lineWidth": 1, + "pointSize": 3, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "dark-green", + "value": null + } + ] + }, + "unit": "ops" + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 12, + "x": 12, + "y": 13 + }, + "hideTimeOverride": true, + "id": 29, + "interval": "$interval", + "options": { + "legend": { + "calcs": [ + "mean", + "max" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true + }, + "tooltip": { + "maxHeight": 600, + "mode": "multi", + "sort": "desc" + } + }, + "pluginVersion": "11.0.0", + "targets": [ + { + "application": { + "filter": "" + }, + "countTriggersBy": "", + "datasource": { + "type": "alexanderzobnin-zabbix-datasource", + "uid": "${DS_ZABBIX}" + }, + "evaltype": "0", + "functions": [ + { + "added": true, + "def": { + "category": "Transform", + "defaultParams": [ + "1m", + "avg" + ], + "name": "groupBy", + "params": [ + { + "name": "interval", + "type": "string" + }, + { + "name": "function", + "options": [ + "avg", + "min", + "max", + "sum", + "count", + "median", + "first", + "last" + ], + "type": "string" + } + ] + }, + "params": [ + "$interval", + "avg" + ], + "text": "groupBy(1m, avg)" + }, + { + "added": true, + "def": { + "category": "Alias", + "defaultParams": [ + "/(.*)/", + "$1" + ], + "name": "replaceAlias", + "params": [ + { + "name": "regexp", + "type": "string" + }, + { + "name": "newAlias", + "type": "string" + } + ] + }, + "params": [ + "/^.*: (.*)/", + "$1" + ], + "text": "replaceAlias(/(.*)/, $1)" + } + ], + "group": { + "filter": "$group" + }, + "host": { + "filter": "$host" + }, + "item": { + "filter": "/PostgreSQL Instance: Blocks/" + }, + "itemTag": { + "filter": "" + }, + "macro": { + "filter": "" + }, + "options": { + "count": false, + "disableDataAlignment": false, + "showDisabledItems": false, + "skipEmptyValues": false, + "useTrends": "default", + "useZabbixValueMapping": false + }, + "proxy": { + "filter": "" + }, + "queryType": "0", + "refId": "A", + "resultFormat": "time_series", + "schema": 12, + "table": { + "skipEmptyValues": false + }, + "tags": { + "filter": "" + }, + "textFilter": "", + "trigger": { + "filter": "" + } + } + ], + "title": "Blocks", + "type": "timeseries" + }, + { + "datasource": { + "type": "alexanderzobnin-zabbix-datasource", + "uid": "${DS_ZABBIX}" + }, + "description": "Cache Hit Ratio calculates as ratio between last value of Blocks hit and summa of last values of Blocks hit and Blocks read.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "smooth", + "lineWidth": 1, + "pointSize": 3, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "fieldMinMax": false, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "dark-green", + "value": null + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 12, + "x": 0, + "y": 19 + }, + "hideTimeOverride": true, + "id": 5, + "interval": "$interval", + "options": { + "legend": { + "calcs": [ + "min", + "mean", + "max" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true, + "sortBy": "Mean", + "sortDesc": true + }, + "tooltip": { + "maxHeight": 600, + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "11.0.0", + "targets": [ + { + "application": { + "filter": "" + }, + "countTriggersBy": "", + "datasource": { + "type": "alexanderzobnin-zabbix-datasource", + "uid": "${DS_ZABBIX}" + }, + "evaltype": "0", + "functions": [ + { + "added": true, + "def": { + "category": "Transform", + "defaultParams": [ + "1m", + "avg" + ], + "name": "groupBy", + "params": [ + { + "name": "interval", + "type": "string" + }, + { + "name": "function", + "options": [ + "avg", + "min", + "max", + "sum", + "count", + "median", + "first", + "last" + ], + "type": "string" + } + ] + }, + "params": [ + "$interval", + "avg" + ], + "text": "groupBy(1m, avg)" + }, + { + "added": true, + "def": { + "category": "Alias", + "defaultParams": [ + "/(.*)/", + "$1" + ], + "name": "replaceAlias", + "params": [ + { + "name": "regexp", + "type": "string" + }, + { + "name": "newAlias", + "type": "string" + } + ] + }, + "params": [ + "/^.*: (.*)$/", + "$1" + ], + "text": "replaceAlias(/(.*)/, $1)" + } + ], + "group": { + "filter": "$group" + }, + "host": { + "filter": "$host" + }, + "item": { + "filter": "PostgreSQL Health: Cache Hit Ratio" + }, + "itemTag": { + "filter": "" + }, + "macro": { + "filter": "" + }, + "options": { + "count": false, + "disableDataAlignment": false, + "showDisabledItems": false, + "skipEmptyValues": false, + "useTrends": "default", + "useZabbixValueMapping": false + }, + "proxy": { + "filter": "" + }, + "queryType": "0", + "refId": "A", + "resultFormat": "time_series", + "schema": 12, + "table": { + "skipEmptyValues": false + }, + "tags": { + "filter": "" + }, + "textFilter": "", + "trigger": { + "filter": "" + } + } + ], + "title": "Cache hit ratio", + "type": "timeseries" + }, + { + "datasource": { + "type": "alexanderzobnin-zabbix-datasource", + "uid": "${DS_ZABBIX}" + }, + "description": "Ping calculates as difference between ping query start time and time of receiving ping query result.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "smooth", + "lineWidth": 1, + "pointSize": 3, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "fieldMinMax": false, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "dark-green", + "value": null + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 12, + "x": 12, + "y": 19 + }, + "hideTimeOverride": true, + "id": 45, + "interval": "$interval", + "options": { + "legend": { + "calcs": [ + "min", + "mean", + "max" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true, + "sortBy": "Mean", + "sortDesc": true + }, + "tooltip": { + "maxHeight": 600, + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "11.0.0", + "targets": [ + { + "application": { + "filter": "" + }, + "countTriggersBy": "", + "datasource": { + "type": "alexanderzobnin-zabbix-datasource", + "uid": "${DS_ZABBIX}" + }, + "evaltype": "0", + "functions": [ + { + "added": true, + "def": { + "category": "Transform", + "defaultParams": [ + "1m", + "avg" + ], + "name": "groupBy", + "params": [ + { + "name": "interval", + "type": "string" + }, + { + "name": "function", + "options": [ + "avg", + "min", + "max", + "sum", + "count", + "median", + "first", + "last" + ], + "type": "string" + } + ] + }, + "params": [ + "$interval", + "avg" + ], + "text": "groupBy(1m, avg)" + }, + { + "added": true, + "def": { + "category": "Alias", + "defaultParams": [ + "/(.*)/", + "$1" + ], + "name": "replaceAlias", + "params": [ + { + "name": "regexp", + "type": "string" + }, + { + "name": "newAlias", + "type": "string" + } + ] + }, + "params": [ + "/^.*: (.*)$/", + "$1" + ], + "text": "replaceAlias(/(.*)/, $1)" + } + ], + "group": { + "filter": "$group" + }, + "host": { + "filter": "$host" + }, + "item": { + "filter": "PostgreSQL Health: Ping" + }, + "itemTag": { + "filter": "" + }, + "macro": { + "filter": "" + }, + "options": { + "count": false, + "disableDataAlignment": false, + "showDisabledItems": false, + "skipEmptyValues": false, + "useTrends": "default", + "useZabbixValueMapping": false + }, + "proxy": { + "filter": "" + }, + "queryType": "0", + "refId": "A", + "resultFormat": "time_series", + "schema": 12, + "table": { + "skipEmptyValues": false + }, + "tags": { + "filter": "" + }, + "textFilter": "", + "trigger": { + "filter": "" + } + } + ], + "title": "Query ping time", + "type": "timeseries" + }, + { + "collapsed": true, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 25 + }, + "id": 15, + "panels": [ + { + "datasource": { + "type": "alexanderzobnin-zabbix-datasource", + "uid": "${DS_ZABBIX}" + }, + "description": "Archiving metrics use information from pg_stat_archiver view.", + "fieldConfig": { + "defaults": { + "color": { + "fixedColor": "yellow", + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "smooth", + "lineWidth": 1, + "pointSize": 3, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "dark-green" + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 12, + "x": 0, + "y": 26 + }, + "hideTimeOverride": true, + "id": 16, + "interval": "$interval", + "options": { + "legend": { + "calcs": [ + "mean", + "max" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true, + "sortBy": "Mean", + "sortDesc": true + }, + "tooltip": { + "maxHeight": 600, + "mode": "multi", + "sort": "desc" + } + }, + "pluginVersion": "11.0.0", + "targets": [ + { + "application": { + "filter": "" + }, + "countTriggersBy": "", + "datasource": { + "type": "alexanderzobnin-zabbix-datasource", + "uid": "${DS_ZABBIX}" + }, + "evaltype": "0", + "functions": [ + { + "added": true, + "def": { + "category": "Special", + "defaultParams": [ + "avg" + ], + "name": "consolidateBy", + "params": [ + { + "name": "type", + "options": [ + "avg", + "min", + "max", + "sum", + "count" + ], + "type": "string" + } + ] + }, + "params": [ + "sum" + ], + "text": "consolidateBy(avg)" + }, + { + "added": true, + "def": { + "category": "Transform", + "defaultParams": [ + "1m", + "avg" + ], + "name": "groupBy", + "params": [ + { + "name": "interval", + "type": "string" + }, + { + "name": "function", + "options": [ + "avg", + "min", + "max", + "sum", + "count", + "median", + "first", + "last" + ], + "type": "string" + } + ] + }, + "params": [ + "$interval", + "sum" + ], + "text": "groupBy(1m, avg)" + }, + { + "added": true, + "def": { + "category": "Trends", + "defaultParams": [ + "avg" + ], + "name": "trendValue", + "params": [ + { + "name": "type", + "options": [ + "avg", + "min", + "max", + "sum", + "count" + ], + "type": "string" + } + ] + }, + "params": [ + "sum" + ], + "text": "trendValue(avg)" + }, + { + "added": true, + "def": { + "category": "Alias", + "defaultParams": [ + "/(.*)/", + "$1" + ], + "name": "replaceAlias", + "params": [ + { + "name": "regexp", + "type": "string" + }, + { + "name": "newAlias", + "type": "string" + } + ] + }, + "params": [ + "/^.*: (.+)$/", + "$1" + ], + "text": "replaceAlias(/(.*)/, $1)" + } + ], + "group": { + "filter": "$group" + }, + "host": { + "filter": "$host" + }, + "item": { + "filter": "PostgreSQL Archiver: Archived Files Count" + }, + "itemTag": { + "filter": "" + }, + "macro": { + "filter": "" + }, + "options": { + "count": false, + "disableDataAlignment": false, + "showDisabledItems": false, + "skipEmptyValues": false, + "useTrends": "default", + "useZabbixValueMapping": false + }, + "proxy": { + "filter": "" + }, + "queryType": "0", + "refId": "A", + "resultFormat": "time_series", + "schema": 12, + "table": { + "skipEmptyValues": false + }, + "tags": { + "filter": "" + }, + "textFilter": "", + "trigger": { + "filter": "" + } + }, + { + "application": { + "filter": "" + }, + "countTriggersBy": "", + "datasource": { + "type": "alexanderzobnin-zabbix-datasource", + "uid": "${DS_ZABBIX}" + }, + "evaltype": "0", + "functions": [ + { + "added": true, + "def": { + "category": "Special", + "defaultParams": [ + "avg" + ], + "name": "consolidateBy", + "params": [ + { + "name": "type", + "options": [ + "avg", + "min", + "max", + "sum", + "count" + ], + "type": "string" + } + ] + }, + "params": [ + "sum" + ], + "text": "consolidateBy(avg)" + }, + { + "added": true, + "def": { + "category": "Transform", + "defaultParams": [ + "1m", + "avg" + ], + "name": "groupBy", + "params": [ + { + "name": "interval", + "type": "string" + }, + { + "name": "function", + "options": [ + "avg", + "min", + "max", + "sum", + "count", + "median", + "first", + "last" + ], + "type": "string" + } + ] + }, + "params": [ + "$interval", + "sum" + ], + "text": "groupBy(1m, avg)" + }, + { + "added": true, + "def": { + "category": "Trends", + "defaultParams": [ + "avg" + ], + "name": "trendValue", + "params": [ + { + "name": "type", + "options": [ + "avg", + "min", + "max", + "sum", + "count" + ], + "type": "string" + } + ] + }, + "params": [ + "sum" + ], + "text": "trendValue(avg)" + }, + { + "added": true, + "def": { + "category": "Alias", + "defaultParams": [ + "/(.*)/", + "$1" + ], + "name": "replaceAlias", + "params": [ + { + "name": "regexp", + "type": "string" + }, + { + "name": "newAlias", + "type": "string" + } + ] + }, + "params": [ + "/^.*: (.+)$/", + "$1" + ], + "text": "replaceAlias(/(.*)/, $1)" + } + ], + "group": { + "filter": "$group" + }, + "hide": false, + "host": { + "filter": "$host" + }, + "item": { + "filter": "PostgreSQL Archiver: Attempts to Archive Files Count" + }, + "itemTag": { + "filter": "" + }, + "macro": { + "filter": "" + }, + "options": { + "count": false, + "disableDataAlignment": false, + "showDisabledItems": false, + "skipEmptyValues": false, + "useTrends": "default", + "useZabbixValueMapping": false + }, + "proxy": { + "filter": "" + }, + "queryType": "0", + "refId": "B", + "resultFormat": "time_series", + "schema": 12, + "table": { + "skipEmptyValues": false + }, + "tags": { + "filter": "" + }, + "textFilter": "", + "trigger": { + "filter": "" + } + }, + { + "application": { + "filter": "" + }, + "countTriggersBy": "", + "datasource": { + "type": "alexanderzobnin-zabbix-datasource", + "uid": "${DS_ZABBIX}" + }, + "evaltype": "0", + "functions": [ + { + "added": true, + "def": { + "category": "Special", + "defaultParams": [ + "avg" + ], + "name": "consolidateBy", + "params": [ + { + "name": "type", + "options": [ + "avg", + "min", + "max", + "sum", + "count" + ], + "type": "string" + } + ] + }, + "params": [ + "sum" + ], + "text": "consolidateBy(avg)" + }, + { + "added": true, + "def": { + "category": "Transform", + "defaultParams": [ + "1m", + "avg" + ], + "name": "groupBy", + "params": [ + { + "name": "interval", + "type": "string" + }, + { + "name": "function", + "options": [ + "avg", + "min", + "max", + "sum", + "count", + "median", + "first", + "last" + ], + "type": "string" + } + ] + }, + "params": [ + "$interval", + "sum" + ], + "text": "groupBy(1m, avg)" + }, + { + "added": true, + "def": { + "category": "Trends", + "defaultParams": [ + "avg" + ], + "name": "trendValue", + "params": [ + { + "name": "type", + "options": [ + "avg", + "min", + "max", + "sum", + "count" + ], + "type": "string" + } + ] + }, + "params": [ + "sum" + ], + "text": "trendValue(avg)" + }, + { + "added": true, + "def": { + "category": "Alias", + "defaultParams": [ + "/(.*)/", + "$1" + ], + "name": "replaceAlias", + "params": [ + { + "name": "regexp", + "type": "string" + }, + { + "name": "newAlias", + "type": "string" + } + ] + }, + "params": [ + "/^.*: (.+)$/", + "$1" + ], + "text": "replaceAlias(/(.*)/, $1)" + } + ], + "group": { + "filter": "$group" + }, + "hide": false, + "host": { + "filter": "$host" + }, + "item": { + "filter": "PostgreSQL Archiver: Files in archive_status Need to Archive Count" + }, + "itemTag": { + "filter": "" + }, + "macro": { + "filter": "" + }, + "options": { + "count": false, + "disableDataAlignment": false, + "showDisabledItems": false, + "skipEmptyValues": false, + "useTrends": "default", + "useZabbixValueMapping": false + }, + "proxy": { + "filter": "" + }, + "queryType": "0", + "refId": "C", + "resultFormat": "time_series", + "schema": 12, + "table": { + "skipEmptyValues": false + }, + "tags": { + "filter": "" + }, + "textFilter": "", + "trigger": { + "filter": "" + } + } + ], + "title": " Archived Status", + "type": "timeseries" + }, + { + "datasource": { + "type": "alexanderzobnin-zabbix-datasource", + "uid": "${DS_ZABBIX}" + }, + "description": "Size Of Files Need To Archive is calculated as difference between current WAL number and last archived WAL number multiplied by wal_segment_size\n\nArchiving metrics use information from pg_stat_archiver.", + "fieldConfig": { + "defaults": { + "color": { + "fixedColor": "yellow", + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "smooth", + "lineWidth": 1, + "pointSize": 3, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "dark-green" + } + ] + }, + "unit": "bytes" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 12, + "x": 12, + "y": 26 + }, + "hideTimeOverride": true, + "id": 19, + "interval": "$interval", + "options": { + "legend": { + "calcs": [ + "mean", + "max" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true, + "sortBy": "Mean", + "sortDesc": true + }, + "tooltip": { + "maxHeight": 600, + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "11.0.0", + "targets": [ + { + "application": { + "filter": "" + }, + "countTriggersBy": "", + "datasource": { + "type": "alexanderzobnin-zabbix-datasource", + "uid": "${DS_ZABBIX}" + }, + "evaltype": "0", + "functions": [ + { + "added": true, + "def": { + "category": "Transform", + "defaultParams": [ + "1m", + "avg" + ], + "name": "groupBy", + "params": [ + { + "name": "interval", + "type": "string" + }, + { + "name": "function", + "options": [ + "avg", + "min", + "max", + "sum", + "count", + "median", + "first", + "last" + ], + "type": "string" + } + ] + }, + "params": [ + "$interval", + "max" + ], + "text": "groupBy(1m, avg)" + }, + { + "added": true, + "def": { + "category": "Trends", + "defaultParams": [ + "avg" + ], + "name": "trendValue", + "params": [ + { + "name": "type", + "options": [ + "avg", + "min", + "max", + "sum", + "count" + ], + "type": "string" + } + ] + }, + "params": [ + "max" + ], + "text": "trendValue(avg)" + }, + { + "added": true, + "def": { + "category": "Special", + "defaultParams": [ + "avg" + ], + "name": "consolidateBy", + "params": [ + { + "name": "type", + "options": [ + "avg", + "min", + "max", + "sum", + "count" + ], + "type": "string" + } + ] + }, + "params": [ + "max" + ], + "text": "consolidateBy(avg)" + }, + { + "added": true, + "def": { + "category": "Alias", + "defaultParams": [ + "/(.*)/", + "$1" + ], + "name": "replaceAlias", + "params": [ + { + "name": "regexp", + "type": "string" + }, + { + "name": "newAlias", + "type": "string" + } + ] + }, + "params": [ + "/^.*: (.+)$/", + "$1" + ], + "text": "replaceAlias(/(.*)/, $1)" + } + ], + "group": { + "filter": "$group" + }, + "host": { + "filter": "$host" + }, + "item": { + "filter": "PostgreSQL Archiver: Files Need to Archive Size" + }, + "itemTag": { + "filter": "" + }, + "macro": { + "filter": "" + }, + "options": { + "count": false, + "disableDataAlignment": false, + "showDisabledItems": false, + "skipEmptyValues": false, + "useTrends": "default", + "useZabbixValueMapping": false + }, + "proxy": { + "filter": "" + }, + "queryType": "0", + "refId": "A", + "resultFormat": "time_series", + "schema": 12, + "table": { + "skipEmptyValues": false + }, + "tags": { + "filter": "" + }, + "textFilter": "", + "trigger": { + "filter": "" + } + } + ], + "title": "Size Of Files Need To Archive", + "type": "timeseries" + } + ], + "title": "Archiver", + "type": "row" + }, + { + "collapsed": true, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 26 + }, + "id": 20, + "panels": [ + { + "datasource": { + "type": "alexanderzobnin-zabbix-datasource", + "uid": "${DS_ZABBIX}" + }, + "description": "Autovacuum metrics use information from pg_stat_activity.", + "fieldConfig": { + "defaults": { + "color": { + "fixedColor": "blue", + "mode": "fixed" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "smooth", + "lineWidth": 1, + "pointSize": 3, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "dark-green" + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 35 + }, + "hideTimeOverride": true, + "id": 21, + "interval": "$interval", + "options": { + "legend": { + "calcs": [ + "mean", + "max" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true, + "sortBy": "Name", + "sortDesc": false + }, + "tooltip": { + "maxHeight": 600, + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "11.0.0", + "targets": [ + { + "application": { + "filter": "" + }, + "countTriggersBy": "", + "datasource": { + "type": "alexanderzobnin-zabbix-datasource", + "uid": "${DS_ZABBIX}" + }, + "evaltype": "0", + "functions": [ + { + "added": true, + "def": { + "category": "Transform", + "defaultParams": [ + "1m", + "avg" + ], + "name": "groupBy", + "params": [ + { + "name": "interval", + "type": "string" + }, + { + "name": "function", + "options": [ + "avg", + "min", + "max", + "sum", + "count", + "median", + "first", + "last" + ], + "type": "string" + } + ] + }, + "params": [ + "$interval", + "max" + ], + "text": "groupBy(1m, avg)" + }, + { + "added": true, + "def": { + "category": "Special", + "defaultParams": [ + "avg" + ], + "name": "consolidateBy", + "params": [ + { + "name": "type", + "options": [ + "avg", + "min", + "max", + "sum", + "count" + ], + "type": "string" + } + ] + }, + "params": [ + "max" + ], + "text": "consolidateBy(avg)" + }, + { + "added": true, + "def": { + "category": "Trends", + "defaultParams": [ + "avg" + ], + "name": "trendValue", + "params": [ + { + "name": "type", + "options": [ + "avg", + "min", + "max", + "sum", + "count" + ], + "type": "string" + } + ] + }, + "params": [ + "max" + ], + "text": "trendValue(avg)" + }, + { + "added": true, + "def": { + "category": "Alias", + "defaultParams": [], + "name": "setAlias", + "params": [ + { + "name": "alias", + "type": "string" + } + ] + }, + "params": [ + "Autovacuum Utiliazation" + ], + "text": "setAlias()" + } + ], + "group": { + "filter": "$group" + }, + "host": { + "filter": "$host" + }, + "item": { + "filter": "PostgreSQL Autovacuum: Utilization per 30 seconds" + }, + "itemTag": { + "filter": "" + }, + "macro": { + "filter": "" + }, + "options": { + "count": false, + "disableDataAlignment": false, + "showDisabledItems": false, + "skipEmptyValues": false, + "useTrends": "default", + "useZabbixValueMapping": false + }, + "proxy": { + "filter": "" + }, + "queryType": "0", + "refId": "A", + "resultFormat": "time_series", + "schema": 12, + "table": { + "skipEmptyValues": false + }, + "tags": { + "filter": "" + }, + "textFilter": "", + "trigger": { + "filter": "" + } + } + ], + "title": "Autovacuum Utilization", + "type": "timeseries" + }, + { + "datasource": { + "type": "alexanderzobnin-zabbix-datasource", + "uid": "${DS_ZABBIX}" + }, + "description": "Autovacuum metrics use information from pg_stat_activity.", + "fieldConfig": { + "defaults": { + "color": { + "fixedColor": "blue", + "mode": "fixed" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "bars", + "fillOpacity": 50, + "gradientMode": "opacity", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "smooth", + "lineWidth": 1, + "pointSize": 3, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "dark-green" + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 35 + }, + "hideTimeOverride": true, + "id": 22, + "interval": "$interval", + "options": { + "legend": { + "calcs": [ + "mean", + "max" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true, + "sortBy": "Name", + "sortDesc": false + }, + "tooltip": { + "maxHeight": 600, + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "11.0.0", + "targets": [ + { + "application": { + "filter": "" + }, + "countTriggersBy": "", + "datasource": { + "type": "alexanderzobnin-zabbix-datasource", + "uid": "${DS_ZABBIX}" + }, + "evaltype": "0", + "functions": [ + { + "added": true, + "def": { + "category": "Special", + "defaultParams": [ + "avg" + ], + "name": "consolidateBy", + "params": [ + { + "name": "type", + "options": [ + "avg", + "min", + "max", + "sum", + "count" + ], + "type": "string" + } + ] + }, + "params": [ + "max" + ], + "text": "consolidateBy(avg)" + }, + { + "added": true, + "def": { + "category": "Transform", + "defaultParams": [ + "1m", + "avg" + ], + "name": "groupBy", + "params": [ + { + "name": "interval", + "type": "string" + }, + { + "name": "function", + "options": [ + "avg", + "min", + "max", + "sum", + "count", + "median", + "first", + "last" + ], + "type": "string" + } + ] + }, + "params": [ + "$interval", + "max" + ], + "text": "groupBy(1m, avg)" + }, + { + "added": true, + "def": { + "category": "Trends", + "defaultParams": [ + "avg" + ], + "name": "trendValue", + "params": [ + { + "name": "type", + "options": [ + "avg", + "min", + "max", + "sum", + "count" + ], + "type": "string" + } + ] + }, + "params": [ + "max" + ], + "text": "trendValue(avg)" + }, + { + "added": true, + "def": { + "category": "Alias", + "defaultParams": [], + "name": "setAlias", + "params": [ + { + "name": "alias", + "type": "string" + } + ] + }, + "params": [ + "Autovacuum Workers" + ], + "text": "setAlias()" + } + ], + "group": { + "filter": "$group" + }, + "host": { + "filter": "$host" + }, + "item": { + "filter": "PostgreSQL Autovacuum: Count of Autovacuum Workers" + }, + "itemTag": { + "filter": "" + }, + "macro": { + "filter": "" + }, + "options": { + "count": false, + "disableDataAlignment": false, + "showDisabledItems": false, + "skipEmptyValues": false, + "useTrends": "default", + "useZabbixValueMapping": false + }, + "proxy": { + "filter": "" + }, + "queryType": "0", + "refId": "A", + "resultFormat": "time_series", + "schema": 12, + "table": { + "skipEmptyValues": false + }, + "tags": { + "filter": "" + }, + "textFilter": "", + "trigger": { + "filter": "" + } + } + ], + "title": "Autovacuum workers", + "type": "timeseries" + } + ], + "title": "Autovacuum", + "type": "row" + }, + { + "collapsed": true, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 27 + }, + "id": 23, + "panels": [ + { + "datasource": { + "type": "alexanderzobnin-zabbix-datasource", + "uid": "${DS_ZABBIX}" + }, + "description": "Buffers Allocated maps to buffers_alloc.\n\nBackground Writer metrics use information from pg_stat_bgwriter.", + "fieldConfig": { + "defaults": { + "color": { + "fixedColor": "orange", + "mode": "fixed" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "smooth", + "lineWidth": 1, + "pointSize": 3, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "dark-green" + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 8, + "x": 0, + "y": 36 + }, + "hideTimeOverride": true, + "id": 24, + "interval": "$interval", + "options": { + "legend": { + "calcs": [ + "mean", + "max" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Name", + "sortDesc": false + }, + "tooltip": { + "maxHeight": 600, + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "11.0.0", + "targets": [ + { + "application": { + "filter": "" + }, + "countTriggersBy": "", + "datasource": { + "type": "alexanderzobnin-zabbix-datasource", + "uid": "${DS_ZABBIX}" + }, + "evaltype": "0", + "functions": [ + { + "added": true, + "def": { + "category": "Transform", + "defaultParams": [ + "1m", + "avg" + ], + "name": "groupBy", + "params": [ + { + "name": "interval", + "type": "string" + }, + { + "name": "function", + "options": [ + "avg", + "min", + "max", + "sum", + "count", + "median", + "first", + "last" + ], + "type": "string" + } + ] + }, + "params": [ + "$interval", + "max" + ], + "text": "groupBy(1m, avg)" + }, + { + "added": true, + "def": { + "category": "Special", + "defaultParams": [ + "avg" + ], + "name": "consolidateBy", + "params": [ + { + "name": "type", + "options": [ + "avg", + "min", + "max", + "sum", + "count" + ], + "type": "string" + } + ] + }, + "params": [ + "max" + ], + "text": "consolidateBy(avg)" + }, + { + "added": true, + "def": { + "category": "Trends", + "defaultParams": [ + "avg" + ], + "name": "trendValue", + "params": [ + { + "name": "type", + "options": [ + "avg", + "min", + "max", + "sum", + "count" + ], + "type": "string" + } + ] + }, + "params": [ + "max" + ], + "text": "trendValue(avg)" + }, + { + "added": true, + "def": { + "category": "Alias", + "defaultParams": [ + "/(.*)/", + "$1" + ], + "name": "replaceAlias", + "params": [ + { + "name": "regexp", + "type": "string" + }, + { + "name": "newAlias", + "type": "string" + } + ] + }, + "params": [ + "/^.*: (.+)$/", + "$1" + ], + "text": "replaceAlias(/(.*)/, $1)" + } + ], + "group": { + "filter": "$group" + }, + "host": { + "filter": "$host" + }, + "item": { + "filter": "PostgreSQL bgwriter: Buffers Allocated" + }, + "itemTag": { + "filter": "" + }, + "macro": { + "filter": "" + }, + "options": { + "count": false, + "disableDataAlignment": false, + "showDisabledItems": false, + "skipEmptyValues": false, + "useTrends": "default", + "useZabbixValueMapping": false + }, + "proxy": { + "filter": "" + }, + "queryType": "0", + "refId": "A", + "resultFormat": "time_series", + "schema": 12, + "table": { + "skipEmptyValues": false + }, + "tags": { + "filter": "" + }, + "textFilter": "", + "trigger": { + "filter": "" + } + } + ], + "title": "Buffers Allocated", + "type": "timeseries" + }, + { + "datasource": { + "type": "alexanderzobnin-zabbix-datasource", + "uid": "${DS_ZABBIX}" + }, + "description": "Buffers Written maps to buffers_clean.\n\nBackground Writer metrics use information from pg_stat_bgwriter.", + "fieldConfig": { + "defaults": { + "color": { + "fixedColor": "orange", + "mode": "fixed" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "smooth", + "lineWidth": 1, + "pointSize": 3, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "dark-green" + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 8, + "x": 8, + "y": 36 + }, + "hideTimeOverride": true, + "id": 25, + "interval": "$interval", + "options": { + "legend": { + "calcs": [ + "mean", + "max" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Name", + "sortDesc": false + }, + "tooltip": { + "maxHeight": 600, + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "11.0.0", + "targets": [ + { + "application": { + "filter": "" + }, + "countTriggersBy": "", + "datasource": { + "type": "alexanderzobnin-zabbix-datasource", + "uid": "${DS_ZABBIX}" + }, + "evaltype": "0", + "functions": [ + { + "added": true, + "def": { + "category": "Transform", + "defaultParams": [ + "1m", + "avg" + ], + "name": "groupBy", + "params": [ + { + "name": "interval", + "type": "string" + }, + { + "name": "function", + "options": [ + "avg", + "min", + "max", + "sum", + "count", + "median", + "first", + "last" + ], + "type": "string" + } + ] + }, + "params": [ + "$interval", + "max" + ], + "text": "groupBy(1m, avg)" + }, + { + "added": true, + "def": { + "category": "Special", + "defaultParams": [ + "avg" + ], + "name": "consolidateBy", + "params": [ + { + "name": "type", + "options": [ + "avg", + "min", + "max", + "sum", + "count" + ], + "type": "string" + } + ] + }, + "params": [ + "max" + ], + "text": "consolidateBy(avg)" + }, + { + "added": true, + "def": { + "category": "Trends", + "defaultParams": [ + "avg" + ], + "name": "trendValue", + "params": [ + { + "name": "type", + "options": [ + "avg", + "min", + "max", + "sum", + "count" + ], + "type": "string" + } + ] + }, + "params": [ + "max" + ], + "text": "trendValue(avg)" + }, + { + "added": true, + "def": { + "category": "Alias", + "defaultParams": [ + "/(.*)/", + "$1" + ], + "name": "replaceAlias", + "params": [ + { + "name": "regexp", + "type": "string" + }, + { + "name": "newAlias", + "type": "string" + } + ] + }, + "params": [ + "/^.*: (.+)$/", + "$1" + ], + "text": "replaceAlias(/(.*)/, $1)" + } + ], + "group": { + "filter": "$group" + }, + "host": { + "filter": "$host" + }, + "item": { + "filter": "PostgreSQL bgwriter: Buffers Written" + }, + "itemTag": { + "filter": "" + }, + "macro": { + "filter": "" + }, + "options": { + "count": false, + "disableDataAlignment": false, + "showDisabledItems": false, + "skipEmptyValues": false, + "useTrends": "default", + "useZabbixValueMapping": false + }, + "proxy": { + "filter": "" + }, + "queryType": "0", + "refId": "A", + "resultFormat": "time_series", + "schema": 12, + "table": { + "skipEmptyValues": false + }, + "tags": { + "filter": "" + }, + "textFilter": "", + "trigger": { + "filter": "" + } + } + ], + "title": "Buffers Written", + "type": "timeseries" + }, + { + "datasource": { + "type": "alexanderzobnin-zabbix-datasource", + "uid": "${DS_ZABBIX}" + }, + "description": "Buffers Written Directly By a Backend maps to buffers_backend.\nBuffers Written During Checkpoints maps to buffers_checkpoint.\n\nBackground Writer metrics use information from pg_stat_bgwriter.", + "fieldConfig": { + "defaults": { + "color": { + "fixedColor": "orange", + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "smooth", + "lineWidth": 1, + "pointSize": 3, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "dark-green" + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 8, + "x": 16, + "y": 36 + }, + "hideTimeOverride": true, + "id": 26, + "interval": "$interval", + "options": { + "legend": { + "calcs": [ + "mean", + "max" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Name", + "sortDesc": false + }, + "tooltip": { + "maxHeight": 600, + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "11.0.0", + "targets": [ + { + "application": { + "filter": "" + }, + "countTriggersBy": "", + "datasource": { + "type": "alexanderzobnin-zabbix-datasource", + "uid": "${DS_ZABBIX}" + }, + "evaltype": "0", + "functions": [ + { + "added": true, + "def": { + "category": "Transform", + "defaultParams": [ + "1m", + "avg" + ], + "name": "groupBy", + "params": [ + { + "name": "interval", + "type": "string" + }, + { + "name": "function", + "options": [ + "avg", + "min", + "max", + "sum", + "count", + "median", + "first", + "last" + ], + "type": "string" + } + ] + }, + "params": [ + "$interval", + "max" + ], + "text": "groupBy(1m, avg)" + }, + { + "added": true, + "def": { + "category": "Special", + "defaultParams": [ + "avg" + ], + "name": "consolidateBy", + "params": [ + { + "name": "type", + "options": [ + "avg", + "min", + "max", + "sum", + "count" + ], + "type": "string" + } + ] + }, + "params": [ + "max" + ], + "text": "consolidateBy(avg)" + }, + { + "added": true, + "def": { + "category": "Trends", + "defaultParams": [ + "avg" + ], + "name": "trendValue", + "params": [ + { + "name": "type", + "options": [ + "avg", + "min", + "max", + "sum", + "count" + ], + "type": "string" + } + ] + }, + "params": [ + "max" + ], + "text": "trendValue(avg)" + }, + { + "added": true, + "def": { + "category": "Alias", + "defaultParams": [ + "/(.*)/", + "$1" + ], + "name": "replaceAlias", + "params": [ + { + "name": "regexp", + "type": "string" + }, + { + "name": "newAlias", + "type": "string" + } + ] + }, + "params": [ + "/^.*: (.+)$/", + "$1" + ], + "text": "replaceAlias(/(.*)/, $1)" + } + ], + "group": { + "filter": "$group" + }, + "host": { + "filter": "$host" + }, + "item": { + "filter": "/PostgreSQL bgwriter: Buffers Written /" + }, + "itemTag": { + "filter": "" + }, + "macro": { + "filter": "" + }, + "options": { + "count": false, + "disableDataAlignment": false, + "showDisabledItems": false, + "skipEmptyValues": false, + "useTrends": "default", + "useZabbixValueMapping": false + }, + "proxy": { + "filter": "" + }, + "queryType": "0", + "refId": "A", + "resultFormat": "time_series", + "schema": 12, + "table": { + "skipEmptyValues": false + }, + "tags": { + "filter": "" + }, + "textFilter": "", + "trigger": { + "filter": "" + } + } + ], + "title": "Buffers Written details", + "type": "timeseries" + }, + { + "datasource": { + "type": "alexanderzobnin-zabbix-datasource", + "uid": "${DS_ZABBIX}" + }, + "description": "Bgwriter Stopped a Cleaning Scan maps to maxwritten_clean.\n\nBackground Writer metrics use information from pg_stat_bgwriter.", + "fieldConfig": { + "defaults": { + "color": { + "fixedColor": "orange", + "mode": "fixed" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "smooth", + "lineWidth": 1, + "pointSize": 3, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "dark-green" + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 44 + }, + "hideTimeOverride": true, + "id": 27, + "interval": "$interval", + "options": { + "legend": { + "calcs": [ + "mean", + "max" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Name", + "sortDesc": false + }, + "tooltip": { + "maxHeight": 600, + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "11.0.0", + "targets": [ + { + "application": { + "filter": "" + }, + "countTriggersBy": "", + "datasource": { + "type": "alexanderzobnin-zabbix-datasource", + "uid": "${DS_ZABBIX}" + }, + "evaltype": "0", + "functions": [ + { + "added": true, + "def": { + "category": "Transform", + "defaultParams": [ + "1m", + "avg" + ], + "name": "groupBy", + "params": [ + { + "name": "interval", + "type": "string" + }, + { + "name": "function", + "options": [ + "avg", + "min", + "max", + "sum", + "count", + "median", + "first", + "last" + ], + "type": "string" + } + ] + }, + "params": [ + "$interval", + "max" + ], + "text": "groupBy(1m, avg)" + }, + { + "added": true, + "def": { + "category": "Special", + "defaultParams": [ + "avg" + ], + "name": "consolidateBy", + "params": [ + { + "name": "type", + "options": [ + "avg", + "min", + "max", + "sum", + "count" + ], + "type": "string" + } + ] + }, + "params": [ + "max" + ], + "text": "consolidateBy(avg)" + }, + { + "added": true, + "def": { + "category": "Trends", + "defaultParams": [ + "avg" + ], + "name": "trendValue", + "params": [ + { + "name": "type", + "options": [ + "avg", + "min", + "max", + "sum", + "count" + ], + "type": "string" + } + ] + }, + "params": [ + "max" + ], + "text": "trendValue(avg)" + }, + { + "added": true, + "def": { + "category": "Alias", + "defaultParams": [ + "/(.*)/", + "$1" + ], + "name": "replaceAlias", + "params": [ + { + "name": "regexp", + "type": "string" + }, + { + "name": "newAlias", + "type": "string" + } + ] + }, + "params": [ + "/^.*: (.+)$/", + "$1" + ], + "text": "replaceAlias(/(.*)/, $1)" + } + ], + "group": { + "filter": "$group" + }, + "host": { + "filter": "$host" + }, + "item": { + "filter": "PostgreSQL bgwriter: Number of bgwriter Stopped by Max Write Count" + }, + "itemTag": { + "filter": "" + }, + "macro": { + "filter": "" + }, + "options": { + "count": false, + "disableDataAlignment": false, + "showDisabledItems": false, + "skipEmptyValues": false, + "useTrends": "default", + "useZabbixValueMapping": false + }, + "proxy": { + "filter": "" + }, + "queryType": "0", + "refId": "A", + "resultFormat": "time_series", + "schema": 12, + "table": { + "skipEmptyValues": false + }, + "tags": { + "filter": "" + }, + "textFilter": "", + "trigger": { + "filter": "" + } + } + ], + "title": "Number of bgwriter Stopped by Max Write Count", + "type": "timeseries" + }, + { + "datasource": { + "type": "alexanderzobnin-zabbix-datasource", + "uid": "${DS_ZABBIX}" + }, + "description": "Backend Executes Its Own Fsync Call maps to buffers_backend_fsync.\n\nBackground Writer metrics use information from pg_stat_bgwriter.", + "fieldConfig": { + "defaults": { + "color": { + "fixedColor": "orange", + "mode": "fixed" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "smooth", + "lineWidth": 1, + "pointSize": 3, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "dark-green" + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 44 + }, + "hideTimeOverride": true, + "id": 28, + "interval": "$interval", + "options": { + "legend": { + "calcs": [ + "mean", + "max" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Name", + "sortDesc": false + }, + "tooltip": { + "maxHeight": 600, + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "11.0.0", + "targets": [ + { + "application": { + "filter": "" + }, + "countTriggersBy": "", + "datasource": { + "type": "alexanderzobnin-zabbix-datasource", + "uid": "${DS_ZABBIX}" + }, + "evaltype": "0", + "functions": [ + { + "added": true, + "def": { + "category": "Transform", + "defaultParams": [ + "1m", + "avg" + ], + "name": "groupBy", + "params": [ + { + "name": "interval", + "type": "string" + }, + { + "name": "function", + "options": [ + "avg", + "min", + "max", + "sum", + "count", + "median", + "first", + "last" + ], + "type": "string" + } + ] + }, + "params": [ + "$interval", + "max" + ], + "text": "groupBy(1m, avg)" + }, + { + "added": true, + "def": { + "category": "Special", + "defaultParams": [ + "avg" + ], + "name": "consolidateBy", + "params": [ + { + "name": "type", + "options": [ + "avg", + "min", + "max", + "sum", + "count" + ], + "type": "string" + } + ] + }, + "params": [ + "max" + ], + "text": "consolidateBy(avg)" + }, + { + "added": true, + "def": { + "category": "Trends", + "defaultParams": [ + "avg" + ], + "name": "trendValue", + "params": [ + { + "name": "type", + "options": [ + "avg", + "min", + "max", + "sum", + "count" + ], + "type": "string" + } + ] + }, + "params": [ + "max" + ], + "text": "trendValue(avg)" + }, + { + "added": true, + "def": { + "category": "Alias", + "defaultParams": [ + "/(.*)/", + "$1" + ], + "name": "replaceAlias", + "params": [ + { + "name": "regexp", + "type": "string" + }, + { + "name": "newAlias", + "type": "string" + } + ] + }, + "params": [ + "/^.*: (.+)$/", + "$1" + ], + "text": "replaceAlias(/(.*)/, $1)" + } + ], + "group": { + "filter": "$group" + }, + "host": { + "filter": "$host" + }, + "item": { + "filter": "PostgreSQL bgwriter: Times a Backend Execute Its Own Fsync" + }, + "itemTag": { + "filter": "" + }, + "macro": { + "filter": "" + }, + "options": { + "count": false, + "disableDataAlignment": false, + "showDisabledItems": false, + "skipEmptyValues": false, + "useTrends": "default", + "useZabbixValueMapping": false + }, + "proxy": { + "filter": "" + }, + "queryType": "0", + "refId": "A", + "resultFormat": "time_series", + "schema": 12, + "table": { + "skipEmptyValues": false + }, + "tags": { + "filter": "" + }, + "textFilter": "", + "trigger": { + "filter": "" + } + } + ], + "title": "Backend Executes Its Own Fsync Call", + "type": "timeseries" + } + ], + "title": "Background Writer", + "type": "row" + }, + { + "collapsed": true, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 28 + }, + "id": 35, + "panels": [ + { + "datasource": { + "type": "alexanderzobnin-zabbix-datasource", + "uid": "${DS_ZABBIX}" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "smooth", + "lineWidth": 1, + "pointSize": 3, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "dark-green" + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 52 + }, + "hideTimeOverride": true, + "id": 36, + "interval": "$interval", + "options": { + "legend": { + "calcs": [ + "min", + "max", + "lastNotNull" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "maxHeight": 600, + "mode": "multi", + "sort": "desc" + } + }, + "pluginVersion": "11.0.0", + "targets": [ + { + "application": { + "filter": "" + }, + "countTriggersBy": "", + "datasource": { + "type": "alexanderzobnin-zabbix-datasource", + "uid": "${DS_ZABBIX}" + }, + "evaltype": "0", + "functions": [ + { + "added": true, + "def": { + "category": "Transform", + "defaultParams": [ + "1m", + "avg" + ], + "name": "groupBy", + "params": [ + { + "name": "interval", + "type": "string" + }, + { + "name": "function", + "options": [ + "avg", + "min", + "max", + "sum", + "count", + "median", + "first", + "last" + ], + "type": "string" + } + ] + }, + "params": [ + "$interval", + "max" + ], + "text": "groupBy(1m, avg)" + }, + { + "added": true, + "def": { + "category": "Special", + "defaultParams": [ + "avg" + ], + "name": "consolidateBy", + "params": [ + { + "name": "type", + "options": [ + "avg", + "min", + "max", + "sum", + "count" + ], + "type": "string" + } + ] + }, + "params": [ + "max" + ], + "text": "consolidateBy(avg)" + }, + { + "added": true, + "def": { + "category": "Trends", + "defaultParams": [ + "avg" + ], + "name": "trendValue", + "params": [ + { + "name": "type", + "options": [ + "avg", + "min", + "max", + "sum", + "count" + ], + "type": "string" + } + ] + }, + "params": [ + "max" + ], + "text": "trendValue(avg)" + }, + { + "added": true, + "def": { + "category": "Alias", + "defaultParams": [ + "/(.*)/", + "$1" + ], + "name": "replaceAlias", + "params": [ + { + "name": "regexp", + "type": "string" + }, + { + "name": "newAlias", + "type": "string" + } + ] + }, + "params": [ + "/^PostgreSQL Databases: (.+) size$/", + "$1" + ], + "text": "replaceAlias(/(.*)/, $1)" + } + ], + "group": { + "filter": "$group" + }, + "host": { + "filter": "$host" + }, + "item": { + "filter": "/^PostgreSQL Databases: $database size$/" + }, + "itemTag": { + "filter": "" + }, + "macro": { + "filter": "" + }, + "options": { + "count": false, + "disableDataAlignment": false, + "showDisabledItems": false, + "skipEmptyValues": false, + "useTrends": "default", + "useZabbixValueMapping": false + }, + "proxy": { + "filter": "" + }, + "queryType": "0", + "refId": "A", + "resultFormat": "time_series", + "schema": 12, + "table": { + "skipEmptyValues": false + }, + "tags": { + "filter": "" + }, + "textFilter": "", + "trigger": { + "filter": "" + } + } + ], + "title": "Database size", + "type": "timeseries" + }, + { + "datasource": { + "type": "alexanderzobnin-zabbix-datasource", + "uid": "${DS_ZABBIX}" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "smooth", + "lineWidth": 1, + "pointSize": 3, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "dark-green" + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 52 + }, + "hideTimeOverride": true, + "id": 40, + "interval": "$interval", + "options": { + "legend": { + "calcs": [ + "min", + "max", + "lastNotNull" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "maxHeight": 600, + "mode": "multi", + "sort": "desc" + } + }, + "pluginVersion": "11.0.0", + "targets": [ + { + "application": { + "filter": "" + }, + "countTriggersBy": "", + "datasource": { + "type": "alexanderzobnin-zabbix-datasource", + "uid": "${DS_ZABBIX}" + }, + "evaltype": "0", + "functions": [ + { + "added": true, + "def": { + "category": "Transform", + "defaultParams": [ + "1m", + "avg" + ], + "name": "groupBy", + "params": [ + { + "name": "interval", + "type": "string" + }, + { + "name": "function", + "options": [ + "avg", + "min", + "max", + "sum", + "count", + "median", + "first", + "last" + ], + "type": "string" + } + ] + }, + "params": [ + "$interval", + "max" + ], + "text": "groupBy(1m, avg)" + }, + { + "added": true, + "def": { + "category": "Special", + "defaultParams": [ + "avg" + ], + "name": "consolidateBy", + "params": [ + { + "name": "type", + "options": [ + "avg", + "min", + "max", + "sum", + "count" + ], + "type": "string" + } + ] + }, + "params": [ + "max" + ], + "text": "consolidateBy(avg)" + }, + { + "added": true, + "def": { + "category": "Trends", + "defaultParams": [ + "avg" + ], + "name": "trendValue", + "params": [ + { + "name": "type", + "options": [ + "avg", + "min", + "max", + "sum", + "count" + ], + "type": "string" + } + ] + }, + "params": [ + "max" + ], + "text": "trendValue(avg)" + }, + { + "added": true, + "def": { + "category": "Alias", + "defaultParams": [ + "/(.*)/", + "$1" + ], + "name": "replaceAlias", + "params": [ + { + "name": "regexp", + "type": "string" + }, + { + "name": "newAlias", + "type": "string" + } + ] + }, + "params": [ + "/^PostgreSQL Databases: Max datfrozenxid Age in: (.+)$/", + "$1" + ], + "text": "replaceAlias(/(.*)/, $1)" + } + ], + "group": { + "filter": "$group" + }, + "host": { + "filter": "$host" + }, + "item": { + "filter": "/^PostgreSQL Databases: Max datfrozenxid Age in: (.+)$/" + }, + "itemTag": { + "filter": "" + }, + "macro": { + "filter": "" + }, + "options": { + "count": false, + "disableDataAlignment": false, + "showDisabledItems": false, + "skipEmptyValues": false, + "useTrends": "default", + "useZabbixValueMapping": false + }, + "proxy": { + "filter": "" + }, + "queryType": "0", + "refId": "A", + "resultFormat": "time_series", + "schema": 12, + "table": { + "skipEmptyValues": false + }, + "tags": { + "filter": "" + }, + "textFilter": "", + "trigger": { + "filter": "" + } + } + ], + "title": "Max datfrozenxid Age", + "type": "timeseries" + }, + { + "datasource": { + "type": "alexanderzobnin-zabbix-datasource", + "uid": "${DS_ZABBIX}" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "smooth", + "lineWidth": 1, + "pointSize": 3, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "dark-green" + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 60 + }, + "hideTimeOverride": true, + "id": 38, + "interval": "$interval", + "options": { + "legend": { + "calcs": [ + "max", + "lastNotNull" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true + }, + "tooltip": { + "maxHeight": 600, + "mode": "multi", + "sort": "desc" + } + }, + "pluginVersion": "11.0.0", + "targets": [ + { + "application": { + "filter": "" + }, + "countTriggersBy": "", + "datasource": { + "type": "alexanderzobnin-zabbix-datasource", + "uid": "${DS_ZABBIX}" + }, + "evaltype": "0", + "functions": [ + { + "added": true, + "def": { + "category": "Transform", + "defaultParams": [ + "1m", + "avg" + ], + "name": "groupBy", + "params": [ + { + "name": "interval", + "type": "string" + }, + { + "name": "function", + "options": [ + "avg", + "min", + "max", + "sum", + "count", + "median", + "first", + "last" + ], + "type": "string" + } + ] + }, + "params": [ + "$interval", + "max" + ], + "text": "groupBy(1m, avg)" + }, + { + "added": true, + "def": { + "category": "Special", + "defaultParams": [ + "avg" + ], + "name": "consolidateBy", + "params": [ + { + "name": "type", + "options": [ + "avg", + "min", + "max", + "sum", + "count" + ], + "type": "string" + } + ] + }, + "params": [ + "max" + ], + "text": "consolidateBy(avg)" + }, + { + "added": true, + "def": { + "category": "Trends", + "defaultParams": [ + "avg" + ], + "name": "trendValue", + "params": [ + { + "name": "type", + "options": [ + "avg", + "min", + "max", + "sum", + "count" + ], + "type": "string" + } + ] + }, + "params": [ + "max" + ], + "text": "trendValue(avg)" + }, + { + "added": true, + "def": { + "category": "Alias", + "defaultParams": [ + "/(.*)/", + "$1" + ], + "name": "replaceAlias", + "params": [ + { + "name": "regexp", + "type": "string" + }, + { + "name": "newAlias", + "type": "string" + } + ] + }, + "params": [ + "/^.* Count of Bloating Tables in (.+)$/", + "$1" + ], + "text": "replaceAlias(/(.*)/, $1)" + } + ], + "group": { + "filter": "$group" + }, + "host": { + "filter": "$host" + }, + "item": { + "filter": "/^PostgreSQL Databases: Count of Bloating Tables in $database$/" + }, + "itemTag": { + "filter": "" + }, + "macro": { + "filter": "" + }, + "options": { + "count": false, + "disableDataAlignment": false, + "showDisabledItems": false, + "skipEmptyValues": false, + "useTrends": "default", + "useZabbixValueMapping": false + }, + "proxy": { + "filter": "" + }, + "queryType": "0", + "refId": "A", + "resultFormat": "time_series", + "schema": 12, + "table": { + "skipEmptyValues": false + }, + "tags": { + "filter": "" + }, + "textFilter": "", + "trigger": { + "filter": "" + } + } + ], + "title": "Count of Bloating Tables in database", + "type": "timeseries" + }, + { + "datasource": { + "type": "alexanderzobnin-zabbix-datasource", + "uid": "${DS_ZABBIX}" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "smooth", + "lineWidth": 1, + "pointSize": 3, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "dark-green" + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 60 + }, + "hideTimeOverride": true, + "id": 41, + "interval": "$interval", + "options": { + "legend": { + "calcs": [ + "max", + "lastNotNull" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "maxHeight": 600, + "mode": "multi", + "sort": "desc" + } + }, + "pluginVersion": "11.0.0", + "targets": [ + { + "application": { + "filter": "" + }, + "countTriggersBy": "", + "datasource": { + "type": "alexanderzobnin-zabbix-datasource", + "uid": "${DS_ZABBIX}" + }, + "evaltype": "0", + "functions": [ + { + "added": true, + "def": { + "category": "Transform", + "defaultParams": [ + "1m", + "avg" + ], + "name": "groupBy", + "params": [ + { + "name": "interval", + "type": "string" + }, + { + "name": "function", + "options": [ + "avg", + "min", + "max", + "sum", + "count", + "median", + "first", + "last" + ], + "type": "string" + } + ] + }, + "params": [ + "$interval", + "max" + ], + "text": "groupBy(1m, avg)" + }, + { + "added": true, + "def": { + "category": "Special", + "defaultParams": [ + "avg" + ], + "name": "consolidateBy", + "params": [ + { + "name": "type", + "options": [ + "avg", + "min", + "max", + "sum", + "count" + ], + "type": "string" + } + ] + }, + "params": [ + "max" + ], + "text": "consolidateBy(avg)" + }, + { + "added": true, + "def": { + "category": "Trends", + "defaultParams": [ + "avg" + ], + "name": "trendValue", + "params": [ + { + "name": "type", + "options": [ + "avg", + "min", + "max", + "sum", + "count" + ], + "type": "string" + } + ] + }, + "params": [ + "max" + ], + "text": "trendValue(avg)" + }, + { + "added": true, + "def": { + "category": "Alias", + "defaultParams": [ + "/(.*)/", + "$1" + ], + "name": "replaceAlias", + "params": [ + { + "name": "regexp", + "type": "string" + }, + { + "name": "newAlias", + "type": "string" + } + ] + }, + "params": [ + "/^PostgreSQL Databases: Count of Invalid Indexes in (.+)$/", + "$1" + ], + "text": "replaceAlias(/(.*)/, $1)" + } + ], + "group": { + "filter": "$group" + }, + "host": { + "filter": "$host" + }, + "item": { + "filter": "/^PostgreSQL Databases: Count of Invalid Indexes in ${database}$/" + }, + "itemTag": { + "filter": "" + }, + "macro": { + "filter": "" + }, + "options": { + "count": false, + "disableDataAlignment": false, + "showDisabledItems": false, + "skipEmptyValues": false, + "useTrends": "default", + "useZabbixValueMapping": false + }, + "proxy": { + "filter": "" + }, + "queryType": "0", + "refId": "A", + "resultFormat": "time_series", + "schema": 12, + "table": { + "skipEmptyValues": false + }, + "tags": { + "filter": "" + }, + "textFilter": "", + "trigger": { + "filter": "" + } + } + ], + "title": "Count of Invalid Indexes in database", + "type": "timeseries" + } + ], + "title": "Databases", + "type": "row" + }, + { + "collapsed": true, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 29 + }, + "id": 30, + "panels": [ + { + "datasource": { + "type": "alexanderzobnin-zabbix-datasource", + "uid": "${DS_ZABBIX}" + }, + "description": "Checkpoints Sync Time maps checkpoint_sync_time.\n\nCheckpoints metrics use information from pg_stat_bgwriter.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "smooth", + "lineWidth": 1, + "pointSize": 3, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "dark-green" + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 30 + }, + "hideTimeOverride": true, + "id": 31, + "interval": "$interval", + "options": { + "legend": { + "calcs": [ + "mean", + "max" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "maxHeight": 600, + "mode": "multi", + "sort": "desc" + } + }, + "pluginVersion": "11.0.0", + "targets": [ + { + "application": { + "filter": "" + }, + "countTriggersBy": "", + "datasource": { + "type": "alexanderzobnin-zabbix-datasource", + "uid": "${DS_ZABBIX}" + }, + "evaltype": "0", + "functions": [ + { + "added": true, + "def": { + "category": "Transform", + "defaultParams": [ + "1m", + "avg" + ], + "name": "groupBy", + "params": [ + { + "name": "interval", + "type": "string" + }, + { + "name": "function", + "options": [ + "avg", + "min", + "max", + "sum", + "count", + "median", + "first", + "last" + ], + "type": "string" + } + ] + }, + "params": [ + "$interval", + "avg" + ], + "text": "groupBy(1m, avg)" + }, + { + "added": true, + "def": { + "category": "Alias", + "defaultParams": [ + "/(.*)/", + "$1" + ], + "name": "replaceAlias", + "params": [ + { + "name": "regexp", + "type": "string" + }, + { + "name": "newAlias", + "type": "string" + } + ] + }, + "params": [ + "/^.*: (.*)/", + "$1" + ], + "text": "replaceAlias(/(.*)/, $1)" + } + ], + "group": { + "filter": "$group" + }, + "host": { + "filter": "$host" + }, + "item": { + "filter": "PostgreSQL Checkpoints: Sync Time" + }, + "itemTag": { + "filter": "" + }, + "macro": { + "filter": "" + }, + "options": { + "count": false, + "disableDataAlignment": false, + "showDisabledItems": false, + "skipEmptyValues": false, + "useTrends": "default", + "useZabbixValueMapping": false + }, + "proxy": { + "filter": "" + }, + "queryType": "0", + "refId": "A", + "resultFormat": "time_series", + "schema": 12, + "table": { + "skipEmptyValues": false + }, + "tags": { + "filter": "" + }, + "textFilter": "", + "trigger": { + "filter": "" + } + } + ], + "title": "Checkpoints Sync Time", + "type": "timeseries" + }, + { + "datasource": { + "type": "alexanderzobnin-zabbix-datasource", + "uid": "${DS_ZABBIX}" + }, + "description": "Checkpoints Write Time maps checkpoint_write_time.\n\nCheckpoints metrics use information from pg_stat_bgwriter.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "smooth", + "lineWidth": 1, + "pointSize": 3, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "dark-green" + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 30 + }, + "hideTimeOverride": true, + "id": 32, + "interval": "$interval", + "options": { + "legend": { + "calcs": [ + "mean", + "max" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "maxHeight": 600, + "mode": "multi", + "sort": "desc" + } + }, + "pluginVersion": "11.0.0", + "targets": [ + { + "application": { + "filter": "" + }, + "countTriggersBy": "", + "datasource": { + "type": "alexanderzobnin-zabbix-datasource", + "uid": "${DS_ZABBIX}" + }, + "evaltype": "0", + "functions": [ + { + "added": true, + "def": { + "category": "Transform", + "defaultParams": [ + "1m", + "avg" + ], + "name": "groupBy", + "params": [ + { + "name": "interval", + "type": "string" + }, + { + "name": "function", + "options": [ + "avg", + "min", + "max", + "sum", + "count", + "median", + "first", + "last" + ], + "type": "string" + } + ] + }, + "params": [ + "$interval", + "avg" + ], + "text": "groupBy(1m, avg)" + }, + { + "added": true, + "def": { + "category": "Alias", + "defaultParams": [ + "/(.*)/", + "$1" + ], + "name": "replaceAlias", + "params": [ + { + "name": "regexp", + "type": "string" + }, + { + "name": "newAlias", + "type": "string" + } + ] + }, + "params": [ + "/^.*: (.*)/", + "$1" + ], + "text": "replaceAlias(/(.*)/, $1)" + } + ], + "group": { + "filter": "$group" + }, + "host": { + "filter": "$host" + }, + "item": { + "filter": "PostgreSQL Checkpoints: Write Time" + }, + "itemTag": { + "filter": "" + }, + "macro": { + "filter": "" + }, + "options": { + "count": false, + "disableDataAlignment": false, + "showDisabledItems": false, + "skipEmptyValues": false, + "useTrends": "default", + "useZabbixValueMapping": false + }, + "proxy": { + "filter": "" + }, + "queryType": "0", + "refId": "A", + "resultFormat": "time_series", + "schema": 12, + "table": { + "skipEmptyValues": false + }, + "tags": { + "filter": "" + }, + "textFilter": "", + "trigger": { + "filter": "" + } + } + ], + "title": "Checkpoints Write Time", + "type": "timeseries" + }, + { + "datasource": { + "type": "alexanderzobnin-zabbix-datasource", + "uid": "${DS_ZABBIX}" + }, + "description": "Scheduled Checkpoints maps checkpoints_timed.\n\nCheckpoints metrics use information from pg_stat_bgwriter.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "smooth", + "lineWidth": 1, + "pointSize": 3, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "dark-green" + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 38 + }, + "hideTimeOverride": true, + "id": 33, + "interval": "1h", + "options": { + "legend": { + "calcs": [ + "mean", + "max" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "maxHeight": 600, + "mode": "multi", + "sort": "desc" + } + }, + "pluginVersion": "11.0.0", + "targets": [ + { + "application": { + "filter": "" + }, + "countTriggersBy": "", + "datasource": { + "type": "alexanderzobnin-zabbix-datasource", + "uid": "${DS_ZABBIX}" + }, + "evaltype": "0", + "functions": [ + { + "added": true, + "def": { + "category": "Transform", + "defaultParams": [ + "1m", + "avg" + ], + "name": "groupBy", + "params": [ + { + "name": "interval", + "type": "string" + }, + { + "name": "function", + "options": [ + "avg", + "min", + "max", + "sum", + "count", + "median", + "first", + "last" + ], + "type": "string" + } + ] + }, + "params": [ + "1h", + "max" + ], + "text": "groupBy(1m, avg)" + }, + { + "added": true, + "def": { + "category": "Trends", + "defaultParams": [ + "avg" + ], + "name": "trendValue", + "params": [ + { + "name": "type", + "options": [ + "avg", + "min", + "max", + "sum", + "count" + ], + "type": "string" + } + ] + }, + "params": [ + "max" + ], + "text": "trendValue(avg)" + }, + { + "added": true, + "def": { + "category": "Special", + "defaultParams": [ + "avg" + ], + "name": "consolidateBy", + "params": [ + { + "name": "type", + "options": [ + "avg", + "min", + "max", + "sum", + "count" + ], + "type": "string" + } + ] + }, + "params": [ + "max" + ], + "text": "consolidateBy(avg)" + }, + { + "added": true, + "def": { + "category": "Alias", + "defaultParams": [], + "name": "setAlias", + "params": [ + { + "name": "alias", + "type": "string" + } + ] + }, + "params": [ + "Scheduled Checkpoints" + ], + "text": "setAlias()" + } + ], + "group": { + "filter": "$group" + }, + "host": { + "filter": "$host" + }, + "item": { + "filter": "PostgreSQL Checkpoints: by Timeout (in hour)" + }, + "itemTag": { + "filter": "" + }, + "macro": { + "filter": "" + }, + "options": { + "count": false, + "disableDataAlignment": false, + "showDisabledItems": false, + "skipEmptyValues": false, + "useTrends": "default", + "useZabbixValueMapping": false + }, + "proxy": { + "filter": "" + }, + "queryType": "0", + "refId": "A", + "resultFormat": "time_series", + "schema": 12, + "table": { + "skipEmptyValues": false + }, + "tags": { + "filter": "" + }, + "textFilter": "", + "trigger": { + "filter": "" + } + } + ], + "title": "Requested Checkpoints [per 1 hour]", + "type": "timeseries" + }, + { + "datasource": { + "type": "alexanderzobnin-zabbix-datasource", + "uid": "${DS_ZABBIX}" + }, + "description": "Requested Checkpoints maps checkpoints_req.\n\nCheckpoints metrics use information from pg_stat_bgwriter.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "smooth", + "lineWidth": 1, + "pointSize": 3, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "dark-green" + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 38 + }, + "hideTimeOverride": true, + "id": 34, + "interval": "1h", + "options": { + "legend": { + "calcs": [ + "mean", + "max" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "maxHeight": 600, + "mode": "multi", + "sort": "desc" + } + }, + "pluginVersion": "11.0.0", + "targets": [ + { + "application": { + "filter": "" + }, + "countTriggersBy": "", + "datasource": { + "type": "alexanderzobnin-zabbix-datasource", + "uid": "${DS_ZABBIX}" + }, + "evaltype": "0", + "functions": [ + { + "added": true, + "def": { + "category": "Transform", + "defaultParams": [ + "1m", + "avg" + ], + "name": "groupBy", + "params": [ + { + "name": "interval", + "type": "string" + }, + { + "name": "function", + "options": [ + "avg", + "min", + "max", + "sum", + "count", + "median", + "first", + "last" + ], + "type": "string" + } + ] + }, + "params": [ + "1h", + "max" + ], + "text": "groupBy(1m, avg)" + }, + { + "added": true, + "def": { + "category": "Trends", + "defaultParams": [ + "avg" + ], + "name": "trendValue", + "params": [ + { + "name": "type", + "options": [ + "avg", + "min", + "max", + "sum", + "count" + ], + "type": "string" + } + ] + }, + "params": [ + "max" + ], + "text": "trendValue(avg)" + }, + { + "added": true, + "def": { + "category": "Special", + "defaultParams": [ + "avg" + ], + "name": "consolidateBy", + "params": [ + { + "name": "type", + "options": [ + "avg", + "min", + "max", + "sum", + "count" + ], + "type": "string" + } + ] + }, + "params": [ + "max" + ], + "text": "consolidateBy(avg)" + }, + { + "added": true, + "def": { + "category": "Alias", + "defaultParams": [], + "name": "setAlias", + "params": [ + { + "name": "alias", + "type": "string" + } + ] + }, + "params": [ + "Requested Checkpoints" + ], + "text": "setAlias()" + } + ], + "group": { + "filter": "$group" + }, + "host": { + "filter": "$host" + }, + "item": { + "filter": "PostgreSQL Checkpoints: by WAL (in hour)" + }, + "itemTag": { + "filter": "" + }, + "macro": { + "filter": "" + }, + "options": { + "count": false, + "disableDataAlignment": false, + "showDisabledItems": false, + "skipEmptyValues": false, + "useTrends": "default", + "useZabbixValueMapping": false + }, + "proxy": { + "filter": "" + }, + "queryType": "0", + "refId": "A", + "resultFormat": "time_series", + "schema": 12, + "table": { + "skipEmptyValues": false + }, + "tags": { + "filter": "" + }, + "textFilter": "", + "trigger": { + "filter": "" + } + } + ], + "title": "Requested Checkpoints [per 1 hour]", + "type": "timeseries" + } + ], + "title": "Checkpoints", + "type": "row" + }, + { + "collapsed": true, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 30 + }, + "id": 94, + "panels": [ + { + "datasource": { + "type": "alexanderzobnin-zabbix-datasource", + "uid": "${DS_ZABBIX}" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "smooth", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "dark-green" + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 12, + "x": 0, + "y": 47 + }, + "hideTimeOverride": true, + "id": 97, + "interval": "1h", + "options": { + "legend": { + "calcs": [ + "min", + "max", + "last" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "maxHeight": 600, + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "11.0.0", + "targets": [ + { + "application": { + "filter": "" + }, + "countTriggersBy": "", + "datasource": { + "type": "alexanderzobnin-zabbix-datasource", + "uid": "${DS_ZABBIX}" + }, + "evaltype": "0", + "functions": [ + { + "added": true, + "def": { + "category": "Alias", + "defaultParams": [ + "/(.*)/", + "$1" + ], + "name": "replaceAlias", + "params": [ + { + "name": "regexp", + "type": "string" + }, + { + "name": "newAlias", + "type": "string" + } + ] + }, + "params": [ + "/^.*: (.*)/", + "$1" + ], + "text": "replaceAlias(/(.*)/, $1)" + } + ], + "group": { + "filter": "$group" + }, + "host": { + "filter": "$host" + }, + "item": { + "filter": "PostgreSQL CFS: Current Ratio" + }, + "itemTag": { + "filter": "" + }, + "macro": { + "filter": "" + }, + "options": { + "count": false, + "disableDataAlignment": false, + "showDisabledItems": false, + "skipEmptyValues": false, + "useTrends": "default", + "useZabbixValueMapping": false + }, + "proxy": { + "filter": "" + }, + "queryType": "0", + "refId": "A", + "resultFormat": "time_series", + "schema": 12, + "table": { + "skipEmptyValues": false + }, + "tags": { + "filter": "" + }, + "textFilter": "", + "trigger": { + "filter": "" + } + } + ], + "title": "Current Ratio", + "type": "timeseries" + }, + { + "datasource": { + "type": "alexanderzobnin-zabbix-datasource", + "uid": "${DS_ZABBIX}" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "smooth", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "dark-green" + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 12, + "x": 12, + "y": 47 + }, + "hideTimeOverride": true, + "id": 98, + "interval": "10m", + "options": { + "legend": { + "calcs": [ + "min", + "max", + "last" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "maxHeight": 600, + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "11.0.0", + "targets": [ + { + "application": { + "filter": "" + }, + "countTriggersBy": "", + "datasource": { + "type": "alexanderzobnin-zabbix-datasource", + "uid": "${DS_ZABBIX}" + }, + "evaltype": "0", + "functions": [ + { + "added": true, + "def": { + "category": "Alias", + "defaultParams": [ + "/(.*)/", + "$1" + ], + "name": "replaceAlias", + "params": [ + { + "name": "regexp", + "type": "string" + }, + { + "name": "newAlias", + "type": "string" + } + ] + }, + "params": [ + "/^.*: (.*)/", + "$1" + ], + "text": "replaceAlias(/(.*)/, $1)" + } + ], + "group": { + "filter": "$group" + }, + "host": { + "filter": "$host" + }, + "item": { + "filter": "PostgreSQL CFS: Total Ratio" + }, + "itemTag": { + "filter": "" + }, + "macro": { + "filter": "" + }, + "options": { + "count": false, + "disableDataAlignment": false, + "showDisabledItems": false, + "skipEmptyValues": false, + "useTrends": "default", + "useZabbixValueMapping": false + }, + "proxy": { + "filter": "" + }, + "queryType": "0", + "refId": "A", + "resultFormat": "time_series", + "schema": 12, + "table": { + "skipEmptyValues": false + }, + "tags": { + "filter": "" + }, + "textFilter": "", + "trigger": { + "filter": "" + } + } + ], + "title": "Total Ratio", + "type": "timeseries" + }, + { + "datasource": { + "type": "alexanderzobnin-zabbix-datasource", + "uid": "${DS_ZABBIX}" + }, + "description": "Scanned Speed maps cfs_gc_activity_processed_pages().", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "smooth", + "lineWidth": 1, + "pointSize": 3, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "dark-green" + } + ] + }, + "unit": "recps" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 54 + }, + "hideTimeOverride": true, + "id": 99, + "interval": "$interval", + "options": { + "legend": { + "calcs": [ + "mean", + "max" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "maxHeight": 600, + "mode": "multi", + "sort": "desc" + } + }, + "pluginVersion": "11.0.0", + "targets": [ + { + "application": { + "filter": "" + }, + "countTriggersBy": "", + "datasource": { + "type": "alexanderzobnin-zabbix-datasource", + "uid": "${DS_ZABBIX}" + }, + "evaltype": "0", + "functions": [ + { + "added": true, + "def": { + "category": "Transform", + "defaultParams": [ + "1m", + "avg" + ], + "name": "groupBy", + "params": [ + { + "name": "interval", + "type": "string" + }, + { + "name": "function", + "options": [ + "avg", + "min", + "max", + "sum", + "count", + "median", + "first", + "last" + ], + "type": "string" + } + ] + }, + "params": [ + "$interval", + "avg" + ], + "text": "groupBy(1m, avg)" + }, + { + "added": true, + "def": { + "category": "Alias", + "defaultParams": [ + "/(.*)/", + "$1" + ], + "name": "replaceAlias", + "params": [ + { + "name": "regexp", + "type": "string" + }, + { + "name": "newAlias", + "type": "string" + } + ] + }, + "params": [ + "/^.*: (.*)/", + "$1" + ], + "text": "replaceAlias(/(.*)/, $1)" + } + ], + "group": { + "filter": "$group" + }, + "host": { + "filter": "$host" + }, + "item": { + "filter": "PostgreSQL CFS: Scanned byte/s" + }, + "itemTag": { + "filter": "" + }, + "macro": { + "filter": "" + }, + "options": { + "count": false, + "disableDataAlignment": false, + "showDisabledItems": false, + "skipEmptyValues": false, + "useTrends": "default", + "useZabbixValueMapping": false + }, + "proxy": { + "filter": "" + }, + "queryType": "0", + "refId": "A", + "resultFormat": "time_series", + "schema": 12, + "table": { + "skipEmptyValues": false + }, + "tags": { + "filter": "" + }, + "textFilter": "", + "trigger": { + "filter": "" + } + } + ], + "title": "Scanned byte/s", + "type": "timeseries" + }, + { + "datasource": { + "type": "alexanderzobnin-zabbix-datasource", + "uid": "${DS_ZABBIX}" + }, + "description": "Scanned Files maps cfs_gc_activity_scanned_files().", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "smooth", + "lineWidth": 1, + "pointSize": 3, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "dark-green" + } + ] + }, + "unit": "recps" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 54 + }, + "hideTimeOverride": true, + "id": 96, + "interval": "$interval", + "options": { + "legend": { + "calcs": [ + "mean", + "max" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "maxHeight": 600, + "mode": "multi", + "sort": "desc" + } + }, + "pluginVersion": "11.0.0", + "targets": [ + { + "application": { + "filter": "" + }, + "countTriggersBy": "", + "datasource": { + "type": "alexanderzobnin-zabbix-datasource", + "uid": "${DS_ZABBIX}" + }, + "evaltype": "0", + "functions": [ + { + "added": true, + "def": { + "category": "Transform", + "defaultParams": [ + "1m", + "avg" + ], + "name": "groupBy", + "params": [ + { + "name": "interval", + "type": "string" + }, + { + "name": "function", + "options": [ + "avg", + "min", + "max", + "sum", + "count", + "median", + "first", + "last" + ], + "type": "string" + } + ] + }, + "params": [ + "$interval", + "avg" + ], + "text": "groupBy(1m, avg)" + }, + { + "added": true, + "def": { + "category": "Alias", + "defaultParams": [ + "/(.*)/", + "$1" + ], + "name": "replaceAlias", + "params": [ + { + "name": "regexp", + "type": "string" + }, + { + "name": "newAlias", + "type": "string" + } + ] + }, + "params": [ + "/^.*: (.*)/", + "$1" + ], + "text": "replaceAlias(/(.*)/, $1)" + } + ], + "group": { + "filter": "$group" + }, + "host": { + "filter": "$host" + }, + "item": { + "filter": "PostgreSQL CFS: Scanned Files" + }, + "itemTag": { + "filter": "" + }, + "macro": { + "filter": "" + }, + "options": { + "count": false, + "disableDataAlignment": false, + "showDisabledItems": false, + "skipEmptyValues": false, + "useTrends": "default", + "useZabbixValueMapping": false + }, + "proxy": { + "filter": "" + }, + "queryType": "0", + "refId": "A", + "resultFormat": "time_series", + "schema": 12, + "table": { + "skipEmptyValues": false + }, + "tags": { + "filter": "" + }, + "textFilter": "", + "trigger": { + "filter": "" + } + } + ], + "title": "Scanned Files processing rate", + "type": "timeseries" + }, + { + "datasource": { + "type": "alexanderzobnin-zabbix-datasource", + "uid": "${DS_ZABBIX}" + }, + "description": "Compressed Files maps cfs_gc_activity_processed_files()", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "smooth", + "lineWidth": 1, + "pointSize": 3, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "dark-green" + } + ] + }, + "unit": "recps" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 62 + }, + "hideTimeOverride": true, + "id": 95, + "interval": "$interval", + "options": { + "legend": { + "calcs": [ + "mean", + "max" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "maxHeight": 600, + "mode": "multi", + "sort": "desc" + } + }, + "pluginVersion": "11.0.0", + "targets": [ + { + "application": { + "filter": "" + }, + "countTriggersBy": "", + "datasource": { + "type": "alexanderzobnin-zabbix-datasource", + "uid": "${DS_ZABBIX}" + }, + "evaltype": "0", + "functions": [ + { + "added": true, + "def": { + "category": "Transform", + "defaultParams": [ + "1m", + "avg" + ], + "name": "groupBy", + "params": [ + { + "name": "interval", + "type": "string" + }, + { + "name": "function", + "options": [ + "avg", + "min", + "max", + "sum", + "count", + "median", + "first", + "last" + ], + "type": "string" + } + ] + }, + "params": [ + "$interval", + "avg" + ], + "text": "groupBy(1m, avg)" + }, + { + "added": true, + "def": { + "category": "Alias", + "defaultParams": [ + "/(.*)/", + "$1" + ], + "name": "replaceAlias", + "params": [ + { + "name": "regexp", + "type": "string" + }, + { + "name": "newAlias", + "type": "string" + } + ] + }, + "params": [ + "/^.*: (.*)/", + "$1" + ], + "text": "replaceAlias(/(.*)/, $1)" + } + ], + "group": { + "filter": "$group" + }, + "host": { + "filter": "$host" + }, + "item": { + "filter": "PostgreSQL CFS: Compressed Files" + }, + "itemTag": { + "filter": "" + }, + "macro": { + "filter": "" + }, + "options": { + "count": false, + "disableDataAlignment": false, + "showDisabledItems": false, + "skipEmptyValues": false, + "useTrends": "default", + "useZabbixValueMapping": false + }, + "proxy": { + "filter": "" + }, + "queryType": "0", + "refId": "A", + "resultFormat": "time_series", + "schema": 12, + "table": { + "skipEmptyValues": false + }, + "tags": { + "filter": "" + }, + "textFilter": "", + "trigger": { + "filter": "" + } + } + ], + "title": "Compressed Files processing rate", + "type": "timeseries" + }, + { + "datasource": { + "type": "alexanderzobnin-zabbix-datasource", + "uid": "${DS_ZABBIX}" + }, + "description": "Written Speed maps cfs_gc_activity_processed_bytes()", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "smooth", + "lineWidth": 1, + "pointSize": 3, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "dark-green" + } + ] + }, + "unit": "recps" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 62 + }, + "hideTimeOverride": true, + "id": 100, + "interval": "$interval", + "options": { + "legend": { + "calcs": [ + "mean", + "max" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "maxHeight": 600, + "mode": "multi", + "sort": "desc" + } + }, + "pluginVersion": "11.0.0", + "targets": [ + { + "application": { + "filter": "" + }, + "countTriggersBy": "", + "datasource": { + "type": "alexanderzobnin-zabbix-datasource", + "uid": "${DS_ZABBIX}" + }, + "evaltype": "0", + "functions": [ + { + "added": true, + "def": { + "category": "Transform", + "defaultParams": [ + "1m", + "avg" + ], + "name": "groupBy", + "params": [ + { + "name": "interval", + "type": "string" + }, + { + "name": "function", + "options": [ + "avg", + "min", + "max", + "sum", + "count", + "median", + "first", + "last" + ], + "type": "string" + } + ] + }, + "params": [ + "$interval", + "avg" + ], + "text": "groupBy(1m, avg)" + }, + { + "added": true, + "def": { + "category": "Alias", + "defaultParams": [ + "/(.*)/", + "$1" + ], + "name": "replaceAlias", + "params": [ + { + "name": "regexp", + "type": "string" + }, + { + "name": "newAlias", + "type": "string" + } + ] + }, + "params": [ + "/^.*: (.*)/", + "$1" + ], + "text": "replaceAlias(/(.*)/, $1)" + } + ], + "group": { + "filter": "$group" + }, + "host": { + "filter": "$host" + }, + "item": { + "filter": "PostgreSQL CFS: Written byte/s" + }, + "itemTag": { + "filter": "" + }, + "macro": { + "filter": "" + }, + "options": { + "count": false, + "disableDataAlignment": false, + "showDisabledItems": false, + "skipEmptyValues": false, + "useTrends": "default", + "useZabbixValueMapping": false + }, + "proxy": { + "filter": "" + }, + "queryType": "0", + "refId": "A", + "resultFormat": "time_series", + "schema": 12, + "table": { + "skipEmptyValues": false + }, + "tags": { + "filter": "" + }, + "textFilter": "", + "trigger": { + "filter": "" + } + } + ], + "title": "Written Speed", + "type": "timeseries" + }, + { + "datasource": { + "type": "alexanderzobnin-zabbix-datasource", + "uid": "${DS_ZABBIX}" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": { + "align": "auto", + "cellOptions": { + "type": "auto" + }, + "filterable": true, + "inspect": false + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "dark-green" + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Last compression ratio" + }, + "properties": [ + { + "id": "custom.width", + "value": 180 + } + ] + } + ] + }, + "gridPos": { + "h": 10, + "w": 12, + "x": 0, + "y": 70 + }, + "hideTimeOverride": true, + "id": 101, + "interval": "$interval", + "options": { + "cellHeight": "sm", + "footer": { + "countRows": false, + "enablePagination": true, + "fields": "", + "reducer": [ + "sum" + ], + "show": false + }, + "showHeader": true, + "sortBy": [] + }, + "pluginVersion": "11.0.0", + "targets": [ + { + "application": { + "filter": "" + }, + "countTriggersBy": "", + "datasource": { + "type": "alexanderzobnin-zabbix-datasource", + "uid": "${DS_ZABBIX}" + }, + "evaltype": "0", + "functions": [ + { + "added": true, + "def": { + "category": "Transform", + "defaultParams": [ + "1m", + "avg" + ], + "name": "groupBy", + "params": [ + { + "name": "interval", + "type": "string" + }, + { + "name": "function", + "options": [ + "avg", + "min", + "max", + "sum", + "count", + "median", + "first", + "last" + ], + "type": "string" + } + ] + }, + "params": [ + "$interval", + "avg" + ], + "text": "groupBy(1m, avg)" + }, + { + "added": true, + "def": { + "category": "Alias", + "defaultParams": [ + "/(.*)/", + "$1" + ], + "name": "replaceAlias", + "params": [ + { + "name": "regexp", + "type": "string" + }, + { + "name": "newAlias", + "type": "string" + } + ] + }, + "params": [ + "/^PostgreSQL CFS: Relation (.+) Compress Ratio$/", + "$1" + ], + "text": "replaceAlias(/(.*)/, $1)" + } + ], + "group": { + "filter": "$group" + }, + "host": { + "filter": "$host" + }, + "item": { + "filter": "/^PostgreSQL CFS: Relation (.+) Compress Ratio$/" + }, + "itemTag": { + "filter": "" + }, + "macro": { + "filter": "" + }, + "options": { + "count": false, + "disableDataAlignment": false, + "showDisabledItems": false, + "skipEmptyValues": false, + "useTrends": "default", + "useZabbixValueMapping": false + }, + "proxy": { + "filter": "" + }, + "queryType": "0", + "refId": "A", + "resultFormat": "time_series", + "schema": 12, + "table": { + "skipEmptyValues": false + }, + "tags": { + "filter": "" + }, + "textFilter": "", + "trigger": { + "filter": "" + } + } + ], + "title": "Relations compression ratio", + "transformations": [ + { + "id": "reduce", + "options": { + "reducers": [ + "last" + ] + } + }, + { + "id": "organize", + "options": { + "excludeByName": {}, + "includeByName": {}, + "indexByName": {}, + "renameByName": { + "Field": "Relation", + "Last": "Last compression ratio" + } + } + } + ], + "type": "table" + } + ], + "title": "CFS (Postgres Pro)", + "type": "row" + }, + { + "collapsed": true, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 31 + }, + "id": 42, + "panels": [ + { + "datasource": { + "type": "alexanderzobnin-zabbix-datasource", + "uid": "${DS_ZABBIX}" + }, + "description": "Events per [$interval]\n\nEvents metrics use information from pg_stat_database.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "smooth", + "lineWidth": 1, + "pointSize": 3, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "dark-green" + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 8, + "x": 0, + "y": 53 + }, + "hideTimeOverride": true, + "id": 6, + "interval": "$interval", + "options": { + "legend": { + "calcs": [ + "mean", + "max" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Mean", + "sortDesc": true + }, + "tooltip": { + "maxHeight": 600, + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "11.0.0", + "targets": [ + { + "application": { + "filter": "" + }, + "countTriggersBy": "", + "datasource": { + "type": "alexanderzobnin-zabbix-datasource", + "uid": "${DS_ZABBIX}" + }, + "evaltype": "0", + "functions": [ + { + "added": true, + "def": { + "category": "Transform", + "defaultParams": [ + "1m", + "avg" + ], + "name": "groupBy", + "params": [ + { + "name": "interval", + "type": "string" + }, + { + "name": "function", + "options": [ + "avg", + "min", + "max", + "sum", + "count", + "median", + "first", + "last" + ], + "type": "string" + } + ] + }, + "params": [ + "$interval", + "sum" + ], + "text": "groupBy(1m, avg)" + }, + { + "added": true, + "def": { + "category": "Special", + "defaultParams": [ + "avg" + ], + "name": "consolidateBy", + "params": [ + { + "name": "type", + "options": [ + "avg", + "min", + "max", + "sum", + "count" + ], + "type": "string" + } + ] + }, + "params": [ + "sum" + ], + "text": "consolidateBy(avg)" + }, + { + "added": true, + "def": { + "category": "Trends", + "defaultParams": [ + "avg" + ], + "name": "trendValue", + "params": [ + { + "name": "type", + "options": [ + "avg", + "min", + "max", + "sum", + "count" + ], + "type": "string" + } + ] + }, + "params": [ + "sum" + ], + "text": "trendValue(avg)" + }, + { + "added": true, + "def": { + "category": "Alias", + "defaultParams": [ + "/(.*)/", + "$1" + ], + "name": "replaceAlias", + "params": [ + { + "name": "regexp", + "type": "string" + }, + { + "name": "newAlias", + "type": "string" + } + ] + }, + "params": [ + "/^.*: (.*)$/", + "$1" + ], + "text": "replaceAlias(/(.*)/, $1)" + } + ], + "group": { + "filter": "$group" + }, + "host": { + "filter": "$host" + }, + "item": { + "filter": "PostgreSQL Instance: Conflict Events" + }, + "itemTag": { + "filter": "" + }, + "macro": { + "filter": "" + }, + "options": { + "count": false, + "disableDataAlignment": false, + "showDisabledItems": false, + "skipEmptyValues": false, + "useTrends": "default", + "useZabbixValueMapping": false + }, + "proxy": { + "filter": "" + }, + "queryType": "0", + "refId": "A", + "resultFormat": "time_series", + "schema": 12, + "table": { + "skipEmptyValues": false + }, + "tags": { + "filter": "" + }, + "textFilter": "", + "trigger": { + "filter": "" + } + } + ], + "title": "Conflict Events", + "type": "timeseries" + }, + { + "datasource": { + "type": "alexanderzobnin-zabbix-datasource", + "uid": "${DS_ZABBIX}" + }, + "description": "Events per [$interval]\n\nEvents metrics use information from pg_stat_database.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "smooth", + "lineWidth": 1, + "pointSize": 3, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "dark-green" + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 8, + "x": 8, + "y": 53 + }, + "hideTimeOverride": true, + "id": 43, + "interval": "$interval", + "options": { + "legend": { + "calcs": [ + "mean", + "max" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Mean", + "sortDesc": true + }, + "tooltip": { + "maxHeight": 600, + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "11.0.0", + "targets": [ + { + "application": { + "filter": "" + }, + "countTriggersBy": "", + "datasource": { + "type": "alexanderzobnin-zabbix-datasource", + "uid": "${DS_ZABBIX}" + }, + "evaltype": "0", + "functions": [ + { + "added": true, + "def": { + "category": "Transform", + "defaultParams": [ + "1m", + "avg" + ], + "name": "groupBy", + "params": [ + { + "name": "interval", + "type": "string" + }, + { + "name": "function", + "options": [ + "avg", + "min", + "max", + "sum", + "count", + "median", + "first", + "last" + ], + "type": "string" + } + ] + }, + "params": [ + "$interval", + "sum" + ], + "text": "groupBy(1m, avg)" + }, + { + "added": true, + "def": { + "category": "Special", + "defaultParams": [ + "avg" + ], + "name": "consolidateBy", + "params": [ + { + "name": "type", + "options": [ + "avg", + "min", + "max", + "sum", + "count" + ], + "type": "string" + } + ] + }, + "params": [ + "sum" + ], + "text": "consolidateBy(avg)" + }, + { + "added": true, + "def": { + "category": "Trends", + "defaultParams": [ + "avg" + ], + "name": "trendValue", + "params": [ + { + "name": "type", + "options": [ + "avg", + "min", + "max", + "sum", + "count" + ], + "type": "string" + } + ] + }, + "params": [ + "sum" + ], + "text": "trendValue(avg)" + }, + { + "added": true, + "def": { + "category": "Alias", + "defaultParams": [ + "/(.*)/", + "$1" + ], + "name": "replaceAlias", + "params": [ + { + "name": "regexp", + "type": "string" + }, + { + "name": "newAlias", + "type": "string" + } + ] + }, + "params": [ + "/^.*: (.*)$/", + "$1" + ], + "text": "replaceAlias(/(.*)/, $1)" + } + ], + "group": { + "filter": "$group" + }, + "host": { + "filter": "$host" + }, + "item": { + "filter": "PostgreSQL Instance: Deadlock Events" + }, + "itemTag": { + "filter": "" + }, + "macro": { + "filter": "" + }, + "options": { + "count": false, + "disableDataAlignment": false, + "showDisabledItems": false, + "skipEmptyValues": false, + "useTrends": "default", + "useZabbixValueMapping": false + }, + "proxy": { + "filter": "" + }, + "queryType": "0", + "refId": "A", + "resultFormat": "time_series", + "schema": 12, + "table": { + "skipEmptyValues": false + }, + "tags": { + "filter": "" + }, + "textFilter": "", + "trigger": { + "filter": "" + } + } + ], + "title": "Deadlock Events", + "type": "timeseries" + }, + { + "datasource": { + "type": "alexanderzobnin-zabbix-datasource", + "uid": "${DS_ZABBIX}" + }, + "description": "Events per [$interval]\n\nEvents metrics use information from pg_stat_database.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "smooth", + "lineWidth": 1, + "pointSize": 3, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "dark-green" + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 8, + "x": 16, + "y": 53 + }, + "hideTimeOverride": true, + "id": 44, + "interval": "$interval", + "options": { + "legend": { + "calcs": [ + "mean", + "max" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Mean", + "sortDesc": true + }, + "tooltip": { + "maxHeight": 600, + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "11.0.0", + "targets": [ + { + "application": { + "filter": "" + }, + "countTriggersBy": "", + "datasource": { + "type": "alexanderzobnin-zabbix-datasource", + "uid": "${DS_ZABBIX}" + }, + "evaltype": "0", + "functions": [ + { + "added": true, + "def": { + "category": "Transform", + "defaultParams": [ + "1m", + "avg" + ], + "name": "groupBy", + "params": [ + { + "name": "interval", + "type": "string" + }, + { + "name": "function", + "options": [ + "avg", + "min", + "max", + "sum", + "count", + "median", + "first", + "last" + ], + "type": "string" + } + ] + }, + "params": [ + "$interval", + "sum" + ], + "text": "groupBy(1m, avg)" + }, + { + "added": true, + "def": { + "category": "Special", + "defaultParams": [ + "avg" + ], + "name": "consolidateBy", + "params": [ + { + "name": "type", + "options": [ + "avg", + "min", + "max", + "sum", + "count" + ], + "type": "string" + } + ] + }, + "params": [ + "sum" + ], + "text": "consolidateBy(avg)" + }, + { + "added": true, + "def": { + "category": "Trends", + "defaultParams": [ + "avg" + ], + "name": "trendValue", + "params": [ + { + "name": "type", + "options": [ + "avg", + "min", + "max", + "sum", + "count" + ], + "type": "string" + } + ] + }, + "params": [ + "sum" + ], + "text": "trendValue(avg)" + }, + { + "added": true, + "def": { + "category": "Alias", + "defaultParams": [ + "/(.*)/", + "$1" + ], + "name": "replaceAlias", + "params": [ + { + "name": "regexp", + "type": "string" + }, + { + "name": "newAlias", + "type": "string" + } + ] + }, + "params": [ + "/^.*: (.*)$/", + "$1" + ], + "text": "replaceAlias(/(.*)/, $1)" + } + ], + "group": { + "filter": "$group" + }, + "host": { + "filter": "$host" + }, + "item": { + "filter": "PostgreSQL Instance: checksum_failures Events" + }, + "itemTag": { + "filter": "" + }, + "macro": { + "filter": "" + }, + "options": { + "count": false, + "disableDataAlignment": false, + "showDisabledItems": false, + "skipEmptyValues": false, + "useTrends": "default", + "useZabbixValueMapping": false + }, + "proxy": { + "filter": "" + }, + "queryType": "0", + "refId": "A", + "resultFormat": "time_series", + "schema": 12, + "table": { + "skipEmptyValues": false + }, + "tags": { + "filter": "" + }, + "textFilter": "", + "trigger": { + "filter": "" + } + } + ], + "title": "Checksum Failures Events", + "type": "timeseries" + } + ], + "title": "Events", + "type": "row" + }, + { + "collapsed": true, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 32 + }, + "id": 8, + "panels": [ + { + "datasource": { + "type": "alexanderzobnin-zabbix-datasource", + "uid": "${DS_ZABBIX}" + }, + "description": "Wait Sampling metrics use information from pgpro_stats extension by default or from pg_wait_sampling extension if you installed it on non-PostgrePro edition.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "smooth", + "lineWidth": 1, + "pointSize": 3, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "dark-green" + } + ] + }, + "unit": "ops" + }, + "overrides": [] + }, + "gridPos": { + "h": 10, + "w": 8, + "x": 0, + "y": 40 + }, + "hideTimeOverride": true, + "id": 10, + "interval": "$interval", + "options": { + "legend": { + "calcs": [ + "mean", + "max" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Mean", + "sortDesc": true + }, + "tooltip": { + "maxHeight": 600, + "mode": "multi", + "sort": "desc" + } + }, + "pluginVersion": "11.0.0", + "targets": [ + { + "application": { + "filter": "" + }, + "countTriggersBy": "", + "datasource": { + "type": "alexanderzobnin-zabbix-datasource", + "uid": "${DS_ZABBIX}" + }, + "evaltype": "0", + "functions": [ + { + "added": true, + "def": { + "category": "Transform", + "defaultParams": [ + "1m", + "avg" + ], + "name": "groupBy", + "params": [ + { + "name": "interval", + "type": "string" + }, + { + "name": "function", + "options": [ + "avg", + "min", + "max", + "sum", + "count", + "median", + "first", + "last" + ], + "type": "string" + } + ] + }, + "params": [ + "$interval", + "avg" + ], + "text": "groupBy(1m, avg)" + }, + { + "added": true, + "def": { + "category": "Alias", + "defaultParams": [ + "/(.*)/", + "$1" + ], + "name": "replaceAlias", + "params": [ + { + "name": "regexp", + "type": "string" + }, + { + "name": "newAlias", + "type": "string" + } + ] + }, + "params": [ + "/^.*: (.*)$/", + "$1" + ], + "text": "replaceAlias(/(.*)/, $1)" + } + ], + "group": { + "filter": "$group" + }, + "host": { + "filter": "$host" + }, + "item": { + "filter": "/^PostgreSQL Wait Sampling LWLocks: /" + }, + "itemTag": { + "filter": "" + }, + "macro": { + "filter": "" + }, + "options": { + "count": false, + "disableDataAlignment": false, + "showDisabledItems": false, + "skipEmptyValues": false, + "useTrends": "default", + "useZabbixValueMapping": false + }, + "proxy": { + "filter": "" + }, + "queryType": "0", + "refId": "A", + "resultFormat": "time_series", + "schema": 12, + "table": { + "skipEmptyValues": false + }, + "tags": { + "filter": "" + }, + "textFilter": "", + "trigger": { + "filter": "" + } + } + ], + "title": "Locks by type rate", + "type": "timeseries" + }, + { + "datasource": { + "type": "alexanderzobnin-zabbix-datasource", + "uid": "${DS_ZABBIX}" + }, + "description": "Wait Sampling metrics use information from pgpro_stats extension by default or from pg_wait_sampling extension if you installed it on non-PostgrePro edition.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "smooth", + "lineWidth": 1, + "pointSize": 3, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "dark-green" + } + ] + }, + "unit": "ops" + }, + "overrides": [] + }, + "gridPos": { + "h": 10, + "w": 8, + "x": 8, + "y": 40 + }, + "hideTimeOverride": true, + "id": 12, + "interval": "$interval", + "options": { + "legend": { + "calcs": [ + "mean", + "max" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Mean", + "sortDesc": true + }, + "tooltip": { + "maxHeight": 600, + "mode": "multi", + "sort": "desc" + } + }, + "pluginVersion": "11.0.0", + "targets": [ + { + "application": { + "filter": "" + }, + "countTriggersBy": "", + "datasource": { + "type": "alexanderzobnin-zabbix-datasource", + "uid": "${DS_ZABBIX}" + }, + "evaltype": "0", + "functions": [ + { + "added": true, + "def": { + "category": "Transform", + "defaultParams": [ + "1m", + "avg" + ], + "name": "groupBy", + "params": [ + { + "name": "interval", + "type": "string" + }, + { + "name": "function", + "options": [ + "avg", + "min", + "max", + "sum", + "count", + "median", + "first", + "last" + ], + "type": "string" + } + ] + }, + "params": [ + "$interval", + "avg" + ], + "text": "groupBy(1m, avg)" + }, + { + "added": true, + "def": { + "category": "Alias", + "defaultParams": [ + "/(.*)/", + "$1" + ], + "name": "replaceAlias", + "params": [ + { + "name": "regexp", + "type": "string" + }, + { + "name": "newAlias", + "type": "string" + } + ] + }, + "params": [ + "/^.*: (.*)$/", + "$1" + ], + "text": "replaceAlias(/(.*)/, $1)" + } + ], + "group": { + "filter": "$group" + }, + "host": { + "filter": "$host" + }, + "item": { + "filter": "/^PostgreSQL Wait Sampling HWLocks/" + }, + "itemTag": { + "filter": "" + }, + "macro": { + "filter": "" + }, + "options": { + "count": false, + "disableDataAlignment": false, + "showDisabledItems": false, + "skipEmptyValues": false, + "useTrends": "default", + "useZabbixValueMapping": false + }, + "proxy": { + "filter": "" + }, + "queryType": "0", + "refId": "A", + "resultFormat": "time_series", + "schema": 12, + "table": { + "skipEmptyValues": false + }, + "tags": { + "filter": "" + }, + "textFilter": "", + "trigger": { + "filter": "" + } + } + ], + "title": "Lightweight Locks rate", + "type": "timeseries" + }, + { + "datasource": { + "type": "alexanderzobnin-zabbix-datasource", + "uid": "${DS_ZABBIX}" + }, + "description": "Wait Sampling metrics use information from pgpro_stats extension by default or from pg_wait_sampling extension if you installed it on non-PostgrePro edition.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "smooth", + "lineWidth": 1, + "pointSize": 3, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "dark-green" + } + ] + }, + "unit": "ops" + }, + "overrides": [] + }, + "gridPos": { + "h": 10, + "w": 8, + "x": 16, + "y": 40 + }, + "hideTimeOverride": true, + "id": 11, + "interval": "$interval", + "options": { + "legend": { + "calcs": [ + "mean", + "max" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Mean", + "sortDesc": true + }, + "tooltip": { + "maxHeight": 600, + "mode": "multi", + "sort": "desc" + } + }, + "pluginVersion": "11.0.0", + "targets": [ + { + "application": { + "filter": "" + }, + "countTriggersBy": "", + "datasource": { + "type": "alexanderzobnin-zabbix-datasource", + "uid": "${DS_ZABBIX}" + }, + "evaltype": "0", + "functions": [ + { + "added": true, + "def": { + "category": "Transform", + "defaultParams": [ + "1m", + "avg" + ], + "name": "groupBy", + "params": [ + { + "name": "interval", + "type": "string" + }, + { + "name": "function", + "options": [ + "avg", + "min", + "max", + "sum", + "count", + "median", + "first", + "last" + ], + "type": "string" + } + ] + }, + "params": [ + "$interval", + "avg" + ], + "text": "groupBy(1m, avg)" + }, + { + "added": true, + "def": { + "category": "Alias", + "defaultParams": [ + "/(.*)/", + "$1" + ], + "name": "replaceAlias", + "params": [ + { + "name": "regexp", + "type": "string" + }, + { + "name": "newAlias", + "type": "string" + } + ] + }, + "params": [ + "/^.*: (.*)$/", + "$1" + ], + "text": "replaceAlias(/(.*)/, $1)" + } + ], + "group": { + "filter": "$group" + }, + "host": { + "filter": "$host" + }, + "item": { + "filter": "/^PostgreSQL Wait Sampling LWLocks/" + }, + "itemTag": { + "filter": "" + }, + "macro": { + "filter": "" + }, + "options": { + "count": false, + "disableDataAlignment": false, + "showDisabledItems": false, + "skipEmptyValues": false, + "useTrends": "default", + "useZabbixValueMapping": false + }, + "proxy": { + "filter": "" + }, + "queryType": "0", + "refId": "A", + "resultFormat": "time_series", + "schema": 12, + "table": { + "skipEmptyValues": false + }, + "tags": { + "filter": "" + }, + "textFilter": "", + "trigger": { + "filter": "" + } + } + ], + "title": "Heavyweight Locks rate", + "type": "timeseries" + }, + { + "datasource": { + "type": "alexanderzobnin-zabbix-datasource", + "uid": "${DS_ZABBIX}" + }, + "description": "Average number of locks from pg_locks per [$interval] for different query types.\n\nAccess share locks - Sum of locks from pg_locks with mode Access Share. Metric describes a total number of locks acquired (or waiting) by queries that only reads tables and do not modify.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "smooth", + "lineWidth": 1, + "pointSize": 3, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "dark-green" + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 24, + "x": 0, + "y": 50 + }, + "hideTimeOverride": true, + "id": 9, + "interval": "$interval", + "options": { + "legend": { + "calcs": [ + "mean", + "max" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true, + "sortBy": "Mean", + "sortDesc": true + }, + "tooltip": { + "maxHeight": 600, + "mode": "multi", + "sort": "desc" + } + }, + "pluginVersion": "11.0.0", + "targets": [ + { + "application": { + "filter": "" + }, + "countTriggersBy": "", + "datasource": { + "type": "alexanderzobnin-zabbix-datasource", + "uid": "${DS_ZABBIX}" + }, + "evaltype": "0", + "functions": [ + { + "added": true, + "def": { + "category": "Transform", + "defaultParams": [ + "1m", + "avg" + ], + "name": "groupBy", + "params": [ + { + "name": "interval", + "type": "string" + }, + { + "name": "function", + "options": [ + "avg", + "min", + "max", + "sum", + "count", + "median", + "first", + "last" + ], + "type": "string" + } + ] + }, + "params": [ + "$interval", + "avg" + ], + "text": "groupBy(1m, avg)" + }, + { + "added": true, + "def": { + "category": "Alias", + "defaultParams": [ + "/(.*)/", + "$1" + ], + "name": "replaceAlias", + "params": [ + { + "name": "regexp", + "type": "string" + }, + { + "name": "newAlias", + "type": "string" + } + ] + }, + "params": [ + "/^.* by all queries like (.*)$/", + "$1" + ], + "text": "replaceAlias(/(.*)/, $1)" + } + ], + "group": { + "filter": "$group" + }, + "host": { + "filter": "$host" + }, + "item": { + "filter": "/total number of locks acquired \\(or waiting\\) by all queries like (.*)$/" + }, + "itemTag": { + "filter": "" + }, + "macro": { + "filter": "" + }, + "options": { + "count": false, + "disableDataAlignment": false, + "showDisabledItems": false, + "skipEmptyValues": false, + "useTrends": "default", + "useZabbixValueMapping": false + }, + "proxy": { + "filter": "" + }, + "queryType": "0", + "refId": "A", + "resultFormat": "time_series", + "schema": 12, + "table": { + "skipEmptyValues": false + }, + "tags": { + "filter": "" + }, + "textFilter": "", + "trigger": { + "filter": "" + } + }, + { + "application": { + "filter": "" + }, + "countTriggersBy": "", + "datasource": { + "type": "alexanderzobnin-zabbix-datasource", + "uid": "${DS_ZABBIX}" + }, + "evaltype": "0", + "functions": [ + { + "added": true, + "def": { + "category": "Transform", + "defaultParams": [ + "1m", + "avg" + ], + "name": "groupBy", + "params": [ + { + "name": "interval", + "type": "string" + }, + { + "name": "function", + "options": [ + "avg", + "min", + "max", + "sum", + "count", + "median", + "first", + "last" + ], + "type": "string" + } + ] + }, + "params": [ + "$interval", + "avg" + ], + "text": "groupBy(1m, avg)" + }, + { + "added": true, + "def": { + "category": "Alias", + "defaultParams": [], + "name": "setAlias", + "params": [ + { + "name": "alias", + "type": "string" + } + ] + }, + "params": [ + "Access share locks" + ], + "text": "setAlias()" + } + ], + "group": { + "filter": "$group" + }, + "hide": false, + "host": { + "filter": "$host" + }, + "item": { + "filter": "/total number of locks acquired \\(or waiting\\) by queries that only reads tables and do not modify$/" + }, + "itemTag": { + "filter": "" + }, + "macro": { + "filter": "" + }, + "options": { + "count": false, + "disableDataAlignment": false, + "showDisabledItems": false, + "skipEmptyValues": false, + "useTrends": "default", + "useZabbixValueMapping": false + }, + "proxy": { + "filter": "" + }, + "queryType": "0", + "refId": "B", + "resultFormat": "time_series", + "schema": 12, + "table": { + "skipEmptyValues": false + }, + "tags": { + "filter": "" + }, + "textFilter": "", + "trigger": { + "filter": "" + } + } + ], + "title": "Locks sampling", + "type": "timeseries" + } + ], + "title": "Locks & Wait sampling", + "type": "row" + }, + { + "collapsed": true, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 33 + }, + "id": 48, + "panels": [ + { + "datasource": { + "type": "alexanderzobnin-zabbix-datasource", + "uid": "${DS_ZABBIX}" + }, + "description": "", + "gridPos": { + "h": 10, + "w": 9, + "x": 0, + "y": 41 + }, + "id": 49, + "options": { + "code": { + "language": "plaintext", + "showLineNumbers": false, + "showMiniMap": false + }, + "content": "### Memory Leak detection plugin\nThis plugin allows detects possible memory leaks while working with PostgreSQL using /proc/pid/status and /proc/pid/statm.\n\nThis plugin is **disabled** by default. \\\nTo enable the plugin - set *\"enabled = True\"* in the Mamonsu agent configuration file, section **[memoryleakdiagnostic]**.\n\nWe use RES and SHR difference to calculate approximate volume of private anonymous backend memory.\nIf it exceeds private_anon_mem_threshold then that pid will be added to a message. An example is presented below\nstatm - 'pid: {pid}, RES {RES} - SHR {SHR} more then {private_anon_mem_threshold}\\n'\nSince Linux 4.5 RssAnon, RssFile and RssShmem have been added.\nThey allows to distinguish types of memory such as private anonymous, file-backed, and shared anonymous memory.\nWe are interested in RssAnon. If its value exceeds private_anon_mem_threshold then that pid will also be added to a message.", + "mode": "markdown" + }, + "pluginVersion": "11.0.0", + "targets": [ + { + "application": { + "filter": "" + }, + "countTriggersBy": "", + "datasource": { + "type": "alexanderzobnin-zabbix-datasource", + "uid": "${DS_ZABBIX}" + }, + "evaltype": "0", + "functions": [], + "group": { + "filter": "" + }, + "host": { + "filter": "" + }, + "item": { + "filter": "" + }, + "itemTag": { + "filter": "" + }, + "macro": { + "filter": "" + }, + "options": { + "count": false, + "disableDataAlignment": false, + "showDisabledItems": false, + "skipEmptyValues": false, + "useTrends": "default", + "useZabbixValueMapping": false + }, + "proxy": { + "filter": "" + }, + "queryType": "0", + "refId": "A", + "resultFormat": "time_series", + "schema": 12, + "table": { + "skipEmptyValues": false + }, + "tags": { + "filter": "" + }, + "textFilter": "", + "trigger": { + "filter": "" + } + } + ], + "type": "text" + }, + { + "datasource": { + "type": "alexanderzobnin-zabbix-datasource", + "uid": "${DS_ZABBIX}" + }, + "description": "PostgreSQL Memory Leak: Number of Pids Which Private Anonymous Memory Exceeds private_anon_mem_threshold", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 3, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "dark-green" + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 15, + "x": 9, + "y": 41 + }, + "hideTimeOverride": true, + "id": 50, + "interval": "$interval", + "options": { + "legend": { + "calcs": [ + "max", + "lastNotNull" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true + }, + "tooltip": { + "maxHeight": 600, + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "11.0.0", + "targets": [ + { + "application": { + "filter": "" + }, + "countTriggersBy": "", + "datasource": { + "type": "alexanderzobnin-zabbix-datasource", + "uid": "${DS_ZABBIX}" + }, + "evaltype": "0", + "functions": [ + { + "added": true, + "def": { + "category": "Transform", + "defaultParams": [ + "1m", + "avg" + ], + "name": "groupBy", + "params": [ + { + "name": "interval", + "type": "string" + }, + { + "name": "function", + "options": [ + "avg", + "min", + "max", + "sum", + "count", + "median", + "first", + "last" + ], + "type": "string" + } + ] + }, + "params": [ + "$interval", + "max" + ], + "text": "groupBy(1m, avg)" + }, + { + "added": true, + "def": { + "category": "Special", + "defaultParams": [ + "avg" + ], + "name": "consolidateBy", + "params": [ + { + "name": "type", + "options": [ + "avg", + "min", + "max", + "sum", + "count" + ], + "type": "string" + } + ] + }, + "params": [ + "max" + ], + "text": "consolidateBy(avg)" + }, + { + "added": true, + "def": { + "category": "Trends", + "defaultParams": [ + "avg" + ], + "name": "trendValue", + "params": [ + { + "name": "type", + "options": [ + "avg", + "min", + "max", + "sum", + "count" + ], + "type": "string" + } + ] + }, + "params": [ + "max" + ], + "text": "trendValue(avg)" + }, + { + "added": true, + "def": { + "category": "Alias", + "defaultParams": [], + "name": "setAlias", + "params": [ + { + "name": "alias", + "type": "string" + } + ] + }, + "params": [ + "Number of PIDs" + ], + "text": "setAlias()" + } + ], + "group": { + "filter": "$group" + }, + "host": { + "filter": "$host" + }, + "item": { + "filter": "PostgreSQL Memory Leak: Number of Pids Which Private Anonymous Memory Exceeds private_anon_mem_threshold" + }, + "itemTag": { + "filter": "" + }, + "macro": { + "filter": "" + }, + "options": { + "count": false, + "disableDataAlignment": false, + "showDisabledItems": false, + "skipEmptyValues": false, + "useTrends": "default", + "useZabbixValueMapping": false + }, + "proxy": { + "filter": "" + }, + "queryType": "0", + "refId": "A", + "resultFormat": "time_series", + "schema": 12, + "table": { + "skipEmptyValues": false + }, + "tags": { + "filter": "" + }, + "textFilter": "", + "trigger": { + "filter": "" + } + } + ], + "title": "Number of Pids exceeds private_anon_mem_threshold", + "type": "timeseries" + }, + { + "datasource": { + "type": "alexanderzobnin-zabbix-datasource", + "uid": "${DS_ZABBIX}" + }, + "description": "Can be empty, if there's no memory leaks", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "text" + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 4, + "w": 15, + "x": 9, + "y": 47 + }, + "hideTimeOverride": true, + "id": 47, + "interval": "$interval", + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "textMode": "value", + "wideLayout": true + }, + "pluginVersion": "11.0.0", + "targets": [ + { + "application": { + "filter": "" + }, + "countTriggersBy": "", + "datasource": { + "type": "alexanderzobnin-zabbix-datasource", + "uid": "${DS_ZABBIX}" + }, + "evaltype": "0", + "functions": [ + { + "added": true, + "def": { + "category": "Transform", + "defaultParams": [ + "1m", + "avg" + ], + "name": "groupBy", + "params": [ + { + "name": "interval", + "type": "string" + }, + { + "name": "function", + "options": [ + "avg", + "min", + "max", + "sum", + "count", + "median", + "first", + "last" + ], + "type": "string" + } + ] + }, + "params": [ + "$interval", + "max" + ], + "text": "groupBy(1m, avg)" + }, + { + "added": true, + "def": { + "category": "Special", + "defaultParams": [ + "avg" + ], + "name": "consolidateBy", + "params": [ + { + "name": "type", + "options": [ + "avg", + "min", + "max", + "sum", + "count" + ], + "type": "string" + } + ] + }, + "params": [ + "max" + ], + "text": "consolidateBy(avg)" + }, + { + "added": true, + "def": { + "category": "Trends", + "defaultParams": [ + "avg" + ], + "name": "trendValue", + "params": [ + { + "name": "type", + "options": [ + "avg", + "min", + "max", + "sum", + "count" + ], + "type": "string" + } + ] + }, + "params": [ + "max" + ], + "text": "trendValue(avg)" + }, + { + "added": true, + "def": { + "category": "Alias", + "defaultParams": [ + "/(.*)/", + "$1" + ], + "name": "replaceAlias", + "params": [ + { + "name": "regexp", + "type": "string" + }, + { + "name": "newAlias", + "type": "string" + } + ] + }, + "params": [ + "/^PostgreSQL Databases: (.+) size$/", + "$1" + ], + "text": "replaceAlias(/(.*)/, $1)" + } + ], + "group": { + "filter": "$group" + }, + "host": { + "filter": "$host" + }, + "item": { + "filter": "PostgreSQL Memory Leak: Number of Pids Which Private Anonymous Memory Exceeds private_anon_mem_threshold, text of message" + }, + "itemTag": { + "filter": "" + }, + "macro": { + "filter": "" + }, + "options": { + "count": false, + "disableDataAlignment": false, + "showDisabledItems": false, + "skipEmptyValues": false, + "useTrends": "default", + "useZabbixValueMapping": false + }, + "proxy": { + "filter": "" + }, + "queryType": "2", + "refId": "A", + "resultFormat": "time_series", + "schema": 12, + "table": { + "skipEmptyValues": false + }, + "tags": { + "filter": "" + }, + "textFilter": "", + "trigger": { + "filter": "" + } + } + ], + "title": "Memory Leak plugin message", + "type": "stat" + } + ], + "title": "Memory Leak Detection", + "type": "row" + }, + { + "collapsed": true, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 34 + }, + "id": 67, + "panels": [ + { + "datasource": { + "type": "alexanderzobnin-zabbix-datasource", + "uid": "${DS_ZABBIX}" + }, + "description": "", + "gridPos": { + "h": 7, + "w": 8, + "x": 0, + "y": 34 + }, + "id": 68, + "options": { + "code": { + "language": "plaintext", + "showLineNumbers": false, + "showMiniMap": false + }, + "content": "### Relations size\nGets size of specified relations.\nIf the relation is blocked by some process such as vacuum full or create index, the result will be -1.\n\nThis plugin is **disabled** by default. \\\nTo enable the plugin - set *\"enabled = True\"* in the Mamonsu agent configuration file, section **[relationssize]**.\n\n\n", + "mode": "markdown" + }, + "pluginVersion": "11.0.0", + "targets": [ + { + "application": { + "filter": "" + }, + "countTriggersBy": "", + "datasource": { + "type": "alexanderzobnin-zabbix-datasource", + "uid": "${DS_ZABBIX}" + }, + "evaltype": "0", + "functions": [], + "group": { + "filter": "" + }, + "host": { + "filter": "" + }, + "item": { + "filter": "" + }, + "itemTag": { + "filter": "" + }, + "macro": { + "filter": "" + }, + "options": { + "count": false, + "disableDataAlignment": false, + "showDisabledItems": false, + "skipEmptyValues": false, + "useTrends": "default", + "useZabbixValueMapping": false + }, + "proxy": { + "filter": "" + }, + "queryType": "0", + "refId": "A", + "resultFormat": "time_series", + "schema": 12, + "table": { + "skipEmptyValues": false + }, + "tags": { + "filter": "" + }, + "textFilter": "", + "trigger": { + "filter": "" + } + } + ], + "type": "text" + }, + { + "datasource": { + "type": "alexanderzobnin-zabbix-datasource", + "uid": "${DS_ZABBIX}" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 3, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "dark-green" + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 16, + "x": 8, + "y": 34 + }, + "hideTimeOverride": true, + "id": 69, + "interval": "$interval", + "options": { + "legend": { + "calcs": [ + "max", + "lastNotNull" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "maxHeight": 600, + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "11.0.0", + "targets": [ + { + "application": { + "filter": "" + }, + "countTriggersBy": "", + "datasource": { + "type": "alexanderzobnin-zabbix-datasource", + "uid": "${DS_ZABBIX}" + }, + "evaltype": "0", + "functions": [ + { + "added": true, + "def": { + "category": "Transform", + "defaultParams": [ + "1m", + "avg" + ], + "name": "groupBy", + "params": [ + { + "name": "interval", + "type": "string" + }, + { + "name": "function", + "options": [ + "avg", + "min", + "max", + "sum", + "count", + "median", + "first", + "last" + ], + "type": "string" + } + ] + }, + "params": [ + "$interval", + "avg" + ], + "text": "groupBy(1m, avg)" + }, + { + "added": true, + "def": { + "category": "Alias", + "defaultParams": [ + "/(.*)/", + "$1" + ], + "name": "replaceAlias", + "params": [ + { + "name": "regexp", + "type": "string" + }, + { + "name": "newAlias", + "type": "string" + } + ] + }, + "params": [ + "/^.*: (.+)$/", + "$1" + ], + "text": "replaceAlias(/(.*)/, $1)" + } + ], + "group": { + "filter": "$group" + }, + "host": { + "filter": "$host" + }, + "item": { + "filter": "/^PostgreSQL Relation Size:/" + }, + "itemTag": { + "filter": "" + }, + "macro": { + "filter": "" + }, + "options": { + "count": false, + "disableDataAlignment": false, + "showDisabledItems": false, + "skipEmptyValues": false, + "useTrends": "default", + "useZabbixValueMapping": false + }, + "proxy": { + "filter": "" + }, + "queryType": "0", + "refId": "A", + "resultFormat": "time_series", + "schema": 12, + "table": { + "skipEmptyValues": false + }, + "tags": { + "filter": "" + }, + "textFilter": "", + "trigger": { + "filter": "" + } + } + ], + "title": "Relations Size", + "type": "timeseries" + } + ], + "title": "Relations Size", + "type": "row" + }, + { + "collapsed": true, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 35 + }, + "id": 102, + "panels": [ + { + "datasource": { + "type": "alexanderzobnin-zabbix-datasource", + "uid": "${DS_ZABBIX}" + }, + "description": "Server Mode shows server status as MASTER or STANDBY.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [ + { + "options": { + "MASTER": { + "color": "dark-green", + "index": 0 + }, + "STANDBY": { + "color": "dark-yellow", + "index": 1 + } + }, + "type": "value" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "dark-green" + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 12, + "x": 0, + "y": 36 + }, + "hideTimeOverride": true, + "id": 53, + "maxDataPoints": 3, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "last" + ], + "fields": "/^PostgreSQL Instance: Server Mode$/", + "values": false + }, + "showPercentChange": false, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "11.0.0", + "targets": [ + { + "application": { + "filter": "" + }, + "countTriggersBy": "", + "datasource": { + "type": "alexanderzobnin-zabbix-datasource", + "uid": "${DS_ZABBIX}" + }, + "evaltype": "0", + "functions": [], + "group": { + "filter": "$group" + }, + "host": { + "filter": "$host" + }, + "item": { + "filter": "PostgreSQL Instance: Server Mode" + }, + "itemTag": { + "filter": "" + }, + "macro": { + "filter": "" + }, + "options": { + "count": false, + "disableDataAlignment": false, + "showDisabledItems": false, + "skipEmptyValues": false, + "useTrends": "default", + "useZabbixValueMapping": false + }, + "proxy": { + "filter": "" + }, + "queryType": "2", + "refId": "A", + "resultFormat": "time_series", + "schema": 12, + "table": { + "skipEmptyValues": false + }, + "tags": { + "filter": "" + }, + "textFilter": "", + "trigger": { + "filter": "" + } + } + ], + "timeFrom": "1h", + "title": "Server mode", + "type": "stat" + }, + { + "datasource": { + "type": "alexanderzobnin-zabbix-datasource", + "uid": "${DS_ZABBIX}" + }, + "description": "Non-active Replication Slots calculates as count of slots with false active status.\n\nReplication metrics use information from pg_replication_slots.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [ + { + "options": { + "0": { + "color": "dark-green", + "index": 0 + } + }, + "type": "value" + }, + { + "options": { + "from": 1, + "result": { + "color": "dark-yellow", + "index": 1 + }, + "to": 999999 + }, + "type": "range" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "dark-green" + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 12, + "x": 12, + "y": 36 + }, + "hideTimeOverride": true, + "id": 104, + "maxDataPoints": 3, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "last" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "11.0.0", + "targets": [ + { + "application": { + "filter": "" + }, + "countTriggersBy": "", + "datasource": { + "type": "alexanderzobnin-zabbix-datasource", + "uid": "${DS_ZABBIX}" + }, + "evaltype": "0", + "functions": [], + "group": { + "filter": "$group" + }, + "host": { + "filter": "$host" + }, + "item": { + "filter": "PostgreSQL Replication: Count Non-Active Replication Slots" + }, + "itemTag": { + "filter": "" + }, + "macro": { + "filter": "" + }, + "options": { + "count": false, + "disableDataAlignment": false, + "showDisabledItems": false, + "skipEmptyValues": false, + "useTrends": "default", + "useZabbixValueMapping": false + }, + "proxy": { + "filter": "" + }, + "queryType": "0", + "refId": "A", + "resultFormat": "time_series", + "schema": 12, + "table": { + "skipEmptyValues": false + }, + "tags": { + "filter": "" + }, + "textFilter": "", + "trigger": { + "filter": "" + } + } + ], + "timeFrom": "1h", + "title": "Non-Active Replication Slots", + "type": "stat" + }, + { + "datasource": { + "type": "alexanderzobnin-zabbix-datasource", + "uid": "${DS_ZABBIX}" + }, + "description": "Streaming Replication Lag calculates as difference between now and pg_last_xact_replay_timestamp.\n\nReplication metrics use information from pg_replication_slots.", + "fieldConfig": { + "defaults": { + "color": { + "fixedColor": "#bd2eb1", + "mode": "fixed" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "smooth", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "dark-green" + } + ] + }, + "unit": "s" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 12, + "x": 0, + "y": 39 + }, + "hideTimeOverride": true, + "id": 105, + "interval": "$interval", + "options": { + "legend": { + "calcs": [ + "mean", + "max", + "last" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "maxHeight": 600, + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "11.0.0", + "targets": [ + { + "application": { + "filter": "" + }, + "countTriggersBy": "", + "datasource": { + "type": "alexanderzobnin-zabbix-datasource", + "uid": "${DS_ZABBIX}" + }, + "evaltype": "0", + "functions": [], + "group": { + "filter": "$group" + }, + "host": { + "filter": "$host" + }, + "item": { + "filter": "PostgreSQL Replication: Streaming Replication Lag" + }, + "itemTag": { + "filter": "" + }, + "macro": { + "filter": "" + }, + "options": { + "count": false, + "disableDataAlignment": false, + "showDisabledItems": false, + "skipEmptyValues": false, + "useTrends": "default", + "useZabbixValueMapping": false + }, + "proxy": { + "filter": "" + }, + "queryType": "0", + "refId": "A", + "resultFormat": "time_series", + "schema": 12, + "table": { + "skipEmptyValues": false + }, + "tags": { + "filter": "" + }, + "textFilter": "", + "trigger": { + "filter": "" + } + } + ], + "title": "Streaming Replication Lag", + "type": "timeseries" + }, + { + "datasource": { + "type": "alexanderzobnin-zabbix-datasource", + "uid": "${DS_ZABBIX}" + }, + "description": "Replication metrics use information from pg_replication_slots.", + "fieldConfig": { + "defaults": { + "color": { + "fixedColor": "#bd2eb1", + "mode": "fixed" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "smooth", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "dark-green" + } + ] + }, + "unit": "s" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 12, + "x": 12, + "y": 39 + }, + "hideTimeOverride": true, + "id": 106, + "interval": "$interval", + "options": { + "legend": { + "calcs": [ + "mean", + "max", + "last" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "maxHeight": 600, + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "11.0.0", + "targets": [ + { + "application": { + "filter": "" + }, + "countTriggersBy": "", + "datasource": { + "type": "alexanderzobnin-zabbix-datasource", + "uid": "${DS_ZABBIX}" + }, + "evaltype": "0", + "functions": [ + { + "added": true, + "def": { + "category": "Transform", + "defaultParams": [ + "1m", + "avg" + ], + "name": "groupBy", + "params": [ + { + "name": "interval", + "type": "string" + }, + { + "name": "function", + "options": [ + "avg", + "min", + "max", + "sum", + "count", + "median", + "first", + "last" + ], + "type": "string" + } + ] + }, + "params": [ + "$interval", + "max" + ], + "text": "groupBy(1m, avg)" + }, + { + "added": true, + "def": { + "category": "Special", + "defaultParams": [ + "avg" + ], + "name": "consolidateBy", + "params": [ + { + "name": "type", + "options": [ + "avg", + "min", + "max", + "sum", + "count" + ], + "type": "string" + } + ] + }, + "params": [ + "max" + ], + "text": "consolidateBy(avg)" + }, + { + "added": true, + "def": { + "category": "Trends", + "defaultParams": [ + "avg" + ], + "name": "trendValue", + "params": [ + { + "name": "type", + "options": [ + "avg", + "min", + "max", + "sum", + "count" + ], + "type": "string" + } + ] + }, + "params": [ + "max" + ], + "text": "trendValue(avg)" + }, + { + "added": true, + "def": { + "category": "Alias", + "defaultParams": [ + "/(.*)/", + "$1" + ], + "name": "replaceAlias", + "params": [ + { + "name": "regexp", + "type": "string" + }, + { + "name": "newAlias", + "type": "string" + } + ] + }, + "params": [ + "/^PostgreSQL Replication: (.+) Delta of Total Lag$/", + "$1" + ], + "text": "replaceAlias(/(.*)/, $1)" + } + ], + "group": { + "filter": "$group" + }, + "host": { + "filter": "$host" + }, + "item": { + "filter": "/^PostgreSQL Replication: .+ Delta of Total Lag$/" + }, + "itemTag": { + "filter": "" + }, + "macro": { + "filter": "" + }, + "options": { + "count": false, + "disableDataAlignment": false, + "showDisabledItems": false, + "skipEmptyValues": false, + "useTrends": "default", + "useZabbixValueMapping": false + }, + "proxy": { + "filter": "" + }, + "queryType": "0", + "refId": "A", + "resultFormat": "time_series", + "schema": 12, + "table": { + "skipEmptyValues": false + }, + "tags": { + "filter": "" + }, + "textFilter": "", + "trigger": { + "filter": "" + } + } + ], + "title": "Delta of Total Lag", + "type": "timeseries" + }, + { + "datasource": { + "type": "alexanderzobnin-zabbix-datasource", + "uid": "${DS_ZABBIX}" + }, + "description": "**Flush Lag** - Time elapsed between flushing recent WAL locally and receiving notification that this standby server has written and flushed it.\n\t\n**Receive Lag** - Time elapsed between receiving recent WAL locally and receiving notification that this standby server has flushed it.\n\n**Replay Lag** - Time elapsed between flushing recent WAL locally and receiving notification that this standby server has written, flushed and applied.\n\n**Send Lag** - Time elapsed sending recent WAL locally.\n\t\n**Write Lag** - Time elapsed between flushing recent WAL locally and receiving notification that this standby server has written it\n\nReplication metrics use information from pg_replication_slots.", + "fieldConfig": { + "defaults": { + "color": { + "fixedColor": "#bd2eb1", + "mode": "fixed" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "smooth", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "dark-green" + } + ] + }, + "unit": "s" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 24, + "x": 0, + "y": 46 + }, + "hideTimeOverride": true, + "id": 107, + "interval": "$interval", + "options": { + "legend": { + "calcs": [ + "mean", + "max", + "last" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "maxHeight": 600, + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "11.0.0", + "targets": [ + { + "application": { + "filter": "" + }, + "countTriggersBy": "", + "datasource": { + "type": "alexanderzobnin-zabbix-datasource", + "uid": "${DS_ZABBIX}" + }, + "evaltype": "0", + "functions": [ + { + "added": true, + "def": { + "category": "Transform", + "defaultParams": [ + "1m", + "avg" + ], + "name": "groupBy", + "params": [ + { + "name": "interval", + "type": "string" + }, + { + "name": "function", + "options": [ + "avg", + "min", + "max", + "sum", + "count", + "median", + "first", + "last" + ], + "type": "string" + } + ] + }, + "params": [ + "$interval", + "max" + ], + "text": "groupBy(1m, avg)" + }, + { + "added": true, + "def": { + "category": "Special", + "defaultParams": [ + "avg" + ], + "name": "consolidateBy", + "params": [ + { + "name": "type", + "options": [ + "avg", + "min", + "max", + "sum", + "count" + ], + "type": "string" + } + ] + }, + "params": [ + "max" + ], + "text": "consolidateBy(avg)" + }, + { + "added": true, + "def": { + "category": "Trends", + "defaultParams": [ + "avg" + ], + "name": "trendValue", + "params": [ + { + "name": "type", + "options": [ + "avg", + "min", + "max", + "sum", + "count" + ], + "type": "string" + } + ] + }, + "params": [ + "max" + ], + "text": "trendValue(avg)" + }, + { + "added": true, + "def": { + "category": "Alias", + "defaultParams": [ + "/(.*)/", + "$1" + ], + "name": "replaceAlias", + "params": [ + { + "name": "regexp", + "type": "string" + }, + { + "name": "newAlias", + "type": "string" + } + ] + }, + "params": [ + "/^PostgreSQL Replication: (.+) (\\S+ Lag)/", + "$1/$2" + ], + "text": "replaceAlias(/(.*)/, $1)" + } + ], + "group": { + "filter": "$group" + }, + "host": { + "filter": "$host" + }, + "item": { + "filter": "/^PostgreSQL Replication: .+ (Flush|Receive|Replay|Send|Write) Lag/" + }, + "itemTag": { + "filter": "" + }, + "macro": { + "filter": "" + }, + "options": { + "count": false, + "disableDataAlignment": false, + "showDisabledItems": false, + "skipEmptyValues": false, + "useTrends": "default", + "useZabbixValueMapping": false + }, + "proxy": { + "filter": "" + }, + "queryType": "0", + "refId": "A", + "resultFormat": "time_series", + "schema": 12, + "table": { + "skipEmptyValues": false + }, + "tags": { + "filter": "" + }, + "textFilter": "", + "trigger": { + "filter": "" + } + } + ], + "title": "Lag details", + "type": "timeseries" + } + ], + "title": "Replication", + "type": "row" + }, + { + "collapsed": true, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 36 + }, + "id": 70, + "panels": [ + { + "datasource": { + "type": "alexanderzobnin-zabbix-datasource", + "uid": "${DS_ZABBIX}" + }, + "description": "Amount of WAL Files maps wal_bytes.\n\nStatements metrics use information from pg_stat_statements and pg_stat_statements_info for PostgreSQL cluster and from pgpro_stats extension for PostgresPro cluster.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 3, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "dark-green" + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 8, + "x": 0, + "y": 46 + }, + "hideTimeOverride": true, + "id": 93, + "interval": "$interval", + "options": { + "legend": { + "calcs": [ + "max", + "lastNotNull" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "maxHeight": 600, + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "11.0.0", + "targets": [ + { + "application": { + "filter": "" + }, + "countTriggersBy": "", + "datasource": { + "type": "alexanderzobnin-zabbix-datasource", + "uid": "${DS_ZABBIX}" + }, + "evaltype": "0", + "functions": [ + { + "added": true, + "def": { + "category": "Transform", + "defaultParams": [ + "1m", + "avg" + ], + "name": "groupBy", + "params": [ + { + "name": "interval", + "type": "string" + }, + { + "name": "function", + "options": [ + "avg", + "min", + "max", + "sum", + "count", + "median", + "first", + "last" + ], + "type": "string" + } + ] + }, + "params": [ + "$interval", + "avg" + ], + "text": "groupBy(1m, avg)" + }, + { + "added": true, + "def": { + "category": "Alias", + "defaultParams": [ + "/(.*)/", + "$1" + ], + "name": "replaceAlias", + "params": [ + { + "name": "regexp", + "type": "string" + }, + { + "name": "newAlias", + "type": "string" + } + ] + }, + "params": [ + "/^.*: (.+)$/", + "$1" + ], + "text": "replaceAlias(/(.*)/, $1)" + } + ], + "group": { + "filter": "$group" + }, + "host": { + "filter": "$host" + }, + "item": { + "filter": "PostgreSQL Statements: Amount of WAL Files" + }, + "itemTag": { + "filter": "" + }, + "macro": { + "filter": "" + }, + "options": { + "count": false, + "disableDataAlignment": false, + "showDisabledItems": false, + "skipEmptyValues": false, + "useTrends": "default", + "useZabbixValueMapping": false + }, + "proxy": { + "filter": "" + }, + "queryType": "0", + "refId": "A", + "resultFormat": "time_series", + "schema": 12, + "table": { + "skipEmptyValues": false + }, + "tags": { + "filter": "" + }, + "textFilter": "", + "trigger": { + "filter": "" + } + } + ], + "title": "Amount of WAL Files", + "type": "timeseries" + }, + { + "datasource": { + "type": "alexanderzobnin-zabbix-datasource", + "uid": "${DS_ZABBIX}" + }, + "description": "Amount of WAL Records maps wal_records.\n\nStatements metrics use information from pg_stat_statements and pg_stat_statements_info for PostgreSQL cluster and from pgpro_stats extension for PostgresPro cluster.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 3, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "dark-green" + } + ] + }, + "unit": "recps" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 8, + "x": 8, + "y": 46 + }, + "hideTimeOverride": true, + "id": 85, + "interval": "$interval", + "options": { + "legend": { + "calcs": [ + "max", + "lastNotNull" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "maxHeight": 600, + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "11.0.0", + "targets": [ + { + "application": { + "filter": "" + }, + "countTriggersBy": "", + "datasource": { + "type": "alexanderzobnin-zabbix-datasource", + "uid": "${DS_ZABBIX}" + }, + "evaltype": "0", + "functions": [ + { + "added": true, + "def": { + "category": "Transform", + "defaultParams": [ + "1m", + "avg" + ], + "name": "groupBy", + "params": [ + { + "name": "interval", + "type": "string" + }, + { + "name": "function", + "options": [ + "avg", + "min", + "max", + "sum", + "count", + "median", + "first", + "last" + ], + "type": "string" + } + ] + }, + "params": [ + "$interval", + "avg" + ], + "text": "groupBy(1m, avg)" + }, + { + "added": true, + "def": { + "category": "Alias", + "defaultParams": [ + "/(.*)/", + "$1" + ], + "name": "replaceAlias", + "params": [ + { + "name": "regexp", + "type": "string" + }, + { + "name": "newAlias", + "type": "string" + } + ] + }, + "params": [ + "/^.*: (.+)$/", + "$1" + ], + "text": "replaceAlias(/(.*)/, $1)" + } + ], + "group": { + "filter": "$group" + }, + "host": { + "filter": "$host" + }, + "item": { + "filter": "PostgreSQL Statements: Amount of WAL Records" + }, + "itemTag": { + "filter": "" + }, + "macro": { + "filter": "" + }, + "options": { + "count": false, + "disableDataAlignment": false, + "showDisabledItems": false, + "skipEmptyValues": false, + "useTrends": "default", + "useZabbixValueMapping": false + }, + "proxy": { + "filter": "" + }, + "queryType": "0", + "refId": "A", + "resultFormat": "time_series", + "schema": 12, + "table": { + "skipEmptyValues": false + }, + "tags": { + "filter": "" + }, + "textFilter": "", + "trigger": { + "filter": "" + } + } + ], + "title": "Amount of WAL Records", + "type": "timeseries" + }, + { + "datasource": { + "type": "alexanderzobnin-zabbix-datasource", + "uid": "${DS_ZABBIX}" + }, + "description": "Dirty Bytes calculates as summa of shared_blks_dirtied and local_blks_dirtied.\n\nStatements metrics use information from pg_stat_statements and pg_stat_statements_info for PostgreSQL cluster and from pgpro_stats extension for PostgresPro cluster.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 3, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "dark-green" + } + ] + }, + "unit": "recps" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 8, + "x": 16, + "y": 46 + }, + "hideTimeOverride": true, + "id": 86, + "interval": "$interval", + "options": { + "legend": { + "calcs": [ + "max", + "lastNotNull" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "maxHeight": 600, + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "11.0.0", + "targets": [ + { + "application": { + "filter": "" + }, + "countTriggersBy": "", + "datasource": { + "type": "alexanderzobnin-zabbix-datasource", + "uid": "${DS_ZABBIX}" + }, + "evaltype": "0", + "functions": [ + { + "added": true, + "def": { + "category": "Transform", + "defaultParams": [ + "1m", + "avg" + ], + "name": "groupBy", + "params": [ + { + "name": "interval", + "type": "string" + }, + { + "name": "function", + "options": [ + "avg", + "min", + "max", + "sum", + "count", + "median", + "first", + "last" + ], + "type": "string" + } + ] + }, + "params": [ + "$interval", + "avg" + ], + "text": "groupBy(1m, avg)" + }, + { + "added": true, + "def": { + "category": "Alias", + "defaultParams": [ + "/(.*)/", + "$1" + ], + "name": "replaceAlias", + "params": [ + { + "name": "regexp", + "type": "string" + }, + { + "name": "newAlias", + "type": "string" + } + ] + }, + "params": [ + "/^.*: (.+)$/", + "$1" + ], + "text": "replaceAlias(/(.*)/, $1)" + } + ], + "group": { + "filter": "$group" + }, + "host": { + "filter": "$host" + }, + "item": { + "filter": "PostgreSQL Statements: Dirty bytes/s" + }, + "itemTag": { + "filter": "" + }, + "macro": { + "filter": "" + }, + "options": { + "count": false, + "disableDataAlignment": false, + "showDisabledItems": false, + "skipEmptyValues": false, + "useTrends": "default", + "useZabbixValueMapping": false + }, + "proxy": { + "filter": "" + }, + "queryType": "0", + "refId": "A", + "resultFormat": "time_series", + "schema": 12, + "table": { + "skipEmptyValues": false + }, + "tags": { + "filter": "" + }, + "textFilter": "", + "trigger": { + "filter": "" + } + } + ], + "title": "Dirty Bytes", + "type": "timeseries" + }, + { + "datasource": { + "type": "alexanderzobnin-zabbix-datasource", + "uid": "${DS_ZABBIX}" + }, + "description": "Read IO Time maps blk_read_time.\n\nStatements metrics use information from pg_stat_statements and pg_stat_statements_info for PostgreSQL cluster and from pgpro_stats extension for PostgresPro cluster.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 3, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "dark-green" + } + ] + }, + "unit": "recps" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 8, + "x": 0, + "y": 53 + }, + "hideTimeOverride": true, + "id": 88, + "interval": "$interval", + "options": { + "legend": { + "calcs": [ + "max", + "lastNotNull" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "maxHeight": 600, + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "11.0.0", + "targets": [ + { + "application": { + "filter": "" + }, + "countTriggersBy": "", + "datasource": { + "type": "alexanderzobnin-zabbix-datasource", + "uid": "${DS_ZABBIX}" + }, + "evaltype": "0", + "functions": [ + { + "added": true, + "def": { + "category": "Transform", + "defaultParams": [ + "1m", + "avg" + ], + "name": "groupBy", + "params": [ + { + "name": "interval", + "type": "string" + }, + { + "name": "function", + "options": [ + "avg", + "min", + "max", + "sum", + "count", + "median", + "first", + "last" + ], + "type": "string" + } + ] + }, + "params": [ + "$interval", + "avg" + ], + "text": "groupBy(1m, avg)" + }, + { + "added": true, + "def": { + "category": "Alias", + "defaultParams": [ + "/(.*)/", + "$1" + ], + "name": "replaceAlias", + "params": [ + { + "name": "regexp", + "type": "string" + }, + { + "name": "newAlias", + "type": "string" + } + ] + }, + "params": [ + "/^.*: (.+)$/", + "$1" + ], + "text": "replaceAlias(/(.*)/, $1)" + } + ], + "group": { + "filter": "$group" + }, + "host": { + "filter": "$host" + }, + "item": { + "filter": "PostgreSQL Statements: Read IO Time" + }, + "itemTag": { + "filter": "" + }, + "macro": { + "filter": "" + }, + "options": { + "count": false, + "disableDataAlignment": false, + "showDisabledItems": false, + "skipEmptyValues": false, + "useTrends": "default", + "useZabbixValueMapping": false + }, + "proxy": { + "filter": "" + }, + "queryType": "0", + "refId": "A", + "resultFormat": "time_series", + "schema": 12, + "table": { + "skipEmptyValues": false + }, + "tags": { + "filter": "" + }, + "textFilter": "", + "trigger": { + "filter": "" + } + } + ], + "title": "Read IO Time", + "type": "timeseries" + }, + { + "datasource": { + "type": "alexanderzobnin-zabbix-datasource", + "uid": "${DS_ZABBIX}" + }, + "description": "Write IO Time maps blk_write_time.\n\nStatements metrics use information from pg_stat_statements and pg_stat_statements_info for PostgreSQL cluster and from pgpro_stats extension for PostgresPro cluster.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 3, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "dark-green" + } + ] + }, + "unit": "recps" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 8, + "x": 8, + "y": 53 + }, + "hideTimeOverride": true, + "id": 89, + "interval": "$interval", + "options": { + "legend": { + "calcs": [ + "max", + "lastNotNull" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "maxHeight": 600, + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "11.0.0", + "targets": [ + { + "application": { + "filter": "" + }, + "countTriggersBy": "", + "datasource": { + "type": "alexanderzobnin-zabbix-datasource", + "uid": "${DS_ZABBIX}" + }, + "evaltype": "0", + "functions": [ + { + "added": true, + "def": { + "category": "Transform", + "defaultParams": [ + "1m", + "avg" + ], + "name": "groupBy", + "params": [ + { + "name": "interval", + "type": "string" + }, + { + "name": "function", + "options": [ + "avg", + "min", + "max", + "sum", + "count", + "median", + "first", + "last" + ], + "type": "string" + } + ] + }, + "params": [ + "$interval", + "avg" + ], + "text": "groupBy(1m, avg)" + }, + { + "added": true, + "def": { + "category": "Alias", + "defaultParams": [ + "/(.*)/", + "$1" + ], + "name": "replaceAlias", + "params": [ + { + "name": "regexp", + "type": "string" + }, + { + "name": "newAlias", + "type": "string" + } + ] + }, + "params": [ + "/^.*: (.+)$/", + "$1" + ], + "text": "replaceAlias(/(.*)/, $1)" + } + ], + "group": { + "filter": "$group" + }, + "host": { + "filter": "$host" + }, + "item": { + "filter": "PostgreSQL Statements: Write IO Time" + }, + "itemTag": { + "filter": "" + }, + "macro": { + "filter": "" + }, + "options": { + "count": false, + "disableDataAlignment": false, + "showDisabledItems": false, + "skipEmptyValues": false, + "useTrends": "default", + "useZabbixValueMapping": false + }, + "proxy": { + "filter": "" + }, + "queryType": "0", + "refId": "A", + "resultFormat": "time_series", + "schema": 12, + "table": { + "skipEmptyValues": false + }, + "tags": { + "filter": "" + }, + "textFilter": "", + "trigger": { + "filter": "" + } + } + ], + "title": "Write IO Time", + "type": "timeseries" + }, + { + "datasource": { + "type": "alexanderzobnin-zabbix-datasource", + "uid": "${DS_ZABBIX}" + }, + "description": "Other Time calculates as total_time - blk_read_time - blk_write_time.\n\nStatements metrics use information from pg_stat_statements and pg_stat_statements_info for PostgreSQL cluster and from pgpro_stats extension for PostgresPro cluster.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 3, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "dark-green" + } + ] + }, + "unit": "recps" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 8, + "x": 16, + "y": 53 + }, + "hideTimeOverride": true, + "id": 90, + "interval": "$interval", + "options": { + "legend": { + "calcs": [ + "max", + "lastNotNull" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "maxHeight": 600, + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "11.0.0", + "targets": [ + { + "application": { + "filter": "" + }, + "countTriggersBy": "", + "datasource": { + "type": "alexanderzobnin-zabbix-datasource", + "uid": "${DS_ZABBIX}" + }, + "evaltype": "0", + "functions": [ + { + "added": true, + "def": { + "category": "Transform", + "defaultParams": [ + "1m", + "avg" + ], + "name": "groupBy", + "params": [ + { + "name": "interval", + "type": "string" + }, + { + "name": "function", + "options": [ + "avg", + "min", + "max", + "sum", + "count", + "median", + "first", + "last" + ], + "type": "string" + } + ] + }, + "params": [ + "$interval", + "avg" + ], + "text": "groupBy(1m, avg)" + }, + { + "added": true, + "def": { + "category": "Alias", + "defaultParams": [ + "/(.*)/", + "$1" + ], + "name": "replaceAlias", + "params": [ + { + "name": "regexp", + "type": "string" + }, + { + "name": "newAlias", + "type": "string" + } + ] + }, + "params": [ + "/^.*: (.+)$/", + "$1" + ], + "text": "replaceAlias(/(.*)/, $1)" + } + ], + "group": { + "filter": "$group" + }, + "host": { + "filter": "$host" + }, + "item": { + "filter": "PostgreSQL Statements: Other (mostly CPU) Time" + }, + "itemTag": { + "filter": "" + }, + "macro": { + "filter": "" + }, + "options": { + "count": false, + "disableDataAlignment": false, + "showDisabledItems": false, + "skipEmptyValues": false, + "useTrends": "default", + "useZabbixValueMapping": false + }, + "proxy": { + "filter": "" + }, + "queryType": "0", + "refId": "A", + "resultFormat": "time_series", + "schema": 12, + "table": { + "skipEmptyValues": false + }, + "tags": { + "filter": "" + }, + "textFilter": "", + "trigger": { + "filter": "" + } + } + ], + "title": "Other time", + "type": "timeseries" + }, + { + "datasource": { + "type": "alexanderzobnin-zabbix-datasource", + "uid": "${DS_ZABBIX}" + }, + "description": "Read Speed calculates as shared_blks_read, local_blks_read and temp_blks_read.\n\nStatements metrics use information from pg_stat_statements and pg_stat_statements_info for PostgreSQL cluster and from pgpro_stats extension for PostgresPro cluster.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 3, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "dark-green" + } + ] + }, + "unit": "recps" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 8, + "x": 0, + "y": 60 + }, + "hideTimeOverride": true, + "id": 91, + "interval": "$interval", + "options": { + "legend": { + "calcs": [ + "max", + "lastNotNull" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "maxHeight": 600, + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "11.0.0", + "targets": [ + { + "application": { + "filter": "" + }, + "countTriggersBy": "", + "datasource": { + "type": "alexanderzobnin-zabbix-datasource", + "uid": "${DS_ZABBIX}" + }, + "evaltype": "0", + "functions": [ + { + "added": true, + "def": { + "category": "Transform", + "defaultParams": [ + "1m", + "avg" + ], + "name": "groupBy", + "params": [ + { + "name": "interval", + "type": "string" + }, + { + "name": "function", + "options": [ + "avg", + "min", + "max", + "sum", + "count", + "median", + "first", + "last" + ], + "type": "string" + } + ] + }, + "params": [ + "$interval", + "avg" + ], + "text": "groupBy(1m, avg)" + }, + { + "added": true, + "def": { + "category": "Alias", + "defaultParams": [ + "/(.*)/", + "$1" + ], + "name": "replaceAlias", + "params": [ + { + "name": "regexp", + "type": "string" + }, + { + "name": "newAlias", + "type": "string" + } + ] + }, + "params": [ + "/^.*: (.+)$/", + "$1" + ], + "text": "replaceAlias(/(.*)/, $1)" + } + ], + "group": { + "filter": "$group" + }, + "host": { + "filter": "$host" + }, + "item": { + "filter": "PostgreSQL Statements: Read bytes/s" + }, + "itemTag": { + "filter": "" + }, + "macro": { + "filter": "" + }, + "options": { + "count": false, + "disableDataAlignment": false, + "showDisabledItems": false, + "skipEmptyValues": false, + "useTrends": "default", + "useZabbixValueMapping": false + }, + "proxy": { + "filter": "" + }, + "queryType": "0", + "refId": "A", + "resultFormat": "time_series", + "schema": 12, + "table": { + "skipEmptyValues": false + }, + "tags": { + "filter": "" + }, + "textFilter": "", + "trigger": { + "filter": "" + } + } + ], + "title": "Read Speed", + "type": "timeseries" + }, + { + "datasource": { + "type": "alexanderzobnin-zabbix-datasource", + "uid": "${DS_ZABBIX}" + }, + "description": "Write Speed calculates as summa of shared_blks_written and local_blks_written.\n\nStatements metrics use information from pg_stat_statements and pg_stat_statements_info for PostgreSQL cluster and from pgpro_stats extension for PostgresPro cluster.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 3, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "dark-green" + } + ] + }, + "unit": "recps" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 8, + "x": 8, + "y": 60 + }, + "hideTimeOverride": true, + "id": 92, + "interval": "$interval", + "options": { + "legend": { + "calcs": [ + "max", + "lastNotNull" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "maxHeight": 600, + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "11.0.0", + "targets": [ + { + "application": { + "filter": "" + }, + "countTriggersBy": "", + "datasource": { + "type": "alexanderzobnin-zabbix-datasource", + "uid": "${DS_ZABBIX}" + }, + "evaltype": "0", + "functions": [ + { + "added": true, + "def": { + "category": "Transform", + "defaultParams": [ + "1m", + "avg" + ], + "name": "groupBy", + "params": [ + { + "name": "interval", + "type": "string" + }, + { + "name": "function", + "options": [ + "avg", + "min", + "max", + "sum", + "count", + "median", + "first", + "last" + ], + "type": "string" + } + ] + }, + "params": [ + "$interval", + "avg" + ], + "text": "groupBy(1m, avg)" + }, + { + "added": true, + "def": { + "category": "Alias", + "defaultParams": [ + "/(.*)/", + "$1" + ], + "name": "replaceAlias", + "params": [ + { + "name": "regexp", + "type": "string" + }, + { + "name": "newAlias", + "type": "string" + } + ] + }, + "params": [ + "/^.*: (.+)$/", + "$1" + ], + "text": "replaceAlias(/(.*)/, $1)" + } + ], + "group": { + "filter": "$group" + }, + "host": { + "filter": "$host" + }, + "item": { + "filter": "PostgreSQL Statements: Write bytes/s" + }, + "itemTag": { + "filter": "" + }, + "macro": { + "filter": "" + }, + "options": { + "count": false, + "disableDataAlignment": false, + "showDisabledItems": false, + "skipEmptyValues": false, + "useTrends": "default", + "useZabbixValueMapping": false + }, + "proxy": { + "filter": "" + }, + "queryType": "0", + "refId": "A", + "resultFormat": "time_series", + "schema": 12, + "table": { + "skipEmptyValues": false + }, + "tags": { + "filter": "" + }, + "textFilter": "", + "trigger": { + "filter": "" + } + } + ], + "title": "Write Speed", + "type": "timeseries" + }, + { + "datasource": { + "type": "alexanderzobnin-zabbix-datasource", + "uid": "${DS_ZABBIX}" + }, + "description": "WAL FPI maps wal_fpi.\n\nStatements metrics use information from pg_stat_statements and pg_stat_statements_info for PostgreSQL cluster and from pgpro_stats extension for PostgresPro cluster.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 3, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "dark-green" + } + ] + }, + "unit": "recps" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 8, + "x": 16, + "y": 60 + }, + "hideTimeOverride": true, + "id": 87, + "interval": "$interval", + "options": { + "legend": { + "calcs": [ + "max", + "lastNotNull" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "maxHeight": 600, + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "11.0.0", + "targets": [ + { + "application": { + "filter": "" + }, + "countTriggersBy": "", + "datasource": { + "type": "alexanderzobnin-zabbix-datasource", + "uid": "${DS_ZABBIX}" + }, + "evaltype": "0", + "functions": [ + { + "added": true, + "def": { + "category": "Transform", + "defaultParams": [ + "1m", + "avg" + ], + "name": "groupBy", + "params": [ + { + "name": "interval", + "type": "string" + }, + { + "name": "function", + "options": [ + "avg", + "min", + "max", + "sum", + "count", + "median", + "first", + "last" + ], + "type": "string" + } + ] + }, + "params": [ + "$interval", + "avg" + ], + "text": "groupBy(1m, avg)" + }, + { + "added": true, + "def": { + "category": "Alias", + "defaultParams": [ + "/(.*)/", + "$1" + ], + "name": "replaceAlias", + "params": [ + { + "name": "regexp", + "type": "string" + }, + { + "name": "newAlias", + "type": "string" + } + ] + }, + "params": [ + "/^.*: (.+)$/", + "$1" + ], + "text": "replaceAlias(/(.*)/, $1)" + } + ], + "group": { + "filter": "$group" + }, + "host": { + "filter": "$host" + }, + "item": { + "filter": "PostgreSQL Statements: Full Page Writes" + }, + "itemTag": { + "filter": "" + }, + "macro": { + "filter": "" + }, + "options": { + "count": false, + "disableDataAlignment": false, + "showDisabledItems": false, + "skipEmptyValues": false, + "useTrends": "default", + "useZabbixValueMapping": false + }, + "proxy": { + "filter": "" + }, + "queryType": "0", + "refId": "A", + "resultFormat": "time_series", + "schema": 12, + "table": { + "skipEmptyValues": false + }, + "tags": { + "filter": "" + }, + "textFilter": "", + "trigger": { + "filter": "" + } + } + ], + "title": "WAL Full Page Writes", + "type": "timeseries" + } + ], + "title": "Statements", + "type": "row" + }, + { + "collapsed": true, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 37 + }, + "id": 60, + "panels": [ + { + "datasource": { + "type": "alexanderzobnin-zabbix-datasource", + "uid": "${DS_ZABBIX}" + }, + "description": "Shared Buffer Size is a count of all rows in pg_buffercache multiplied by block_size", + "fieldConfig": { + "defaults": { + "color": { + "fixedColor": "purple", + "mode": "fixed" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 34, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "smooth", + "lineWidth": 1, + "pointSize": 3, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "normal" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "dark-green" + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 8, + "x": 0, + "y": 43 + }, + "hideTimeOverride": true, + "id": 61, + "interval": "$interval", + "options": { + "legend": { + "calcs": [ + "mean", + "max" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Mean", + "sortDesc": true + }, + "tooltip": { + "maxHeight": 600, + "mode": "multi", + "sort": "desc" + } + }, + "pluginVersion": "11.0.0", + "targets": [ + { + "application": { + "filter": "" + }, + "countTriggersBy": "", + "datasource": { + "type": "alexanderzobnin-zabbix-datasource", + "uid": "${DS_ZABBIX}" + }, + "evaltype": "0", + "functions": [ + { + "added": true, + "def": { + "category": "Transform", + "defaultParams": [ + "1m", + "avg" + ], + "name": "groupBy", + "params": [ + { + "name": "interval", + "type": "string" + }, + { + "name": "function", + "options": [ + "avg", + "min", + "max", + "sum", + "count", + "median", + "first", + "last" + ], + "type": "string" + } + ] + }, + "params": [ + "$interval", + "avg" + ], + "text": "groupBy(1m, avg)" + }, + { + "added": true, + "def": { + "category": "Alias", + "defaultParams": [ + "/(.*)/", + "$1" + ], + "name": "replaceAlias", + "params": [ + { + "name": "regexp", + "type": "string" + }, + { + "name": "newAlias", + "type": "string" + } + ] + }, + "params": [ + "/^.*: (.+)$/", + "$1" + ], + "text": "replaceAlias(/(.*)/, $1)" + } + ], + "group": { + "filter": "$group" + }, + "host": { + "filter": "$host" + }, + "item": { + "filter": "PostgreSQL pg_buffercache: Shared Buffer Size" + }, + "itemTag": { + "filter": "" + }, + "macro": { + "filter": "" + }, + "options": { + "count": false, + "disableDataAlignment": false, + "showDisabledItems": false, + "skipEmptyValues": false, + "useTrends": "default", + "useZabbixValueMapping": false + }, + "proxy": { + "filter": "" + }, + "queryType": "0", + "refId": "A", + "resultFormat": "time_series", + "schema": 12, + "table": { + "skipEmptyValues": false + }, + "tags": { + "filter": "" + }, + "textFilter": "", + "trigger": { + "filter": "" + } + } + ], + "title": "Shared Buffer Size", + "type": "timeseries" + }, + { + "datasource": { + "type": "alexanderzobnin-zabbix-datasource", + "uid": "${DS_ZABBIX}" + }, + "description": "Shared Buffer Dirty Size is a count of all isdirty rows in pg_buffercache multiplied by block_size.", + "fieldConfig": { + "defaults": { + "color": { + "fixedColor": "purple", + "mode": "fixed" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 34, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "smooth", + "lineWidth": 1, + "pointSize": 3, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "normal" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "dark-green" + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 8, + "x": 8, + "y": 43 + }, + "hideTimeOverride": true, + "id": 62, + "interval": "$interval", + "options": { + "legend": { + "calcs": [ + "mean", + "max" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Mean", + "sortDesc": true + }, + "tooltip": { + "maxHeight": 600, + "mode": "multi", + "sort": "desc" + } + }, + "pluginVersion": "11.0.0", + "targets": [ + { + "application": { + "filter": "" + }, + "countTriggersBy": "", + "datasource": { + "type": "alexanderzobnin-zabbix-datasource", + "uid": "${DS_ZABBIX}" + }, + "evaltype": "0", + "functions": [ + { + "added": true, + "def": { + "category": "Transform", + "defaultParams": [ + "1m", + "avg" + ], + "name": "groupBy", + "params": [ + { + "name": "interval", + "type": "string" + }, + { + "name": "function", + "options": [ + "avg", + "min", + "max", + "sum", + "count", + "median", + "first", + "last" + ], + "type": "string" + } + ] + }, + "params": [ + "$interval", + "avg" + ], + "text": "groupBy(1m, avg)" + }, + { + "added": true, + "def": { + "category": "Alias", + "defaultParams": [ + "/(.*)/", + "$1" + ], + "name": "replaceAlias", + "params": [ + { + "name": "regexp", + "type": "string" + }, + { + "name": "newAlias", + "type": "string" + } + ] + }, + "params": [ + "/^.*: (.+)$/", + "$1" + ], + "text": "replaceAlias(/(.*)/, $1)" + } + ], + "group": { + "filter": "$group" + }, + "host": { + "filter": "$host" + }, + "item": { + "filter": "PostgreSQL pg_buffercache: Shared Buffer Dirty Size" + }, + "itemTag": { + "filter": "" + }, + "macro": { + "filter": "" + }, + "options": { + "count": false, + "disableDataAlignment": false, + "showDisabledItems": false, + "skipEmptyValues": false, + "useTrends": "default", + "useZabbixValueMapping": false + }, + "proxy": { + "filter": "" + }, + "queryType": "0", + "refId": "A", + "resultFormat": "time_series", + "schema": 12, + "table": { + "skipEmptyValues": false + }, + "tags": { + "filter": "" + }, + "textFilter": "", + "trigger": { + "filter": "" + } + } + ], + "title": "Shared Buffer Dirty Size", + "type": "timeseries" + }, + { + "datasource": { + "type": "alexanderzobnin-zabbix-datasource", + "uid": "${DS_ZABBIX}" + }, + "description": "Shared Buffer Twice Used Size is a count of all rows in pg_buffercache where usagecount greater than 1 multiplied by block_size.", + "fieldConfig": { + "defaults": { + "color": { + "fixedColor": "purple", + "mode": "fixed" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 34, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "smooth", + "lineWidth": 1, + "pointSize": 3, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "normal" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "dark-green" + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 8, + "x": 16, + "y": 43 + }, + "hideTimeOverride": true, + "id": 63, + "interval": "$interval", + "options": { + "legend": { + "calcs": [ + "mean", + "max" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Mean", + "sortDesc": true + }, + "tooltip": { + "maxHeight": 600, + "mode": "multi", + "sort": "desc" + } + }, + "pluginVersion": "11.0.0", + "targets": [ + { + "application": { + "filter": "" + }, + "countTriggersBy": "", + "datasource": { + "type": "alexanderzobnin-zabbix-datasource", + "uid": "${DS_ZABBIX}" + }, + "evaltype": "0", + "functions": [ + { + "added": true, + "def": { + "category": "Transform", + "defaultParams": [ + "1m", + "avg" + ], + "name": "groupBy", + "params": [ + { + "name": "interval", + "type": "string" + }, + { + "name": "function", + "options": [ + "avg", + "min", + "max", + "sum", + "count", + "median", + "first", + "last" + ], + "type": "string" + } + ] + }, + "params": [ + "$interval", + "avg" + ], + "text": "groupBy(1m, avg)" + }, + { + "added": true, + "def": { + "category": "Alias", + "defaultParams": [ + "/(.*)/", + "$1" + ], + "name": "replaceAlias", + "params": [ + { + "name": "regexp", + "type": "string" + }, + { + "name": "newAlias", + "type": "string" + } + ] + }, + "params": [ + "/^.*: (.+)$/", + "$1" + ], + "text": "replaceAlias(/(.*)/, $1)" + } + ], + "group": { + "filter": "$group" + }, + "host": { + "filter": "$host" + }, + "item": { + "filter": "PostgreSQL pg_buffercache: Shared Buffer Twice Used Size" + }, + "itemTag": { + "filter": "" + }, + "macro": { + "filter": "" + }, + "options": { + "count": false, + "disableDataAlignment": false, + "showDisabledItems": false, + "skipEmptyValues": false, + "useTrends": "default", + "useZabbixValueMapping": false + }, + "proxy": { + "filter": "" + }, + "queryType": "0", + "refId": "A", + "resultFormat": "time_series", + "schema": 12, + "table": { + "skipEmptyValues": false + }, + "tags": { + "filter": "" + }, + "textFilter": "", + "trigger": { + "filter": "" + } + } + ], + "title": "Shared Buffer Twice Used Size ", + "type": "timeseries" + } + ], + "title": "Shared Buffers", + "type": "row" + }, + { + "collapsed": true, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 38 + }, + "id": 82, + "panels": [ + { + "datasource": { + "type": "alexanderzobnin-zabbix-datasource", + "uid": "${DS_ZABBIX}" + }, + "description": "Temp Files created per [$interval].\n\nTemp Files metrics use information from pg_stat_database.", + "fieldConfig": { + "defaults": { + "color": { + "fixedColor": "purple", + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 34, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "smooth", + "lineWidth": 1, + "pointSize": 3, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "normal" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "dark-green" + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 12, + "x": 0, + "y": 37 + }, + "hideTimeOverride": true, + "id": 84, + "interval": "$interval", + "options": { + "legend": { + "calcs": [ + "mean", + "max" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Mean", + "sortDesc": true + }, + "tooltip": { + "maxHeight": 600, + "mode": "multi", + "sort": "desc" + } + }, + "pluginVersion": "11.0.0", + "targets": [ + { + "application": { + "filter": "" + }, + "countTriggersBy": "", + "datasource": { + "type": "alexanderzobnin-zabbix-datasource", + "uid": "${DS_ZABBIX}" + }, + "evaltype": "0", + "functions": [ + { + "added": true, + "def": { + "category": "Transform", + "defaultParams": [ + "1m", + "avg" + ], + "name": "groupBy", + "params": [ + { + "name": "interval", + "type": "string" + }, + { + "name": "function", + "options": [ + "avg", + "min", + "max", + "sum", + "count", + "median", + "first", + "last" + ], + "type": "string" + } + ] + }, + "params": [ + "$interval", + "sum" + ], + "text": "groupBy(1m, avg)" + }, + { + "added": true, + "def": { + "category": "Special", + "defaultParams": [ + "avg" + ], + "name": "consolidateBy", + "params": [ + { + "name": "type", + "options": [ + "avg", + "min", + "max", + "sum", + "count" + ], + "type": "string" + } + ] + }, + "params": [ + "sum" + ], + "text": "consolidateBy(avg)" + }, + { + "added": true, + "def": { + "category": "Trends", + "defaultParams": [ + "avg" + ], + "name": "trendValue", + "params": [ + { + "name": "type", + "options": [ + "avg", + "min", + "max", + "sum", + "count" + ], + "type": "string" + } + ] + }, + "params": [ + "sum" + ], + "text": "trendValue(avg)" + }, + { + "added": true, + "def": { + "category": "Alias", + "defaultParams": [ + "/(.*)/", + "$1" + ], + "name": "replaceAlias", + "params": [ + { + "name": "regexp", + "type": "string" + }, + { + "name": "newAlias", + "type": "string" + } + ] + }, + "params": [ + "/^.*: (.+)$/", + "$1" + ], + "text": "replaceAlias(/(.*)/, $1)" + } + ], + "group": { + "filter": "$group" + }, + "host": { + "filter": "$host" + }, + "item": { + "filter": "PostgreSQL Instance: Temp Files Created" + }, + "itemTag": { + "filter": "" + }, + "macro": { + "filter": "" + }, + "options": { + "count": false, + "disableDataAlignment": false, + "showDisabledItems": false, + "skipEmptyValues": false, + "useTrends": "default", + "useZabbixValueMapping": false + }, + "proxy": { + "filter": "" + }, + "queryType": "0", + "refId": "A", + "resultFormat": "time_series", + "schema": 12, + "table": { + "skipEmptyValues": false + }, + "tags": { + "filter": "" + }, + "textFilter": "", + "trigger": { + "filter": "" + } + } + ], + "title": "Temp Files Created", + "type": "timeseries" + }, + { + "datasource": { + "type": "alexanderzobnin-zabbix-datasource", + "uid": "${DS_ZABBIX}" + }, + "description": "Temp Bytes Written per [$interval].\n\nTemp Files metrics use information from pg_stat_database.", + "fieldConfig": { + "defaults": { + "color": { + "fixedColor": "purple", + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 34, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "smooth", + "lineWidth": 1, + "pointSize": 3, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "normal" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "dark-green" + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 12, + "x": 12, + "y": 37 + }, + "hideTimeOverride": true, + "id": 83, + "interval": "$interval", + "options": { + "legend": { + "calcs": [ + "mean", + "max" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Mean", + "sortDesc": true + }, + "tooltip": { + "maxHeight": 600, + "mode": "multi", + "sort": "desc" + } + }, + "pluginVersion": "11.0.0", + "targets": [ + { + "application": { + "filter": "" + }, + "countTriggersBy": "", + "datasource": { + "type": "alexanderzobnin-zabbix-datasource", + "uid": "${DS_ZABBIX}" + }, + "evaltype": "0", + "functions": [ + { + "added": true, + "def": { + "category": "Transform", + "defaultParams": [ + "1m", + "avg" + ], + "name": "groupBy", + "params": [ + { + "name": "interval", + "type": "string" + }, + { + "name": "function", + "options": [ + "avg", + "min", + "max", + "sum", + "count", + "median", + "first", + "last" + ], + "type": "string" + } + ] + }, + "params": [ + "$interval", + "sum" + ], + "text": "groupBy(1m, avg)" + }, + { + "added": true, + "def": { + "category": "Special", + "defaultParams": [ + "avg" + ], + "name": "consolidateBy", + "params": [ + { + "name": "type", + "options": [ + "avg", + "min", + "max", + "sum", + "count" + ], + "type": "string" + } + ] + }, + "params": [ + "sum" + ], + "text": "consolidateBy(avg)" + }, + { + "added": true, + "def": { + "category": "Trends", + "defaultParams": [ + "avg" + ], + "name": "trendValue", + "params": [ + { + "name": "type", + "options": [ + "avg", + "min", + "max", + "sum", + "count" + ], + "type": "string" + } + ] + }, + "params": [ + "sum" + ], + "text": "trendValue(avg)" + }, + { + "added": true, + "def": { + "category": "Alias", + "defaultParams": [ + "/(.*)/", + "$1" + ], + "name": "replaceAlias", + "params": [ + { + "name": "regexp", + "type": "string" + }, + { + "name": "newAlias", + "type": "string" + } + ] + }, + "params": [ + "/^.*: (.+)$/", + "$1" + ], + "text": "replaceAlias(/(.*)/, $1)" + } + ], + "group": { + "filter": "$group" + }, + "host": { + "filter": "$host" + }, + "item": { + "filter": "PostgreSQL Instance: Temp Bytes Written" + }, + "itemTag": { + "filter": "" + }, + "macro": { + "filter": "" + }, + "options": { + "count": false, + "disableDataAlignment": false, + "showDisabledItems": false, + "skipEmptyValues": false, + "useTrends": "default", + "useZabbixValueMapping": false + }, + "proxy": { + "filter": "" + }, + "queryType": "0", + "refId": "A", + "resultFormat": "time_series", + "schema": 12, + "table": { + "skipEmptyValues": false + }, + "tags": { + "filter": "" + }, + "textFilter": "", + "trigger": { + "filter": "" + } + } + ], + "title": "Temp Bytes Written", + "type": "timeseries" + } + ], + "title": "Temp Files", + "type": "row" + }, + { + "collapsed": true, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 39 + }, + "id": 64, + "panels": [ + { + "datasource": { + "type": "alexanderzobnin-zabbix-datasource", + "uid": "${DS_ZABBIX}" + }, + "description": "Oldest XID Age calculates based on data from pg_stat_activity", + "fieldConfig": { + "defaults": { + "color": { + "fixedColor": "purple", + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 34, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "smooth", + "lineWidth": 1, + "pointSize": 3, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "normal" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "dark-green" + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 12, + "x": 0, + "y": 45 + }, + "hideTimeOverride": true, + "id": 72, + "interval": "$interval", + "options": { + "legend": { + "calcs": [ + "mean", + "max" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Mean", + "sortDesc": true + }, + "tooltip": { + "maxHeight": 600, + "mode": "multi", + "sort": "desc" + } + }, + "pluginVersion": "11.0.0", + "targets": [ + { + "application": { + "filter": "" + }, + "countTriggersBy": "", + "datasource": { + "type": "alexanderzobnin-zabbix-datasource", + "uid": "${DS_ZABBIX}" + }, + "evaltype": "0", + "functions": [ + { + "added": true, + "def": { + "category": "Transform", + "defaultParams": [ + "1m", + "avg" + ], + "name": "groupBy", + "params": [ + { + "name": "interval", + "type": "string" + }, + { + "name": "function", + "options": [ + "avg", + "min", + "max", + "sum", + "count", + "median", + "first", + "last" + ], + "type": "string" + } + ] + }, + "params": [ + "$interval", + "avg" + ], + "text": "groupBy(1m, avg)" + }, + { + "added": true, + "def": { + "category": "Alias", + "defaultParams": [ + "/(.*)/", + "$1" + ], + "name": "replaceAlias", + "params": [ + { + "name": "regexp", + "type": "string" + }, + { + "name": "newAlias", + "type": "string" + } + ] + }, + "params": [ + "/^.*: (.+)$/", + "$1" + ], + "text": "replaceAlias(/(.*)/, $1)" + } + ], + "group": { + "filter": "$group" + }, + "host": { + "filter": "$host" + }, + "item": { + "filter": "PostgreSQL Transactions: Age of the Oldest XID" + }, + "itemTag": { + "filter": "" + }, + "macro": { + "filter": "" + }, + "options": { + "count": false, + "disableDataAlignment": false, + "showDisabledItems": false, + "skipEmptyValues": false, + "useTrends": "default", + "useZabbixValueMapping": false + }, + "proxy": { + "filter": "" + }, + "queryType": "0", + "refId": "A", + "resultFormat": "time_series", + "schema": 12, + "table": { + "skipEmptyValues": false + }, + "tags": { + "filter": "" + }, + "textFilter": "", + "trigger": { + "filter": "" + } + } + ], + "title": "Age of the Oldest XID", + "type": "timeseries" + }, + { + "datasource": { + "type": "alexanderzobnin-zabbix-datasource", + "uid": "${DS_ZABBIX}" + }, + "description": "Oldest Transaction Time calculates based on data from pg_stat_activity", + "fieldConfig": { + "defaults": { + "color": { + "fixedColor": "purple", + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 34, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "smooth", + "lineWidth": 1, + "pointSize": 3, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "normal" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "dark-green" + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 12, + "x": 12, + "y": 45 + }, + "hideTimeOverride": true, + "id": 73, + "interval": "$interval", + "options": { + "legend": { + "calcs": [ + "mean", + "max" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Mean", + "sortDesc": true + }, + "tooltip": { + "maxHeight": 600, + "mode": "multi", + "sort": "desc" + } + }, + "pluginVersion": "11.0.0", + "targets": [ + { + "application": { + "filter": "" + }, + "countTriggersBy": "", + "datasource": { + "type": "alexanderzobnin-zabbix-datasource", + "uid": "${DS_ZABBIX}" + }, + "evaltype": "0", + "functions": [ + { + "added": true, + "def": { + "category": "Transform", + "defaultParams": [ + "1m", + "avg" + ], + "name": "groupBy", + "params": [ + { + "name": "interval", + "type": "string" + }, + { + "name": "function", + "options": [ + "avg", + "min", + "max", + "sum", + "count", + "median", + "first", + "last" + ], + "type": "string" + } + ] + }, + "params": [ + "$interval", + "avg" + ], + "text": "groupBy(1m, avg)" + }, + { + "added": true, + "def": { + "category": "Alias", + "defaultParams": [ + "/(.*)/", + "$1" + ], + "name": "replaceAlias", + "params": [ + { + "name": "regexp", + "type": "string" + }, + { + "name": "newAlias", + "type": "string" + } + ] + }, + "params": [ + "/^.*: (.+)$/", + "$1" + ], + "text": "replaceAlias(/(.*)/, $1)" + } + ], + "group": { + "filter": "$group" + }, + "host": { + "filter": "$host" + }, + "item": { + "filter": "PostgreSQL Transactions: the Oldest Transaction Running Time in sec" + }, + "itemTag": { + "filter": "" + }, + "macro": { + "filter": "" + }, + "options": { + "count": false, + "disableDataAlignment": false, + "showDisabledItems": false, + "skipEmptyValues": false, + "useTrends": "default", + "useZabbixValueMapping": false + }, + "proxy": { + "filter": "" + }, + "queryType": "0", + "refId": "A", + "resultFormat": "time_series", + "schema": 12, + "table": { + "skipEmptyValues": false + }, + "tags": { + "filter": "" + }, + "textFilter": "", + "trigger": { + "filter": "" + } + } + ], + "title": "the Oldest Transaction Running Time in sec", + "type": "timeseries" + }, + { + "datasource": { + "type": "alexanderzobnin-zabbix-datasource", + "uid": "${DS_ZABBIX}" + }, + "description": "Prepared Transactions Count calculates as summa of all rows in pg_prepared_xacts.\n\nPrepared Transactions metrics use information from pg_prepared_xacts.", + "fieldConfig": { + "defaults": { + "color": { + "fixedColor": "purple", + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 34, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "smooth", + "lineWidth": 1, + "pointSize": 3, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "normal" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "dark-green" + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 12, + "x": 0, + "y": 52 + }, + "hideTimeOverride": true, + "id": 65, + "interval": "$interval", + "options": { + "legend": { + "calcs": [ + "mean", + "max" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Mean", + "sortDesc": true + }, + "tooltip": { + "maxHeight": 600, + "mode": "multi", + "sort": "desc" + } + }, + "pluginVersion": "11.0.0", + "targets": [ + { + "application": { + "filter": "" + }, + "countTriggersBy": "", + "datasource": { + "type": "alexanderzobnin-zabbix-datasource", + "uid": "${DS_ZABBIX}" + }, + "evaltype": "0", + "functions": [ + { + "added": true, + "def": { + "category": "Transform", + "defaultParams": [ + "1m", + "avg" + ], + "name": "groupBy", + "params": [ + { + "name": "interval", + "type": "string" + }, + { + "name": "function", + "options": [ + "avg", + "min", + "max", + "sum", + "count", + "median", + "first", + "last" + ], + "type": "string" + } + ] + }, + "params": [ + "$interval", + "avg" + ], + "text": "groupBy(1m, avg)" + }, + { + "added": true, + "def": { + "category": "Alias", + "defaultParams": [ + "/(.*)/", + "$1" + ], + "name": "replaceAlias", + "params": [ + { + "name": "regexp", + "type": "string" + }, + { + "name": "newAlias", + "type": "string" + } + ] + }, + "params": [ + "/^.*: (.+)$/", + "$1" + ], + "text": "replaceAlias(/(.*)/, $1)" + } + ], + "group": { + "filter": "$group" + }, + "host": { + "filter": "$host" + }, + "item": { + "filter": "PostgreSQL Prepared Transactions: Number of Prepared Transactions" + }, + "itemTag": { + "filter": "" + }, + "macro": { + "filter": "" + }, + "options": { + "count": false, + "disableDataAlignment": false, + "showDisabledItems": false, + "skipEmptyValues": false, + "useTrends": "default", + "useZabbixValueMapping": false + }, + "proxy": { + "filter": "" + }, + "queryType": "0", + "refId": "A", + "resultFormat": "time_series", + "schema": 12, + "table": { + "skipEmptyValues": false + }, + "tags": { + "filter": "" + }, + "textFilter": "", + "trigger": { + "filter": "" + } + } + ], + "title": "Number of Prepared Transactions", + "type": "timeseries" + }, + { + "datasource": { + "type": "alexanderzobnin-zabbix-datasource", + "uid": "${DS_ZABBIX}" + }, + "description": "Oldest Prepared Transaction Time calculates as max(now() - prepared).\n\nPrepared Transactions metrics use information from pg_prepared_xacts.", + "fieldConfig": { + "defaults": { + "color": { + "fixedColor": "purple", + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 34, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "smooth", + "lineWidth": 1, + "pointSize": 3, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "normal" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "dark-green" + } + ] + }, + "unit": "s" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 12, + "x": 12, + "y": 52 + }, + "hideTimeOverride": true, + "id": 66, + "interval": "$interval", + "options": { + "legend": { + "calcs": [ + "mean", + "max" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Mean", + "sortDesc": true + }, + "tooltip": { + "maxHeight": 600, + "mode": "multi", + "sort": "desc" + } + }, + "pluginVersion": "11.0.0", + "targets": [ + { + "application": { + "filter": "" + }, + "countTriggersBy": "", + "datasource": { + "type": "alexanderzobnin-zabbix-datasource", + "uid": "${DS_ZABBIX}" + }, + "evaltype": "0", + "functions": [ + { + "added": true, + "def": { + "category": "Transform", + "defaultParams": [ + "1m", + "avg" + ], + "name": "groupBy", + "params": [ + { + "name": "interval", + "type": "string" + }, + { + "name": "function", + "options": [ + "avg", + "min", + "max", + "sum", + "count", + "median", + "first", + "last" + ], + "type": "string" + } + ] + }, + "params": [ + "$interval", + "avg" + ], + "text": "groupBy(1m, avg)" + }, + { + "added": true, + "def": { + "category": "Alias", + "defaultParams": [ + "/(.*)/", + "$1" + ], + "name": "replaceAlias", + "params": [ + { + "name": "regexp", + "type": "string" + }, + { + "name": "newAlias", + "type": "string" + } + ] + }, + "params": [ + "/^.*: (.+)$/", + "$1" + ], + "text": "replaceAlias(/(.*)/, $1)" + } + ], + "group": { + "filter": "$group" + }, + "host": { + "filter": "$host" + }, + "item": { + "filter": "PostgreSQL Prepared Transactions: the Oldest Prepared Transaction Running Time in sec" + }, + "itemTag": { + "filter": "" + }, + "macro": { + "filter": "" + }, + "options": { + "count": false, + "disableDataAlignment": false, + "showDisabledItems": false, + "skipEmptyValues": false, + "useTrends": "default", + "useZabbixValueMapping": false + }, + "proxy": { + "filter": "" + }, + "queryType": "0", + "refId": "A", + "resultFormat": "time_series", + "schema": 12, + "table": { + "skipEmptyValues": false + }, + "tags": { + "filter": "" + }, + "textFilter": "", + "trigger": { + "filter": "" + } + } + ], + "title": "the Oldest Prepared Transaction Running Time", + "type": "timeseries" + } + ], + "title": "Transactions", + "type": "row" + }, + { + "collapsed": true, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 40 + }, + "id": 76, + "panels": [ + { + "datasource": { + "type": "alexanderzobnin-zabbix-datasource", + "uid": "${DS_ZABBIX}" + }, + "description": "WAL count calculates as count of WAL files in pg_wal directory via pg_ls_dir().", + "fieldConfig": { + "defaults": { + "color": { + "fixedColor": "yellow", + "mode": "fixed" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 34, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "smooth", + "lineWidth": 1, + "pointSize": 3, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "dark-green" + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 8, + "x": 0, + "y": 46 + }, + "hideTimeOverride": true, + "id": 77, + "interval": "$interval", + "options": { + "legend": { + "calcs": [ + "mean", + "max" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Mean", + "sortDesc": true + }, + "tooltip": { + "maxHeight": 600, + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "11.0.0", + "targets": [ + { + "application": { + "filter": "" + }, + "countTriggersBy": "", + "datasource": { + "type": "alexanderzobnin-zabbix-datasource", + "uid": "${DS_ZABBIX}" + }, + "evaltype": "0", + "functions": [ + { + "added": true, + "def": { + "category": "Transform", + "defaultParams": [ + "1m", + "avg" + ], + "name": "groupBy", + "params": [ + { + "name": "interval", + "type": "string" + }, + { + "name": "function", + "options": [ + "avg", + "min", + "max", + "sum", + "count", + "median", + "first", + "last" + ], + "type": "string" + } + ] + }, + "params": [ + "$interval", + "avg" + ], + "text": "groupBy(1m, avg)" + }, + { + "added": true, + "def": { + "category": "Alias", + "defaultParams": [ + "/(.*)/", + "$1" + ], + "name": "replaceAlias", + "params": [ + { + "name": "regexp", + "type": "string" + }, + { + "name": "newAlias", + "type": "string" + } + ] + }, + "params": [ + "/^.*: (.+)$/", + "$1" + ], + "text": "replaceAlias(/(.*)/, $1)" + } + ], + "group": { + "filter": "$group" + }, + "host": { + "filter": "$host" + }, + "item": { + "filter": "PostgreSQL WAL: Count of WAL Files" + }, + "itemTag": { + "filter": "" + }, + "macro": { + "filter": "" + }, + "options": { + "count": false, + "disableDataAlignment": false, + "showDisabledItems": false, + "skipEmptyValues": false, + "useTrends": "default", + "useZabbixValueMapping": false + }, + "proxy": { + "filter": "" + }, + "queryType": "0", + "refId": "A", + "resultFormat": "time_series", + "schema": 12, + "table": { + "skipEmptyValues": false + }, + "tags": { + "filter": "" + }, + "textFilter": "", + "trigger": { + "filter": "" + } + } + ], + "title": "WAL Count", + "type": "timeseries" + }, + { + "datasource": { + "type": "alexanderzobnin-zabbix-datasource", + "uid": "${DS_ZABBIX}" + }, + "description": "WAL Records Generated maps wal_records.\n\nWAL metrics use information from pg_stat_wal.", + "fieldConfig": { + "defaults": { + "color": { + "fixedColor": "yellow", + "mode": "fixed" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 34, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "smooth", + "lineWidth": 1, + "pointSize": 3, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "dark-green" + } + ] + }, + "unit": "ops" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 16, + "x": 8, + "y": 46 + }, + "hideTimeOverride": true, + "id": 79, + "interval": "$interval", + "options": { + "legend": { + "calcs": [ + "mean", + "max" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Mean", + "sortDesc": true + }, + "tooltip": { + "maxHeight": 600, + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "11.0.0", + "targets": [ + { + "application": { + "filter": "" + }, + "countTriggersBy": "", + "datasource": { + "type": "alexanderzobnin-zabbix-datasource", + "uid": "${DS_ZABBIX}" + }, + "evaltype": "0", + "functions": [ + { + "added": true, + "def": { + "category": "Transform", + "defaultParams": [ + "1m", + "avg" + ], + "name": "groupBy", + "params": [ + { + "name": "interval", + "type": "string" + }, + { + "name": "function", + "options": [ + "avg", + "min", + "max", + "sum", + "count", + "median", + "first", + "last" + ], + "type": "string" + } + ] + }, + "params": [ + "$interval", + "avg" + ], + "text": "groupBy(1m, avg)" + }, + { + "added": true, + "def": { + "category": "Alias", + "defaultParams": [ + "/(.*)/", + "$1" + ], + "name": "replaceAlias", + "params": [ + { + "name": "regexp", + "type": "string" + }, + { + "name": "newAlias", + "type": "string" + } + ] + }, + "params": [ + "/^.*: (.+)$/", + "$1" + ], + "text": "replaceAlias(/(.*)/, $1)" + } + ], + "group": { + "filter": "$group" + }, + "host": { + "filter": "$host" + }, + "item": { + "filter": "PostgreSQL WAL: Records Generated" + }, + "itemTag": { + "filter": "" + }, + "macro": { + "filter": "" + }, + "options": { + "count": false, + "disableDataAlignment": false, + "showDisabledItems": false, + "skipEmptyValues": false, + "useTrends": "default", + "useZabbixValueMapping": false + }, + "proxy": { + "filter": "" + }, + "queryType": "0", + "refId": "A", + "resultFormat": "time_series", + "schema": 12, + "table": { + "skipEmptyValues": false + }, + "tags": { + "filter": "" + }, + "textFilter": "", + "trigger": { + "filter": "" + } + } + ], + "title": "WAL Records Generated", + "type": "timeseries" + }, + { + "datasource": { + "type": "alexanderzobnin-zabbix-datasource", + "uid": "${DS_ZABBIX}" + }, + "description": "WAL Sync Time maps wal_sync_time.\n\nWAL metrics use information from pg_stat_wal.", + "fieldConfig": { + "defaults": { + "color": { + "fixedColor": "yellow", + "mode": "fixed" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 34, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "smooth", + "lineWidth": 1, + "pointSize": 3, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "dark-green" + } + ] + }, + "unit": "ms" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 8, + "x": 0, + "y": 54 + }, + "hideTimeOverride": true, + "id": 80, + "interval": "$interval", + "options": { + "legend": { + "calcs": [ + "mean", + "max" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Mean", + "sortDesc": true + }, + "tooltip": { + "maxHeight": 600, + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "11.0.0", + "targets": [ + { + "application": { + "filter": "" + }, + "countTriggersBy": "", + "datasource": { + "type": "alexanderzobnin-zabbix-datasource", + "uid": "${DS_ZABBIX}" + }, + "evaltype": "0", + "functions": [ + { + "added": true, + "def": { + "category": "Transform", + "defaultParams": [ + "1m", + "avg" + ], + "name": "groupBy", + "params": [ + { + "name": "interval", + "type": "string" + }, + { + "name": "function", + "options": [ + "avg", + "min", + "max", + "sum", + "count", + "median", + "first", + "last" + ], + "type": "string" + } + ] + }, + "params": [ + "$interval", + "avg" + ], + "text": "groupBy(1m, avg)" + }, + { + "added": true, + "def": { + "category": "Alias", + "defaultParams": [], + "name": "setAlias", + "params": [ + { + "name": "alias", + "type": "string" + } + ] + }, + "params": [ + "WAL Write Time" + ], + "text": "setAlias()" + } + ], + "group": { + "filter": "$group" + }, + "host": { + "filter": "$host" + }, + "item": { + "filter": "PostgreSQL WAL: Sync Time (ms)" + }, + "itemTag": { + "filter": "" + }, + "macro": { + "filter": "" + }, + "options": { + "count": false, + "disableDataAlignment": false, + "showDisabledItems": false, + "skipEmptyValues": false, + "useTrends": "default", + "useZabbixValueMapping": false + }, + "proxy": { + "filter": "" + }, + "queryType": "0", + "refId": "A", + "resultFormat": "time_series", + "schema": 12, + "table": { + "skipEmptyValues": false + }, + "tags": { + "filter": "" + }, + "textFilter": "", + "trigger": { + "filter": "" + } + } + ], + "title": "WAL Sync Time", + "type": "timeseries" + }, + { + "datasource": { + "type": "alexanderzobnin-zabbix-datasource", + "uid": "${DS_ZABBIX}" + }, + "description": "WAL Sync Duty calculates as change of wal_sync_time per mamonsu interval.\n\nWAL metrics use information from pg_stat_wal.", + "fieldConfig": { + "defaults": { + "color": { + "fixedColor": "yellow", + "mode": "fixed" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 34, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "smooth", + "lineWidth": 1, + "pointSize": 3, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "dark-green" + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 8, + "x": 8, + "y": 54 + }, + "hideTimeOverride": true, + "id": 81, + "interval": "$interval", + "options": { + "legend": { + "calcs": [ + "mean", + "max" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Mean", + "sortDesc": true + }, + "tooltip": { + "maxHeight": 600, + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "11.0.0", + "targets": [ + { + "application": { + "filter": "" + }, + "countTriggersBy": "", + "datasource": { + "type": "alexanderzobnin-zabbix-datasource", + "uid": "${DS_ZABBIX}" + }, + "evaltype": "0", + "functions": [ + { + "added": true, + "def": { + "category": "Transform", + "defaultParams": [ + "1m", + "avg" + ], + "name": "groupBy", + "params": [ + { + "name": "interval", + "type": "string" + }, + { + "name": "function", + "options": [ + "avg", + "min", + "max", + "sum", + "count", + "median", + "first", + "last" + ], + "type": "string" + } + ] + }, + "params": [ + "$interval", + "avg" + ], + "text": "groupBy(1m, avg)" + }, + { + "added": true, + "def": { + "category": "Alias", + "defaultParams": [ + "/(.*)/", + "$1" + ], + "name": "replaceAlias", + "params": [ + { + "name": "regexp", + "type": "string" + }, + { + "name": "newAlias", + "type": "string" + } + ] + }, + "params": [ + "/^.*: (.+)$/", + "$1" + ], + "text": "replaceAlias(/(.*)/, $1)" + } + ], + "group": { + "filter": "$group" + }, + "host": { + "filter": "$host" + }, + "item": { + "filter": "PostgreSQL WAL: Sync Duty (%)" + }, + "itemTag": { + "filter": "" + }, + "macro": { + "filter": "" + }, + "options": { + "count": false, + "disableDataAlignment": false, + "showDisabledItems": false, + "skipEmptyValues": false, + "useTrends": "default", + "useZabbixValueMapping": false + }, + "proxy": { + "filter": "" + }, + "queryType": "0", + "refId": "A", + "resultFormat": "time_series", + "schema": 12, + "table": { + "skipEmptyValues": false + }, + "tags": { + "filter": "" + }, + "textFilter": "", + "trigger": { + "filter": "" + } + } + ], + "title": "WAL Sync Duty", + "type": "timeseries" + }, + { + "datasource": { + "type": "alexanderzobnin-zabbix-datasource", + "uid": "${DS_ZABBIX}" + }, + "description": "WAL FPI Generated maps wal_fpi.\n\nWAL metrics use information from pg_stat_wal.", + "fieldConfig": { + "defaults": { + "color": { + "fixedColor": "yellow", + "mode": "fixed" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 34, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "smooth", + "lineWidth": 1, + "pointSize": 3, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "dark-green" + } + ] + }, + "unit": "ops" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 8, + "x": 16, + "y": 54 + }, + "hideTimeOverride": true, + "id": 78, + "interval": "$interval", + "options": { + "legend": { + "calcs": [ + "mean", + "max" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Mean", + "sortDesc": true + }, + "tooltip": { + "maxHeight": 600, + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "11.0.0", + "targets": [ + { + "application": { + "filter": "" + }, + "countTriggersBy": "", + "datasource": { + "type": "alexanderzobnin-zabbix-datasource", + "uid": "${DS_ZABBIX}" + }, + "evaltype": "0", + "functions": [ + { + "added": true, + "def": { + "category": "Transform", + "defaultParams": [ + "1m", + "avg" + ], + "name": "groupBy", + "params": [ + { + "name": "interval", + "type": "string" + }, + { + "name": "function", + "options": [ + "avg", + "min", + "max", + "sum", + "count", + "median", + "first", + "last" + ], + "type": "string" + } + ] + }, + "params": [ + "$interval", + "avg" + ], + "text": "groupBy(1m, avg)" + }, + { + "added": true, + "def": { + "category": "Alias", + "defaultParams": [ + "/(.*)/", + "$1" + ], + "name": "replaceAlias", + "params": [ + { + "name": "regexp", + "type": "string" + }, + { + "name": "newAlias", + "type": "string" + } + ] + }, + "params": [ + "/^.*: (.+)$/", + "$1" + ], + "text": "replaceAlias(/(.*)/, $1)" + } + ], + "group": { + "filter": "$group" + }, + "host": { + "filter": "$host" + }, + "item": { + "filter": "PostgreSQL WAL: Full Page Images Generated" + }, + "itemTag": { + "filter": "" + }, + "macro": { + "filter": "" + }, + "options": { + "count": false, + "disableDataAlignment": false, + "showDisabledItems": false, + "skipEmptyValues": false, + "useTrends": "default", + "useZabbixValueMapping": false + }, + "proxy": { + "filter": "" + }, + "queryType": "0", + "refId": "A", + "resultFormat": "time_series", + "schema": 12, + "table": { + "skipEmptyValues": false + }, + "tags": { + "filter": "" + }, + "textFilter": "", + "trigger": { + "filter": "" + } + } + ], + "title": "WAL Full Page Images (FPI) Generated", + "type": "timeseries" + }, + { + "datasource": { + "type": "alexanderzobnin-zabbix-datasource", + "uid": "${DS_ZABBIX}" + }, + "description": "WAL Write Time maps wal_write_time.\n\nWAL metrics use information from pg_stat_wal.", + "fieldConfig": { + "defaults": { + "color": { + "fixedColor": "yellow", + "mode": "fixed" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 34, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "smooth", + "lineWidth": 1, + "pointSize": 3, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "dark-green" + } + ] + }, + "unit": "ms" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 8, + "x": 0, + "y": 62 + }, + "hideTimeOverride": true, + "id": 74, + "interval": "$interval", + "options": { + "legend": { + "calcs": [ + "mean", + "max" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Mean", + "sortDesc": true + }, + "tooltip": { + "maxHeight": 600, + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "11.0.0", + "targets": [ + { + "application": { + "filter": "" + }, + "countTriggersBy": "", + "datasource": { + "type": "alexanderzobnin-zabbix-datasource", + "uid": "${DS_ZABBIX}" + }, + "evaltype": "0", + "functions": [ + { + "added": true, + "def": { + "category": "Transform", + "defaultParams": [ + "1m", + "avg" + ], + "name": "groupBy", + "params": [ + { + "name": "interval", + "type": "string" + }, + { + "name": "function", + "options": [ + "avg", + "min", + "max", + "sum", + "count", + "median", + "first", + "last" + ], + "type": "string" + } + ] + }, + "params": [ + "$interval", + "avg" + ], + "text": "groupBy(1m, avg)" + }, + { + "added": true, + "def": { + "category": "Alias", + "defaultParams": [], + "name": "setAlias", + "params": [ + { + "name": "alias", + "type": "string" + } + ] + }, + "params": [ + "WAL Write Time" + ], + "text": "setAlias()" + } + ], + "group": { + "filter": "$group" + }, + "host": { + "filter": "$host" + }, + "item": { + "filter": "PostgreSQL WAL: Write Time (ms)" + }, + "itemTag": { + "filter": "" + }, + "macro": { + "filter": "" + }, + "options": { + "count": false, + "disableDataAlignment": false, + "showDisabledItems": false, + "skipEmptyValues": false, + "useTrends": "default", + "useZabbixValueMapping": false + }, + "proxy": { + "filter": "" + }, + "queryType": "0", + "refId": "A", + "resultFormat": "time_series", + "schema": 12, + "table": { + "skipEmptyValues": false + }, + "tags": { + "filter": "" + }, + "textFilter": "", + "trigger": { + "filter": "" + } + } + ], + "title": "WAL Write Time", + "type": "timeseries" + }, + { + "datasource": { + "type": "alexanderzobnin-zabbix-datasource", + "uid": "${DS_ZABBIX}" + }, + "description": "WAL Write Speed calculates as difference between current WAL file and 0/00000000.\n\nWAL metrics use information from pg_stat_wal.", + "fieldConfig": { + "defaults": { + "color": { + "fixedColor": "yellow", + "mode": "fixed" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 34, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "smooth", + "lineWidth": 1, + "pointSize": 3, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "dark-green" + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 8, + "x": 8, + "y": 62 + }, + "hideTimeOverride": true, + "id": 18, + "interval": "$interval", + "options": { + "legend": { + "calcs": [ + "mean", + "max" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Mean", + "sortDesc": true + }, + "tooltip": { + "maxHeight": 600, + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "11.0.0", + "targets": [ + { + "application": { + "filter": "" + }, + "countTriggersBy": "", + "datasource": { + "type": "alexanderzobnin-zabbix-datasource", + "uid": "${DS_ZABBIX}" + }, + "evaltype": "0", + "functions": [ + { + "added": true, + "def": { + "category": "Transform", + "defaultParams": [ + "1m", + "avg" + ], + "name": "groupBy", + "params": [ + { + "name": "interval", + "type": "string" + }, + { + "name": "function", + "options": [ + "avg", + "min", + "max", + "sum", + "count", + "median", + "first", + "last" + ], + "type": "string" + } + ] + }, + "params": [ + "$interval", + "avg" + ], + "text": "groupBy(1m, avg)" + }, + { + "added": true, + "def": { + "category": "Alias", + "defaultParams": [], + "name": "setAlias", + "params": [ + { + "name": "alias", + "type": "string" + } + ] + }, + "params": [ + "WAL Write Speed" + ], + "text": "setAlias()" + } + ], + "group": { + "filter": "$group" + }, + "host": { + "filter": "$host" + }, + "item": { + "filter": "PostgreSQL WAL: Write Speed" + }, + "itemTag": { + "filter": "" + }, + "macro": { + "filter": "" + }, + "options": { + "count": false, + "disableDataAlignment": false, + "showDisabledItems": false, + "skipEmptyValues": false, + "useTrends": "default", + "useZabbixValueMapping": false + }, + "proxy": { + "filter": "" + }, + "queryType": "0", + "refId": "A", + "resultFormat": "time_series", + "schema": 12, + "table": { + "skipEmptyValues": false + }, + "tags": { + "filter": "" + }, + "textFilter": "", + "trigger": { + "filter": "" + } + } + ], + "title": "WAL Write Speed", + "type": "timeseries" + }, + { + "datasource": { + "type": "alexanderzobnin-zabbix-datasource", + "uid": "${DS_ZABBIX}" + }, + "description": "WAL Buffers Full maps wal_buffers_full.\n\nWAL metrics use information from pg_stat_wal.", + "fieldConfig": { + "defaults": { + "color": { + "fixedColor": "yellow", + "mode": "fixed" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 34, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "smooth", + "lineWidth": 1, + "pointSize": 3, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "dark-green" + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 8, + "x": 16, + "y": 62 + }, + "hideTimeOverride": true, + "id": 75, + "interval": "$interval", + "options": { + "legend": { + "calcs": [ + "mean", + "max" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Mean", + "sortDesc": true + }, + "tooltip": { + "maxHeight": 600, + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "11.0.0", + "targets": [ + { + "application": { + "filter": "" + }, + "countTriggersBy": "", + "datasource": { + "type": "alexanderzobnin-zabbix-datasource", + "uid": "${DS_ZABBIX}" + }, + "evaltype": "0", + "functions": [ + { + "added": true, + "def": { + "category": "Transform", + "defaultParams": [ + "1m", + "avg" + ], + "name": "groupBy", + "params": [ + { + "name": "interval", + "type": "string" + }, + { + "name": "function", + "options": [ + "avg", + "min", + "max", + "sum", + "count", + "median", + "first", + "last" + ], + "type": "string" + } + ] + }, + "params": [ + "$interval", + "avg" + ], + "text": "groupBy(1m, avg)" + }, + { + "added": true, + "def": { + "category": "Alias", + "defaultParams": [ + "/(.*)/", + "$1" + ], + "name": "replaceAlias", + "params": [ + { + "name": "regexp", + "type": "string" + }, + { + "name": "newAlias", + "type": "string" + } + ] + }, + "params": [ + "/^.*: (.+)$/", + "$1" + ], + "text": "replaceAlias(/(.*)/, $1)" + } + ], + "group": { + "filter": "$group" + }, + "host": { + "filter": "$host" + }, + "item": { + "filter": "PostgreSQL WAL: Buffers Full" + }, + "itemTag": { + "filter": "" + }, + "macro": { + "filter": "" + }, + "options": { + "count": false, + "disableDataAlignment": false, + "showDisabledItems": false, + "skipEmptyValues": false, + "useTrends": "default", + "useZabbixValueMapping": false + }, + "proxy": { + "filter": "" + }, + "queryType": "0", + "refId": "A", + "resultFormat": "time_series", + "schema": 12, + "table": { + "skipEmptyValues": false + }, + "tags": { + "filter": "" + }, + "textFilter": "", + "trigger": { + "filter": "" + } + } + ], + "title": "WAL Buffers full", + "type": "timeseries" + } + ], + "title": "WAL", + "type": "row" + } + ], + "refresh": "", + "schemaVersion": 39, + "tags": [ + "pgpro", + "mamonsu", + "postgres", + "zabbix" + ], + "templating": { + "list": [ + { + "current": {}, + "datasource": { + "type": "alexanderzobnin-zabbix-datasource", + "uid": "${DS_ZABBIX}" + }, + "definition": "Zabbix - group", + "description": "Zabbix host group", + "hide": 0, + "includeAll": false, + "label": "Host group", + "multi": false, + "name": "group", + "options": [], + "query": { + "application": "", + "group": "/.*/", + "host": "", + "item": "", + "itemTag": "", + "queryType": "group" + }, + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 1, + "type": "query" + }, + { + "current": {}, + "datasource": { + "type": "alexanderzobnin-zabbix-datasource", + "uid": "${DS_ZABBIX}" + }, + "definition": "Zabbix - host", + "description": "Zabbix host.\nMamonsu template should be assigned to the host.", + "hide": 0, + "includeAll": false, + "label": "Zabbix host", + "multi": false, + "name": "host", + "options": [], + "query": { + "application": "", + "group": "$group", + "host": "/.*/", + "item": "", + "itemTag": "", + "queryType": "host" + }, + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 0, + "type": "query" + }, + { + "current": { + "selected": false, + "text": "Zabbix", + "value": "zabbix" + }, + "description": "Zabbix data source.\nSupported plugin: https://grafana.com/grafana/plugins/alexanderzobnin-zabbix-app", + "hide": 0, + "includeAll": false, + "label": "Data source", + "multi": false, + "name": "ds", + "options": [], + "query": "alexanderzobnin-zabbix-datasource", + "queryValue": "", + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "type": "datasource" + }, + { + "current": {}, + "datasource": { + "type": "alexanderzobnin-zabbix-datasource", + "uid": "${DS_ZABBIX}" + }, + "definition": "Zabbix - item", + "hide": 0, + "includeAll": true, + "multi": true, + "name": "database", + "options": [], + "query": { + "application": "", + "group": "$group", + "host": "$host", + "item": "/^PostgreSQL Databases: (.+) size$/", + "itemTag": "", + "queryType": "item" + }, + "refresh": 1, + "regex": "/^PostgreSQL Databases: (?.+) size$/", + "skipUrlSync": false, + "sort": 1, + "type": "query" + }, + { + "auto": true, + "auto_count": 100, + "auto_min": "1m", + "current": { + "selected": false, + "text": "auto", + "value": "$__auto_interval_interval" + }, + "hide": 0, + "name": "interval", + "options": [ + { + "selected": true, + "text": "auto", + "value": "$__auto_interval_interval" + }, + { + "selected": false, + "text": "1m", + "value": "1m" + }, + { + "selected": false, + "text": "5m", + "value": "5m" + }, + { + "selected": false, + "text": "10m", + "value": "10m" + }, + { + "selected": false, + "text": "15m", + "value": "15m" + }, + { + "selected": false, + "text": "30m", + "value": "30m" + }, + { + "selected": false, + "text": "1h", + "value": "1h" + }, + { + "selected": false, + "text": "6h", + "value": "6h" + }, + { + "selected": false, + "text": "12h", + "value": "12h" + }, + { + "selected": false, + "text": "1d", + "value": "1d" + }, + { + "selected": false, + "text": "7d", + "value": "7d" + } + ], + "query": "1m,5m,10m,15m,30m,1h,6h,12h,1d,7d", + "queryValue": "", + "refresh": 2, + "skipUrlSync": false, + "type": "interval" + } + ] + }, + "time": { + "from": "now-6h", + "to": "now" + }, + "timeRangeUpdatedDuringEditOrView": false, + "timepicker": {}, + "timezone": "browser", + "title": "Postgres Pro | Postgres metrics by Mamonsu", + "uid": "bdpqi1jk82l8gf", + "version": 1, + "weekStart": "" +} From 3419758739872509632590cbd866e3f3257b6c91 Mon Sep 17 00:00:00 2001 From: Maxim Styushin Date: Tue, 9 Jul 2024 14:43:50 +0400 Subject: [PATCH 080/106] cicd: fix centos7 repo urls --- github-actions-tests/tests.sh | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/github-actions-tests/tests.sh b/github-actions-tests/tests.sh index 8374448..36e3e71 100644 --- a/github-actions-tests/tests.sh +++ b/github-actions-tests/tests.sh @@ -36,6 +36,32 @@ REPO="sudo yum -y install https://download.postgresql.org/pub/repos/yum/reporpms if [ "${OS}" = "centos:7" ]; then # install and set up components missing in docker image (sudo, wget, bc, unzip) yum clean all + cat << REPO > /etc/yum.repos.d/CentOS-Base.repo +[base] +name=CentOS-\$releasever - Base +baseurl=http://vault.centos.org/7.9.2009/os/\$basearch/ +gpgcheck=1 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7 + +[updates] +name=CentOS-\$releasever - Updates +baseurl=http://vault.centos.org/7.9.2009/updates/\$basearch/ +gpgcheck=1 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7 + +[extras] +name=CentOS-\$releasever - Extras +baseurl=http://vault.centos.org/7.9.2009/extras/\$basearch/ +gpgcheck=1 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7 + +[centosplus] +name=CentOS-\$releasever - Plus +baseurl=http://vault.centos.org/7.9.2009/centosplus/\$basearch/ +gpgcheck=1 +enabled=0 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7 +REPO yum update -y yum install -y sudo PACKAGE_MANAGER_INSTALL="sudo yum -y install" From 1e54c5998d19d1804aace3f80c2529087624e832 Mon Sep 17 00:00:00 2001 From: Maxim Styushin Date: Fri, 16 Aug 2024 18:48:53 +0400 Subject: [PATCH 081/106] fix: run on systems with newer setuptools - Don't use pkg_resources.packaging if installed version of setuptools doesn't support it --- mamonsu/plugins/pgsql/driver/pg8000/core.py | 6 +++++- mamonsu/plugins/pgsql/driver/pool.py | 5 ++++- mamonsu/plugins/pgsql/memory_leak_diagnostic.py | 5 ++++- mamonsu/plugins/pgsql/replication.py | 6 +++++- 4 files changed, 18 insertions(+), 4 deletions(-) diff --git a/mamonsu/plugins/pgsql/driver/pg8000/core.py b/mamonsu/plugins/pgsql/driver/pg8000/core.py index 7816bff..26db69a 100755 --- a/mamonsu/plugins/pgsql/driver/pg8000/core.py +++ b/mamonsu/plugins/pgsql/driver/pg8000/core.py @@ -2,12 +2,16 @@ from collections import defaultdict, deque from datetime import datetime as Datetime from decimal import Decimal -from pkg_resources import packaging from hashlib import md5 from itertools import count, islice from struct import Struct from warnings import warn +try: + from pkg_resources import packaging +except ImportError: + import packaging.version + from mamonsu.plugins.pgsql.driver.pg8000 import converters from .exceptions import ( ArrayContentNotSupportedError, DatabaseError, Error, IntegrityError, diff --git a/mamonsu/plugins/pgsql/driver/pool.py b/mamonsu/plugins/pgsql/driver/pool.py index b7ca620..bfd4749 100644 --- a/mamonsu/plugins/pgsql/driver/pool.py +++ b/mamonsu/plugins/pgsql/driver/pool.py @@ -1,6 +1,9 @@ -from pkg_resources import packaging from .connection import Connection, ConnectionInfo +try: + from pkg_resources import packaging +except ImportError: + import packaging.version class Pool(object): ExcludeDBs = ["template0", "template1"] diff --git a/mamonsu/plugins/pgsql/memory_leak_diagnostic.py b/mamonsu/plugins/pgsql/memory_leak_diagnostic.py index cb368a9..c22c5f9 100644 --- a/mamonsu/plugins/pgsql/memory_leak_diagnostic.py +++ b/mamonsu/plugins/pgsql/memory_leak_diagnostic.py @@ -4,10 +4,13 @@ import os from .pool import Pooler import re -from pkg_resources import packaging import mamonsu.lib.platform as platform import posix +try: + from pkg_resources import packaging +except ImportError: + import packaging.version class MemoryLeakDiagnostic(Plugin): DEFAULT_CONFIG = { diff --git a/mamonsu/plugins/pgsql/replication.py b/mamonsu/plugins/pgsql/replication.py index 0c53f5b..78d841a 100644 --- a/mamonsu/plugins/pgsql/replication.py +++ b/mamonsu/plugins/pgsql/replication.py @@ -1,10 +1,14 @@ # -*- coding: utf-8 -*- from mamonsu.plugins.pgsql.plugin import PgsqlPlugin as Plugin -from pkg_resources import packaging from .pool import Pooler from mamonsu.lib.zbx_template import ZbxTemplate +try: + from pkg_resources import packaging +except ImportError: + import packaging.version + NUMBER_NON_ACTIVE_SLOTS = 0 From f94a504671be0ce028065556617f6b59b14ee5ad Mon Sep 17 00:00:00 2001 From: Maxim Styushin Date: Fri, 16 Aug 2024 18:53:59 +0400 Subject: [PATCH 082/106] build: fix RPM buildspec - Stop using old-style user:group specification in chown calls --- packaging/rpm/SPECS/mamonsu.spec | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packaging/rpm/SPECS/mamonsu.spec b/packaging/rpm/SPECS/mamonsu.spec index f35fbd9..6fc2357 100644 --- a/packaging/rpm/SPECS/mamonsu.spec +++ b/packaging/rpm/SPECS/mamonsu.spec @@ -57,20 +57,20 @@ getent passwd mamonsu > /dev/null || \ -c "mamonsu monitoring user" mamonsu mkdir -p /var/run/mamonsu -chown -R mamonsu.mamonsu /var/run/mamonsu +chown -R mamonsu:mamonsu /var/run/mamonsu mkdir -p /etc/mamonsu/plugins touch /etc/mamonsu/plugins/__init__.py mkdir -p /var/log/mamonsu -chown -R mamonsu.mamonsu /var/log/mamonsu +chown -R mamonsu:mamonsu /var/log/mamonsu %preun /sbin/service mamonsu stop >/dev/null 2>&1 /sbin/chkconfig --del mamonsu %post -chown -R mamonsu.mamonsu /etc/mamonsu +chown -R mamonsu:mamonsu /etc/mamonsu %changelog * Thu Apr 18 2024 Maxim Styushin - 3.5.8-1 From 4f1a44c52435ff054c1f5df386f7c7281ec8ddd5 Mon Sep 17 00:00:00 2001 From: Maxim Styushin Date: Mon, 19 Aug 2024 12:43:49 +0400 Subject: [PATCH 083/106] cicd: fix url for EPEL rpm (moved to archives) --- github-actions-tests/tests.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/github-actions-tests/tests.sh b/github-actions-tests/tests.sh index 36e3e71..5562da6 100644 --- a/github-actions-tests/tests.sh +++ b/github-actions-tests/tests.sh @@ -69,7 +69,7 @@ REPO eval "${PACKAGE_MANAGER_INSTALL} wget" eval "${PACKAGE_MANAGER_INSTALL} bc" eval "${PACKAGE_MANAGER_INSTALL} unzip" - eval "${PACKAGE_MANAGER_INSTALL} https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm" + eval "${PACKAGE_MANAGER_INSTALL} https://archives.fedoraproject.org/pub/archive/epel/7/x86_64/Packages/e/epel-release-7-14.noarch.rpm" REPO=${PACKAGE_MANAGER_INSTALL}" https://download.postgresql.org/pub/repos/yum/reporpms/EL-"$(echo ${OS} | sed -r 's/^[^0-9]*([0-9]+).*/\1/')"-x86_64/pgdg-redhat-repo-latest.noarch.rpm"\ # run tests From 29961c24bc3cbb100025902433990d2b88e346ad Mon Sep 17 00:00:00 2001 From: Maxim Styushin Date: Mon, 19 Aug 2024 12:58:17 +0400 Subject: [PATCH 084/106] build: upgrade to 3.5.9 --- .github/workflows/mamonsu-tests-dev.yml | 2 +- .github/workflows/mamonsu-tests-master.yml | 2 +- github-actions-tests/mamonsu_build.sh | 4 ++-- .../sources/{agent_3.5.8.conf => agent_3.5.9.conf} | 0 mamonsu/__init__.py | 2 +- packaging/debian/changelog | 4 ++++ packaging/rpm/SPECS/mamonsu.spec | 6 +++++- packaging/win/mamonsu.def.nsh | 2 +- 8 files changed, 15 insertions(+), 7 deletions(-) rename github-actions-tests/sources/{agent_3.5.8.conf => agent_3.5.9.conf} (100%) diff --git a/.github/workflows/mamonsu-tests-dev.yml b/.github/workflows/mamonsu-tests-dev.yml index 22386fb..0162db9 100644 --- a/.github/workflows/mamonsu-tests-dev.yml +++ b/.github/workflows/mamonsu-tests-dev.yml @@ -80,7 +80,7 @@ jobs: echo "zabbix_address=$(hostname -I | awk '{print $1}')" >> $GITHUB_OUTPUT id: zabbix_address - name: Edit Zabbix address in agent.conf - run: sed -i "s/\(address *= *\).*/\1 ${{ steps.zabbix_address.outputs.zabbix_address }}/" ${{ env.MAMONSU_PATH }}/github-actions-tests/sources/agent_3.5.8.conf + run: sed -i "s/\(address *= *\).*/\1 ${{ steps.zabbix_address.outputs.zabbix_address }}/" ${{ env.MAMONSU_PATH }}/github-actions-tests/sources/agent_3.5.9.conf - name: Copy test scripts to container run: docker exec $( echo "${{ matrix.docker_os }}" | sed 's/://' | sed 's/\.//' ) mkdir -p -m 755 /mamonsu/ diff --git a/.github/workflows/mamonsu-tests-master.yml b/.github/workflows/mamonsu-tests-master.yml index 2cdde54..0d895af 100644 --- a/.github/workflows/mamonsu-tests-master.yml +++ b/.github/workflows/mamonsu-tests-master.yml @@ -91,7 +91,7 @@ jobs: echo "zabbix_address=$(hostname -I | awk '{print $1}')" >> $GITHUB_OUTPUT id: zabbix_address - name: Edit Zabbix address in agent.conf - run: sed -i "s/\(address *= *\).*/\1 ${{ steps.zabbix_address.outputs.zabbix_address }}/" ${{ env.MAMONSU_PATH }}/github-actions-tests/sources/agent_3.5.8.conf + run: sed -i "s/\(address *= *\).*/\1 ${{ steps.zabbix_address.outputs.zabbix_address }}/" ${{ env.MAMONSU_PATH }}/github-actions-tests/sources/agent_3.5.9.conf - name: Copy test scripts to container run: docker exec $( echo "${{ matrix.docker_os }}" | sed 's/://' | sed 's/\.//' ) mkdir -p -m 755 /mamonsu/ diff --git a/github-actions-tests/mamonsu_build.sh b/github-actions-tests/mamonsu_build.sh index bc7d5e4..137e072 100644 --- a/github-actions-tests/mamonsu_build.sh +++ b/github-actions-tests/mamonsu_build.sh @@ -41,7 +41,7 @@ if [ "${OS%:*}" = "centos" ]; then python3 setup.py build && python3 setup.py install make rpm sudo rpm -i ./mamonsu*.rpm - cat /mamonsu/github-actions-tests/sources/agent_3.5.8.conf > /etc/mamonsu/agent.conf + cat /mamonsu/github-actions-tests/sources/agent_3.5.9.conf > /etc/mamonsu/agent.conf systemctl daemon-reload systemctl restart mamonsu sleep 5 @@ -64,7 +64,7 @@ elif [ "${OS%:*}" = "ubuntu" ]; then python3 setup.py build && python3 setup.py install make deb sudo dpkg -i ./mamonsu*.deb - cat /mamonsu/github-actions-tests/sources/agent_3.5.8.conf > /etc/mamonsu/agent.conf + cat /mamonsu/github-actions-tests/sources/agent_3.5.9.conf > /etc/mamonsu/agent.conf service mamonsu restart sleep 5 echo && echo && echo "mamonsu version:" diff --git a/github-actions-tests/sources/agent_3.5.8.conf b/github-actions-tests/sources/agent_3.5.9.conf similarity index 100% rename from github-actions-tests/sources/agent_3.5.8.conf rename to github-actions-tests/sources/agent_3.5.9.conf diff --git a/mamonsu/__init__.py b/mamonsu/__init__.py index 0a9cadd..634d8d3 100644 --- a/mamonsu/__init__.py +++ b/mamonsu/__init__.py @@ -1,7 +1,7 @@ __author__ = 'Dmitry Vasilyev' __author_email__ = 'info@postgrespro.ru' __description__ = 'Monitoring agent for PostgreSQL' -__version__ = '3.5.8' +__version__ = '3.5.9' __licence__ = 'BSD' __url__ = 'https://github.com/postgrespro/mamonsu' diff --git a/packaging/debian/changelog b/packaging/debian/changelog index 0a0c778..dd77d37 100644 --- a/packaging/debian/changelog +++ b/packaging/debian/changelog @@ -1,3 +1,7 @@ +mamonsu (3.5.9-1) stable; urgency=low + * Run on systems with latest setuptools installed (>67.7.2); + * Drop using dotted user:group specification in RPM pre-install stage; + mamonsu (3.5.8-1) stable; urgency=low * Prepare for python 3.12: remove deprecated distutils imports; diff --git a/packaging/rpm/SPECS/mamonsu.spec b/packaging/rpm/SPECS/mamonsu.spec index 6fc2357..f9e19b1 100644 --- a/packaging/rpm/SPECS/mamonsu.spec +++ b/packaging/rpm/SPECS/mamonsu.spec @@ -1,5 +1,5 @@ Name: mamonsu -Version: 3.5.8 +Version: 3.5.9 Release: 1%{?dist} Summary: Monitoring agent for PostgreSQL Group: Applications/Internet @@ -73,6 +73,10 @@ chown -R mamonsu:mamonsu /var/log/mamonsu chown -R mamonsu:mamonsu /etc/mamonsu %changelog +* Mon Aug 19 2024 Maxim Styushin - 3.5.9-1 + - Run on systems with latest setuptools installed (>67.7.2); + - Drop using dotted user:group specification in RPM pre-install stage; + * Thu Apr 18 2024 Maxim Styushin - 3.5.8-1 - Prepare for python 3.12: remove deprecated distutils imports; diff --git a/packaging/win/mamonsu.def.nsh b/packaging/win/mamonsu.def.nsh index 1e32c88..5ca5afc 100644 --- a/packaging/win/mamonsu.def.nsh +++ b/packaging/win/mamonsu.def.nsh @@ -1,5 +1,5 @@ !define NAME Mamonsu -!define VERSION 3.5.8 +!define VERSION 3.5.9 !define MAMONSU_REG_PATH "Software\PostgresPro\Mamonsu" !define MAMONSU_REG_UNINSTALLER_PATH "Software\Microsoft\Windows\CurrentVersion\Uninstall" !define EDB_REG "SOFTWARE\Postgresql" From 775d8aa997f5940f0c1e69ef624dd2794a56a338 Mon Sep 17 00:00:00 2001 From: Maxim Styushin Date: Mon, 14 Oct 2024 18:08:53 +0400 Subject: [PATCH 085/106] cicd: add Postgres 17 to test matrix --- .github/workflows/mamonsu-tests-dev.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/mamonsu-tests-dev.yml b/.github/workflows/mamonsu-tests-dev.yml index 0162db9..a7a3885 100644 --- a/.github/workflows/mamonsu-tests-dev.yml +++ b/.github/workflows/mamonsu-tests-dev.yml @@ -36,6 +36,12 @@ jobs: - docker_os: 'centos:8' pg_version: '16' zabbix_version: '6.4.13' + - docker_os: 'centos:8' + pg_version: '17' + zabbix_version: '6.4.13' + - docker_os: 'ubuntu:22.04' + pg_version: '17' + zabbix_version: '6.4.13' - docker_os: 'ubuntu:24.04' pg_version: '16' zabbix_version: '6.4.13' From ea9ceb44a8ce61cbf08a30bdc5094947a3b66428 Mon Sep 17 00:00:00 2001 From: Maxim Styushin Date: Fri, 13 Dec 2024 16:52:58 +0400 Subject: [PATCH 086/106] fix: run zabbix cli tools with newer setuptools --- mamonsu/tools/zabbix_cli/operations.py | 7 ++++++- mamonsu/tools/zabbix_cli/request.py | 5 ++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/mamonsu/tools/zabbix_cli/operations.py b/mamonsu/tools/zabbix_cli/operations.py index d3b25e4..984f96f 100644 --- a/mamonsu/tools/zabbix_cli/operations.py +++ b/mamonsu/tools/zabbix_cli/operations.py @@ -5,7 +5,12 @@ import json from mamonsu.tools.zabbix_cli.request import Request from mamonsu.lib.parser import zabbix_msg -from pkg_resources import packaging + +try: + from pkg_resources import packaging +except ImportError: + import packaging.version + from mamonsu.tools.zabbix_cli.dashboard import generate_dashboard diff --git a/mamonsu/tools/zabbix_cli/request.py b/mamonsu/tools/zabbix_cli/request.py index 566868f..f0cee27 100644 --- a/mamonsu/tools/zabbix_cli/request.py +++ b/mamonsu/tools/zabbix_cli/request.py @@ -4,8 +4,11 @@ import logging from collections import OrderedDict +try: + from pkg_resources import packaging +except ImportError: + import packaging.version -from pkg_resources import packaging import urllib.request as urllib2 From a1b0f512e428ca9e5b49660d97bd121ad2586dc1 Mon Sep 17 00:00:00 2001 From: Maxim Styushin Date: Fri, 13 Dec 2024 17:11:42 +0400 Subject: [PATCH 087/106] fix: updates for postgres 17 - updated checkpoint plugin: added support for new view pg_stat_checkpointer - updated bgwriter plugin: consider updated view pg_stat_bgwriter in postgres 17 --- README.md | 3 +- documentation/metrics.md | 42 ++++++++++-- mamonsu/plugins/pgsql/bgwriter.py | 92 +++++++++++++++---------- mamonsu/plugins/pgsql/checkpoint.py | 102 ++++++++++++++++++---------- 4 files changed, 166 insertions(+), 73 deletions(-) diff --git a/README.md b/README.md index df7611c..a4f3076 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,8 @@ Supported platforms: - Windows; Supported Zabbix server versions: 4.0.44 - 6.4.13 -Supported PostgreSQL versions: 12 - 16 + +Supported PostgreSQL versions: 12 - 17 *** ***Table of Contents*** diff --git a/documentation/metrics.md b/documentation/metrics.md index a157eab..15ef4a1 100644 --- a/documentation/metrics.md +++ b/documentation/metrics.md @@ -1997,7 +1997,7 @@ Default config: - +
NamePostgreSQL Locks: CREATE INDEXPostgreSQL Locks: total number of locks acquired (or waiting) by all queries like CREATE INDEX
Key
Supported Version9.5+9.5 - 16
@@ -2030,7 +2030,7 @@ Default config: Supported Version - 9.5+ + 9.5 - 16 @@ -2096,7 +2096,7 @@ Default config: Supported Version - 9.5+ + 9.5 - 16 @@ -2208,7 +2208,7 @@ Default config: ### Items -*Checkpoints metrics* use information from `pg_stat_bgwriter`. +*Checkpoints metrics* use information from `pg_stat_bgwriter`. Starting from Postgres 17 this information is pulled from view `pg_stat_checkpointer`. - **Checkpoints Sync Time** @@ -2341,6 +2341,40 @@ Default config: *Requested Checkpoints* maps `checkpoints_req`. + +- **Buffers Written During Checkpoints** + + Zabbix item: + + + + + + + + + + + + + + + + + + + + + + + + + +
NamePostgreSQL bgwriter: Buffers Written During Checkpoints
Keypgsql.checkpoint[buffers_written]
TypeNumeric (float)
Units
DeltaSimple Change
Supported Version17+
+ + *Buffers Written During Checkpoints* maps `buffers_written`. + + ### Graphs diff --git a/mamonsu/plugins/pgsql/bgwriter.py b/mamonsu/plugins/pgsql/bgwriter.py index 6d95013..2ca2d70 100644 --- a/mamonsu/plugins/pgsql/bgwriter.py +++ b/mamonsu/plugins/pgsql/bgwriter.py @@ -12,44 +12,68 @@ class BgWriter(Plugin): SELECT {0} FROM pg_catalog.pg_stat_bgwriter; """ - Items = [ - # key, zbx_key, description, - # ('graph name', color, side), units, delta - - ("buffers_checkpoint", "bgwriter[buffers_checkpoint]", - "Buffers Written During Checkpoints", - ("PostgreSQL bgwriter", "006AAE", 1), - Plugin.DELTA.simple_change), - - ("buffers_clean", "bgwriter[buffers_clean]", - "Buffers Written", - ("PostgreSQL bgwriter", "00CC00", 1), - Plugin.DELTA.simple_change), - - ("maxwritten_clean", "bgwriter[maxwritten_clean]", - "Number of bgwriter Stopped by Max Write Count", - ("PostgreSQL bgwriter", "FF5656", 0), - Plugin.DELTA.simple_change), - - ("buffers_backend", "bgwriter[buffers_backend]", - "Buffers Written Directly by a Backend", - ("PostgreSQL bgwriter", "9C8A4E", 1), - Plugin.DELTA.simple_change), - - ("buffers_backend_fsync", "bgwriter[buffers_backend_fsync]", - "Times a Backend Execute Its Own Fsync", - ("PostgreSQL bgwriter", "00CC00", 0), - Plugin.DELTA.simple_change), - - ("buffers_alloc", "bgwriter[buffers_alloc]", - "Buffers Allocated", - ("PostgreSQL bgwriter", "FF5656", 1), - Plugin.DELTA.simple_change) - ] graph_name_buffers = "PostgreSQL bgwriter: Buffers" graph_name_ws = "PostgreSQL bgwriter: Write/Sync" + def __init__(self, config): + super(BgWriter, self).__init__(config) + if Pooler.server_version_less("17"): + self.Items = [ + # key, zbx_key, description, + # ('graph name', color, side), units, delta + + ("buffers_checkpoint", "bgwriter[buffers_checkpoint]", + "Buffers Written During Checkpoints", + ("PostgreSQL bgwriter", "006AAE", 1), + Plugin.DELTA.simple_change), + + ("buffers_clean", "bgwriter[buffers_clean]", + "Buffers Written", + ("PostgreSQL bgwriter", "00CC00", 1), + Plugin.DELTA.simple_change), + + ("maxwritten_clean", "bgwriter[maxwritten_clean]", + "Number of bgwriter Stopped by Max Write Count", + ("PostgreSQL bgwriter", "FF5656", 0), + Plugin.DELTA.simple_change), + + ("buffers_backend", "bgwriter[buffers_backend]", + "Buffers Written Directly by a Backend", + ("PostgreSQL bgwriter", "9C8A4E", 1), + Plugin.DELTA.simple_change), + + ("buffers_backend_fsync", "bgwriter[buffers_backend_fsync]", + "Times a Backend Execute Its Own Fsync", + ("PostgreSQL bgwriter", "00CC00", 0), + Plugin.DELTA.simple_change), + + ("buffers_alloc", "bgwriter[buffers_alloc]", + "Buffers Allocated", + ("PostgreSQL bgwriter", "FF5656", 1), + Plugin.DELTA.simple_change) + ] + else: + self.Items = [ + # key, zbx_key, description, + # ('graph name', color, side), units, delta + + ("buffers_clean", "bgwriter[buffers_clean]", + "Buffers Written", + ("PostgreSQL bgwriter", "00CC00", 1), + Plugin.DELTA.simple_change), + + ("maxwritten_clean", "bgwriter[maxwritten_clean]", + "Number of bgwriter Stopped by Max Write Count", + ("PostgreSQL bgwriter", "FF5656", 0), + Plugin.DELTA.simple_change), + + ("buffers_alloc", "bgwriter[buffers_alloc]", + "Buffers Allocated", + ("PostgreSQL bgwriter", "FF5656", 1), + Plugin.DELTA.simple_change) + ] + def run(self, zbx): columns = [x[0] for x in self.Items] result = Pooler.query(self.query.format(", ".join(columns))) diff --git a/mamonsu/plugins/pgsql/checkpoint.py b/mamonsu/plugins/pgsql/checkpoint.py index f4a5324..80eff40 100644 --- a/mamonsu/plugins/pgsql/checkpoint.py +++ b/mamonsu/plugins/pgsql/checkpoint.py @@ -9,14 +9,6 @@ class Checkpoint(Plugin): AgentPluginType = "pg" Interval = 60 * 5 - query = """ - SELECT {0} - FROM pg_catalog.pg_stat_bgwriter; - """ # for mamonsu and agent - query_interval = """ - SELECT {0}*3600 - FROM pg_catalog.pg_stat_bgwriter; - """ # for mamonsu and agent checkpoints in hour key = "pgsql.checkpoint{0}" # key: (macro, value) @@ -24,34 +16,76 @@ class Checkpoint(Plugin): "max_checkpoint_by_wal_in_hour": [("macro", "{$MAX_CHECKPOINT_BY_WAL_IN_HOUR}"), ("value", 12)] } - Items = [ - # key, zbx_key, description, - # ('graph name', color, side), units, delta, factor - - ("checkpoints_timed", "count_timed", - "by Timeout (in hour)", - ("PostgreSQL Checkpoints: Count (in hour)", "00CC00", 0), - Plugin.UNITS.none, Plugin.DELTA.speed_per_second, 60 * 60), - - ("checkpoints_req", "count_wal", - "by WAL (in hour)", - ("PostgreSQL Checkpoints: Count (in hour)", "FF5656", 0), - Plugin.UNITS.none, Plugin.DELTA.speed_per_second, 60 * 60), - - ("checkpoint_write_time", "write_time", - "Write Time", - ("PostgreSQL Checkpoints: Write/Sync", "00CC00", 1), - Plugin.UNITS.ms, Plugin.DELTA.speed_per_second, 1), - - ("checkpoint_sync_time", "checkpoint_sync_time", - "Sync Time", - ("PostgreSQL Checkpoints: Write/Sync", "FF5656", 1), - Plugin.UNITS.ms, Plugin.DELTA.speed_per_second, 1) - ] - graph_name_count = "PostgreSQL Checkpoints: Count (in hour)" graph_name_ws = "PostgreSQL Checkpoints: Write/Sync" + def __init__(self, config): + super(Checkpoint, self).__init__(config) + if Pooler.server_version_less("17"): + self.query = """ + SELECT {0} + FROM pg_catalog.pg_stat_bgwriter; + """ # for mamonsu and agent + self.query_interval = """ + SELECT {0}*3600 + FROM pg_catalog.pg_stat_bgwriter; + """ # for mamonsu and agent checkpoints in hour + self.Items = [ + # key, zbx_key, description, + # ('graph name', color, side), units, delta, factor + ("checkpoints_timed", "count_timed", + "by Timeout (in hour)", + ("PostgreSQL Checkpoints: Count (in hour)", "00CC00", 0), + Plugin.UNITS.none, Plugin.DELTA.speed_per_second, 60 * 60), + + ("checkpoints_req", "count_wal", + "by WAL (in hour)", + ("PostgreSQL Checkpoints: Count (in hour)", "FF5656", 0), + Plugin.UNITS.none, Plugin.DELTA.speed_per_second, 60 * 60), + + ("checkpoint_write_time", "write_time", + "Write Time", + ("PostgreSQL Checkpoints: Write/Sync", "00CC00", 1), + Plugin.UNITS.ms, Plugin.DELTA.speed_per_second, 1), + + ("checkpoint_sync_time", "checkpoint_sync_time", + "Sync Time", + ("PostgreSQL Checkpoints: Write/Sync", "FF5656", 1), + Plugin.UNITS.ms, Plugin.DELTA.speed_per_second, 1) + ] + else: + self.query = """ + SELECT {0} + FROM pg_catalog.pg_stat_checkpointer; + """ # for mamonsu and agent + self.query_interval = """ + SELECT {0}*3600 + FROM pg_catalog.pg_stat_checkpointer; + """ # for mamonsu and agent checkpoints in hour + self.Items = [ + # key, zbx_key, description, + # ('graph name', color, side), units, delta, factor + ("num_timed", "count_timed", + "by Timeout (in hour)", + ("PostgreSQL Checkpoints: Count (in hour)", "00CC00", 0), + Plugin.UNITS.none, Plugin.DELTA.speed_per_second, 60 * 60), + + ("num_requested", "count_wal", + "by WAL (in hour)", + ("PostgreSQL Checkpoints: Count (in hour)", "FF5656", 0), + Plugin.UNITS.none, Plugin.DELTA.speed_per_second, 60 * 60), + + ("write_time", "write_time", + "Write Time", + ("PostgreSQL Checkpoints: Write/Sync", "00CC00", 1), + Plugin.UNITS.ms, Plugin.DELTA.speed_per_second, 1), + + ("sync_time", "checkpoint_sync_time", + "Sync Time", + ("PostgreSQL Checkpoints: Write/Sync", "FF5656", 1), + Plugin.UNITS.ms, Plugin.DELTA.speed_per_second, 1) + ] + def run(self, zbx): columns = [x[0] for x in self.Items] result = Pooler.query(self.query.format(", ".join(columns))) @@ -146,5 +180,5 @@ def keys_and_queries(self, template_zabbix): else: result.append( "{0}[*],$2 $1 -c \"{1}\"".format(self.key.format("." + item[1]), - self.query_interval.format(item[0]))) + self.query_interval.format(item[0]))) return template_zabbix.key_and_query(result) From 9cafa8991c0ce8b913f48d3f155d3dd7b9c544db Mon Sep 17 00:00:00 2001 From: Maxim Styushin Date: Fri, 13 Dec 2024 18:48:11 +0400 Subject: [PATCH 088/106] cicd: fixed failing pipelines - workaround possible /sys/fs/cgroup issue - add test mertric files for Postgres 16 and 17 - install pg_buffercache extension in test DB - fix system.uptime expected metric name --- github-actions-tests/mamonsu_build.sh | 7 +- github-actions-tests/metrics.sh | 4 +- .../sources/metrics-linux-10.txt | 2 +- .../sources/metrics-linux-11.txt | 2 +- .../sources/metrics-linux-12.txt | 2 +- .../sources/metrics-linux-13.txt | 2 +- .../sources/metrics-linux-14.txt | 2 +- .../sources/metrics-linux-16.txt | 130 ++++++++++++++++++ .../sources/metrics-linux-17.txt | 116 ++++++++++++++++ .../sources/metrics-linux-9.6.txt | 2 +- .../sources/metrics-linux-full-list.txt | 2 +- 11 files changed, 260 insertions(+), 11 deletions(-) create mode 100644 github-actions-tests/sources/metrics-linux-16.txt create mode 100644 github-actions-tests/sources/metrics-linux-17.txt diff --git a/github-actions-tests/mamonsu_build.sh b/github-actions-tests/mamonsu_build.sh index 137e072..6fbb92d 100644 --- a/github-actions-tests/mamonsu_build.sh +++ b/github-actions-tests/mamonsu_build.sh @@ -42,8 +42,9 @@ if [ "${OS%:*}" = "centos" ]; then make rpm sudo rpm -i ./mamonsu*.rpm cat /mamonsu/github-actions-tests/sources/agent_3.5.9.conf > /etc/mamonsu/agent.conf - systemctl daemon-reload - systemctl restart mamonsu + # ensuring mamonsu can actually start + sudo su -s /bin/bash -c "mamonsu bootstrap -x --user postgres -d mamonsu_test_db" mamonsu + /etc/init.d/mamonsu restart sleep 5 echo && echo && echo "mamonsu version:" mamonsu --version @@ -65,6 +66,8 @@ elif [ "${OS%:*}" = "ubuntu" ]; then make deb sudo dpkg -i ./mamonsu*.deb cat /mamonsu/github-actions-tests/sources/agent_3.5.9.conf > /etc/mamonsu/agent.conf + # ensuring mamonsu can actually start + sudo su -s /bin/bash -c "mamonsu bootstrap -x --user postgres -d mamonsu_test_db" mamonsu service mamonsu restart sleep 5 echo && echo && echo "mamonsu version:" diff --git a/github-actions-tests/metrics.sh b/github-actions-tests/metrics.sh index a4ebf63..5ea6694 100644 --- a/github-actions-tests/metrics.sh +++ b/github-actions-tests/metrics.sh @@ -60,12 +60,12 @@ END sleep 120 # read metric for specific version -while read metric; do +for metric in $(cat ${METRICS_FILE}); do GREP=$( mamonsu agent metric-get ${metric} | grep "pgsql\|sys\|mamonsu" ) if [ -z "$GREP" ]; then echo "---> ERROR: Cannot found metric $metric" exit 11 fi -done <"${METRICS_FILE}" +done echo && echo diff --git a/github-actions-tests/sources/metrics-linux-10.txt b/github-actions-tests/sources/metrics-linux-10.txt index f62a60f..c2d044c 100644 --- a/github-actions-tests/sources/metrics-linux-10.txt +++ b/github-actions-tests/sources/metrics-linux-10.txt @@ -120,4 +120,4 @@ system.vfs.free[/] system.vfs.percent_free[/] system.vfs.percent_inode_free[/] system.vfs.used[/] -system.up_time[] \ No newline at end of file +system.uptime[] diff --git a/github-actions-tests/sources/metrics-linux-11.txt b/github-actions-tests/sources/metrics-linux-11.txt index f62a60f..c2d044c 100644 --- a/github-actions-tests/sources/metrics-linux-11.txt +++ b/github-actions-tests/sources/metrics-linux-11.txt @@ -120,4 +120,4 @@ system.vfs.free[/] system.vfs.percent_free[/] system.vfs.percent_inode_free[/] system.vfs.used[/] -system.up_time[] \ No newline at end of file +system.uptime[] diff --git a/github-actions-tests/sources/metrics-linux-12.txt b/github-actions-tests/sources/metrics-linux-12.txt index 94ffe7e..1c09797 100644 --- a/github-actions-tests/sources/metrics-linux-12.txt +++ b/github-actions-tests/sources/metrics-linux-12.txt @@ -121,4 +121,4 @@ system.vfs.free[/] system.vfs.percent_free[/] system.vfs.percent_inode_free[/] system.vfs.used[/] -system.up_time[] \ No newline at end of file +system.uptime[] diff --git a/github-actions-tests/sources/metrics-linux-13.txt b/github-actions-tests/sources/metrics-linux-13.txt index c847ac5..b6a0d1c 100644 --- a/github-actions-tests/sources/metrics-linux-13.txt +++ b/github-actions-tests/sources/metrics-linux-13.txt @@ -125,4 +125,4 @@ system.vfs.free[/] system.vfs.percent_free[/] system.vfs.percent_inode_free[/] system.vfs.used[/] -system.up_time[] \ No newline at end of file +system.uptime[] diff --git a/github-actions-tests/sources/metrics-linux-14.txt b/github-actions-tests/sources/metrics-linux-14.txt index fcc168b..71f2684 100644 --- a/github-actions-tests/sources/metrics-linux-14.txt +++ b/github-actions-tests/sources/metrics-linux-14.txt @@ -132,4 +132,4 @@ system.vfs.free[/] system.vfs.percent_free[/] system.vfs.percent_inode_free[/] system.vfs.used[/] -system.up_time[] \ No newline at end of file +system.uptime[] diff --git a/github-actions-tests/sources/metrics-linux-16.txt b/github-actions-tests/sources/metrics-linux-16.txt new file mode 100644 index 0000000..cfe646d --- /dev/null +++ b/github-actions-tests/sources/metrics-linux-16.txt @@ -0,0 +1,130 @@ +mamonsu.memory.rss[max] +mamonsu.plugin.errors[] +mamonsu.plugin.keepalive[] +pgsql.archive_command[archived_files] +pgsql.archive_command[count_files_to_archive] +pgsql.archive_command[failed_trying_to_archive] +pgsql.archive_command[size_files_to_archive] +pgsql.autovacuum.count[] +pgsql.autovacuum.utilization[] +pgsql.bgwriter[buffers_alloc] +pgsql.bgwriter[buffers_backend] +pgsql.bgwriter[buffers_backend_fsync] +pgsql.bgwriter[buffers_checkpoint] +pgsql.bgwriter[buffers_clean] +pgsql.bgwriter[maxwritten_clean] +pgsql.blocks[hit] +pgsql.blocks[read] +pgsql.checkpoint[checkpoint_sync_time] +pgsql.checkpoint[count_timed] +pgsql.checkpoint[count_wal] +pgsql.checkpoint[write_time] +pgsql.connections[active] +pgsql.connections[disabled] +pgsql.connections[fastpath_function_call] +pgsql.connections[idle] +pgsql.connections[idle_in_transaction] +pgsql.connections[idle_in_transaction_aborted] +pgsql.connections[max_connections] +pgsql.connections[other] +pgsql.connections[total] +pgsql.connections[waiting] +pgsql.database.discovery[] +pgsql.database.bloating_tables[mamonsu_test_db] +pgsql.database.bloating_tables[postgres] +pgsql.database.invalid_indexes[mamonsu_test_db] +pgsql.database.invalid_indexes[postgres] +pgsql.database.max_age[mamonsu_test_db] +pgsql.database.max_age[postgres] +pgsql.database.size[mamonsu_test_db] +pgsql.database.size[postgres] +pgsql.events[checksum_failures] +pgsql.events[conflicts] +pgsql.events[deadlocks] +pgsql.events[xact_rollback] +pgsql.oldest[transaction_time] +pgsql.oldest[xid_age] +pgsql.ping[] +pgsql.pg_locks[accessexclusive] +pgsql.pg_locks[accessshare] +pgsql.pg_locks[exclusive] +pgsql.pg_locks[rowexclusive] +pgsql.pg_locks[rowshare] +pgsql.pg_locks[share] +pgsql.pg_locks[sharerowexclusive] +pgsql.pg_locks[shareupdateexclusive] +pgsql.parallel[queries] +pgsql.prepared.count +pgsql.prepared.oldest +pgsql.relation.size[] +pgsql.relation.size[mamonsu_test_db.mamonsu.config] +pgsql.relation.size[postgres.pg_catalog.pg_class] +pgsql.replication.non_active_slots[] +pgsql.replication_lag[sec] +pgsql.replication_lag[sec] +pgsql.stat[dirty_bytes] +pgsql.stat[other_time] +pgsql.stat[read_bytes] +pgsql.stat[read_time] +pgsql.stat[wal_bytes] +pgsql.stat[wal_fpi] +pgsql.stat[wal_records] +pgsql.stat[write_bytes] +pgsql.stat[write_time] +pgsql.stat_info[dealloc] +pgsql.stat_info[stats_reset] +pgsql.temp[bytes] +pgsql.temp[files] +pgsql.transactions[committed] +pgsql.tuples[deleted] +pgsql.tuples[fetched] +pgsql.tuples[inserted] +pgsql.tuples[returned] +pgsql.tuples[updated] +pgsql.uptime[] +pgsql.wal.buffers_full[] +pgsql.wal.count[] +pgsql.wal.fpi.count[] +pgsql.wal.records.count[] +pgsql.wal.sync_time[] +pgsql.wal.write[] +pgsql.wal.write_time[] +system.cpu[idle] +system.cpu[iowait] +system.cpu[irq] +system.cpu[nice] +system.cpu[softirq] +system.cpu[system] +system.cpu[user] +system.disk.discovery[] +system.disk.all_read[] +system.disk.all_write[] +system.disk.all_read_b[] +system.disk.all_write_b[] +system.la[1] +system.memory[active] +system.memory[available] +system.memory[buffers] +system.memory[cached] +system.memory[committed] +system.memory[inactive] +system.memory[mapped] +system.memory[page_tables] +system.memory[slab] +system.memory[swap] +system.memory[swap_cache] +system.memory[total] +system.memory[vmalloc_used] +system.memory[unused] +system.memory[used] +system.net.discovery[] +system.open_files[] +system.processes[blocked] +system.processes[forkrate] +system.processes[running] +system.vfs.discovery[] +system.vfs.free[/] +system.vfs.percent_free[/] +system.vfs.percent_inode_free[/] +system.vfs.used[/] +system.uptime[] diff --git a/github-actions-tests/sources/metrics-linux-17.txt b/github-actions-tests/sources/metrics-linux-17.txt new file mode 100644 index 0000000..1959c69 --- /dev/null +++ b/github-actions-tests/sources/metrics-linux-17.txt @@ -0,0 +1,116 @@ +mamonsu.memory.rss[max] +mamonsu.plugin.errors[] +mamonsu.plugin.keepalive[] +pgsql.archive_command[archived_files] +pgsql.archive_command[count_files_to_archive] +pgsql.archive_command[failed_trying_to_archive] +pgsql.archive_command[size_files_to_archive] +pgsql.autovacuum.count[] +pgsql.autovacuum.utilization[] +pgsql.bgwriter[buffers_alloc] +pgsql.bgwriter[buffers_clean] +pgsql.bgwriter[maxwritten_clean] +pgsql.blocks[hit] +pgsql.blocks[read] +pgsql.checkpoint[checkpoint_sync_time] +pgsql.checkpoint[count_timed] +pgsql.checkpoint[count_wal] +pgsql.checkpoint[write_time] +pgsql.connections[active] +pgsql.connections[disabled] +pgsql.connections[fastpath_function_call] +pgsql.connections[idle] +pgsql.connections[idle_in_transaction] +pgsql.connections[idle_in_transaction_aborted] +pgsql.connections[max_connections] +pgsql.connections[other] +pgsql.connections[total] +pgsql.connections[waiting] +pgsql.database.discovery[] +pgsql.database.bloating_tables[mamonsu_test_db] +pgsql.database.bloating_tables[postgres] +pgsql.database.invalid_indexes[mamonsu_test_db] +pgsql.database.invalid_indexes[postgres] +pgsql.database.max_age[mamonsu_test_db] +pgsql.database.max_age[postgres] +pgsql.database.size[mamonsu_test_db] +pgsql.database.size[postgres] +pgsql.events[checksum_failures] +pgsql.events[conflicts] +pgsql.events[deadlocks] +pgsql.events[xact_rollback] +pgsql.oldest[transaction_time] +pgsql.oldest[xid_age] +pgsql.ping[] +pgsql.pg_locks[accessexclusive] +pgsql.pg_locks[accessshare] +pgsql.pg_locks[exclusive] +pgsql.pg_locks[rowexclusive] +pgsql.pg_locks[rowshare] +pgsql.pg_locks[share] +pgsql.pg_locks[sharerowexclusive] +pgsql.pg_locks[shareupdateexclusive] +pgsql.parallel[queries] +pgsql.prepared.count +pgsql.prepared.oldest +pgsql.relation.size[] +pgsql.relation.size[mamonsu_test_db.mamonsu.config] +pgsql.relation.size[postgres.pg_catalog.pg_class] +pgsql.replication.non_active_slots[] +pgsql.replication_lag[sec] +pgsql.replication_lag[sec] +pgsql.temp[bytes] +pgsql.temp[files] +pgsql.transactions[committed] +pgsql.tuples[deleted] +pgsql.tuples[fetched] +pgsql.tuples[inserted] +pgsql.tuples[returned] +pgsql.tuples[updated] +pgsql.uptime[] +pgsql.wal.buffers_full[] +pgsql.wal.count[] +pgsql.wal.fpi.count[] +pgsql.wal.records.count[] +pgsql.wal.sync_time[] +pgsql.wal.write[] +pgsql.wal.write_time[] +system.cpu[idle] +system.cpu[iowait] +system.cpu[irq] +system.cpu[nice] +system.cpu[softirq] +system.cpu[system] +system.cpu[user] +system.disk.discovery[] +system.disk.all_read[] +system.disk.all_write[] +system.disk.all_read_b[] +system.disk.all_write_b[] +system.la[1] +system.memory[active] +system.memory[available] +system.memory[buffers] +system.memory[cached] +system.memory[committed] +system.memory[inactive] +system.memory[mapped] +system.memory[page_tables] +system.memory[slab] +system.memory[swap] +system.memory[swap_cache] +system.memory[total] +system.memory[vmalloc_used] +system.memory[unused] +system.memory[used] +system.net.discovery[] +system.open_files[] +system.processes[blocked] +system.processes[forkrate] +system.processes[running] +system.vfs.discovery[] +system.vfs.free[/] +system.vfs.percent_free[/] +system.vfs.percent_inode_free[/] +system.vfs.used[/] +system.uptime[] diff --git a/github-actions-tests/sources/metrics-linux-9.6.txt b/github-actions-tests/sources/metrics-linux-9.6.txt index 3e3b990..1623ddc 100644 --- a/github-actions-tests/sources/metrics-linux-9.6.txt +++ b/github-actions-tests/sources/metrics-linux-9.6.txt @@ -119,4 +119,4 @@ system.vfs.free[/] system.vfs.percent_free[/] system.vfs.percent_inode_free[/] system.vfs.used[/] -system.up_time[] \ No newline at end of file +system.uptime[] diff --git a/github-actions-tests/sources/metrics-linux-full-list.txt b/github-actions-tests/sources/metrics-linux-full-list.txt index a658c9a..798ad2f 100644 --- a/github-actions-tests/sources/metrics-linux-full-list.txt +++ b/github-actions-tests/sources/metrics-linux-full-list.txt @@ -133,4 +133,4 @@ system.vfs.free[/] system.vfs.percent_free[/] system.vfs.percent_inode_free[/] system.vfs.used[/] -system.up_time[] \ No newline at end of file +system.uptime[] From 55bff231983bddfba0109cbd399070a78b9123f3 Mon Sep 17 00:00:00 2001 From: Maxim Styushin Date: Sat, 14 Dec 2024 01:30:54 +0400 Subject: [PATCH 089/106] build: upgrade to 3.5.10 --- .github/workflows/mamonsu-tests-dev.yml | 2 +- .github/workflows/mamonsu-tests-master.yml | 2 +- github-actions-tests/mamonsu_build.sh | 4 ++-- .../sources/{agent_3.5.9.conf => agent_3.5.10.conf} | 0 mamonsu/__init__.py | 2 +- packaging/debian/changelog | 5 +++++ packaging/rpm/SPECS/mamonsu.spec | 7 ++++++- packaging/win/mamonsu.def.nsh | 2 +- 8 files changed, 17 insertions(+), 7 deletions(-) rename github-actions-tests/sources/{agent_3.5.9.conf => agent_3.5.10.conf} (100%) diff --git a/.github/workflows/mamonsu-tests-dev.yml b/.github/workflows/mamonsu-tests-dev.yml index a7a3885..f32e2ea 100644 --- a/.github/workflows/mamonsu-tests-dev.yml +++ b/.github/workflows/mamonsu-tests-dev.yml @@ -86,7 +86,7 @@ jobs: echo "zabbix_address=$(hostname -I | awk '{print $1}')" >> $GITHUB_OUTPUT id: zabbix_address - name: Edit Zabbix address in agent.conf - run: sed -i "s/\(address *= *\).*/\1 ${{ steps.zabbix_address.outputs.zabbix_address }}/" ${{ env.MAMONSU_PATH }}/github-actions-tests/sources/agent_3.5.9.conf + run: sed -i "s/\(address *= *\).*/\1 ${{ steps.zabbix_address.outputs.zabbix_address }}/" ${{ env.MAMONSU_PATH }}/github-actions-tests/sources/agent_3.5.10.conf - name: Copy test scripts to container run: docker exec $( echo "${{ matrix.docker_os }}" | sed 's/://' | sed 's/\.//' ) mkdir -p -m 755 /mamonsu/ diff --git a/.github/workflows/mamonsu-tests-master.yml b/.github/workflows/mamonsu-tests-master.yml index 0d895af..6c07531 100644 --- a/.github/workflows/mamonsu-tests-master.yml +++ b/.github/workflows/mamonsu-tests-master.yml @@ -91,7 +91,7 @@ jobs: echo "zabbix_address=$(hostname -I | awk '{print $1}')" >> $GITHUB_OUTPUT id: zabbix_address - name: Edit Zabbix address in agent.conf - run: sed -i "s/\(address *= *\).*/\1 ${{ steps.zabbix_address.outputs.zabbix_address }}/" ${{ env.MAMONSU_PATH }}/github-actions-tests/sources/agent_3.5.9.conf + run: sed -i "s/\(address *= *\).*/\1 ${{ steps.zabbix_address.outputs.zabbix_address }}/" ${{ env.MAMONSU_PATH }}/github-actions-tests/sources/agent_3.5.10.conf - name: Copy test scripts to container run: docker exec $( echo "${{ matrix.docker_os }}" | sed 's/://' | sed 's/\.//' ) mkdir -p -m 755 /mamonsu/ diff --git a/github-actions-tests/mamonsu_build.sh b/github-actions-tests/mamonsu_build.sh index 6fbb92d..ac9dfca 100644 --- a/github-actions-tests/mamonsu_build.sh +++ b/github-actions-tests/mamonsu_build.sh @@ -41,7 +41,7 @@ if [ "${OS%:*}" = "centos" ]; then python3 setup.py build && python3 setup.py install make rpm sudo rpm -i ./mamonsu*.rpm - cat /mamonsu/github-actions-tests/sources/agent_3.5.9.conf > /etc/mamonsu/agent.conf + cat /mamonsu/github-actions-tests/sources/agent_3.5.10.conf > /etc/mamonsu/agent.conf # ensuring mamonsu can actually start sudo su -s /bin/bash -c "mamonsu bootstrap -x --user postgres -d mamonsu_test_db" mamonsu /etc/init.d/mamonsu restart @@ -65,7 +65,7 @@ elif [ "${OS%:*}" = "ubuntu" ]; then python3 setup.py build && python3 setup.py install make deb sudo dpkg -i ./mamonsu*.deb - cat /mamonsu/github-actions-tests/sources/agent_3.5.9.conf > /etc/mamonsu/agent.conf + cat /mamonsu/github-actions-tests/sources/agent_3.5.10.conf > /etc/mamonsu/agent.conf # ensuring mamonsu can actually start sudo su -s /bin/bash -c "mamonsu bootstrap -x --user postgres -d mamonsu_test_db" mamonsu service mamonsu restart diff --git a/github-actions-tests/sources/agent_3.5.9.conf b/github-actions-tests/sources/agent_3.5.10.conf similarity index 100% rename from github-actions-tests/sources/agent_3.5.9.conf rename to github-actions-tests/sources/agent_3.5.10.conf diff --git a/mamonsu/__init__.py b/mamonsu/__init__.py index 634d8d3..6ccb3bc 100644 --- a/mamonsu/__init__.py +++ b/mamonsu/__init__.py @@ -1,7 +1,7 @@ __author__ = 'Dmitry Vasilyev' __author_email__ = 'info@postgrespro.ru' __description__ = 'Monitoring agent for PostgreSQL' -__version__ = '3.5.9' +__version__ = '3.5.10' __licence__ = 'BSD' __url__ = 'https://github.com/postgrespro/mamonsu' diff --git a/packaging/debian/changelog b/packaging/debian/changelog index dd77d37..17eb03b 100644 --- a/packaging/debian/changelog +++ b/packaging/debian/changelog @@ -1,3 +1,8 @@ +mamonsu (3.5.10-1) stable; urgency=low + * Updated checkpoint plugin: added support for new view pg_stat_checkpointer; + * Updated bgwriter plugin: consider updated view pg_stat_bgwriter in postgres 17; + * Run zabbix cli tools with latest setuptools installed (>67.7.2); + mamonsu (3.5.9-1) stable; urgency=low * Run on systems with latest setuptools installed (>67.7.2); * Drop using dotted user:group specification in RPM pre-install stage; diff --git a/packaging/rpm/SPECS/mamonsu.spec b/packaging/rpm/SPECS/mamonsu.spec index f9e19b1..7aab82d 100644 --- a/packaging/rpm/SPECS/mamonsu.spec +++ b/packaging/rpm/SPECS/mamonsu.spec @@ -1,5 +1,5 @@ Name: mamonsu -Version: 3.5.9 +Version: 3.5.10 Release: 1%{?dist} Summary: Monitoring agent for PostgreSQL Group: Applications/Internet @@ -73,6 +73,11 @@ chown -R mamonsu:mamonsu /var/log/mamonsu chown -R mamonsu:mamonsu /etc/mamonsu %changelog +* Sat Dec 14 2024 Maxim Styushin - 3.5.10-1 + - Updated checkpoint plugin: added support for new view pg_stat_checkpointer; + - Updated bgwriter plugin: consider updated view pg_stat_bgwriter in postgres 17; + - Run zabbix cli tools with latest setuptools installed (>67.7.2); + * Mon Aug 19 2024 Maxim Styushin - 3.5.9-1 - Run on systems with latest setuptools installed (>67.7.2); - Drop using dotted user:group specification in RPM pre-install stage; diff --git a/packaging/win/mamonsu.def.nsh b/packaging/win/mamonsu.def.nsh index 5ca5afc..3ebffda 100644 --- a/packaging/win/mamonsu.def.nsh +++ b/packaging/win/mamonsu.def.nsh @@ -1,5 +1,5 @@ !define NAME Mamonsu -!define VERSION 3.5.9 +!define VERSION 3.5.10 !define MAMONSU_REG_PATH "Software\PostgresPro\Mamonsu" !define MAMONSU_REG_UNINSTALLER_PATH "Software\Microsoft\Windows\CurrentVersion\Uninstall" !define EDB_REG "SOFTWARE\Postgresql" From 3465255b2978d8adbbcf06dcb5fce3195b3abc55 Mon Sep 17 00:00:00 2001 From: Maxim Styushin Date: Tue, 14 Jan 2025 18:22:18 +0400 Subject: [PATCH 090/106] fix: count_wal_lag_lsn return type to bigint --- mamonsu/tools/bootstrap/sql.py | 38 +++++++++++++++++----------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/mamonsu/tools/bootstrap/sql.py b/mamonsu/tools/bootstrap/sql.py index fb56a9d..f37be0f 100644 --- a/mamonsu/tools/bootstrap/sql.py +++ b/mamonsu/tools/bootstrap/sql.py @@ -7,7 +7,7 @@ $do$ BEGIN IF NOT EXISTS ( - SELECT FROM pg_catalog.pg_roles + SELECT FROM pg_catalog.pg_roles WHERE rolname = '{0}') THEN CREATE ROLE {0} LOGIN PASSWORD '{0}'; IF EXISTS ( @@ -166,15 +166,15 @@ DROP FUNCTION IF EXISTS mamonsu.get_oldest_transaction(); CREATE or REPLACE FUNCTION mamonsu.get_oldest_transaction() RETURNS DOUBLE PRECISION AS $$ - SELECT - CASE WHEN extract(epoch from max(now() - xact_start)) IS NOT null + SELECT + CASE WHEN extract(epoch from max(now() - xact_start)) IS NOT null AND extract(epoch from max(now() - xact_start))>0 - THEN extract(epoch from max(now() - xact_start)) - ELSE 0 - END - FROM pg_catalog.pg_stat_activity - WHERE - pid NOT IN(select pid from pg_stat_replication) AND + THEN extract(epoch from max(now() - xact_start)) + ELSE 0 + END + FROM pg_catalog.pg_stat_activity + WHERE + pid NOT IN(select pid from pg_stat_replication) AND pid <> pg_backend_pid() $$ LANGUAGE SQL SECURITY DEFINER; @@ -225,15 +225,15 @@ CREATE OR REPLACE FUNCTION mamonsu.prepared_transaction() RETURNS TABLE(count_prepared BIGINT, oldest_prepared BIGINT) AS $$ SELECT COUNT(*) AS count_prepared, -coalesce (ROUND(MAX(EXTRACT (EPOCH FROM (now() - prepared)))),0)::bigint AS oldest_prepared +coalesce (ROUND(MAX(EXTRACT (EPOCH FROM (now() - prepared)))),0)::bigint AS oldest_prepared FROM pg_catalog.pg_prepared_xacts$$ LANGUAGE SQL SECURITY DEFINER; DROP FUNCTION IF EXISTS mamonsu.count_{3}_lag_lsn(); CREATE OR REPLACE FUNCTION mamonsu.count_{3}_lag_lsn() -RETURNS TABLE(application_name TEXT, {8} total_lag INTEGER) AS $$ +RETURNS TABLE(application_name TEXT, {8} total_lag BIGINT) AS $$ SELECT application_name, - {6} - coalesce((pg_{7}_diff(pg_current_{7}(), replay_{9}))::int, 0) AS total_lag + {6} + coalesce((pg_{7}_diff(pg_current_{7}(), replay_{9}))::bigint, 0) AS total_lag FROM pg_stat_replication $$ LANGUAGE SQL SECURITY DEFINER; """ @@ -287,7 +287,7 @@ FROM pg_extension e JOIN pg_namespace n ON e.extnamespace = n.oid - WHERE e.extname = 'pgpro_stats'; + WHERE e.extname = 'pgpro_stats'; EXECUTE 'DROP FUNCTION IF EXISTS mamonsu.wait_sampling_all_locks(); CREATE OR REPLACE FUNCTION mamonsu.wait_sampling_all_locks() RETURNS TABLE(lock_type text, count bigint) AS $$ @@ -298,7 +298,7 @@ FROM (SELECT key, value AS locktuple FROM jsonb_each((SELECT wait_stats FROM ' || extension_schema || '.pgpro_stats_totals() - WHERE object_type = ''cluster''))) setoflocks, + WHERE object_type = ''cluster''))) setoflocks, jsonb_each(setoflocks.locktuple) AS json_data) SELECT CASE @@ -327,7 +327,7 @@ FROM (SELECT key, value AS locktuple FROM jsonb_each((SELECT wait_stats FROM ' || extension_schema || '.pgpro_stats_totals() - WHERE object_type = ''cluster''))) setoflocks, + WHERE object_type = ''cluster''))) setoflocks, jsonb_each(setoflocks.locktuple) AS json_data) SELECT lock_type, @@ -347,7 +347,7 @@ FROM (SELECT key, value AS locktuple FROM jsonb_each((SELECT wait_stats FROM ' || extension_schema || '.pgpro_stats_totals() - WHERE object_type = ''cluster''))) setoflocks, + WHERE object_type = ''cluster''))) setoflocks, jsonb_each(setoflocks.locktuple) AS json_data WHERE setoflocks.key IN (''Lock'', ''LWLock'', ''LWLockTranche'', ''LWLockNamed'')) SELECT @@ -415,13 +415,13 @@ FROM pg_extension e JOIN pg_namespace n ON e.extnamespace = n.oid - WHERE e.extname = 'pgpro_stats'; + WHERE e.extname = 'pgpro_stats'; EXECUTE 'DROP FUNCTION IF EXISTS mamonsu.statements_pro(); CREATE OR REPLACE FUNCTION mamonsu.statements_pro() RETURNS TABLE({columns}) AS $$ SELECT {metrics} FROM ' || extension_schema || '.pgpro_stats_totals() - WHERE object_type = ''cluster''; + WHERE object_type = ''cluster''; $$ LANGUAGE SQL SECURITY DEFINER;'; ELSE EXIT functions_creation; From f9e862382896911a1771de614ec02abda516f7f8 Mon Sep 17 00:00:00 2001 From: Maxim Styushin Date: Tue, 14 Jan 2025 18:24:12 +0400 Subject: [PATCH 091/106] feat: add support for pgpro_stats 1.8 --- mamonsu/plugins/pgsql/driver/pool.py | 22 +++++++++ mamonsu/plugins/pgsql/statements.py | 70 ++++++++++++++++++++++++---- mamonsu/tools/bootstrap/start.py | 8 +++- 3 files changed, 89 insertions(+), 11 deletions(-) diff --git a/mamonsu/plugins/pgsql/driver/pool.py b/mamonsu/plugins/pgsql/driver/pool.py index bfd4749..dae2a59 100644 --- a/mamonsu/plugins/pgsql/driver/pool.py +++ b/mamonsu/plugins/pgsql/driver/pool.py @@ -110,6 +110,7 @@ def __init__(self, params=None): "bootstrap": {"storage": {}, "counter": 0, "cache": 10, "version": False}, "recovery": {"storage": {}, "counter": 0, "cache": 10}, "extension_schema": {"pg_buffercache": {}, "pg_stat_statements": {}, "pg_wait_sampling": {}, "pgpro_stats": {}}, + "extension_versions" : {}, "pgpro": {"storage": {}}, "pgproee": {"storage": {}} } @@ -135,6 +136,19 @@ def server_version(self, db=None): result.decode("ascii")) return self._cache["server_version"]["storage"][db] + def extension_version(self, extension, db=None): + db = self._normalize_db(db) + if extension in self._cache["extension_versions"] and db in self._cache["extension_versions"][extension][db]: + return self._cache["extension_versions"][extension][db] + + version_string = self.query("select extversion from pg_catalog.pg_extension where lower(extname) = lower('{0}');".format(extension), db)[0][0] + result = bytes( + version_string.split(" ")[0], "utf-8") + self._cache["extension_versions"][extension] = {} + self._cache["extension_versions"][extension][db] = "{0}".format( + result.decode("ascii")) + return self._cache["extension_versions"][extension][db] + def server_version_greater(self, version, db=None): db = self._normalize_db(db) return packaging.version.parse(self.server_version(db)) >= packaging.version.parse(version) @@ -229,6 +243,14 @@ def is_pgpro_ee(self, db=None): self._cache["pgproee"][db] = False return self._cache["pgproee"][db] + def extension_version_greater(self, extension, version, db=None): + db = self._normalize_db(db) + return packaging.version.parse(self.extension_version(extension, db)) >= packaging.version.parse(version) + + def extension_version_less(self, extension, version, db=None): + db = self._normalize_db(db) + return packaging.version.parse(self.extension_version(extension, db)) <= packaging.version.parse(version) + def extension_installed(self, ext, db=None): db = self._normalize_db(db) result = self.query(""" diff --git a/mamonsu/plugins/pgsql/statements.py b/mamonsu/plugins/pgsql/statements.py index 4cebcd6..e294f03 100644 --- a/mamonsu/plugins/pgsql/statements.py +++ b/mamonsu/plugins/pgsql/statements.py @@ -27,7 +27,7 @@ class Statements(Plugin): query_info = """ SELECT {metrics} - FROM {extension_schema}.pg_stat_statements_info; + FROM {extension_schema}.{info_view_name}; """ key = "pgsql." # zbx_key, sql, desc, unit, delta, (Graph, color, side) @@ -88,6 +88,32 @@ class Statements(Plugin): ("PostgreSQL Statements Info: Last Statistics Reset Time", "9C8A4E", 0)) ] + Items_pgpro_stats_1_8 = [ + ("stat[read_bytes]", + "(sum(shared_blks_read+local_blks_read+temp_blks_read)*8*1024)::bigint", + "Read bytes/s", Plugin.UNITS.bytes_per_second, Plugin.DELTA.speed_per_second, + ("PostgreSQL Statements: Bytes", "87C2B9", 0)), + ("stat[write_bytes]", + "(sum(shared_blks_written+local_blks_written+temp_blks_written)*8*1024)::bigint", + "Write bytes/s", Plugin.UNITS.bytes_per_second, Plugin.DELTA.speed_per_second, + ("PostgreSQL Statements: Bytes", "793F5D", 0)), + ("stat[dirty_bytes]", + "(sum(shared_blks_dirtied+local_blks_dirtied)*8*1024)::bigint", + "Dirty bytes/s", Plugin.UNITS.bytes_per_second, Plugin.DELTA.speed_per_second, + ("PostgreSQL Statements: Bytes", "9C8A4E", 0)), + ("stat[read_time]", + "(sum(shared_blk_read_time+local_blk_read_time+temp_blk_read_time)/float4(100))::bigint", + "Read IO Time", Plugin.UNITS.s, Plugin.DELTA.speed_per_second, + ("PostgreSQL Statements: Spent Time", "87C2B9", 0)), + ("stat[write_time]", + "(sum(shared_blk_write_time+local_blk_write_time+temp_blk_write_time)/float4(100))::bigint", + "Write IO Time", Plugin.UNITS.s, Plugin.DELTA.speed_per_second, + ("PostgreSQL Statements: Spent Time", "793F5D", 0)), + ["stat[other_time]", + "(sum(total_exec_time+total_plan_time-shared_blk_read_time-local_blk_read_time-temp_blk_read_time-shared_blk_write_time-local_blk_write_time-temp_blk_write_time)/float4(100))::bigint", + "Other (mostly CPU) Time", Plugin.UNITS.s, Plugin.DELTA.speed_per_second, + ("PostgreSQL Statements: Spent Time", "9C8A4E", 0)]] + all_graphs = [ ("PostgreSQL Statements: Bytes", None), ("PostgreSQL Statements: Spent Time", 1), @@ -115,21 +141,45 @@ def run(self, zbx): # TODO: add 13 and 14 items when pgpro_stats added new WAL metrics all_items = self.Items.copy() - if Pooler.server_version_greater("14"): + + if Pooler.extension_version_greater("pgpro_stats", "1.8"): + info_view = 'pg_stat_statements_info' + if self.extension == "pgpro_stats": + info_view = 'pgpro_stats_info' + + info_items = self.Items_pg_14 + info_params = [x[1] for x in info_items] + info_result = Pooler.query( + self.query_info.format(metrics=(", ".join(info_params)), extension_schema=extension_schema, info_view_name=info_view)) + for key, value in enumerate(info_result[0]): + zbx_key, value = "pgsql.{0}".format( + info_items[key][0]), int(value) + zbx.send(zbx_key, value, info_items[key][4]) + + all_items = self.Items_pgpro_stats_1_8.copy() + all_items += self.Items_pg_13 + + elif Pooler.server_version_greater("14"): self.Items[5][1] = self.Items[5][1].format("total_exec_time+total_plan_time") all_items += self.Items_pg_13 + info_view = 'pgpro_stats_info' if self.extension == "pg_stat_statements": - info_items = self.Items_pg_14 - info_params = [x[1] for x in info_items] - info_result = Pooler.query( - self.query_info.format(metrics=(", ".join(info_params)), extension_schema=extension_schema)) - for key, value in enumerate(info_result[0]): - zbx_key, value = "pgsql.{0}".format( - info_items[key][0]), int(value) - zbx.send(zbx_key, value, info_items[key][4]) + info_view = 'pg_stat_statements_info' + info_items = self.Items_pg_14 + info_params = [x[1] for x in info_items] + info_result = Pooler.query( + self.query_info.format(metrics=(", ".join(info_params)), + extension_schema=extension_schema, + info_view_name=info_view)) + for key, value in enumerate(info_result[0]): + zbx_key, value = "pgsql.{0}".format( + info_items[key][0]), int(value) + zbx.send(zbx_key, value, info_items[key][4]) + elif Pooler.server_version_greater("13"): self.Items[5][1] = self.Items[5][1].format("total_exec_time+total_plan_time") all_items += self.Items_pg_13 + else: self.Items[5][1] = self.Items[5][1].format("total_time") columns = [x[1] for x in all_items] diff --git a/mamonsu/tools/bootstrap/start.py b/mamonsu/tools/bootstrap/start.py index 3976de1..c35e63a 100644 --- a/mamonsu/tools/bootstrap/start.py +++ b/mamonsu/tools/bootstrap/start.py @@ -237,7 +237,13 @@ def run_deploy(): if Pooler.is_pgpro() or Pooler.is_pgpro_ee(): bootstrap_extension_queries = fill_query_params(CreateWaitSamplingFunctionsSQL) Pooler.query(bootstrap_extension_queries) - if Pooler.server_version_greater("12"): + if Pooler.extension_version_greater("pgpro_stats", "1.8"): + statements_items = [x[1] for x in Statements.Items_pgpro_stats_1_8] + [x[1] for x in Statements.Items_pg_13] + statements_columns = [x[0][x[0].find("[")+1:x[0].find("]")] for x in Statements.Items_pgpro_stats_1_8] + [x[0][x[0].find("[")+1:x[0].find("]")] for x in Statements.Items_pg_13] + bootstrap_extension_queries = CreateStatementsFunctionsSQL.format( + columns=" bigint, ".join(statements_columns) + " bigint", metrics=(", ".join(statements_items))) + Pooler.query(bootstrap_extension_queries) + elif Pooler.server_version_greater("12"): statements_items = [x[1] for x in Statements.Items] + ([x[1] for x in Statements.Items_pg_13] if Pooler.server_version_greater("13") else []) statements_items[5] = statements_items[5].format("total_exec_time+total_plan_time") statements_columns = [x[0][x[0].find("[")+1:x[0].find("]")] for x in Statements.Items] + ([x[0][x[0].find("[")+1:x[0].find("]")] for x in Statements.Items_pg_13] if Pooler.server_version_greater("13") else []) From 63d7e4a3a15789cf0cd58b544f006bb20efed6ea Mon Sep 17 00:00:00 2001 From: Maxim Styushin Date: Wed, 15 Jan 2025 00:50:38 +0400 Subject: [PATCH 092/106] fix: check if pgpro_stats was installed --- mamonsu/plugins/pgsql/statements.py | 2 +- mamonsu/tools/bootstrap/start.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/mamonsu/plugins/pgsql/statements.py b/mamonsu/plugins/pgsql/statements.py index e294f03..784f226 100644 --- a/mamonsu/plugins/pgsql/statements.py +++ b/mamonsu/plugins/pgsql/statements.py @@ -142,7 +142,7 @@ def run(self, zbx): # TODO: add 13 and 14 items when pgpro_stats added new WAL metrics all_items = self.Items.copy() - if Pooler.extension_version_greater("pgpro_stats", "1.8"): + if Pooler.extension_installed("pgpro_stats") and Pooler.extension_version_greater("pgpro_stats", "1.8"): info_view = 'pg_stat_statements_info' if self.extension == "pgpro_stats": info_view = 'pgpro_stats_info' diff --git a/mamonsu/tools/bootstrap/start.py b/mamonsu/tools/bootstrap/start.py index c35e63a..6fbc582 100644 --- a/mamonsu/tools/bootstrap/start.py +++ b/mamonsu/tools/bootstrap/start.py @@ -237,7 +237,7 @@ def run_deploy(): if Pooler.is_pgpro() or Pooler.is_pgpro_ee(): bootstrap_extension_queries = fill_query_params(CreateWaitSamplingFunctionsSQL) Pooler.query(bootstrap_extension_queries) - if Pooler.extension_version_greater("pgpro_stats", "1.8"): + if Pooler.extension_installed("pgpro_stats") and Pooler.extension_version_greater("pgpro_stats", "1.8"): statements_items = [x[1] for x in Statements.Items_pgpro_stats_1_8] + [x[1] for x in Statements.Items_pg_13] statements_columns = [x[0][x[0].find("[")+1:x[0].find("]")] for x in Statements.Items_pgpro_stats_1_8] + [x[0][x[0].find("[")+1:x[0].find("]")] for x in Statements.Items_pg_13] bootstrap_extension_queries = CreateStatementsFunctionsSQL.format( From 1319701dc02ea37050b11dab95a0f332b68fa5e0 Mon Sep 17 00:00:00 2001 From: Maxim Styushin Date: Wed, 15 Jan 2025 01:14:05 +0400 Subject: [PATCH 093/106] build: upgrade to 3.5.11 --- .github/workflows/mamonsu-tests-dev.yml | 2 +- .github/workflows/mamonsu-tests-master.yml | 2 +- github-actions-tests/mamonsu_build.sh | 4 ++-- .../sources/{agent_3.5.10.conf => agent_3.5.11.conf} | 0 mamonsu/__init__.py | 2 +- packaging/debian/changelog | 4 ++++ packaging/rpm/SPECS/mamonsu.spec | 6 +++++- packaging/win/mamonsu.def.nsh | 2 +- 8 files changed, 15 insertions(+), 7 deletions(-) rename github-actions-tests/sources/{agent_3.5.10.conf => agent_3.5.11.conf} (100%) diff --git a/.github/workflows/mamonsu-tests-dev.yml b/.github/workflows/mamonsu-tests-dev.yml index f32e2ea..6e3bf27 100644 --- a/.github/workflows/mamonsu-tests-dev.yml +++ b/.github/workflows/mamonsu-tests-dev.yml @@ -86,7 +86,7 @@ jobs: echo "zabbix_address=$(hostname -I | awk '{print $1}')" >> $GITHUB_OUTPUT id: zabbix_address - name: Edit Zabbix address in agent.conf - run: sed -i "s/\(address *= *\).*/\1 ${{ steps.zabbix_address.outputs.zabbix_address }}/" ${{ env.MAMONSU_PATH }}/github-actions-tests/sources/agent_3.5.10.conf + run: sed -i "s/\(address *= *\).*/\1 ${{ steps.zabbix_address.outputs.zabbix_address }}/" ${{ env.MAMONSU_PATH }}/github-actions-tests/sources/agent_3.5.11.conf - name: Copy test scripts to container run: docker exec $( echo "${{ matrix.docker_os }}" | sed 's/://' | sed 's/\.//' ) mkdir -p -m 755 /mamonsu/ diff --git a/.github/workflows/mamonsu-tests-master.yml b/.github/workflows/mamonsu-tests-master.yml index 6c07531..312134a 100644 --- a/.github/workflows/mamonsu-tests-master.yml +++ b/.github/workflows/mamonsu-tests-master.yml @@ -91,7 +91,7 @@ jobs: echo "zabbix_address=$(hostname -I | awk '{print $1}')" >> $GITHUB_OUTPUT id: zabbix_address - name: Edit Zabbix address in agent.conf - run: sed -i "s/\(address *= *\).*/\1 ${{ steps.zabbix_address.outputs.zabbix_address }}/" ${{ env.MAMONSU_PATH }}/github-actions-tests/sources/agent_3.5.10.conf + run: sed -i "s/\(address *= *\).*/\1 ${{ steps.zabbix_address.outputs.zabbix_address }}/" ${{ env.MAMONSU_PATH }}/github-actions-tests/sources/agent_3.5.11.conf - name: Copy test scripts to container run: docker exec $( echo "${{ matrix.docker_os }}" | sed 's/://' | sed 's/\.//' ) mkdir -p -m 755 /mamonsu/ diff --git a/github-actions-tests/mamonsu_build.sh b/github-actions-tests/mamonsu_build.sh index ac9dfca..def1505 100644 --- a/github-actions-tests/mamonsu_build.sh +++ b/github-actions-tests/mamonsu_build.sh @@ -41,7 +41,7 @@ if [ "${OS%:*}" = "centos" ]; then python3 setup.py build && python3 setup.py install make rpm sudo rpm -i ./mamonsu*.rpm - cat /mamonsu/github-actions-tests/sources/agent_3.5.10.conf > /etc/mamonsu/agent.conf + cat /mamonsu/github-actions-tests/sources/agent_3.5.11.conf > /etc/mamonsu/agent.conf # ensuring mamonsu can actually start sudo su -s /bin/bash -c "mamonsu bootstrap -x --user postgres -d mamonsu_test_db" mamonsu /etc/init.d/mamonsu restart @@ -65,7 +65,7 @@ elif [ "${OS%:*}" = "ubuntu" ]; then python3 setup.py build && python3 setup.py install make deb sudo dpkg -i ./mamonsu*.deb - cat /mamonsu/github-actions-tests/sources/agent_3.5.10.conf > /etc/mamonsu/agent.conf + cat /mamonsu/github-actions-tests/sources/agent_3.5.11.conf > /etc/mamonsu/agent.conf # ensuring mamonsu can actually start sudo su -s /bin/bash -c "mamonsu bootstrap -x --user postgres -d mamonsu_test_db" mamonsu service mamonsu restart diff --git a/github-actions-tests/sources/agent_3.5.10.conf b/github-actions-tests/sources/agent_3.5.11.conf similarity index 100% rename from github-actions-tests/sources/agent_3.5.10.conf rename to github-actions-tests/sources/agent_3.5.11.conf diff --git a/mamonsu/__init__.py b/mamonsu/__init__.py index 6ccb3bc..0265a12 100644 --- a/mamonsu/__init__.py +++ b/mamonsu/__init__.py @@ -1,7 +1,7 @@ __author__ = 'Dmitry Vasilyev' __author_email__ = 'info@postgrespro.ru' __description__ = 'Monitoring agent for PostgreSQL' -__version__ = '3.5.10' +__version__ = '3.5.11' __licence__ = 'BSD' __url__ = 'https://github.com/postgrespro/mamonsu' diff --git a/packaging/debian/changelog b/packaging/debian/changelog index 17eb03b..ab3c0ff 100644 --- a/packaging/debian/changelog +++ b/packaging/debian/changelog @@ -1,3 +1,7 @@ +mamonsu (3.5.11-1) stable; urgency=low + * Updated statements plugin: added support for pgpro_stats 1.8; + * Fixed types for count_wal_lag_lsn() function (int to bigint); + mamonsu (3.5.10-1) stable; urgency=low * Updated checkpoint plugin: added support for new view pg_stat_checkpointer; * Updated bgwriter plugin: consider updated view pg_stat_bgwriter in postgres 17; diff --git a/packaging/rpm/SPECS/mamonsu.spec b/packaging/rpm/SPECS/mamonsu.spec index 7aab82d..7c44f1d 100644 --- a/packaging/rpm/SPECS/mamonsu.spec +++ b/packaging/rpm/SPECS/mamonsu.spec @@ -1,5 +1,5 @@ Name: mamonsu -Version: 3.5.10 +Version: 3.5.11 Release: 1%{?dist} Summary: Monitoring agent for PostgreSQL Group: Applications/Internet @@ -73,6 +73,10 @@ chown -R mamonsu:mamonsu /var/log/mamonsu chown -R mamonsu:mamonsu /etc/mamonsu %changelog +* Wed Jan 15 2025 Maxim Styushin - 3.5.11-1 + - Updated statements plugin: added support for pgpro_stats 1.8; + - Fixed types for count_wal_lag_lsn() function (int to bigint); + * Sat Dec 14 2024 Maxim Styushin - 3.5.10-1 - Updated checkpoint plugin: added support for new view pg_stat_checkpointer; - Updated bgwriter plugin: consider updated view pg_stat_bgwriter in postgres 17; diff --git a/packaging/win/mamonsu.def.nsh b/packaging/win/mamonsu.def.nsh index 3ebffda..8138fe3 100644 --- a/packaging/win/mamonsu.def.nsh +++ b/packaging/win/mamonsu.def.nsh @@ -1,5 +1,5 @@ !define NAME Mamonsu -!define VERSION 3.5.10 +!define VERSION 3.5.11 !define MAMONSU_REG_PATH "Software\PostgresPro\Mamonsu" !define MAMONSU_REG_UNINSTALLER_PATH "Software\Microsoft\Windows\CurrentVersion\Uninstall" !define EDB_REG "SOFTWARE\Postgresql" From 3ab4aed65b4888798992644a58ec7a96fc1bc23b Mon Sep 17 00:00:00 2001 From: Maxim Styushin Date: Sat, 22 Feb 2025 23:20:19 +0400 Subject: [PATCH 094/106] feat: add version parser code - port version parser code from public archive of pypa/pkg_resources --- mamonsu/lib/version.py | 576 ++++++++++++++++++ mamonsu/plugins/pgsql/driver/pg8000/core.py | 12 +- mamonsu/plugins/pgsql/driver/pool.py | 19 +- .../plugins/pgsql/memory_leak_diagnostic.py | 8 +- mamonsu/plugins/pgsql/replication.py | 7 +- mamonsu/tools/zabbix_cli/operations.py | 12 +- mamonsu/tools/zabbix_cli/request.py | 7 +- 7 files changed, 598 insertions(+), 43 deletions(-) create mode 100644 mamonsu/lib/version.py diff --git a/mamonsu/lib/version.py b/mamonsu/lib/version.py new file mode 100644 index 0000000..711e933 --- /dev/null +++ b/mamonsu/lib/version.py @@ -0,0 +1,576 @@ +# Copyright (c) Jason R. Coombs +# +# Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation +# files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, +# modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software +# is furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +# OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +import collections +import itertools +import re +import warnings +from typing import Callable, Iterator, List, Optional, SupportsInt, Tuple, Union + + +class InfinityType: + def __repr__(self) -> str: + return "Infinity" + + def __hash__(self) -> int: + return hash(repr(self)) + + def __lt__(self, other: object) -> bool: + return False + + def __le__(self, other: object) -> bool: + return False + + def __eq__(self, other: object) -> bool: + return isinstance(other, self.__class__) + + def __ne__(self, other: object) -> bool: + return not isinstance(other, self.__class__) + + def __gt__(self, other: object) -> bool: + return True + + def __ge__(self, other: object) -> bool: + return True + + def __neg__(self: object) -> "NegativeInfinityType": + return NegativeInfinity + + +Infinity = InfinityType() + + +class NegativeInfinityType: + def __repr__(self) -> str: + return "-Infinity" + + def __hash__(self) -> int: + return hash(repr(self)) + + def __lt__(self, other: object) -> bool: + return True + + def __le__(self, other: object) -> bool: + return True + + def __eq__(self, other: object) -> bool: + return isinstance(other, self.__class__) + + def __ne__(self, other: object) -> bool: + return not isinstance(other, self.__class__) + + def __gt__(self, other: object) -> bool: + return False + + def __ge__(self, other: object) -> bool: + return False + + def __neg__(self: object) -> InfinityType: + return Infinity + + +NegativeInfinity = NegativeInfinityType() + +__all__ = ["parse", "Version", "LegacyVersion", "InvalidVersion", "VERSION_PATTERN"] + +InfiniteTypes = Union[InfinityType, NegativeInfinityType] +PrePostDevType = Union[InfiniteTypes, Tuple[str, int]] +SubLocalType = Union[InfiniteTypes, int, str] +LocalType = Union[ + NegativeInfinityType, + Tuple[ + Union[ + SubLocalType, + Tuple[SubLocalType, str], + Tuple[NegativeInfinityType, SubLocalType], + ], + ..., + ], +] +CmpKey = Tuple[ + int, Tuple[int, ...], PrePostDevType, PrePostDevType, PrePostDevType, LocalType +] +LegacyCmpKey = Tuple[int, Tuple[str, ...]] +VersionComparisonMethod = Callable[ + [Union[CmpKey, LegacyCmpKey], Union[CmpKey, LegacyCmpKey]], bool +] + +_Version = collections.namedtuple( + "_Version", ["epoch", "release", "dev", "pre", "post", "local"] +) + + +def parse(version: str) -> Union["LegacyVersion", "Version"]: + """ + Parse the given version string and return either a :class:`Version` object + or a :class:`LegacyVersion` object depending on if the given version is + a valid PEP 440 version or a legacy version. + """ + try: + return Version(version) + except InvalidVersion: + return LegacyVersion(version) + + +class InvalidVersion(ValueError): + """ + An invalid version was found, users should refer to PEP 440. + """ + + +class _BaseVersion: + _key: Union[CmpKey, LegacyCmpKey] + + def __hash__(self) -> int: + return hash(self._key) + + # Please keep the duplicated `isinstance` check + # in the six comparisons hereunder + # unless you find a way to avoid adding overhead function calls. + def __lt__(self, other: "_BaseVersion") -> bool: + if not isinstance(other, _BaseVersion): + return NotImplemented + + return self._key < other._key + + def __le__(self, other: "_BaseVersion") -> bool: + if not isinstance(other, _BaseVersion): + return NotImplemented + + return self._key <= other._key + + def __eq__(self, other: object) -> bool: + if not isinstance(other, _BaseVersion): + return NotImplemented + + return self._key == other._key + + def __ge__(self, other: "_BaseVersion") -> bool: + if not isinstance(other, _BaseVersion): + return NotImplemented + + return self._key >= other._key + + def __gt__(self, other: "_BaseVersion") -> bool: + if not isinstance(other, _BaseVersion): + return NotImplemented + + return self._key > other._key + + def __ne__(self, other: object) -> bool: + if not isinstance(other, _BaseVersion): + return NotImplemented + + return self._key != other._key + + +class LegacyVersion(_BaseVersion): + def __init__(self, version: str) -> None: + self._version = str(version) + self._key = _legacy_cmpkey(self._version) + + warnings.warn( + "Creating a LegacyVersion has been deprecated and will be " + "removed in the next major release", + DeprecationWarning, + ) + + def __str__(self) -> str: + return self._version + + def __repr__(self) -> str: + return f"" + + @property + def public(self) -> str: + return self._version + + @property + def base_version(self) -> str: + return self._version + + @property + def epoch(self) -> int: + return -1 + + @property + def release(self) -> None: + return None + + @property + def pre(self) -> None: + return None + + @property + def post(self) -> None: + return None + + @property + def dev(self) -> None: + return None + + @property + def local(self) -> None: + return None + + @property + def is_prerelease(self) -> bool: + return False + + @property + def is_postrelease(self) -> bool: + return False + + @property + def is_devrelease(self) -> bool: + return False + + +_legacy_version_component_re = re.compile(r"(\d+ | [a-z]+ | \.| -)", re.VERBOSE) + +_legacy_version_replacement_map = { + "pre": "c", + "preview": "c", + "-": "final-", + "rc": "c", + "dev": "@", +} + + +def _parse_version_parts(s: str) -> Iterator[str]: + for part in _legacy_version_component_re.split(s): + part = _legacy_version_replacement_map.get(part, part) + + if not part or part == ".": + continue + + if part[:1] in "0123456789": + # pad for numeric comparison + yield part.zfill(8) + else: + yield "*" + part + + # ensure that alpha/beta/candidate are before final + yield "*final" + + +def _legacy_cmpkey(version: str) -> LegacyCmpKey: + + # We hardcode an epoch of -1 here. A PEP 440 version can only have a epoch + # greater than or equal to 0. This will effectively put the LegacyVersion, + # which uses the defacto standard originally implemented by setuptools, + # as before all PEP 440 versions. + epoch = -1 + + # This scheme is taken from pkg_resources.parse_version setuptools prior to + # it's adoption of the packaging library. + parts: List[str] = [] + for part in _parse_version_parts(version.lower()): + if part.startswith("*"): + # remove "-" before a prerelease tag + if part < "*final": + while parts and parts[-1] == "*final-": + parts.pop() + + # remove trailing zeros from each series of numeric parts + while parts and parts[-1] == "00000000": + parts.pop() + + parts.append(part) + + return epoch, tuple(parts) + + +# Deliberately not anchored to the start and end of the string, to make it +# easier for 3rd party code to reuse +VERSION_PATTERN = r""" + v? + (?: + (?:(?P[0-9]+)!)? # epoch + (?P[0-9]+(?:\.[0-9]+)*) # release segment + (?P
                                          # pre-release
+            [-_\.]?
+            (?P(a|b|c|rc|alpha|beta|pre|preview))
+            [-_\.]?
+            (?P[0-9]+)?
+        )?
+        (?P                                         # post release
+            (?:-(?P[0-9]+))
+            |
+            (?:
+                [-_\.]?
+                (?Ppost|rev|r)
+                [-_\.]?
+                (?P[0-9]+)?
+            )
+        )?
+        (?P                                          # dev release
+            [-_\.]?
+            (?Pdev)
+            [-_\.]?
+            (?P[0-9]+)?
+        )?
+    )
+    (?:\+(?P[a-z0-9]+(?:[-_\.][a-z0-9]+)*))?       # local version
+"""
+
+
+class Version(_BaseVersion):
+
+    _regex = re.compile(r"^\s*" + VERSION_PATTERN + r"\s*$", re.VERBOSE | re.IGNORECASE)
+
+    def __init__(self, version: str) -> None:
+
+        # Validate the version and parse it into pieces
+        match = self._regex.search(version)
+        if not match:
+            raise InvalidVersion(f"Invalid version: '{version}'")
+
+        # Store the parsed out pieces of the version
+        self._version = _Version(
+            epoch=int(match.group("epoch")) if match.group("epoch") else 0,
+            release=tuple(int(i) for i in match.group("release").split(".")),
+            pre=_parse_letter_version(match.group("pre_l"), match.group("pre_n")),
+            post=_parse_letter_version(
+                match.group("post_l"), match.group("post_n1") or match.group("post_n2")
+            ),
+            dev=_parse_letter_version(match.group("dev_l"), match.group("dev_n")),
+            local=_parse_local_version(match.group("local")),
+        )
+
+        # Generate a key which will be used for sorting
+        self._key = _cmpkey(
+            self._version.epoch,
+            self._version.release,
+            self._version.pre,
+            self._version.post,
+            self._version.dev,
+            self._version.local,
+        )
+
+    def __repr__(self) -> str:
+        return f""
+
+    def __str__(self) -> str:
+        parts = []
+
+        # Epoch
+        if self.epoch != 0:
+            parts.append(f"{self.epoch}!")
+
+        # Release segment
+        parts.append(".".join(str(x) for x in self.release))
+
+        # Pre-release
+        if self.pre is not None:
+            parts.append("".join(str(x) for x in self.pre))
+
+        # Post-release
+        if self.post is not None:
+            parts.append(f".post{self.post}")
+
+        # Development release
+        if self.dev is not None:
+            parts.append(f".dev{self.dev}")
+
+        # Local version segment
+        if self.local is not None:
+            parts.append(f"+{self.local}")
+
+        return "".join(parts)
+
+    @property
+    def epoch(self) -> int:
+        _epoch: int = self._version.epoch
+        return _epoch
+
+    @property
+    def release(self) -> Tuple[int, ...]:
+        _release: Tuple[int, ...] = self._version.release
+        return _release
+
+    @property
+    def pre(self) -> Optional[Tuple[str, int]]:
+        _pre: Optional[Tuple[str, int]] = self._version.pre
+        return _pre
+
+    @property
+    def post(self) -> Optional[int]:
+        return self._version.post[1] if self._version.post else None
+
+    @property
+    def dev(self) -> Optional[int]:
+        return self._version.dev[1] if self._version.dev else None
+
+    @property
+    def local(self) -> Optional[str]:
+        if self._version.local:
+            return ".".join(str(x) for x in self._version.local)
+        else:
+            return None
+
+    @property
+    def public(self) -> str:
+        return str(self).split("+", 1)[0]
+
+    @property
+    def base_version(self) -> str:
+        parts = []
+
+        # Epoch
+        if self.epoch != 0:
+            parts.append(f"{self.epoch}!")
+
+        # Release segment
+        parts.append(".".join(str(x) for x in self.release))
+
+        return "".join(parts)
+
+    @property
+    def is_prerelease(self) -> bool:
+        return self.dev is not None or self.pre is not None
+
+    @property
+    def is_postrelease(self) -> bool:
+        return self.post is not None
+
+    @property
+    def is_devrelease(self) -> bool:
+        return self.dev is not None
+
+    @property
+    def major(self) -> int:
+        return self.release[0] if len(self.release) >= 1 else 0
+
+    @property
+    def minor(self) -> int:
+        return self.release[1] if len(self.release) >= 2 else 0
+
+    @property
+    def micro(self) -> int:
+        return self.release[2] if len(self.release) >= 3 else 0
+
+
+def _parse_letter_version(
+    letter: str, number: Union[str, bytes, SupportsInt]
+) -> Optional[Tuple[str, int]]:
+
+    if letter:
+        # We consider there to be an implicit 0 in a pre-release if there is
+        # not a numeral associated with it.
+        if number is None:
+            number = 0
+
+        # We normalize any letters to their lower case form
+        letter = letter.lower()
+
+        # We consider some words to be alternate spellings of other words and
+        # in those cases we want to normalize the spellings to our preferred
+        # spelling.
+        if letter == "alpha":
+            letter = "a"
+        elif letter == "beta":
+            letter = "b"
+        elif letter in ["c", "pre", "preview"]:
+            letter = "rc"
+        elif letter in ["rev", "r"]:
+            letter = "post"
+
+        return letter, int(number)
+    if not letter and number:
+        # We assume if we are given a number, but we are not given a letter
+        # then this is using the implicit post release syntax (e.g. 1.0-1)
+        letter = "post"
+
+        return letter, int(number)
+
+    return None
+
+
+_local_version_separators = re.compile(r"[\._-]")
+
+
+def _parse_local_version(local: str) -> Optional[LocalType]:
+    """
+    Takes a string like abc.1.twelve and turns it into ("abc", 1, "twelve").
+    """
+    if local is not None:
+        return tuple(
+            part.lower() if not part.isdigit() else int(part)
+            for part in _local_version_separators.split(local)
+        )
+    return None
+
+
+def _cmpkey(
+    epoch: int,
+    release: Tuple[int, ...],
+    pre: Optional[Tuple[str, int]],
+    post: Optional[Tuple[str, int]],
+    dev: Optional[Tuple[str, int]],
+    local: Optional[Tuple[SubLocalType]],
+) -> CmpKey:
+
+    # When we compare a release version, we want to compare it with all of the
+    # trailing zeros removed. So we'll use a reverse the list, drop all the now
+    # leading zeros until we come to something non zero, then take the rest
+    # re-reverse it back into the correct order and make it a tuple and use
+    # that for our sorting key.
+    _release = tuple(
+        reversed(list(itertools.dropwhile(lambda x: x == 0, reversed(release))))
+    )
+
+    # We need to "trick" the sorting algorithm to put 1.0.dev0 before 1.0a0.
+    # We'll do this by abusing the pre segment, but we _only_ want to do this
+    # if there is not a pre or a post segment. If we have one of those then
+    # the normal sorting rules will handle this case correctly.
+    if pre is None and post is None and dev is not None:
+        _pre: PrePostDevType = NegativeInfinity
+    # Versions without a pre-release (except as noted above) should sort after
+    # those with one.
+    elif pre is None:
+        _pre = Infinity
+    else:
+        _pre = pre
+
+    # Versions without a post segment should sort before those with one.
+    if post is None:
+        _post: PrePostDevType = NegativeInfinity
+
+    else:
+        _post = post
+
+    # Versions without a development segment should sort after those with one.
+    if dev is None:
+        _dev: PrePostDevType = Infinity
+
+    else:
+        _dev = dev
+
+    if local is None:
+        # Versions without a local segment should sort before those with one.
+        _local: LocalType = NegativeInfinity
+    else:
+        # Versions with a local segment need that segment parsed to implement
+        # the sorting rules in PEP440.
+        # - Alpha numeric segments sort before numeric segments
+        # - Alpha numeric segments sort lexicographically
+        # - Numeric segments sort numerically
+        # - Shorter versions sort before longer versions when the prefixes
+        #   match exactly
+        _local = tuple(
+            (i, "") if isinstance(i, int) else (NegativeInfinity, i) for i in local
+        )
+
+    return epoch, _release, _pre, _post, _dev, _local
diff --git a/mamonsu/plugins/pgsql/driver/pg8000/core.py b/mamonsu/plugins/pgsql/driver/pg8000/core.py
index 26db69a..b050af6 100755
--- a/mamonsu/plugins/pgsql/driver/pg8000/core.py
+++ b/mamonsu/plugins/pgsql/driver/pg8000/core.py
@@ -7,11 +7,7 @@
 from struct import Struct
 from warnings import warn
 
-try:
-    from pkg_resources import packaging
-except ImportError:
-    import packaging.version
-
+import mamonsu.lib.version as version
 from mamonsu.plugins.pgsql.driver.pg8000 import converters
 from .exceptions import (
     ArrayContentNotSupportedError, DatabaseError, Error, IntegrityError,
@@ -1425,11 +1421,11 @@ def handle_PARAMETER_STATUS(self, data, ps):
             # since distutils became deprecated we need this hack hoping that
             # postgres package maintainers won't come up with something more exotic
             string_version = value.decode('ascii').split(' ')[0]
-            self._server_version = packaging.version.parse(string_version)
-            if self._server_version < packaging.version.parse('8.2.0'):
+            self._server_version = version.parse(string_version)
+            if self._server_version < version.parse('8.2.0'):
                 self._commands_with_count = (
                     b"INSERT", b"DELETE", b"UPDATE", b"MOVE")
-            elif self._server_version < packaging.version.parse('9.0.0'):
+            elif self._server_version < version.parse('9.0.0'):
                 self._commands_with_count = (
                     b"INSERT", b"DELETE", b"UPDATE", b"MOVE", b"FETCH",
                     b"COPY")
diff --git a/mamonsu/plugins/pgsql/driver/pool.py b/mamonsu/plugins/pgsql/driver/pool.py
index dae2a59..3850b75 100644
--- a/mamonsu/plugins/pgsql/driver/pool.py
+++ b/mamonsu/plugins/pgsql/driver/pool.py
@@ -1,9 +1,6 @@
 from .connection import Connection, ConnectionInfo
 
-try:
-    from pkg_resources import packaging
-except ImportError:
-    import packaging.version
+from mamonsu.lib.version import parse
 
 class Pool(object):
     ExcludeDBs = ["template0", "template1"]
@@ -151,19 +148,17 @@ def extension_version(self, extension, db=None):
 
     def server_version_greater(self, version, db=None):
         db = self._normalize_db(db)
-        return packaging.version.parse(self.server_version(db)) >= packaging.version.parse(version)
+        return parse(self.server_version(db)) >= parse(version)
 
     def server_version_less(self, version, db=None):
         db = self._normalize_db(db)
-        return packaging.version.parse(self.server_version(db)) <= packaging.version.parse(version)
+        return parse(self.server_version(db)) <= parse(version)
 
     def bootstrap_version_greater(self, version):
-        return packaging.version.parse(
-                str(self._cache["bootstrap"]["version"])) >= packaging.version.parse(version)
+        return parse(str(self._cache["bootstrap"]["version"])) >= parse(version)
 
     def bootstrap_version_less(self, version):
-        return packaging.version.parse(
-                str(self._cache["bootstrap"]["version"])) <= packaging.version.parse(version)
+        return parse(str(self._cache["bootstrap"]["version"])) <= parse(version)
 
     def in_recovery(self, db=None):
         db = self._normalize_db(db)
@@ -245,11 +240,11 @@ def is_pgpro_ee(self, db=None):
 
     def extension_version_greater(self, extension, version, db=None):
         db = self._normalize_db(db)
-        return packaging.version.parse(self.extension_version(extension, db)) >= packaging.version.parse(version)
+        return parse(self.extension_version(extension, db)) >= parse(version)
 
     def extension_version_less(self, extension, version, db=None):
         db = self._normalize_db(db)
-        return packaging.version.parse(self.extension_version(extension, db)) <= packaging.version.parse(version)
+        return parse(self.extension_version(extension, db)) <= parse(version)
 
     def extension_installed(self, ext, db=None):
         db = self._normalize_db(db)
diff --git a/mamonsu/plugins/pgsql/memory_leak_diagnostic.py b/mamonsu/plugins/pgsql/memory_leak_diagnostic.py
index c22c5f9..14c0749 100644
--- a/mamonsu/plugins/pgsql/memory_leak_diagnostic.py
+++ b/mamonsu/plugins/pgsql/memory_leak_diagnostic.py
@@ -7,10 +7,8 @@
 import mamonsu.lib.platform as platform
 import posix
 
-try:
-    from pkg_resources import packaging
-except ImportError:
-    import packaging.version
+import mamonsu.lib.version as version
+
 
 class MemoryLeakDiagnostic(Plugin):
     DEFAULT_CONFIG = {
@@ -94,7 +92,7 @@ def run(self, zbx):
         for row in Pooler.query(query=self.query):
             pids.append(row[0])
 
-        if (packaging.version.parse(self.os_release) < packaging.version.parse("4.5")
+        if (version.parse(self.os_release) < version.parse("4.5")
             and not (self.os_name == "centos" and self.os_version == "7")) \
                 or (not self.os_name and not self.os_version):
             for pid in pids:
diff --git a/mamonsu/plugins/pgsql/replication.py b/mamonsu/plugins/pgsql/replication.py
index 78d841a..8a51889 100644
--- a/mamonsu/plugins/pgsql/replication.py
+++ b/mamonsu/plugins/pgsql/replication.py
@@ -4,10 +4,7 @@
 from .pool import Pooler
 from mamonsu.lib.zbx_template import ZbxTemplate
 
-try:
-    from pkg_resources import packaging
-except ImportError:
-    import packaging.version
+import mamonsu.lib.version as version
 
 NUMBER_NON_ACTIVE_SLOTS = 0
 
@@ -205,7 +202,7 @@ def discovery_rules(self, template, dashboard=False):
 
     def keys_and_queries(self, template_zabbix):
         result = []
-        if packaging.version.parse(self.VersionPG) < packaging.version.parse("10"):
+        if version.parse(self.VersionPG) < version.parse("10"):
             result.append("{0},$2 $1 -c \"{1}\"".format("pgsql.replication_lag.sec[*]",
                                                            self.query_agent_replication_lag.format(
                                                                self.plugin_config("interval"), "xlog_receive_location",
diff --git a/mamonsu/tools/zabbix_cli/operations.py b/mamonsu/tools/zabbix_cli/operations.py
index 984f96f..811ab0b 100644
--- a/mamonsu/tools/zabbix_cli/operations.py
+++ b/mamonsu/tools/zabbix_cli/operations.py
@@ -3,14 +3,10 @@
 from __future__ import print_function
 import sys
 import json
+import mamonsu.lib.version as version
 from mamonsu.tools.zabbix_cli.request import Request
 from mamonsu.lib.parser import zabbix_msg
 
-try:
-    from pkg_resources import packaging
-except ImportError:
-    import packaging.version
-
 from mamonsu.tools.zabbix_cli.dashboard import generate_dashboard
 
 
@@ -176,10 +172,10 @@ def template(self, args):
                     }
                 },
                 'source': open(file).read()}
-            if packaging.version.parse(zabbix_version) < packaging.version.parse('5.4'):
+            if version.parse(zabbix_version) < version.parse('5.4'):
                 params['rules']['applications'] = {'createMissing': True,
                                                    'deleteMissing': True}
-            if packaging.version.parse(zabbix_version) < packaging.version.parse('5.2'):
+            if version.parse(zabbix_version) < version.parse('5.2'):
                 params['rules']['templateScreens'] = {'createMissing': True,
                                                       'updateExisting': False,
                                                       'deleteMissing': True}
@@ -334,7 +330,7 @@ def dashboard(self, args):
             if not len(args) == 2:
                 return self._print_help()
             zabbix_version = str(self.req.post(method='apiinfo.version', params=[]))
-            if packaging.version.parse(zabbix_version) < packaging.version.parse('6.0'):
+            if version.parse(zabbix_version) < version.parse('6.0'):
                 print("You can import Mamonsu dashboard only on Zabbix 6.0+.")
                 return
             else:
diff --git a/mamonsu/tools/zabbix_cli/request.py b/mamonsu/tools/zabbix_cli/request.py
index f0cee27..0ccd78c 100644
--- a/mamonsu/tools/zabbix_cli/request.py
+++ b/mamonsu/tools/zabbix_cli/request.py
@@ -4,10 +4,7 @@
 import logging
 from collections import OrderedDict
 
-try:
-    from pkg_resources import packaging
-except ImportError:
-    import packaging.version
+import mamonsu.lib.version as version
 
 import urllib.request as urllib2
 
@@ -29,7 +26,7 @@ def _auth(self):
         if self._auth_tocken is None:
             if not self._user:
                 return None
-            user_field = 'user' if packaging.version.parse(self._api_version) < packaging.version.parse('6.4') else 'username'
+            user_field = 'user' if version.parse(self._api_version) < version.parse('6.4') else 'username'
             self._auth_tocken = self.post(
                 'user.login',
                 {user_field: self._user, 'password': self._passwd})

From 1002c67a6923e6447c57d7b7dd3c418c386c8c98 Mon Sep 17 00:00:00 2001
From: Maxim Styushin 
Date: Wed, 26 Feb 2025 01:07:44 +0400
Subject: [PATCH 095/106] fix: plugin threads synchronization

- use reentrant lock to synchronize access to Pool singletone.
- make concurrent modifications of _cache structure thread-safe.
---
 mamonsu/plugins/pgsql/driver/pool.py | 196 ++++++++++++++-------------
 1 file changed, 104 insertions(+), 92 deletions(-)

diff --git a/mamonsu/plugins/pgsql/driver/pool.py b/mamonsu/plugins/pgsql/driver/pool.py
index 3850b75..6576f92 100644
--- a/mamonsu/plugins/pgsql/driver/pool.py
+++ b/mamonsu/plugins/pgsql/driver/pool.py
@@ -1,6 +1,8 @@
 from .connection import Connection, ConnectionInfo
 
 from mamonsu.lib.version import parse
+import threading
+
 
 class Pool(object):
     ExcludeDBs = ["template0", "template1"]
@@ -107,10 +109,11 @@ def __init__(self, params=None):
             "bootstrap": {"storage": {}, "counter": 0, "cache": 10, "version": False},
             "recovery": {"storage": {}, "counter": 0, "cache": 10},
             "extension_schema": {"pg_buffercache": {}, "pg_stat_statements": {}, "pg_wait_sampling": {}, "pgpro_stats": {}},
-            "extension_versions" : {},
+            "extension_versions": {},
             "pgpro": {"storage": {}},
             "pgproee": {"storage": {}}
         }
+        self._lock = threading.RLock()
 
     def connection_string(self, db=None):
         db = self._normalize_db(db)
@@ -122,30 +125,32 @@ def query(self, query, db=None):
         return self._connections[db].query(query)
 
     def server_version(self, db=None):
-        db = self._normalize_db(db)
-        if db in self._cache["server_version"]["storage"]:
+        with self._lock:
+            db = self._normalize_db(db)
+            if db in self._cache["server_version"]["storage"]:
+                return self._cache["server_version"]["storage"][db]
+
+            version_string = self.query("show server_version", db)[0][0]
+            result = bytes(
+                version_string.split(" ")[0], "utf-8")
+            self._cache["server_version"]["storage"][db] = "{0}".format(
+                result.decode("ascii"))
             return self._cache["server_version"]["storage"][db]
 
-        version_string = self.query("show server_version", db)[0][0]
-        result = bytes(
-            version_string.split(" ")[0], "utf-8")
-        self._cache["server_version"]["storage"][db] = "{0}".format(
-            result.decode("ascii"))
-        return self._cache["server_version"]["storage"][db]
-
     def extension_version(self, extension, db=None):
-        db = self._normalize_db(db)
-        if extension in self._cache["extension_versions"] and db in self._cache["extension_versions"][extension][db]:
+        with self._lock:
+            db = self._normalize_db(db)
+            if extension in self._cache["extension_versions"] and db in self._cache["extension_versions"][extension][db]:
+                return self._cache["extension_versions"][extension][db]
+
+            version_string = self.query("select extversion from pg_catalog.pg_extension where lower(extname) = lower('{0}');".format(extension), db)[0][0]
+            result = bytes(
+                version_string.split(" ")[0], "utf-8")
+            self._cache["extension_versions"][extension] = {}
+            self._cache["extension_versions"][extension][db] = "{0}".format(
+                result.decode("ascii"))
             return self._cache["extension_versions"][extension][db]
 
-        version_string = self.query("select extversion from pg_catalog.pg_extension where lower(extname) = lower('{0}');".format(extension), db)[0][0]
-        result = bytes(
-            version_string.split(" ")[0], "utf-8")
-        self._cache["extension_versions"][extension] = {}
-        self._cache["extension_versions"][extension][db] = "{0}".format(
-            result.decode("ascii"))
-        return self._cache["extension_versions"][extension][db]
-
     def server_version_greater(self, version, db=None):
         db = self._normalize_db(db)
         return parse(self.server_version(db)) >= parse(version)
@@ -155,49 +160,53 @@ def server_version_less(self, version, db=None):
         return parse(self.server_version(db)) <= parse(version)
 
     def bootstrap_version_greater(self, version):
-        return parse(str(self._cache["bootstrap"]["version"])) >= parse(version)
+        with self._lock:
+            return parse(str(self._cache["bootstrap"]["version"])) >= parse(version)
 
     def bootstrap_version_less(self, version):
-        return parse(str(self._cache["bootstrap"]["version"])) <= parse(version)
+        with self._lock:
+            return parse(str(self._cache["bootstrap"]["version"])) <= parse(version)
 
     def in_recovery(self, db=None):
-        db = self._normalize_db(db)
-        if db in self._cache["recovery"]["storage"]:
-            if self._cache["recovery"]["counter"] < self._cache["recovery"]["cache"]:
-                self._cache["recovery"]["counter"] += 1
-                return self._cache["recovery"]["storage"][db]
-        self._cache["recovery"]["counter"] = 0
-        self._cache["recovery"]["storage"][db] = self.query(
-            "select pg_catalog.pg_is_in_recovery()", db)[0][0]
-        return self._cache["recovery"]["storage"][db]
+        with self._lock:
+            db = self._normalize_db(db)
+            if db in self._cache["recovery"]["storage"]:
+                if self._cache["recovery"]["counter"] < self._cache["recovery"]["cache"]:
+                    self._cache["recovery"]["counter"] += 1
+                    return self._cache["recovery"]["storage"][db]
+            self._cache["recovery"]["counter"] = 0
+            self._cache["recovery"]["storage"][db] = self.query(
+                "select pg_catalog.pg_is_in_recovery()", db)[0][0]
+            return self._cache["recovery"]["storage"][db]
 
     def is_bootstraped(self, db=None):
-        db = self._normalize_db(db)
-        if db in self._cache["bootstrap"]["storage"]:
-            if self._cache["bootstrap"]["counter"] < self._cache["bootstrap"]["cache"]:
-                self._cache["bootstrap"]["counter"] += 1
-                return self._cache["bootstrap"]["storage"][db]
-        self._cache["bootstrap"]["counter"] = 0
-        # TODO: изменить на нормальное название, 'config' слишком общее
-        sql = """
-        SELECT count(*)
-        FROM pg_catalog.pg_class
-        WHERE relname = 'config';
-        """
-        result = int(self.query(sql, db)[0][0])
-        self._cache["bootstrap"]["storage"][db] = (result == 1)
-        if self._cache["bootstrap"]["storage"][db]:
-            self._connections[db].log.info("Found mamonsu bootstrap")
+        with self._lock:
+            db = self._normalize_db(db)
+            if db in self._cache["bootstrap"]["storage"]:
+                if self._cache["bootstrap"]["counter"] < self._cache["bootstrap"]["cache"]:
+                    self._cache["bootstrap"]["counter"] += 1
+                    return self._cache["bootstrap"]["storage"][db]
+            self._cache["bootstrap"]["counter"] = 0
+            # TODO: изменить на нормальное название, 'config' слишком общее
             sql = """
-            SELECT max(version)
-            FROM mamonsu.config;
+            SELECT count(*)
+            FROM pg_catalog.pg_class
+            WHERE relname = 'config';
             """
-            self._cache["bootstrap"]["version"] = self.query(sql, db)[0][0]
-        else:
-            self._connections[db].log.info("Mamonsu bootstrap is not found")
-            self._connections[db].log.info(
-                "hint: run `mamonsu bootstrap` if you want to run without superuser rights")
-        return self._cache["bootstrap"]["storage"][db]
+            result = int(self.query(sql, db)[0][0])
+            self._cache["bootstrap"]["storage"][db] = (result == 1)
+            if self._cache["bootstrap"]["storage"][db]:
+                self._connections[db].log.info("Found mamonsu bootstrap")
+                sql = """
+                SELECT max(version)
+                FROM mamonsu.config;
+                """
+                self._cache["bootstrap"]["version"] = self.query(sql, db)[0][0]
+            else:
+                self._connections[db].log.info("Mamonsu bootstrap is not found")
+                self._connections[db].log.info(
+                    "hint: run `mamonsu bootstrap` if you want to run without superuser rights")
+            return self._cache["bootstrap"]["storage"][db]
 
     def is_superuser(self, db=None):
         _ = self._normalize_db(db)
@@ -209,34 +218,36 @@ def is_superuser(self, db=None):
             return False
 
     def is_pgpro(self, db=None):
-        db = self._normalize_db(db)
-        if db in self._cache["pgpro"]:
+        with self._lock:
+            db = self._normalize_db(db)
+            if db in self._cache["pgpro"]:
+                return self._cache["pgpro"][db]
+            try:
+                self.query("""
+                SELECT pgpro_version();
+                """)
+                self._cache["pgpro"][db] = True
+            except:
+                self._cache["pgpro"][db] = False
             return self._cache["pgpro"][db]
-        try:
-            self.query("""
-            SELECT pgpro_version();
-            """)
-            self._cache["pgpro"][db] = True
-        except:
-            self._cache["pgpro"][db] = False
-        return self._cache["pgpro"][db]
 
     def is_pgpro_ee(self, db=None):
-        db = self._normalize_db(db)
-        if not self.is_pgpro(db):
-            return False
-        if db in self._cache["pgproee"]:
+        with self._lock:
+            db = self._normalize_db(db)
+            if not self.is_pgpro(db):
+                return False
+            if db in self._cache["pgproee"]:
+                return self._cache["pgproee"][db]
+            try:
+                ed = self.query("""
+                SELECT pgpro_edition();
+                """)[0][0]
+                self._connections[db].log.info("pgpro_edition is {}".format(ed))
+                self._cache["pgproee"][db] = (ed.lower() == "enterprise")
+            except:
+                self._connections[db].log.info("pgpro_edition() is not defined")
+                self._cache["pgproee"][db] = False
             return self._cache["pgproee"][db]
-        try:
-            ed = self.query("""
-            SELECT pgpro_edition();
-            """)[0][0]
-            self._connections[db].log.info("pgpro_edition is {}".format(ed))
-            self._cache["pgproee"][db] = (ed.lower() == "enterprise")
-        except:
-            self._connections[db].log.info("pgpro_edition() is not defined")
-            self._cache["pgproee"][db] = False
-        return self._cache["pgproee"][db]
 
     def extension_version_greater(self, extension, version, db=None):
         db = self._normalize_db(db)
@@ -256,19 +267,20 @@ def extension_installed(self, ext, db=None):
         return (int(result[0][0])) == 1
 
     def extension_schema(self, extension, db=None):
-        db = self._normalize_db(db)
-        if db in self._cache["extension_schema"][extension]:
-            return self._cache["extension_schema"][extension][db]
-        try:
-            self._cache["extension_schema"][extension][db] = self.query("""
-            SELECT n.nspname
-            FROM pg_extension e
-            JOIN pg_namespace n ON e.extnamespace = n.oid
-            WHERE e.extname = '{0}'
-            """.format(extension), db)[0][0]
-            return self._cache["extension_schema"][extension][db]
-        except:
-            self._connections[db].log.info("{0} is not installed".format(extension))
+        with self._lock:
+            db = self._normalize_db(db)
+            if db in self._cache["extension_schema"][extension]:
+                return self._cache["extension_schema"][extension][db]
+            try:
+                self._cache["extension_schema"][extension][db] = self.query("""
+                SELECT n.nspname
+                FROM pg_extension e
+                JOIN pg_namespace n ON e.extnamespace = n.oid
+                WHERE e.extname = '{0}'
+                """.format(extension), db)[0][0]
+                return self._cache["extension_schema"][extension][db]
+            except:
+                self._connections[db].log.info("{0} is not installed".format(extension))
 
     def databases(self):
         result, databases = self.query("""

From 3a9e43140a5f94a787be2134c1182ef04c835016 Mon Sep 17 00:00:00 2001
From: Maxim Styushin 
Date: Wed, 26 Feb 2025 20:33:34 +0400
Subject: [PATCH 096/106] cicd: update actions runner to ubuntu 22.04

---
 .github/workflows/mamonsu-tests-dev.yml    | 2 +-
 .github/workflows/mamonsu-tests-master.yml | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/.github/workflows/mamonsu-tests-dev.yml b/.github/workflows/mamonsu-tests-dev.yml
index 6e3bf27..368d655 100644
--- a/.github/workflows/mamonsu-tests-dev.yml
+++ b/.github/workflows/mamonsu-tests-dev.yml
@@ -20,7 +20,7 @@ on:
 
 jobs:
   mamonsu-tests:
-    runs-on: ubuntu-20.04
+    runs-on: ubuntu-22.04
     env:
       DOCKER_COMPOSE_VERSION: '1.29.2'
       MAMONSU_PATH: '/home/runner/work/mamonsu/mamonsu/'
diff --git a/.github/workflows/mamonsu-tests-master.yml b/.github/workflows/mamonsu-tests-master.yml
index 312134a..d7072ba 100644
--- a/.github/workflows/mamonsu-tests-master.yml
+++ b/.github/workflows/mamonsu-tests-master.yml
@@ -20,7 +20,7 @@ on:
 
 jobs:
   mamonsu-tests:
-    runs-on: ubuntu-20.04
+    runs-on: ubuntu-22.04
     env:
       DOCKER_COMPOSE_VERSION: '1.29.2'
       MAMONSU_PATH: '/home/runner/work/mamonsu/mamonsu/'

From d321cc8e9c981cfef723be9328c9a46b9f570df3 Mon Sep 17 00:00:00 2001
From: Maxim Styushin 
Date: Sat, 1 Mar 2025 17:40:48 +0400
Subject: [PATCH 097/106] fix: remove type hints from version parser

- falling back to a way older code to support python3.3
---
 mamonsu/lib/version.py | 376 +++++++++++++++--------------------------
 1 file changed, 134 insertions(+), 242 deletions(-)

diff --git a/mamonsu/lib/version.py b/mamonsu/lib/version.py
index 711e933..821b67b 100644
--- a/mamonsu/lib/version.py
+++ b/mamonsu/lib/version.py
@@ -12,106 +12,90 @@
 # LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
 # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 
+from __future__ import absolute_import, division, print_function
+
 import collections
 import itertools
 import re
-import warnings
-from typing import Callable, Iterator, List, Optional, SupportsInt, Tuple, Union
+
+__all__ = [
+    "parse", "Version", "LegacyVersion", "InvalidVersion", "VERSION_PATTERN"
+]
 
 
-class InfinityType:
-    def __repr__(self) -> str:
+class Infinity(object):
+
+    def __repr__(self):
         return "Infinity"
 
-    def __hash__(self) -> int:
+    def __hash__(self):
         return hash(repr(self))
 
-    def __lt__(self, other: object) -> bool:
+    def __lt__(self, other):
         return False
 
-    def __le__(self, other: object) -> bool:
+    def __le__(self, other):
         return False
 
-    def __eq__(self, other: object) -> bool:
+    def __eq__(self, other):
         return isinstance(other, self.__class__)
 
-    def __ne__(self, other: object) -> bool:
+    def __ne__(self, other):
         return not isinstance(other, self.__class__)
 
-    def __gt__(self, other: object) -> bool:
+    def __gt__(self, other):
         return True
 
-    def __ge__(self, other: object) -> bool:
+    def __ge__(self, other):
         return True
 
-    def __neg__(self: object) -> "NegativeInfinityType":
+    def __neg__(self):
         return NegativeInfinity
 
 
-Infinity = InfinityType()
+Infinity = Infinity()
+
 
+class NegativeInfinity(object):
 
-class NegativeInfinityType:
-    def __repr__(self) -> str:
+    def __repr__(self):
         return "-Infinity"
 
-    def __hash__(self) -> int:
+    def __hash__(self):
         return hash(repr(self))
 
-    def __lt__(self, other: object) -> bool:
+    def __lt__(self, other):
         return True
 
-    def __le__(self, other: object) -> bool:
+    def __le__(self, other):
         return True
 
-    def __eq__(self, other: object) -> bool:
+    def __eq__(self, other):
         return isinstance(other, self.__class__)
 
-    def __ne__(self, other: object) -> bool:
+    def __ne__(self, other):
         return not isinstance(other, self.__class__)
 
-    def __gt__(self, other: object) -> bool:
+    def __gt__(self, other):
         return False
 
-    def __ge__(self, other: object) -> bool:
+    def __ge__(self, other):
         return False
 
-    def __neg__(self: object) -> InfinityType:
+    def __neg__(self):
         return Infinity
 
 
-NegativeInfinity = NegativeInfinityType()
+NegativeInfinity = NegativeInfinity()
 
-__all__ = ["parse", "Version", "LegacyVersion", "InvalidVersion", "VERSION_PATTERN"]
-
-InfiniteTypes = Union[InfinityType, NegativeInfinityType]
-PrePostDevType = Union[InfiniteTypes, Tuple[str, int]]
-SubLocalType = Union[InfiniteTypes, int, str]
-LocalType = Union[
-    NegativeInfinityType,
-    Tuple[
-        Union[
-            SubLocalType,
-            Tuple[SubLocalType, str],
-            Tuple[NegativeInfinityType, SubLocalType],
-        ],
-        ...,
-    ],
-]
-CmpKey = Tuple[
-    int, Tuple[int, ...], PrePostDevType, PrePostDevType, PrePostDevType, LocalType
-]
-LegacyCmpKey = Tuple[int, Tuple[str, ...]]
-VersionComparisonMethod = Callable[
-    [Union[CmpKey, LegacyCmpKey], Union[CmpKey, LegacyCmpKey]], bool
-]
 
 _Version = collections.namedtuple(
-    "_Version", ["epoch", "release", "dev", "pre", "post", "local"]
+    "_Version",
+    ["epoch", "release", "dev", "pre", "post", "local"],
 )
 
 
-def parse(version: str) -> Union["LegacyVersion", "Version"]:
+def parse(version):
     """
     Parse the given version string and return either a :class:`Version` object
     or a :class:`LegacyVersion` object depending on if the given version is
@@ -129,126 +113,79 @@ class InvalidVersion(ValueError):
     """
 
 
-class _BaseVersion:
-    _key: Union[CmpKey, LegacyCmpKey]
+class _BaseVersion(object):
 
-    def __hash__(self) -> int:
+    def __hash__(self):
         return hash(self._key)
 
-    # Please keep the duplicated `isinstance` check
-    # in the six comparisons hereunder
-    # unless you find a way to avoid adding overhead function calls.
-    def __lt__(self, other: "_BaseVersion") -> bool:
-        if not isinstance(other, _BaseVersion):
-            return NotImplemented
+    def __lt__(self, other):
+        return self._compare(other, lambda s, o: s < o)
 
-        return self._key < other._key
+    def __le__(self, other):
+        return self._compare(other, lambda s, o: s <= o)
 
-    def __le__(self, other: "_BaseVersion") -> bool:
-        if not isinstance(other, _BaseVersion):
-            return NotImplemented
+    def __eq__(self, other):
+        return self._compare(other, lambda s, o: s == o)
 
-        return self._key <= other._key
+    def __ge__(self, other):
+        return self._compare(other, lambda s, o: s >= o)
 
-    def __eq__(self, other: object) -> bool:
-        if not isinstance(other, _BaseVersion):
-            return NotImplemented
+    def __gt__(self, other):
+        return self._compare(other, lambda s, o: s > o)
 
-        return self._key == other._key
+    def __ne__(self, other):
+        return self._compare(other, lambda s, o: s != o)
 
-    def __ge__(self, other: "_BaseVersion") -> bool:
+    def _compare(self, other, method):
         if not isinstance(other, _BaseVersion):
             return NotImplemented
 
-        return self._key >= other._key
-
-    def __gt__(self, other: "_BaseVersion") -> bool:
-        if not isinstance(other, _BaseVersion):
-            return NotImplemented
-
-        return self._key > other._key
-
-    def __ne__(self, other: object) -> bool:
-        if not isinstance(other, _BaseVersion):
-            return NotImplemented
-
-        return self._key != other._key
+        return method(self._key, other._key)
 
 
 class LegacyVersion(_BaseVersion):
-    def __init__(self, version: str) -> None:
+
+    def __init__(self, version):
         self._version = str(version)
         self._key = _legacy_cmpkey(self._version)
 
-        warnings.warn(
-            "Creating a LegacyVersion has been deprecated and will be "
-            "removed in the next major release",
-            DeprecationWarning,
-        )
-
-    def __str__(self) -> str:
+    def __str__(self):
         return self._version
 
-    def __repr__(self) -> str:
-        return f""
+    def __repr__(self):
+        return "".format(repr(str(self)))
 
     @property
-    def public(self) -> str:
+    def public(self):
         return self._version
 
     @property
-    def base_version(self) -> str:
+    def base_version(self):
         return self._version
 
     @property
-    def epoch(self) -> int:
-        return -1
-
-    @property
-    def release(self) -> None:
-        return None
-
-    @property
-    def pre(self) -> None:
-        return None
-
-    @property
-    def post(self) -> None:
-        return None
-
-    @property
-    def dev(self) -> None:
-        return None
-
-    @property
-    def local(self) -> None:
+    def local(self):
         return None
 
     @property
-    def is_prerelease(self) -> bool:
+    def is_prerelease(self):
         return False
 
     @property
-    def is_postrelease(self) -> bool:
+    def is_postrelease(self):
         return False
 
-    @property
-    def is_devrelease(self) -> bool:
-        return False
 
-
-_legacy_version_component_re = re.compile(r"(\d+ | [a-z]+ | \.| -)", re.VERBOSE)
+_legacy_version_component_re = re.compile(
+    r"(\d+ | [a-z]+ | \.| -)", re.VERBOSE,
+)
 
 _legacy_version_replacement_map = {
-    "pre": "c",
-    "preview": "c",
-    "-": "final-",
-    "rc": "c",
-    "dev": "@",
+    "pre": "c", "preview": "c", "-": "final-", "rc": "c", "dev": "@",
 }
 
 
-def _parse_version_parts(s: str) -> Iterator[str]:
+def _parse_version_parts(s):
     for part in _legacy_version_component_re.split(s):
         part = _legacy_version_replacement_map.get(part, part)
 
@@ -265,8 +202,7 @@ def _parse_version_parts(s: str) -> Iterator[str]:
     yield "*final"
 
 
-def _legacy_cmpkey(version: str) -> LegacyCmpKey:
-
+def _legacy_cmpkey(version):
     # We hardcode an epoch of -1 here. A PEP 440 version can only have a epoch
     # greater than or equal to 0. This will effectively put the LegacyVersion,
     # which uses the defacto standard originally implemented by setuptools,
@@ -275,7 +211,7 @@ def _legacy_cmpkey(version: str) -> LegacyCmpKey:
 
     # This scheme is taken from pkg_resources.parse_version setuptools prior to
     # it's adoption of the packaging library.
-    parts: List[str] = []
+    parts = []
     for part in _parse_version_parts(version.lower()):
         if part.startswith("*"):
             # remove "-" before a prerelease tag
@@ -288,8 +224,9 @@ def _legacy_cmpkey(version: str) -> LegacyCmpKey:
                 parts.pop()
 
         parts.append(part)
+    parts = tuple(parts)
 
-    return epoch, tuple(parts)
+    return epoch, parts
 
 
 # Deliberately not anchored to the start and end of the string, to make it
@@ -328,24 +265,33 @@ def _legacy_cmpkey(version: str) -> LegacyCmpKey:
 
 class Version(_BaseVersion):
 
-    _regex = re.compile(r"^\s*" + VERSION_PATTERN + r"\s*$", re.VERBOSE | re.IGNORECASE)
-
-    def __init__(self, version: str) -> None:
+    _regex = re.compile(
+        r"^\s*" + VERSION_PATTERN + r"\s*$",
+        re.VERBOSE | re.IGNORECASE,
+    )
 
+    def __init__(self, version):
         # Validate the version and parse it into pieces
         match = self._regex.search(version)
         if not match:
-            raise InvalidVersion(f"Invalid version: '{version}'")
+            raise InvalidVersion("Invalid version: '{0}'".format(version))
 
         # Store the parsed out pieces of the version
         self._version = _Version(
             epoch=int(match.group("epoch")) if match.group("epoch") else 0,
             release=tuple(int(i) for i in match.group("release").split(".")),
-            pre=_parse_letter_version(match.group("pre_l"), match.group("pre_n")),
+            pre=_parse_letter_version(
+                match.group("pre_l"),
+                match.group("pre_n"),
+            ),
             post=_parse_letter_version(
-                match.group("post_l"), match.group("post_n1") or match.group("post_n2")
+                match.group("post_l"),
+                match.group("post_n1") or match.group("post_n2"),
+            ),
+            dev=_parse_letter_version(
+                match.group("dev_l"),
+                match.group("dev_n"),
             ),
-            dev=_parse_letter_version(match.group("dev_l"), match.group("dev_n")),
             local=_parse_local_version(match.group("local")),
         )
 
@@ -359,113 +305,72 @@ def __init__(self, version: str) -> None:
             self._version.local,
         )
 
-    def __repr__(self) -> str:
-        return f""
+    def __repr__(self):
+        return "".format(repr(str(self)))
 
-    def __str__(self) -> str:
+    def __str__(self):
         parts = []
 
         # Epoch
-        if self.epoch != 0:
-            parts.append(f"{self.epoch}!")
+        if self._version.epoch != 0:
+            parts.append("{0}!".format(self._version.epoch))
 
         # Release segment
-        parts.append(".".join(str(x) for x in self.release))
+        parts.append(".".join(str(x) for x in self._version.release))
 
         # Pre-release
-        if self.pre is not None:
-            parts.append("".join(str(x) for x in self.pre))
+        if self._version.pre is not None:
+            parts.append("".join(str(x) for x in self._version.pre))
 
         # Post-release
-        if self.post is not None:
-            parts.append(f".post{self.post}")
+        if self._version.post is not None:
+            parts.append(".post{0}".format(self._version.post[1]))
 
         # Development release
-        if self.dev is not None:
-            parts.append(f".dev{self.dev}")
+        if self._version.dev is not None:
+            parts.append(".dev{0}".format(self._version.dev[1]))
 
         # Local version segment
-        if self.local is not None:
-            parts.append(f"+{self.local}")
+        if self._version.local is not None:
+            parts.append(
+                "+{0}".format(".".join(str(x) for x in self._version.local))
+            )
 
         return "".join(parts)
 
     @property
-    def epoch(self) -> int:
-        _epoch: int = self._version.epoch
-        return _epoch
-
-    @property
-    def release(self) -> Tuple[int, ...]:
-        _release: Tuple[int, ...] = self._version.release
-        return _release
-
-    @property
-    def pre(self) -> Optional[Tuple[str, int]]:
-        _pre: Optional[Tuple[str, int]] = self._version.pre
-        return _pre
-
-    @property
-    def post(self) -> Optional[int]:
-        return self._version.post[1] if self._version.post else None
-
-    @property
-    def dev(self) -> Optional[int]:
-        return self._version.dev[1] if self._version.dev else None
-
-    @property
-    def local(self) -> Optional[str]:
-        if self._version.local:
-            return ".".join(str(x) for x in self._version.local)
-        else:
-            return None
-
-    @property
-    def public(self) -> str:
+    def public(self):
         return str(self).split("+", 1)[0]
 
     @property
-    def base_version(self) -> str:
+    def base_version(self):
         parts = []
 
         # Epoch
-        if self.epoch != 0:
-            parts.append(f"{self.epoch}!")
+        if self._version.epoch != 0:
+            parts.append("{0}!".format(self._version.epoch))
 
         # Release segment
-        parts.append(".".join(str(x) for x in self.release))
+        parts.append(".".join(str(x) for x in self._version.release))
 
         return "".join(parts)
 
     @property
-    def is_prerelease(self) -> bool:
-        return self.dev is not None or self.pre is not None
-
-    @property
-    def is_postrelease(self) -> bool:
-        return self.post is not None
-
-    @property
-    def is_devrelease(self) -> bool:
-        return self.dev is not None
-
-    @property
-    def major(self) -> int:
-        return self.release[0] if len(self.release) >= 1 else 0
+    def local(self):
+        version_string = str(self)
+        if "+" in version_string:
+            return version_string.split("+", 1)[1]
 
     @property
-    def minor(self) -> int:
-        return self.release[1] if len(self.release) >= 2 else 0
+    def is_prerelease(self):
+        return bool(self._version.dev or self._version.pre)
 
     @property
-    def micro(self) -> int:
-        return self.release[2] if len(self.release) >= 3 else 0
+    def is_postrelease(self):
+        return bool(self._version.post)
 
 
-def _parse_letter_version(
-    letter: str, number: Union[str, bytes, SupportsInt]
-) -> Optional[Tuple[str, int]]:
-
+def _parse_letter_version(letter, number):
     if letter:
         # We consider there to be an implicit 0 in a pre-release if there is
         # not a numeral associated with it.
@@ -495,40 +400,34 @@ def _parse_letter_version(
 
         return letter, int(number)
 
-    return None
-
 
-_local_version_separators = re.compile(r"[\._-]")
+_local_version_seperators = re.compile(r"[\._-]")
 
 
-def _parse_local_version(local: str) -> Optional[LocalType]:
+def _parse_local_version(local):
     """
     Takes a string like abc.1.twelve and turns it into ("abc", 1, "twelve").
     """
     if local is not None:
         return tuple(
             part.lower() if not part.isdigit() else int(part)
-            for part in _local_version_separators.split(local)
+            for part in _local_version_seperators.split(local)
         )
-    return None
-
 
-def _cmpkey(
-    epoch: int,
-    release: Tuple[int, ...],
-    pre: Optional[Tuple[str, int]],
-    post: Optional[Tuple[str, int]],
-    dev: Optional[Tuple[str, int]],
-    local: Optional[Tuple[SubLocalType]],
-) -> CmpKey:
 
+def _cmpkey(epoch, release, pre, post, dev, local):
     # When we compare a release version, we want to compare it with all of the
     # trailing zeros removed. So we'll use a reverse the list, drop all the now
     # leading zeros until we come to something non zero, then take the rest
     # re-reverse it back into the correct order and make it a tuple and use
     # that for our sorting key.
-    _release = tuple(
-        reversed(list(itertools.dropwhile(lambda x: x == 0, reversed(release))))
+    release = tuple(
+        reversed(list(
+            itertools.dropwhile(
+                lambda x: x == 0,
+                reversed(release),
+            )
+        ))
     )
 
     # We need to "trick" the sorting algorithm to put 1.0.dev0 before 1.0a0.
@@ -536,31 +435,23 @@ def _cmpkey(
     # if there is not a pre or a post segment. If we have one of those then
     # the normal sorting rules will handle this case correctly.
     if pre is None and post is None and dev is not None:
-        _pre: PrePostDevType = NegativeInfinity
+        pre = -Infinity
     # Versions without a pre-release (except as noted above) should sort after
     # those with one.
     elif pre is None:
-        _pre = Infinity
-    else:
-        _pre = pre
+        pre = Infinity
 
     # Versions without a post segment should sort before those with one.
     if post is None:
-        _post: PrePostDevType = NegativeInfinity
-
-    else:
-        _post = post
+        post = -Infinity
 
     # Versions without a development segment should sort after those with one.
     if dev is None:
-        _dev: PrePostDevType = Infinity
-
-    else:
-        _dev = dev
+        dev = Infinity
 
     if local is None:
         # Versions without a local segment should sort before those with one.
-        _local: LocalType = NegativeInfinity
+        local = -Infinity
     else:
         # Versions with a local segment need that segment parsed to implement
         # the sorting rules in PEP440.
@@ -569,8 +460,9 @@ def _cmpkey(
         # - Numeric segments sort numerically
         # - Shorter versions sort before longer versions when the prefixes
         #   match exactly
-        _local = tuple(
-            (i, "") if isinstance(i, int) else (NegativeInfinity, i) for i in local
+        local = tuple(
+            (i, "") if isinstance(i, int) else (-Infinity, i)
+            for i in local
         )
 
-    return epoch, _release, _pre, _post, _dev, _local
+    return epoch, release, pre, post, dev, local

From 1ad3419100f7212a24868b750d8e1645757bb6b8 Mon Sep 17 00:00:00 2001
From: Maxim Styushin 
Date: Mon, 3 Mar 2025 20:28:13 +0400
Subject: [PATCH 098/106] fix: skip plugin initialization

- don't initialize BGWriter and Checkpoint plugins if PG metrics collecton was disabled
---
 mamonsu/plugins/pgsql/bgwriter.py   | 111 ++++++++++++------------
 mamonsu/plugins/pgsql/checkpoint.py | 129 ++++++++++++++--------------
 2 files changed, 121 insertions(+), 119 deletions(-)

diff --git a/mamonsu/plugins/pgsql/bgwriter.py b/mamonsu/plugins/pgsql/bgwriter.py
index 2ca2d70..9615b70 100644
--- a/mamonsu/plugins/pgsql/bgwriter.py
+++ b/mamonsu/plugins/pgsql/bgwriter.py
@@ -18,61 +18,62 @@ class BgWriter(Plugin):
 
     def __init__(self, config):
         super(BgWriter, self).__init__(config)
-        if Pooler.server_version_less("17"):
-            self.Items = [
-                # key, zbx_key, description,
-                #    ('graph name', color, side), units, delta
-
-                ("buffers_checkpoint", "bgwriter[buffers_checkpoint]",
-                 "Buffers Written During Checkpoints",
-                 ("PostgreSQL bgwriter", "006AAE", 1),
-                 Plugin.DELTA.simple_change),
-
-                ("buffers_clean", "bgwriter[buffers_clean]",
-                 "Buffers Written",
-                 ("PostgreSQL bgwriter", "00CC00", 1),
-                 Plugin.DELTA.simple_change),
-
-                ("maxwritten_clean", "bgwriter[maxwritten_clean]",
-                 "Number of bgwriter Stopped by Max Write Count",
-                 ("PostgreSQL bgwriter", "FF5656", 0),
-                 Plugin.DELTA.simple_change),
-
-                ("buffers_backend", "bgwriter[buffers_backend]",
-                 "Buffers Written Directly by a Backend",
-                 ("PostgreSQL bgwriter", "9C8A4E", 1),
-                 Plugin.DELTA.simple_change),
-
-                ("buffers_backend_fsync", "bgwriter[buffers_backend_fsync]",
-                 "Times a Backend Execute Its Own Fsync",
-                 ("PostgreSQL bgwriter", "00CC00", 0),
-                 Plugin.DELTA.simple_change),
-
-                ("buffers_alloc", "bgwriter[buffers_alloc]",
-                 "Buffers Allocated",
-                 ("PostgreSQL bgwriter", "FF5656", 1),
-                 Plugin.DELTA.simple_change)
-            ]
-        else:
-            self.Items = [
-                # key, zbx_key, description,
-                #    ('graph name', color, side), units, delta
-
-                ("buffers_clean", "bgwriter[buffers_clean]",
-                 "Buffers Written",
-                 ("PostgreSQL bgwriter", "00CC00", 1),
-                 Plugin.DELTA.simple_change),
-
-                ("maxwritten_clean", "bgwriter[maxwritten_clean]",
-                 "Number of bgwriter Stopped by Max Write Count",
-                 ("PostgreSQL bgwriter", "FF5656", 0),
-                 Plugin.DELTA.simple_change),
-
-                ("buffers_alloc", "bgwriter[buffers_alloc]",
-                 "Buffers Allocated",
-                 ("PostgreSQL bgwriter", "FF5656", 1),
-                 Plugin.DELTA.simple_change)
-            ]
+        if self.is_enabled():
+            if Pooler.server_version_less("17"):
+                self.Items = [
+                    # key, zbx_key, description,
+                    #    ('graph name', color, side), units, delta
+
+                    ("buffers_checkpoint", "bgwriter[buffers_checkpoint]",
+                     "Buffers Written During Checkpoints",
+                     ("PostgreSQL bgwriter", "006AAE", 1),
+                     Plugin.DELTA.simple_change),
+
+                    ("buffers_clean", "bgwriter[buffers_clean]",
+                     "Buffers Written",
+                     ("PostgreSQL bgwriter", "00CC00", 1),
+                     Plugin.DELTA.simple_change),
+
+                    ("maxwritten_clean", "bgwriter[maxwritten_clean]",
+                     "Number of bgwriter Stopped by Max Write Count",
+                     ("PostgreSQL bgwriter", "FF5656", 0),
+                     Plugin.DELTA.simple_change),
+
+                    ("buffers_backend", "bgwriter[buffers_backend]",
+                     "Buffers Written Directly by a Backend",
+                     ("PostgreSQL bgwriter", "9C8A4E", 1),
+                     Plugin.DELTA.simple_change),
+
+                    ("buffers_backend_fsync", "bgwriter[buffers_backend_fsync]",
+                     "Times a Backend Execute Its Own Fsync",
+                     ("PostgreSQL bgwriter", "00CC00", 0),
+                     Plugin.DELTA.simple_change),
+
+                    ("buffers_alloc", "bgwriter[buffers_alloc]",
+                     "Buffers Allocated",
+                     ("PostgreSQL bgwriter", "FF5656", 1),
+                     Plugin.DELTA.simple_change)
+                ]
+            else:
+                self.Items = [
+                    # key, zbx_key, description,
+                    #    ('graph name', color, side), units, delta
+
+                    ("buffers_clean", "bgwriter[buffers_clean]",
+                     "Buffers Written",
+                     ("PostgreSQL bgwriter", "00CC00", 1),
+                     Plugin.DELTA.simple_change),
+
+                    ("maxwritten_clean", "bgwriter[maxwritten_clean]",
+                     "Number of bgwriter Stopped by Max Write Count",
+                     ("PostgreSQL bgwriter", "FF5656", 0),
+                     Plugin.DELTA.simple_change),
+
+                    ("buffers_alloc", "bgwriter[buffers_alloc]",
+                     "Buffers Allocated",
+                     ("PostgreSQL bgwriter", "FF5656", 1),
+                     Plugin.DELTA.simple_change)
+                ]
 
     def run(self, zbx):
         columns = [x[0] for x in self.Items]
diff --git a/mamonsu/plugins/pgsql/checkpoint.py b/mamonsu/plugins/pgsql/checkpoint.py
index 80eff40..c1ca9ac 100644
--- a/mamonsu/plugins/pgsql/checkpoint.py
+++ b/mamonsu/plugins/pgsql/checkpoint.py
@@ -21,70 +21,71 @@ class Checkpoint(Plugin):
 
     def __init__(self, config):
         super(Checkpoint, self).__init__(config)
-        if Pooler.server_version_less("17"):
-            self.query = """
-            SELECT {0}
-            FROM pg_catalog.pg_stat_bgwriter;
-            """  # for mamonsu and agent
-            self.query_interval = """
-            SELECT {0}*3600
-            FROM pg_catalog.pg_stat_bgwriter;
-            """  # for mamonsu and agent checkpoints in hour
-            self.Items = [
-                # key, zbx_key, description,
-                #    ('graph name', color, side), units, delta, factor
-                ("checkpoints_timed", "count_timed",
-                 "by Timeout (in hour)",
-                 ("PostgreSQL Checkpoints: Count (in hour)", "00CC00", 0),
-                 Plugin.UNITS.none, Plugin.DELTA.speed_per_second, 60 * 60),
-
-                ("checkpoints_req", "count_wal",
-                 "by WAL (in hour)",
-                 ("PostgreSQL Checkpoints: Count (in hour)", "FF5656", 0),
-                 Plugin.UNITS.none, Plugin.DELTA.speed_per_second, 60 * 60),
-
-                ("checkpoint_write_time", "write_time",
-                 "Write Time",
-                 ("PostgreSQL Checkpoints: Write/Sync", "00CC00", 1),
-                 Plugin.UNITS.ms, Plugin.DELTA.speed_per_second, 1),
-
-                ("checkpoint_sync_time", "checkpoint_sync_time",
-                 "Sync Time",
-                 ("PostgreSQL Checkpoints: Write/Sync", "FF5656", 1),
-                 Plugin.UNITS.ms, Plugin.DELTA.speed_per_second, 1)
-            ]
-        else:
-            self.query = """
-            SELECT {0}
-            FROM pg_catalog.pg_stat_checkpointer;
-            """  # for mamonsu and agent
-            self.query_interval = """
-            SELECT {0}*3600
-            FROM pg_catalog.pg_stat_checkpointer;
-            """  # for mamonsu and agent checkpoints in hour
-            self.Items = [
-                # key, zbx_key, description,
-                #    ('graph name', color, side), units, delta, factor
-                ("num_timed", "count_timed",
-                 "by Timeout (in hour)",
-                 ("PostgreSQL Checkpoints: Count (in hour)", "00CC00", 0),
-                 Plugin.UNITS.none, Plugin.DELTA.speed_per_second, 60 * 60),
-
-                ("num_requested", "count_wal",
-                 "by WAL (in hour)",
-                 ("PostgreSQL Checkpoints: Count (in hour)", "FF5656", 0),
-                 Plugin.UNITS.none, Plugin.DELTA.speed_per_second, 60 * 60),
-
-                ("write_time", "write_time",
-                 "Write Time",
-                 ("PostgreSQL Checkpoints: Write/Sync", "00CC00", 1),
-                 Plugin.UNITS.ms, Plugin.DELTA.speed_per_second, 1),
-
-                ("sync_time", "checkpoint_sync_time",
-                 "Sync Time",
-                 ("PostgreSQL Checkpoints: Write/Sync", "FF5656", 1),
-                 Plugin.UNITS.ms, Plugin.DELTA.speed_per_second, 1)
-            ]
+        if self.is_enabled():
+            if Pooler.server_version_less("17"):
+                self.query = """
+                SELECT {0}
+                FROM pg_catalog.pg_stat_bgwriter;
+                """  # for mamonsu and agent
+                self.query_interval = """
+                SELECT {0}*3600
+                FROM pg_catalog.pg_stat_bgwriter;
+                """  # for mamonsu and agent checkpoints in hour
+                self.Items = [
+                    # key, zbx_key, description,
+                    #    ('graph name', color, side), units, delta, factor
+                    ("checkpoints_timed", "count_timed",
+                     "by Timeout (in hour)",
+                     ("PostgreSQL Checkpoints: Count (in hour)", "00CC00", 0),
+                     Plugin.UNITS.none, Plugin.DELTA.speed_per_second, 60 * 60),
+
+                    ("checkpoints_req", "count_wal",
+                     "by WAL (in hour)",
+                     ("PostgreSQL Checkpoints: Count (in hour)", "FF5656", 0),
+                     Plugin.UNITS.none, Plugin.DELTA.speed_per_second, 60 * 60),
+
+                    ("checkpoint_write_time", "write_time",
+                     "Write Time",
+                     ("PostgreSQL Checkpoints: Write/Sync", "00CC00", 1),
+                     Plugin.UNITS.ms, Plugin.DELTA.speed_per_second, 1),
+
+                    ("checkpoint_sync_time", "checkpoint_sync_time",
+                     "Sync Time",
+                     ("PostgreSQL Checkpoints: Write/Sync", "FF5656", 1),
+                     Plugin.UNITS.ms, Plugin.DELTA.speed_per_second, 1)
+                ]
+            else:
+                self.query = """
+                SELECT {0}
+                FROM pg_catalog.pg_stat_checkpointer;
+                """  # for mamonsu and agent
+                self.query_interval = """
+                SELECT {0}*3600
+                FROM pg_catalog.pg_stat_checkpointer;
+                """  # for mamonsu and agent checkpoints in hour
+                self.Items = [
+                    # key, zbx_key, description,
+                    #    ('graph name', color, side), units, delta, factor
+                    ("num_timed", "count_timed",
+                     "by Timeout (in hour)",
+                     ("PostgreSQL Checkpoints: Count (in hour)", "00CC00", 0),
+                     Plugin.UNITS.none, Plugin.DELTA.speed_per_second, 60 * 60),
+
+                    ("num_requested", "count_wal",
+                     "by WAL (in hour)",
+                     ("PostgreSQL Checkpoints: Count (in hour)", "FF5656", 0),
+                     Plugin.UNITS.none, Plugin.DELTA.speed_per_second, 60 * 60),
+
+                    ("write_time", "write_time",
+                     "Write Time",
+                     ("PostgreSQL Checkpoints: Write/Sync", "00CC00", 1),
+                     Plugin.UNITS.ms, Plugin.DELTA.speed_per_second, 1),
+
+                    ("sync_time", "checkpoint_sync_time",
+                     "Sync Time",
+                     ("PostgreSQL Checkpoints: Write/Sync", "FF5656", 1),
+                     Plugin.UNITS.ms, Plugin.DELTA.speed_per_second, 1)
+                ]
 
     def run(self, zbx):
         columns = [x[0] for x in self.Items]

From 973a30f447bed9ec1c071534074318b430e00ae2 Mon Sep 17 00:00:00 2001
From: Maxim Styushin 
Date: Mon, 3 Mar 2025 20:45:33 +0400
Subject: [PATCH 099/106] doc: string interpolation feature in agent.conf

---
 documentation/configuration_file.md | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/documentation/configuration_file.md b/documentation/configuration_file.md
index 940102c..0cabd35 100644
--- a/documentation/configuration_file.md
+++ b/documentation/configuration_file.md
@@ -10,6 +10,8 @@ All parameters must be specified in the `parameter = value` format.
 
 > **_NOTE:_**  It is necessary to check permissions to the _mamonsu_ user to directories/files for correct interaction of agent with them. By default configuration file _agent.conf_ should have read/write permissions for _mamonsu_ user only.
 
+> **_NOTE:_**  Config file supports string interpolation via _%()s_ syntax in parameter values. please see “[Parameter Values Interpolation](#parameter-values-interpolation)” below.
+
 ***
 
 ### Connection Parameters
@@ -237,3 +239,22 @@ By default this plugin is disabled. To enable it set the enabled parameter to Tr
 This plugin collects two metrics: *pg_probackup.dir.size[#backup_directory]* (the size of the target directory) and *pg_probackup.dir.error[#backup_directory]* (backup errors) for each specified *backup_directory*.
 
 If any generated backup has bad status, like ERROR, CORRUPT, ORPHAN, а trigger is fired.
+
+### Parameter Values Interpolation
+
+Mamonsu uses python3 built-in configparser library which allows defining arbitary variables in any config section and then reuse it within the same config section.
+
+Example:
+```editorconfig
+[postgres]
+pg = postgres
+enabled = True
+user = %(pg)s
+password = %(pg)s
+database = %(pg)s
+port = 5432
+application_name = %(pg)s
+query_timeout = 10
+```
+
+What is important to note here is that you cannot use symbol _%_ in any parameter's value since it will be treated as an interolation syntax.

From 81de16451ee162fa647852e629eb7d83023ea635 Mon Sep 17 00:00:00 2001
From: Maxim Styushin 
Date: Wed, 5 Mar 2025 18:47:46 +0400
Subject: [PATCH 100/106] build: upgrade to 3.5.12

---
 .github/workflows/mamonsu-tests-dev.yml                    | 2 +-
 .github/workflows/mamonsu-tests-master.yml                 | 2 +-
 github-actions-tests/mamonsu_build.sh                      | 4 ++--
 .../sources/{agent_3.5.11.conf => agent_3.5.12.conf}       | 0
 mamonsu/__init__.py                                        | 2 +-
 packaging/debian/changelog                                 | 5 +++++
 packaging/rpm/SPECS/mamonsu.spec                           | 7 ++++++-
 packaging/win/mamonsu.def.nsh                              | 2 +-
 8 files changed, 17 insertions(+), 7 deletions(-)
 rename github-actions-tests/sources/{agent_3.5.11.conf => agent_3.5.12.conf} (100%)

diff --git a/.github/workflows/mamonsu-tests-dev.yml b/.github/workflows/mamonsu-tests-dev.yml
index 368d655..0336b7c 100644
--- a/.github/workflows/mamonsu-tests-dev.yml
+++ b/.github/workflows/mamonsu-tests-dev.yml
@@ -86,7 +86,7 @@ jobs:
           echo "zabbix_address=$(hostname -I | awk '{print $1}')" >> $GITHUB_OUTPUT
         id: zabbix_address
       - name: Edit Zabbix address in agent.conf
-        run: sed -i "s/\(address *= *\).*/\1 ${{ steps.zabbix_address.outputs.zabbix_address }}/" ${{ env.MAMONSU_PATH }}/github-actions-tests/sources/agent_3.5.11.conf
+        run: sed -i "s/\(address *= *\).*/\1 ${{ steps.zabbix_address.outputs.zabbix_address }}/" ${{ env.MAMONSU_PATH }}/github-actions-tests/sources/agent_3.5.12.conf
 
       - name: Copy test scripts to container
         run: docker exec $( echo "${{ matrix.docker_os }}" | sed 's/://' | sed 's/\.//' ) mkdir -p -m 755 /mamonsu/
diff --git a/.github/workflows/mamonsu-tests-master.yml b/.github/workflows/mamonsu-tests-master.yml
index d7072ba..6dfb86d 100644
--- a/.github/workflows/mamonsu-tests-master.yml
+++ b/.github/workflows/mamonsu-tests-master.yml
@@ -91,7 +91,7 @@ jobs:
           echo "zabbix_address=$(hostname -I | awk '{print $1}')" >> $GITHUB_OUTPUT
         id: zabbix_address
       - name: Edit Zabbix address in agent.conf
-        run: sed -i "s/\(address *= *\).*/\1 ${{ steps.zabbix_address.outputs.zabbix_address }}/" ${{ env.MAMONSU_PATH }}/github-actions-tests/sources/agent_3.5.11.conf
+        run: sed -i "s/\(address *= *\).*/\1 ${{ steps.zabbix_address.outputs.zabbix_address }}/" ${{ env.MAMONSU_PATH }}/github-actions-tests/sources/agent_3.5.12.conf
 
       - name: Copy test scripts to container
         run: docker exec $( echo "${{ matrix.docker_os }}" | sed 's/://' | sed 's/\.//' ) mkdir -p -m 755 /mamonsu/
diff --git a/github-actions-tests/mamonsu_build.sh b/github-actions-tests/mamonsu_build.sh
index def1505..a766806 100644
--- a/github-actions-tests/mamonsu_build.sh
+++ b/github-actions-tests/mamonsu_build.sh
@@ -41,7 +41,7 @@ if [ "${OS%:*}" = "centos" ]; then
     python3 setup.py build && python3 setup.py install
     make rpm
     sudo rpm -i ./mamonsu*.rpm
-    cat /mamonsu/github-actions-tests/sources/agent_3.5.11.conf > /etc/mamonsu/agent.conf
+    cat /mamonsu/github-actions-tests/sources/agent_3.5.12.conf > /etc/mamonsu/agent.conf
     # ensuring mamonsu can actually start
     sudo su -s /bin/bash -c "mamonsu bootstrap -x --user postgres -d mamonsu_test_db" mamonsu
     /etc/init.d/mamonsu restart
@@ -65,7 +65,7 @@ elif [ "${OS%:*}" = "ubuntu" ]; then
     python3 setup.py build && python3 setup.py install
     make deb
     sudo dpkg -i ./mamonsu*.deb
-    cat /mamonsu/github-actions-tests/sources/agent_3.5.11.conf > /etc/mamonsu/agent.conf
+    cat /mamonsu/github-actions-tests/sources/agent_3.5.12.conf > /etc/mamonsu/agent.conf
     # ensuring mamonsu can actually start
     sudo su -s /bin/bash -c "mamonsu bootstrap -x --user postgres -d mamonsu_test_db" mamonsu
     service mamonsu restart
diff --git a/github-actions-tests/sources/agent_3.5.11.conf b/github-actions-tests/sources/agent_3.5.12.conf
similarity index 100%
rename from github-actions-tests/sources/agent_3.5.11.conf
rename to github-actions-tests/sources/agent_3.5.12.conf
diff --git a/mamonsu/__init__.py b/mamonsu/__init__.py
index 0265a12..b43c491 100644
--- a/mamonsu/__init__.py
+++ b/mamonsu/__init__.py
@@ -1,7 +1,7 @@
 __author__ = 'Dmitry Vasilyev'
 __author_email__ = 'info@postgrespro.ru'
 __description__ = 'Monitoring agent for PostgreSQL'
-__version__ = '3.5.11'
+__version__ = '3.5.12'
 __licence__ = 'BSD'
 
 __url__ = 'https://github.com/postgrespro/mamonsu'
diff --git a/packaging/debian/changelog b/packaging/debian/changelog
index ab3c0ff..218931a 100644
--- a/packaging/debian/changelog
+++ b/packaging/debian/changelog
@@ -1,3 +1,8 @@
+mamonsu (3.5.12-1) stable; urgency=low
+  * Port version parser code from public archive of pypa/pkg_resources;
+  * Thread-safe implementation of connection cache;
+  * Skip BGwriter and Checkpoint plugins initialization if Postgres metrics collection was explicitly disabled;
+
 mamonsu (3.5.11-1) stable; urgency=low
   * Updated statements plugin: added support for pgpro_stats 1.8;
   * Fixed types for count_wal_lag_lsn() function (int to bigint);
diff --git a/packaging/rpm/SPECS/mamonsu.spec b/packaging/rpm/SPECS/mamonsu.spec
index 7c44f1d..dcc7c9f 100644
--- a/packaging/rpm/SPECS/mamonsu.spec
+++ b/packaging/rpm/SPECS/mamonsu.spec
@@ -1,5 +1,5 @@
 Name:           mamonsu
-Version:        3.5.11
+Version:        3.5.12
 Release:        1%{?dist}
 Summary:        Monitoring agent for PostgreSQL
 Group:          Applications/Internet
@@ -73,6 +73,11 @@ chown -R mamonsu:mamonsu /var/log/mamonsu
 chown -R mamonsu:mamonsu /etc/mamonsu
 
 %changelog
+* Wed Mar 5 2025 Maxim Styushin   - 3.5.12-1
+  - Port version parser code from public archive of pypa/pkg_resources;
+  - Thread-safe implementation of connection cache;
+  - Skip BGwriter and Checkpoint plugins initialization if Postgres metrics collection was explicitly disabled;
+
 * Wed Jan 15 2025 Maxim Styushin   - 3.5.11-1
   - Updated statements plugin: added support for pgpro_stats 1.8;
   - Fixed types for count_wal_lag_lsn() function (int to bigint);
diff --git a/packaging/win/mamonsu.def.nsh b/packaging/win/mamonsu.def.nsh
index 8138fe3..1b60f1c 100644
--- a/packaging/win/mamonsu.def.nsh
+++ b/packaging/win/mamonsu.def.nsh
@@ -1,5 +1,5 @@
 !define NAME Mamonsu
-!define VERSION 3.5.11
+!define VERSION 3.5.12
 !define MAMONSU_REG_PATH "Software\PostgresPro\Mamonsu"
 !define MAMONSU_REG_UNINSTALLER_PATH "Software\Microsoft\Windows\CurrentVersion\Uninstall"
 !define EDB_REG "SOFTWARE\Postgresql"

From 42703d81d618a815a027336de230988d7ec466f4 Mon Sep 17 00:00:00 2001
From: Andrew Papsujko 
Date: Mon, 19 May 2025 17:31:03 +0300
Subject: [PATCH 101/106] fix: deadlock in send queue

---
 mamonsu/lib/queue.py | 26 +++++++++++---------------
 1 file changed, 11 insertions(+), 15 deletions(-)

diff --git a/mamonsu/lib/queue.py b/mamonsu/lib/queue.py
index 96ceadf..e348fc4 100644
--- a/mamonsu/lib/queue.py
+++ b/mamonsu/lib/queue.py
@@ -10,25 +10,21 @@ def __init__(self):
         self.lock = threading.Lock()
 
     def add(self, metric):
-        self.lock.acquire()
-        self.queue.insert(0, metric)
-        self.lock.release()
+        with self.lock:
+            self.queue.insert(0, metric)
 
     # replace last metric
     def replace(self, metric):
-        self.lock.acquire()
-        self.queue.pop()
-        self.queue.append(metric)
-        self.lock.release()
+        with self.lock:
+            if self.queue:
+                self.queue.pop()
+            self.queue.append(metric)
 
     def size(self):
-        self.lock.acquire()
-        result = len(self.queue)
-        self.lock.release()
-        return result
+        with self.lock:
+            return len(self.queue)
 
     def flush(self):
-        self.lock.acquire()
-        result, self.queue = self.queue, []
-        self.lock.release()
-        return result
+        with self.lock:
+            result, self.queue = self.queue, []
+            return result

From 8c198ef48118e70a1a0d7b1386068868ff2de6ce Mon Sep 17 00:00:00 2001
From: Andrew Papsujko 
Date: Wed, 21 May 2025 11:04:51 +0300
Subject: [PATCH 102/106] fix: added cgroup2 to excluded fs types

---
 mamonsu/plugins/system/linux/disk_sizes.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mamonsu/plugins/system/linux/disk_sizes.py b/mamonsu/plugins/system/linux/disk_sizes.py
index 898c2c0..d461812 100644
--- a/mamonsu/plugins/system/linux/disk_sizes.py
+++ b/mamonsu/plugins/system/linux/disk_sizes.py
@@ -20,7 +20,7 @@ class DiskSizes(Plugin):
 
     ExcludeFsTypes = [
         "none", "unknown", "rootfs", "iso9660", "squashfs", "udf", "romfs", "ramfs", "debugfs", "cgroup", "cgroup_root",
-        "pstore", "devtmpfs", "autofs", "cgroup", "configfs", "devpts", "efivarfs", "fusectl", "fuse.gvfsd-fuse",
+        "pstore", "devtmpfs", "autofs", "cgroup2", "configfs", "devpts", "efivarfs", "fusectl", "fuse.gvfsd-fuse",
         "hugetlbfs", "mqueue", "binfmt_misc", "nfsd", "proc", "pstore", "selinuxfs", "rpc_pipefs", "securityfs",
         "sysfs", "nsfs", "tmpfs", "tracefs"
     ]

From 5299263670f22cf5682076e5f601427a30bb90f6 Mon Sep 17 00:00:00 2001
From: Andrew Papsujko 
Date: Fri, 16 May 2025 12:32:51 +0300
Subject: [PATCH 103/106] feat: added metric that shows bytes held by
 non-active replication slot and according trigger

---
 documentation/metrics.md             | 64 +++++++++++++++++++++++++-
 mamonsu/lib/default_config.py        |  2 +
 mamonsu/lib/platform.py              |  1 +
 mamonsu/plugins/pgsql/driver/pool.py | 26 ++++++++++-
 mamonsu/plugins/pgsql/replication.py | 69 ++++++++++++++++++++++++++--
 mamonsu/tools/bootstrap/sql.py       | 17 +++++++
 6 files changed, 172 insertions(+), 7 deletions(-)

diff --git a/documentation/metrics.md b/documentation/metrics.md
index 15ef4a1..d507a8e 100644
--- a/documentation/metrics.md
+++ b/documentation/metrics.md
@@ -3691,7 +3691,8 @@ Default config:
 ### Replication
 
 Default config:  
-        lag_more_than_in_sec = 300
+        lag_more_than_in_sec = 300\
+        critical_bytes_held_by_non_active_slot = 1073741824 bytes
 
 ### Items
 
@@ -3763,6 +3764,37 @@ Default config:
    
     *Non-active Replication Slots* calculates as count of slots with `false` active status.
 
+- **Bytes Held By Non-active Replication Slots**  
+   
+    Zabbix item:  
+    
+ + + + + + + + + + + + + + + + + + + + + + + + +
NamePostgreSQL Replication: Bytes held by non-active slot {#NON_ACTIVE_SLOT_NAME}
Keypgsql.replication.non_active_slots_discovery[]
TypeNumeric (float)
UnitsBytes
DeltaAs Is
Supported Version10+
+ + *Non-active Replication Slots* calculates as count of slots with `false` active status. - **Streaming Replication Lag** @@ -3861,12 +3893,40 @@ Default config: +- **PostgreSQL Replication: Non-active Slots Discovery** + + Items: + + + + + + + + + + + + + + + + + + + + + +
NamePostgreSQL Replication: Bytes held by non-active slot {#NON_ACTIVE_SLOT_NAME}
Keypgsql.replication.non_active_slots_discovery[]
TypeNumeric (float)
UnitsBytes
DeltaAs Is
+ ### Triggers - **PostgreSQL Instance: server mode has been changed on {HOSTNAME} to {ITEM.LASTVALUE}** - **PostgreSQL number of non-active replication slots on {HOSTNAME} (value={ITEM.LASTVALUE})** - + Disabled by default +- **PostgreSQL Replication: bytes held by slot {#NON_ACTIVE_SLOT_NAME} is too high (value={ITEM.LASTVALUE})** + Triggers if *PostgreSQL Replication: Bytes held by non-active slot {#NON_ACTIVE_SLOT_NAME}* exceeds `critical_bytes_held_by_non_active_slot`. - **PostgreSQL streaming lag too high on {HOSTNAME} (value={ITEM.LASTVALUE})** Triggers if *PostgreSQL Replication: Streaming Replication Lag* exceeds `lag_more_than_in_sec`. diff --git a/mamonsu/lib/default_config.py b/mamonsu/lib/default_config.py index c7f2d98..12791a1 100644 --- a/mamonsu/lib/default_config.py +++ b/mamonsu/lib/default_config.py @@ -35,6 +35,8 @@ def default_host(): host = os.environ.get('PGHOST') or 'auto' if platform.FREEBSD: host = os.environ.get('PGHOST') or 'auto' + if platform.DARWIN: + host = os.environ.get('PGHOST') or 'auto' return host @staticmethod diff --git a/mamonsu/lib/platform.py b/mamonsu/lib/platform.py index 5ea5faa..279200d 100644 --- a/mamonsu/lib/platform.py +++ b/mamonsu/lib/platform.py @@ -3,5 +3,6 @@ LINUX = (sys.platform == 'linux' or sys.platform == 'linux2') WINDOWS = (sys.platform == 'win32' or sys.platform == 'win64') FREEBSD = ('freebsd' in sys.platform) +DARWIN = sys.platform == 'darwin' UNIX = LINUX or FREEBSD INTEGER_TYPES = int, diff --git a/mamonsu/plugins/pgsql/driver/pool.py b/mamonsu/plugins/pgsql/driver/pool.py index 6576f92..a8433d9 100644 --- a/mamonsu/plugins/pgsql/driver/pool.py +++ b/mamonsu/plugins/pgsql/driver/pool.py @@ -86,7 +86,7 @@ class Pool(object): """ SELECT application_name, {0} - coalesce((pg_{1}_{2}_diff(pg_current_{1}_{2}(), replay_lsn))::int, 0) AS total_lag + coalesce((pg_{1}_{2}_diff(pg_current_{1}_{2}(), replay_{2}))::int, 0) AS total_lag FROM pg_stat_replication; """, """ @@ -95,6 +95,30 @@ class Pool(object): total_lag FROM mamonsu.count_{1}_lag_lsn(); """ + ), + "wal_held_bytes_master": ( + """ + SELECT slot_name, + coalesce((pg_wal_lsn_diff(pg_current_wal_lsn(), restart_lsn))::int, 0) AS wal_held_bytes + FROM pg_replication_slots; + """, + """ + SELECT slot_name, + wal_held_bytes + FROM mamonsu.bytes_held_by_inactive_slot_on_master(); + """ + ), + "wal_held_bytes_replica": ( + """ + SELECT slot_name, + coalesce((pg_wal_lsn_diff(pg_last_wal_replay_lsn(), restart_lsn))::int, 0) AS wal_held_bytes + FROM pg_replication_slots; + """, + """ + SELECT slot_name, + wal_held_bytes + FROM mamonsu.bytes_held_by_inactive_slot_on_replica(); + """ ) } diff --git a/mamonsu/plugins/pgsql/replication.py b/mamonsu/plugins/pgsql/replication.py index 8a51889..7ed701c 100644 --- a/mamonsu/plugins/pgsql/replication.py +++ b/mamonsu/plugins/pgsql/replication.py @@ -13,7 +13,8 @@ class Replication(Plugin): AgentPluginType = "pg" # key: (macro, value) plugin_macros = { - "critical_lag_seconds": [("macro", "{$CRITICAL_LAG_SECONDS}"), ("value", 60 * 5)] + "critical_lag_seconds": [("macro", "{$CRITICAL_LAG_SECONDS}"), ("value", 60 * 5)], + "critical_bytes_held_by_none_active_slot": [("macro", "{$CRITICAL_BYTES_HELD_BY_NON_ACTIVE_SLOT}"), ("value", 1024 * 1024 * 1024)] } # get time of replication lag @@ -30,8 +31,15 @@ class Replication(Plugin): WHERE active = 'false'; """ + query_bytes_held_by_non_active_slot = """ + SELECT slot_name, coalesce(pg_wal_lsn_diff(pg_current_wal_lsn(), restart_lsn)::bigint, 0) AS wal_size_bytes + FROM pg_replication_slots + WHERE active = 'false'; + """ + # for discovery rule for name of each replica key_lsn_replication_discovery = "pgsql.replication.discovery{0}" + key_replication_non_active_slots_discovery = "pgsql.replication.non_active_slots_discovery{0}" key_total_lag = "pgsql.replication.total_lag{0}" # for PG 10 and higher key_flush = "pgsql.replication.flush_lag{0}" @@ -42,6 +50,7 @@ class Replication(Plugin): key_replication = "pgsql.replication_lag{0}" key_non_active_slots = "pgsql.replication.non_active_slots{0}" + key_non_active_slots_held_bytes = "pgsql.replication.non_active_slots_held_bytes{0}" def run(self, zbx): @@ -79,6 +88,14 @@ def run(self, zbx): zbx.send("pgsql.replication.replay_lag[{0}]".format(info[0]), float(info[5])) zbx.send("pgsql.replication.discovery[]", zbx.json({"data": lags})) del lags + bytes_held_by_non_active_slot = Pooler.run_sql_type("wal_held_bytes_master", args=[]) + if bytes_held_by_non_active_slot: + discovery = [] + for info in bytes_held_by_non_active_slot: + discovery.append({"{#NON_ACTIVE_SLOT_NAME}": info[0]}) + zbx.send("pgsql.replication.non_active_slots_held_bytes[{0}]".format(info[0]), int(info[1])) + zbx.send("pgsql.replication.non_active_slots_discovery[]", zbx.json({"data": discovery})) + del discovery elif Pooler.is_superuser() or Pooler.is_bootstraped(): result_lags = Pooler.run_sql_type("wal_lag_lsn", args=[" ", "xlog", "location"]) if result_lags: @@ -90,7 +107,15 @@ def run(self, zbx): del lags else: self.disable_and_exit_if_not_superuser() - + else: + bytes_held_by_non_active_slot = Pooler.run_sql_type("wal_held_bytes_replica", args=[]) + if bytes_held_by_non_active_slot: + discovery = [] + for info in bytes_held_by_non_active_slot: + discovery.append({"{#NON_ACTIVE_SLOT_NAME}": info[0]}) + zbx.send("pgsql.replication.non_active_slots_held_bytes[{0}]".format(info[0]), int(info[1])) + zbx.send("pgsql.replication.non_active_slots_discovery[]", zbx.json({"data": discovery})) + del discovery non_active_slots = Pooler.query(self.query_non_active_slots) zbx.send(self.key_non_active_slots.format("[]"), int(non_active_slots[0][0])) @@ -132,7 +157,8 @@ def triggers(self, template, dashboard=False): }) + template.trigger({ "name": "PostgreSQL Replication: number of non-active replication slots on {HOSTNAME} (value={ITEM.LASTVALUE})", "expression": "{#TEMPLATE:" + self.right_type(self.key_non_active_slots) + ".last()}>" + str( - NUMBER_NON_ACTIVE_SLOTS) + NUMBER_NON_ACTIVE_SLOTS), + "status": 1 }) return triggers @@ -198,7 +224,42 @@ def discovery_rules(self, template, dashboard=False): ] } ] - return template.discovery_rule(rule=rule, conditions=conditions, items=items, graphs=graphs) + active_slots_discovery_rule = template.discovery_rule(rule=rule, conditions=conditions, items=items, graphs=graphs) + + rule = { + "name": "PostgreSQL Replication: Non Active Slots Discovery", + "key": self.key_replication_non_active_slots_discovery.format("[{0}]".format(self.Macros[self.Type])) + } + if Plugin.old_zabbix: + conditions = [] + rule["filter"] = "{#NON_ACTIVE_SLOT_NAME}:.*" + else: + conditions = [{ + "condition": [ + {"macro": "{#NON_ACTIVE_SLOT_NAME}", + "value": ".*", + "operator": 8, + "formulaid": "A"} + ] + }] + items = [ + {"key": self.right_type(self.key_non_active_slots_held_bytes, var_discovery="{#NON_ACTIVE_SLOT_NAME},"), + "name": "PostgreSQL Replication: Bytes held by non-active slot {#NON_ACTIVE_SLOT_NAME}", + "value_type": Plugin.VALUE_TYPE.numeric_float, + "delay": self.plugin_config("interval"), + "drawtype": 2} + ] + graphs = [] + triggers = [ + { + "name": "PostgreSQL Replication: bytes held by slot {#NON_ACTIVE_SLOT_NAME} is too high (value={ITEM.LASTVALUE})", + "expression": "{#TEMPLATE:" + self.right_type(self.key_non_active_slots_held_bytes, var_discovery="{#NON_ACTIVE_SLOT_NAME},") + ".last()}>" + + self.plugin_macros["critical_bytes_held_by_none_active_slot"][0][1] + } + ] + non_active_slots_discovery_rule = template.discovery_rule(rule=rule, conditions=conditions, items=items, graphs=graphs, triggers=triggers) + + return active_slots_discovery_rule + non_active_slots_discovery_rule def keys_and_queries(self, template_zabbix): result = [] diff --git a/mamonsu/tools/bootstrap/sql.py b/mamonsu/tools/bootstrap/sql.py index f37be0f..bf99442 100644 --- a/mamonsu/tools/bootstrap/sql.py +++ b/mamonsu/tools/bootstrap/sql.py @@ -236,6 +236,23 @@ coalesce((pg_{7}_diff(pg_current_{7}(), replay_{9}))::bigint, 0) AS total_lag FROM pg_stat_replication $$ LANGUAGE SQL SECURITY DEFINER; + +DROP FUNCTION IF EXISTS mamonsu.bytes_held_by_inactive_slot_on_master(); +CREATE OR REPLACE FUNCTION mamonsu.bytes_held_by_inactive_slot_on_master() +RETURNS TABLE(slot_name TEXT, wal_held_bytes BIGINT) AS $$ +SELECT slot_name::TEXT, coalesce((pg_{7}_diff(pg_current_wal_lsn(), restart_lsn))::bigint, 0) AS wal_held_bytes +FROM pg_replication_slots +WHERE active = 'false' +$$ LANGUAGE SQL SECURITY DEFINER; + +DROP FUNCTION IF EXISTS mamonsu.bytes_held_by_inactive_slot_on_replica(); +CREATE OR REPLACE FUNCTION mamonsu.bytes_held_by_inactive_slot_on_replica() +RETURNS TABLE(slot_name TEXT, wal_held_bytes BIGINT) AS $$ +SELECT slot_name::TEXT, coalesce((pg_{7}_diff(pg_last_wal_replay_lsn(), restart_lsn))::bigint, 0) AS wal_held_bytes +FROM pg_replication_slots +WHERE active = 'false' +$$ LANGUAGE SQL SECURITY DEFINER; + """ CreatePgBuffercacheFunctionsSQL = """ From 671d9a946e97a9831c2bb8cf951ffce693739f6c Mon Sep 17 00:00:00 2001 From: Ytipytiman <61265312+Ytipytiman@users.noreply.github.com> Date: Thu, 12 Sep 2024 11:32:53 +0300 Subject: [PATCH 104/106] Update README.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit В процессе установки требуется скачать скрипт: ``` Install from repository using script: wget https://repo.postgrespro.ru/mamonsu/keys/pgpro-repo-add.sh ``` По данному пути скрипта нет, получаешь ошибку 404, скрипт можно скачать по ссылке: `https://repo.postgrespro.ru/mamonsu/mamonsu/keys/pgpro-repo-add.sh` Предлагаю исправить ошибку --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index a4f3076..fd6b6bf 100644 --- a/README.md +++ b/README.md @@ -179,7 +179,7 @@ Pre-built _mamonsu_ packages are provided in official Postgres Pro repository: [ **Install from repository using script:** ```shell -$ wget https://repo.postgrespro.ru/mamonsu/keys/pgpro-repo-add.sh +$ wget https://repo.postgrespro.ru/mamonsu/mamonsu/keys/pgpro-repo-add.sh $ sudo chmod 700 ./pgpro-repo-add.sh $ sudo ./pgpro-repo-add.sh ``` From f218ed4ab5683f04b007b09f9960c481330e8c1a Mon Sep 17 00:00:00 2001 From: Andrew Papsujko Date: Thu, 29 May 2025 16:34:26 +0300 Subject: [PATCH 105/106] build: upgrade to 3.5.13 --- .../sources/agent_3.5.13.conf | 210 ++++++++++++++++++ 1 file changed, 210 insertions(+) create mode 100644 github-actions-tests/sources/agent_3.5.13.conf diff --git a/github-actions-tests/sources/agent_3.5.13.conf b/github-actions-tests/sources/agent_3.5.13.conf new file mode 100644 index 0000000..076419e --- /dev/null +++ b/github-actions-tests/sources/agent_3.5.13.conf @@ -0,0 +1,210 @@ +# This is a configuration file for mamonsu +# To get more information about mamonsu, visit https://postgrespro.ru/docs/postgrespro/12/mamonsu + +######### Connection parameters sections ############## + +# specify connection parameters for the Postgres cluster +# in the user, password, and database fields, you must specify the mamonsu_user, mamonsu_password, +# and the mamonsu_database used for bootstrap, respectively. +# if you skipped the bootstrap, specify a superuser credentials and the database to connect to. + +[postgres] +enabled = True +user = mamonsu +password = mamonsu +database = mamonsu_test_db +host = localhost +port = 5432 +application_name = mamonsu +query_timeout = 10 + +# the address field must point to the running Zabbix server, while the client field must provide the name of +# the Zabbix host. You can find the list of hosts available for your account in the Zabbix web +# interface under Configuration > Hosts. +# re_send - True - in case of transmission error, mamonsu repeats sending metrics one by one to look in log metrics with error + +[zabbix] +enabled = True +client = pg-master +address = 127.0.0.1 +port = 10051 +timeout = 15 +re_send = False + +######### General parameters sections ############ + +# enable or disable collection of system metrics. + +[system] +enabled = True + +# control the queue size of the data to be sent to the Zabbix server + +[sender] +queue = 2048 + +# specify the location of mamonsu and whether it is allowed to access metrics from the command line + +[agent] +enabled = True +host = 127.0.0.1 +port = 10052 + +# specify custom plugins to be added for metrics collection + +[plugins] +enabled = False +directory = /etc/mamonsu/plugins + +# enable storing the collected metric data in text files locally. + +[metric_log] +enabled = False +directory = /var/log/mamonsu +max_size_mb = 1024 + +# specify logging settings for mamonsu + +[log] +file = /var/log/mamonsu/mamonsu.log +level = DEBUG +format = [%(levelname)s] %(asctime)s - %(name)s - %(message)s + +######### Individual Plugin Sections ############ + +# to disable any plugin set the enabled option to False. +# modify collection interval for each plugin in the interval field. +# set customer parameters for some plugins in the individual section. +# below listed all available parameters for each plugin to modify. + +[health] +interval = 60 + +[archivecommand] +interval = 60 + +# Besides standard autovacuum workers count, mamonsu also counts autovacuum utilization. +# But this metric is instantaneous, so recommended to run this plugin frequently +# to get a complete picture of autovacuum utilization. +[autovacuum] +interval = 30 + +[bgwriter] +interval = 60 + +[cfs] +force_enable = False +interval = 60 + +[checkpoint] +interval = 300 + +[connections] +interval = 60 + +[databases] +interval = 300 + +[pghealth] +interval = 60 + +[instance] +interval = 60 + +# This plugin allows detects possible memory leaks while working with PostgreSQL using /proc/pid/status and /proc/pid/statm +# We use RES and SHR difference to calculate approximate volume of private anonymous backend memory. +# If it exceeds private_anon_mem_threshold then that pid will be added to a message. An example is presented below +# statm - 'pid: {pid}, RES {RES} - SHR {SHR} more then {private_anon_mem_threshold}\n' +# Since Linux 4.5 RssAnon, RssFile and RssShmem have been added. +# They allows to distinguish types of memory such as private anonymous, file-backed, and shared anonymous memory. +# We are interested in RssAnon. If its value exceeds private_anon_mem_threshold then that pid will also be added to a message. +# By default this plugin disabled. To enable this plugin - set bellow "enabled = False" +# #interval - (onitoring frequency in seconds. 60 seconds by default +# private_anon_mem_threshold - memory volume threshold after which we need an investigation about memory leak. 1GB by default. +# Possible values MB, GB, TB. For example 1GB +[memoryleakdiagnostic] +enabled = True +interval = 15 +private_anon_mem_threshold = 1GB + +[oldest] +interval = 60 + +[pgbuffercache] +interval = 60 + +[pglocks] +interval = 60 + +# Get age (in seconds) of the oldest running prepared transaction and number of all prepared transactions for two-phase commit. +# https://www.postgresql.org/docs/current/sql-prepare-transaction.html +# https://www.postgresql.org/docs/12/view-pg-prepared-xacts.html +# max_prepared_transaction_time - age of prepared transaction in seconds. +# If pgsql.prepared.oldest exceeds max_prepared_transaction_time the trigger fires. +[preparedtransaction] +interval = 60 + +# Get size of relations defined in this section +# Relations - comma separated list of objects - tables and endexes (database_name.schema.relation) used to calculate relations size. +# Example: +# relations=postgres.pg_catalog.pg_class,postgres.pg_catalog.pg_user +# If the relation is blocked by some process such as vacuum full or create index, the result will be -1 +# by default this plugin disabled. To enable this plugin - set bellow "enabled = False" and define a list of relations. +[relationssize] +enabled = True +relations=postgres.pg_catalog.pg_class,mamonsu_test_db.mamonsu.config +interval = 15 + +[replication] +interval = 60 + +[statstatements] +interval = 60 + +[waitsampling] +interval = 60 + +[wal] +interval = 60 + +[disksizes] +interval = 60 + +[diskstats] +interval = 60 + +[la] +interval = 60 + +[memory] +interval = 60 + +[net] +interval = 60 + +[openfiles] +interval = 60 + +# Get size of backup catalogs stroring all WAL and backup files using pg_probackup +# (https://github.com/postgrespro/pg_probackup) +# Trigger fires if some backup has bad status e.g. (ERROR,CORRUPT,ORPHAN). +[pgprobackup] +enabled = False +interval = 300 +backup_dirs = /backup_dir1,/backup_dir2 +pg_probackup_path = /usr/bin/pg_probackup-11 + +[procstat] +interval = 60 + +[systemuptime] +interval = 60 + +[agentapi] +interval = 60 + +[logsender] +interval = 2 + +[zbxsender] +interval = 10 From 8f9655668b94d9f58eb7dfb22791c3b7fb5d3418 Mon Sep 17 00:00:00 2001 From: Andrew Papsujko Date: Thu, 29 May 2025 17:00:42 +0300 Subject: [PATCH 106/106] build: fix version --- .github/workflows/mamonsu-tests-dev.yml | 2 +- .github/workflows/mamonsu-tests-master.yml | 2 +- github-actions-tests/mamonsu_build.sh | 4 +- .../sources/agent_3.5.12.conf | 210 ------------------ mamonsu/__init__.py | 2 +- packaging/debian/changelog | 6 + packaging/rpm/SPECS/mamonsu.spec | 8 +- packaging/win/mamonsu.def.nsh | 2 +- 8 files changed, 19 insertions(+), 217 deletions(-) delete mode 100644 github-actions-tests/sources/agent_3.5.12.conf diff --git a/.github/workflows/mamonsu-tests-dev.yml b/.github/workflows/mamonsu-tests-dev.yml index 0336b7c..2427a7d 100644 --- a/.github/workflows/mamonsu-tests-dev.yml +++ b/.github/workflows/mamonsu-tests-dev.yml @@ -86,7 +86,7 @@ jobs: echo "zabbix_address=$(hostname -I | awk '{print $1}')" >> $GITHUB_OUTPUT id: zabbix_address - name: Edit Zabbix address in agent.conf - run: sed -i "s/\(address *= *\).*/\1 ${{ steps.zabbix_address.outputs.zabbix_address }}/" ${{ env.MAMONSU_PATH }}/github-actions-tests/sources/agent_3.5.12.conf + run: sed -i "s/\(address *= *\).*/\1 ${{ steps.zabbix_address.outputs.zabbix_address }}/" ${{ env.MAMONSU_PATH }}/github-actions-tests/sources/agent_3.5.13.conf - name: Copy test scripts to container run: docker exec $( echo "${{ matrix.docker_os }}" | sed 's/://' | sed 's/\.//' ) mkdir -p -m 755 /mamonsu/ diff --git a/.github/workflows/mamonsu-tests-master.yml b/.github/workflows/mamonsu-tests-master.yml index 6dfb86d..e14042c 100644 --- a/.github/workflows/mamonsu-tests-master.yml +++ b/.github/workflows/mamonsu-tests-master.yml @@ -91,7 +91,7 @@ jobs: echo "zabbix_address=$(hostname -I | awk '{print $1}')" >> $GITHUB_OUTPUT id: zabbix_address - name: Edit Zabbix address in agent.conf - run: sed -i "s/\(address *= *\).*/\1 ${{ steps.zabbix_address.outputs.zabbix_address }}/" ${{ env.MAMONSU_PATH }}/github-actions-tests/sources/agent_3.5.12.conf + run: sed -i "s/\(address *= *\).*/\1 ${{ steps.zabbix_address.outputs.zabbix_address }}/" ${{ env.MAMONSU_PATH }}/github-actions-tests/sources/agent_3.5.13.conf - name: Copy test scripts to container run: docker exec $( echo "${{ matrix.docker_os }}" | sed 's/://' | sed 's/\.//' ) mkdir -p -m 755 /mamonsu/ diff --git a/github-actions-tests/mamonsu_build.sh b/github-actions-tests/mamonsu_build.sh index a766806..6c24eb9 100644 --- a/github-actions-tests/mamonsu_build.sh +++ b/github-actions-tests/mamonsu_build.sh @@ -41,7 +41,7 @@ if [ "${OS%:*}" = "centos" ]; then python3 setup.py build && python3 setup.py install make rpm sudo rpm -i ./mamonsu*.rpm - cat /mamonsu/github-actions-tests/sources/agent_3.5.12.conf > /etc/mamonsu/agent.conf + cat /mamonsu/github-actions-tests/sources/agent_3.5.13.conf > /etc/mamonsu/agent.conf # ensuring mamonsu can actually start sudo su -s /bin/bash -c "mamonsu bootstrap -x --user postgres -d mamonsu_test_db" mamonsu /etc/init.d/mamonsu restart @@ -65,7 +65,7 @@ elif [ "${OS%:*}" = "ubuntu" ]; then python3 setup.py build && python3 setup.py install make deb sudo dpkg -i ./mamonsu*.deb - cat /mamonsu/github-actions-tests/sources/agent_3.5.12.conf > /etc/mamonsu/agent.conf + cat /mamonsu/github-actions-tests/sources/agent_3.5.13.conf > /etc/mamonsu/agent.conf # ensuring mamonsu can actually start sudo su -s /bin/bash -c "mamonsu bootstrap -x --user postgres -d mamonsu_test_db" mamonsu service mamonsu restart diff --git a/github-actions-tests/sources/agent_3.5.12.conf b/github-actions-tests/sources/agent_3.5.12.conf deleted file mode 100644 index 076419e..0000000 --- a/github-actions-tests/sources/agent_3.5.12.conf +++ /dev/null @@ -1,210 +0,0 @@ -# This is a configuration file for mamonsu -# To get more information about mamonsu, visit https://postgrespro.ru/docs/postgrespro/12/mamonsu - -######### Connection parameters sections ############## - -# specify connection parameters for the Postgres cluster -# in the user, password, and database fields, you must specify the mamonsu_user, mamonsu_password, -# and the mamonsu_database used for bootstrap, respectively. -# if you skipped the bootstrap, specify a superuser credentials and the database to connect to. - -[postgres] -enabled = True -user = mamonsu -password = mamonsu -database = mamonsu_test_db -host = localhost -port = 5432 -application_name = mamonsu -query_timeout = 10 - -# the address field must point to the running Zabbix server, while the client field must provide the name of -# the Zabbix host. You can find the list of hosts available for your account in the Zabbix web -# interface under Configuration > Hosts. -# re_send - True - in case of transmission error, mamonsu repeats sending metrics one by one to look in log metrics with error - -[zabbix] -enabled = True -client = pg-master -address = 127.0.0.1 -port = 10051 -timeout = 15 -re_send = False - -######### General parameters sections ############ - -# enable or disable collection of system metrics. - -[system] -enabled = True - -# control the queue size of the data to be sent to the Zabbix server - -[sender] -queue = 2048 - -# specify the location of mamonsu and whether it is allowed to access metrics from the command line - -[agent] -enabled = True -host = 127.0.0.1 -port = 10052 - -# specify custom plugins to be added for metrics collection - -[plugins] -enabled = False -directory = /etc/mamonsu/plugins - -# enable storing the collected metric data in text files locally. - -[metric_log] -enabled = False -directory = /var/log/mamonsu -max_size_mb = 1024 - -# specify logging settings for mamonsu - -[log] -file = /var/log/mamonsu/mamonsu.log -level = DEBUG -format = [%(levelname)s] %(asctime)s - %(name)s - %(message)s - -######### Individual Plugin Sections ############ - -# to disable any plugin set the enabled option to False. -# modify collection interval for each plugin in the interval field. -# set customer parameters for some plugins in the individual section. -# below listed all available parameters for each plugin to modify. - -[health] -interval = 60 - -[archivecommand] -interval = 60 - -# Besides standard autovacuum workers count, mamonsu also counts autovacuum utilization. -# But this metric is instantaneous, so recommended to run this plugin frequently -# to get a complete picture of autovacuum utilization. -[autovacuum] -interval = 30 - -[bgwriter] -interval = 60 - -[cfs] -force_enable = False -interval = 60 - -[checkpoint] -interval = 300 - -[connections] -interval = 60 - -[databases] -interval = 300 - -[pghealth] -interval = 60 - -[instance] -interval = 60 - -# This plugin allows detects possible memory leaks while working with PostgreSQL using /proc/pid/status and /proc/pid/statm -# We use RES and SHR difference to calculate approximate volume of private anonymous backend memory. -# If it exceeds private_anon_mem_threshold then that pid will be added to a message. An example is presented below -# statm - 'pid: {pid}, RES {RES} - SHR {SHR} more then {private_anon_mem_threshold}\n' -# Since Linux 4.5 RssAnon, RssFile and RssShmem have been added. -# They allows to distinguish types of memory such as private anonymous, file-backed, and shared anonymous memory. -# We are interested in RssAnon. If its value exceeds private_anon_mem_threshold then that pid will also be added to a message. -# By default this plugin disabled. To enable this plugin - set bellow "enabled = False" -# #interval - (onitoring frequency in seconds. 60 seconds by default -# private_anon_mem_threshold - memory volume threshold after which we need an investigation about memory leak. 1GB by default. -# Possible values MB, GB, TB. For example 1GB -[memoryleakdiagnostic] -enabled = True -interval = 15 -private_anon_mem_threshold = 1GB - -[oldest] -interval = 60 - -[pgbuffercache] -interval = 60 - -[pglocks] -interval = 60 - -# Get age (in seconds) of the oldest running prepared transaction and number of all prepared transactions for two-phase commit. -# https://www.postgresql.org/docs/current/sql-prepare-transaction.html -# https://www.postgresql.org/docs/12/view-pg-prepared-xacts.html -# max_prepared_transaction_time - age of prepared transaction in seconds. -# If pgsql.prepared.oldest exceeds max_prepared_transaction_time the trigger fires. -[preparedtransaction] -interval = 60 - -# Get size of relations defined in this section -# Relations - comma separated list of objects - tables and endexes (database_name.schema.relation) used to calculate relations size. -# Example: -# relations=postgres.pg_catalog.pg_class,postgres.pg_catalog.pg_user -# If the relation is blocked by some process such as vacuum full or create index, the result will be -1 -# by default this plugin disabled. To enable this plugin - set bellow "enabled = False" and define a list of relations. -[relationssize] -enabled = True -relations=postgres.pg_catalog.pg_class,mamonsu_test_db.mamonsu.config -interval = 15 - -[replication] -interval = 60 - -[statstatements] -interval = 60 - -[waitsampling] -interval = 60 - -[wal] -interval = 60 - -[disksizes] -interval = 60 - -[diskstats] -interval = 60 - -[la] -interval = 60 - -[memory] -interval = 60 - -[net] -interval = 60 - -[openfiles] -interval = 60 - -# Get size of backup catalogs stroring all WAL and backup files using pg_probackup -# (https://github.com/postgrespro/pg_probackup) -# Trigger fires if some backup has bad status e.g. (ERROR,CORRUPT,ORPHAN). -[pgprobackup] -enabled = False -interval = 300 -backup_dirs = /backup_dir1,/backup_dir2 -pg_probackup_path = /usr/bin/pg_probackup-11 - -[procstat] -interval = 60 - -[systemuptime] -interval = 60 - -[agentapi] -interval = 60 - -[logsender] -interval = 2 - -[zbxsender] -interval = 10 diff --git a/mamonsu/__init__.py b/mamonsu/__init__.py index b43c491..9264cb8 100644 --- a/mamonsu/__init__.py +++ b/mamonsu/__init__.py @@ -1,7 +1,7 @@ __author__ = 'Dmitry Vasilyev' __author_email__ = 'info@postgrespro.ru' __description__ = 'Monitoring agent for PostgreSQL' -__version__ = '3.5.12' +__version__ = '3.5.13' __licence__ = 'BSD' __url__ = 'https://github.com/postgrespro/mamonsu' diff --git a/packaging/debian/changelog b/packaging/debian/changelog index 218931a..6efa097 100644 --- a/packaging/debian/changelog +++ b/packaging/debian/changelog @@ -1,3 +1,9 @@ +mamonsu (3.5.13-1) stable; urgency=low + * Added a new metric that displays the bytes held by non-active replication slots, along with the corresponding trigger.; + * Set the trigger for 'number of non-active replication slots' to be disabled by default.; + * Fixed the Linux plugin to ensure compatibility with recent Linux versions that use cgroups2.; + * Resolved a deadlock issue in the send queue that caused Mamonsu to hang after network problems.; + mamonsu (3.5.12-1) stable; urgency=low * Port version parser code from public archive of pypa/pkg_resources; * Thread-safe implementation of connection cache; diff --git a/packaging/rpm/SPECS/mamonsu.spec b/packaging/rpm/SPECS/mamonsu.spec index dcc7c9f..dcfd2bd 100644 --- a/packaging/rpm/SPECS/mamonsu.spec +++ b/packaging/rpm/SPECS/mamonsu.spec @@ -1,5 +1,5 @@ Name: mamonsu -Version: 3.5.12 +Version: 3.5.13 Release: 1%{?dist} Summary: Monitoring agent for PostgreSQL Group: Applications/Internet @@ -73,6 +73,12 @@ chown -R mamonsu:mamonsu /var/log/mamonsu chown -R mamonsu:mamonsu /etc/mamonsu %changelog +* Thu May 29 2025 Andrey Papsuyko - 3.5.13-1 + - Added a new metric that displays the bytes held by non-active replication slots, along with the corresponding trigger.; + - Set the trigger for 'number of non-active replication slots' to be disabled by default.; + - Fixed the Linux plugin to ensure compatibility with recent Linux versions that use cgroups2.; + - Resolved a deadlock issue in the send queue that caused Mamonsu to hang after network problems.; + * Wed Mar 5 2025 Maxim Styushin - 3.5.12-1 - Port version parser code from public archive of pypa/pkg_resources; - Thread-safe implementation of connection cache; diff --git a/packaging/win/mamonsu.def.nsh b/packaging/win/mamonsu.def.nsh index 1b60f1c..5afbfdc 100644 --- a/packaging/win/mamonsu.def.nsh +++ b/packaging/win/mamonsu.def.nsh @@ -1,5 +1,5 @@ !define NAME Mamonsu -!define VERSION 3.5.12 +!define VERSION 3.5.13 !define MAMONSU_REG_PATH "Software\PostgresPro\Mamonsu" !define MAMONSU_REG_UNINSTALLER_PATH "Software\Microsoft\Windows\CurrentVersion\Uninstall" !define EDB_REG "SOFTWARE\Postgresql" pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy