diff --git a/.github/workflows/mamonsu-tests-dev.yml b/.github/workflows/mamonsu-tests-dev.yml index 216aa5b5..2427a7d8 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/' @@ -36,6 +36,15 @@ 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' exclude: - docker_os: 'centos:8' pg_version: '12' @@ -77,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.7.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 aaf2aec6..e14042c1 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/' @@ -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' @@ -88,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.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/README.md b/README.md index df7611ca..fd6b6bfc 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*** @@ -178,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 ``` diff --git a/documentation/configuration_file.md b/documentation/configuration_file.md index 940102c1..0cabd352 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. diff --git a/documentation/metrics.md b/documentation/metrics.md index a157eab0..d507a8e4 100644 --- a/documentation/metrics.md +++ b/documentation/metrics.md @@ -1997,7 +1997,7 @@ Default config: Supported Version - 9.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 @@ -3657,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 @@ -3729,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** @@ -3827,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/github-actions-tests/mamonsu_build.sh b/github-actions-tests/mamonsu_build.sh index ec2a427f..6c24eb99 100644 --- a/github-actions-tests/mamonsu_build.sh +++ b/github-actions-tests/mamonsu_build.sh @@ -41,9 +41,10 @@ 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 - systemctl daemon-reload - systemctl restart mamonsu + 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 sleep 5 echo && echo && echo "mamonsu version:" mamonsu --version @@ -64,7 +65,9 @@ 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.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 sleep 5 echo && echo && echo "mamonsu version:" diff --git a/github-actions-tests/metrics.sh b/github-actions-tests/metrics.sh index a4ebf630..5ea66946 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/agent_3.5.7.conf b/github-actions-tests/sources/agent_3.5.13.conf similarity index 100% rename from github-actions-tests/sources/agent_3.5.7.conf rename to github-actions-tests/sources/agent_3.5.13.conf diff --git a/github-actions-tests/sources/metrics-linux-10.txt b/github-actions-tests/sources/metrics-linux-10.txt index f62a60f4..c2d044c5 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 f62a60f4..c2d044c5 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 94ffe7eb..1c097974 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 c847ac5c..b6a0d1c1 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 fcc168bd..71f26843 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 00000000..cfe646d0 --- /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 00000000..1959c69b --- /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 3e3b990b..1623ddc2 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 a658c9a8..798ad2fc 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[] diff --git a/github-actions-tests/tests.sh b/github-actions-tests/tests.sh index 8374448e..5562da6d 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" @@ -43,7 +69,7 @@ if [ "${OS}" = "centos:7" ]; 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-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 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 00000000..698261ff --- /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": "" +} diff --git a/mamonsu/__init__.py b/mamonsu/__init__.py index 1aebc348..9264cb85 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.13' __licence__ = 'BSD' __url__ = 'https://github.com/postgrespro/mamonsu' diff --git a/mamonsu/lib/default_config.py b/mamonsu/lib/default_config.py index c7f2d985..12791a18 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 5ea5faa0..279200d1 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/lib/queue.py b/mamonsu/lib/queue.py index 96ceadf1..e348fc49 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 diff --git a/mamonsu/lib/version.py b/mamonsu/lib/version.py new file mode 100644 index 00000000..821b67ba --- /dev/null +++ b/mamonsu/lib/version.py @@ -0,0 +1,468 @@ +# 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. + +from __future__ import absolute_import, division, print_function + +import collections +import itertools +import re + +__all__ = [ + "parse", "Version", "LegacyVersion", "InvalidVersion", "VERSION_PATTERN" +] + + +class Infinity(object): + + def __repr__(self): + return "Infinity" + + def __hash__(self): + return hash(repr(self)) + + def __lt__(self, other): + return False + + def __le__(self, other): + return False + + def __eq__(self, other): + return isinstance(other, self.__class__) + + def __ne__(self, other): + return not isinstance(other, self.__class__) + + def __gt__(self, other): + return True + + def __ge__(self, other): + return True + + def __neg__(self): + return NegativeInfinity + + +Infinity = Infinity() + + +class NegativeInfinity(object): + + def __repr__(self): + return "-Infinity" + + def __hash__(self): + return hash(repr(self)) + + def __lt__(self, other): + return True + + def __le__(self, other): + return True + + def __eq__(self, other): + return isinstance(other, self.__class__) + + def __ne__(self, other): + return not isinstance(other, self.__class__) + + def __gt__(self, other): + return False + + def __ge__(self, other): + return False + + def __neg__(self): + return Infinity + + +NegativeInfinity = NegativeInfinity() + + +_Version = collections.namedtuple( + "_Version", + ["epoch", "release", "dev", "pre", "post", "local"], +) + + +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 + 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(object): + + def __hash__(self): + return hash(self._key) + + def __lt__(self, other): + return self._compare(other, lambda s, o: s < o) + + def __le__(self, other): + return self._compare(other, lambda s, o: s <= o) + + def __eq__(self, other): + return self._compare(other, lambda s, o: s == o) + + def __ge__(self, other): + return self._compare(other, lambda s, o: s >= o) + + def __gt__(self, other): + return self._compare(other, lambda s, o: s > o) + + def __ne__(self, other): + return self._compare(other, lambda s, o: s != o) + + def _compare(self, other, method): + if not isinstance(other, _BaseVersion): + return NotImplemented + + return method(self._key, other._key) + + +class LegacyVersion(_BaseVersion): + + def __init__(self, version): + self._version = str(version) + self._key = _legacy_cmpkey(self._version) + + def __str__(self): + return self._version + + def __repr__(self): + return "".format(repr(str(self))) + + @property + def public(self): + return self._version + + @property + def base_version(self): + return self._version + + @property + def local(self): + return None + + @property + def is_prerelease(self): + return False + + @property + def is_postrelease(self): + 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): + 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): + # 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 = [] + 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) + parts = tuple(parts) + + return epoch, 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):
+        # Validate the version and parse it into pieces
+        match = self._regex.search(version)
+        if not match:
+            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"),
+            ),
+            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):
+        return "".format(repr(str(self)))
+
+    def __str__(self):
+        parts = []
+
+        # Epoch
+        if self._version.epoch != 0:
+            parts.append("{0}!".format(self._version.epoch))
+
+        # Release segment
+        parts.append(".".join(str(x) for x in self._version.release))
+
+        # Pre-release
+        if self._version.pre is not None:
+            parts.append("".join(str(x) for x in self._version.pre))
+
+        # Post-release
+        if self._version.post is not None:
+            parts.append(".post{0}".format(self._version.post[1]))
+
+        # Development release
+        if self._version.dev is not None:
+            parts.append(".dev{0}".format(self._version.dev[1]))
+
+        # Local version segment
+        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 public(self):
+        return str(self).split("+", 1)[0]
+
+    @property
+    def base_version(self):
+        parts = []
+
+        # Epoch
+        if self._version.epoch != 0:
+            parts.append("{0}!".format(self._version.epoch))
+
+        # Release segment
+        parts.append(".".join(str(x) for x in self._version.release))
+
+        return "".join(parts)
+
+    @property
+    def local(self):
+        version_string = str(self)
+        if "+" in version_string:
+            return version_string.split("+", 1)[1]
+
+    @property
+    def is_prerelease(self):
+        return bool(self._version.dev or self._version.pre)
+
+    @property
+    def is_postrelease(self):
+        return bool(self._version.post)
+
+
+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.
+        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)
+
+
+_local_version_seperators = re.compile(r"[\._-]")
+
+
+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_seperators.split(local)
+        )
+
+
+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),
+            )
+        ))
+    )
+
+    # 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 = -Infinity
+    # Versions without a pre-release (except as noted above) should sort after
+    # those with one.
+    elif pre is None:
+        pre = Infinity
+
+    # Versions without a post segment should sort before those with one.
+    if post is None:
+        post = -Infinity
+
+    # Versions without a development segment should sort after those with one.
+    if dev is None:
+        dev = Infinity
+
+    if local is None:
+        # Versions without a local segment should sort before those with one.
+        local = -Infinity
+    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 (-Infinity, i)
+            for i in local
+        )
+
+    return epoch, release, pre, post, dev, local
diff --git a/mamonsu/plugins/pgsql/bgwriter.py b/mamonsu/plugins/pgsql/bgwriter.py
index 6d950134..9615b705 100644
--- a/mamonsu/plugins/pgsql/bgwriter.py
+++ b/mamonsu/plugins/pgsql/bgwriter.py
@@ -12,44 +12,69 @@ 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 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]
         result = Pooler.query(self.query.format(", ".join(columns)))
diff --git a/mamonsu/plugins/pgsql/checkpoint.py b/mamonsu/plugins/pgsql/checkpoint.py
index f4a53244..c1ca9acc 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,77 @@ 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 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]
         result = Pooler.query(self.query.format(", ".join(columns)))
@@ -146,5 +181,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)
diff --git a/mamonsu/plugins/pgsql/driver/pg8000/core.py b/mamonsu/plugins/pgsql/driver/pg8000/core.py
index d29c627d..b050af67 100755
--- a/mamonsu/plugins/pgsql/driver/pg8000/core.py
+++ b/mamonsu/plugins/pgsql/driver/pg8000/core.py
@@ -2,12 +2,12 @@
 from collections import defaultdict, deque
 from datetime import datetime as Datetime
 from decimal import Decimal
-from distutils.version import LooseVersion
 from hashlib import md5
 from itertools import count, islice
 from struct import Struct
 from warnings import warn
 
+import mamonsu.lib.version as version
 from mamonsu.plugins.pgsql.driver.pg8000 import converters
 from .exceptions import (
     ArrayContentNotSupportedError, DatabaseError, Error, IntegrityError,
@@ -1416,11 +1416,16 @@ 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'):
+            # 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 = 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 < LooseVersion('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 1f39e525..a8433d98 100644
--- a/mamonsu/plugins/pgsql/driver/pool.py
+++ b/mamonsu/plugins/pgsql/driver/pool.py
@@ -1,6 +1,8 @@
-from distutils.version import LooseVersion
 from .connection import Connection, ConnectionInfo
 
+from mamonsu.lib.version import parse
+import threading
+
 
 class Pool(object):
     ExcludeDBs = ["template0", "template1"]
@@ -84,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;
             """,
             """
@@ -93,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();
+            """
         )
     }
 
@@ -107,9 +133,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": {},
             "pgpro": {"storage": {}},
             "pgproee": {"storage": {}}
         }
+        self._lock = threading.RLock()
 
     def connection_string(self, db=None):
         db = self._normalize_db(db)
@@ -121,69 +149,88 @@ 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]
-        result = bytes(
-            self.query("show server_version", db)[0][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):
+        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]
 
     def server_version_greater(self, version, db=None):
         db = self._normalize_db(db)
-        return self.server_version(db) >= LooseVersion(version)
+        return parse(self.server_version(db)) >= parse(version)
 
     def server_version_less(self, version, db=None):
         db = self._normalize_db(db)
-        return self.server_version(db) <= LooseVersion(version)
+        return parse(self.server_version(db)) <= parse(version)
 
     def bootstrap_version_greater(self, version):
-        return str(
-            self._cache["bootstrap"]["version"]) >= LooseVersion(version)
+        with self._lock:
+            return parse(str(self._cache["bootstrap"]["version"])) >= parse(version)
 
     def bootstrap_version_less(self, version):
-        return str(
-            self._cache["bootstrap"]["version"]) <= LooseVersion(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)
@@ -195,62 +242,73 @@ 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)
+        return parse(self.extension_version(extension, db)) >= parse(version)
+
+    def extension_version_less(self, extension, version, db=None):
+        db = self._normalize_db(db)
+        return parse(self.extension_version(extension, db)) <= parse(version)
 
     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
 
     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("""
-        SELECT datname 
+        SELECT datname
         FROM pg_catalog.pg_database;
         """), []
         for row in result:
@@ -309,13 +367,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 a9da0a18..14c0749b 100644
--- a/mamonsu/plugins/pgsql/memory_leak_diagnostic.py
+++ b/mamonsu/plugins/pgsql/memory_leak_diagnostic.py
@@ -4,10 +4,11 @@
 import os
 from .pool import Pooler
 import re
-from distutils.version import LooseVersion
 import mamonsu.lib.platform as platform
 import posix
 
+import mamonsu.lib.version as version
+
 
 class MemoryLeakDiagnostic(Plugin):
     DEFAULT_CONFIG = {
@@ -91,7 +92,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 (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 3aa2ba46..7ed701c1 100644
--- a/mamonsu/plugins/pgsql/replication.py
+++ b/mamonsu/plugins/pgsql/replication.py
@@ -1,10 +1,11 @@
 # -*- 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 mamonsu.lib.version as version
+
 NUMBER_NON_ACTIVE_SLOTS = 0
 
 
@@ -12,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
@@ -29,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}"
@@ -41,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):
 
@@ -78,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:
@@ -89,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]))
 
@@ -131,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
 
@@ -197,11 +224,46 @@ 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 = []
-        if LooseVersion(self.VersionPG) < LooseVersion("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/plugins/pgsql/statements.py b/mamonsu/plugins/pgsql/statements.py
index 4cebcd64..784f2262 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_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'
+
+            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/plugins/system/linux/disk_sizes.py b/mamonsu/plugins/system/linux/disk_sizes.py
index 898c2c04..d4618120 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"
     ]
diff --git a/mamonsu/plugins/system/linux/disk_stats.py b/mamonsu/plugins/system/linux/disk_stats.py
index 696b5f7f..e5381cad 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 ef95f62d..c0906afa 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 4da3960c..237e1955 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 1ab25e73..58c2ff6c 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"
diff --git a/mamonsu/tools/bootstrap/sql.py b/mamonsu/tools/bootstrap/sql.py
index fb56a9d3..bf99442a 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,17 +225,34 @@
 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;
+
+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 = """
@@ -287,7 +304,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 +315,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 +344,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 +364,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 +432,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;
diff --git a/mamonsu/tools/bootstrap/start.py b/mamonsu/tools/bootstrap/start.py
index 3976de1b..6fbc5821 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_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(
+                        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 [])
diff --git a/mamonsu/tools/zabbix_cli/operations.py b/mamonsu/tools/zabbix_cli/operations.py
index e12db8af..811ab0b1 100644
--- a/mamonsu/tools/zabbix_cli/operations.py
+++ b/mamonsu/tools/zabbix_cli/operations.py
@@ -3,9 +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
-from distutils.version import LooseVersion
+
 from mamonsu.tools.zabbix_cli.dashboard import generate_dashboard
 
 
@@ -171,10 +172,10 @@ def template(self, args):
                     }
                 },
                 'source': open(file).read()}
-            if LooseVersion(zabbix_version) < LooseVersion('5.4'):
+            if version.parse(zabbix_version) < version.parse('5.4'):
                 params['rules']['applications'] = {'createMissing': True,
                                                    'deleteMissing': True}
-            if LooseVersion(zabbix_version) < LooseVersion('5.2'):
+            if version.parse(zabbix_version) < version.parse('5.2'):
                 params['rules']['templateScreens'] = {'createMissing': True,
                                                       'updateExisting': False,
                                                       'deleteMissing': True}
@@ -329,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 LooseVersion(zabbix_version) < LooseVersion('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 5b83427b..0ccd78c0 100644
--- a/mamonsu/tools/zabbix_cli/request.py
+++ b/mamonsu/tools/zabbix_cli/request.py
@@ -4,8 +4,8 @@
 import logging
 from collections import OrderedDict
 
+import mamonsu.lib.version as version
 
-from distutils.version import LooseVersion
 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 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})
diff --git a/packaging/debian/changelog b/packaging/debian/changelog
index 8b5b7c23..6efa0973 100644
--- a/packaging/debian/changelog
+++ b/packaging/debian/changelog
@@ -1,3 +1,30 @@
+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;
+  * 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);
+
+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;
+
+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 82463494..dcfd2bde 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.13
 Release:        1%{?dist}
 Summary:        Monitoring agent for PostgreSQL
 Group:          Applications/Internet
@@ -57,22 +57,49 @@ 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 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;
+  - 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);
+
+* 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;
+
+* 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 1d638c4c..5afbfdc5 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.13
 !define MAMONSU_REG_PATH "Software\PostgresPro\Mamonsu"
 !define MAMONSU_REG_UNINSTALLER_PATH "Software\Microsoft\Windows\CurrentVersion\Uninstall"
 !define EDB_REG "SOFTWARE\Postgresql"