Files
templates-default/PostgreSQL_by_Zabbix_agent_active.yaml
T

2148 lines
88 KiB
YAML

zabbix_export:
version: '7.0'
template_groups:
- uuid: 748ad4d098d447d492bb935c907f652f
name: Templates/Databases
templates:
- uuid: 7005acc9123e4bc290805a3a16dab9cf
template: 'PostgreSQL by Zabbix agent active'
name: 'PostgreSQL by Zabbix agent active'
description: |
This template is designed for the deployment of PostgreSQL monitoring by Zabbix via Zabbix agent and uses user parameters to run SQL queries with the `psql` command-line tool.
Note:
- The template requires `pg_isready` and `psql` utilities to be installed on the same host with Zabbix agent.
- The template requires files with SQL queries and user parameters that can be found in the Zabbix official repository:
https://git.zabbix.com/projects/ZBX/repos/zabbix/browse/templates/db/postgresql?at=refs%2Fheads%2Frelease%2F6.0
Setup:
1. Deploy Zabbix agent and create the PostgreSQL user for monitoring (`<password>` at your discretion) with proper access rights to your PostgreSQL instance.
For PostgreSQL version 10 and above:
CREATE USER zbx_monitor WITH PASSWORD '<PASSWORD>' INHERIT;
GRANT pg_monitor TO zbx_monitor;
For PostgreSQL version 9.6 and below:
CREATE USER zbx_monitor WITH PASSWORD '<PASSWORD>';
GRANT SELECT ON pg_stat_database TO zbx_monitor;
ALTER USER zbx_monitor WITH SUPERUSER;
2. Copy the `postgresql/` directory to the `zabbix` user home directory - `/var/lib/zabbix/`. The `postgresql/` directory contains the files with SQL queries needed to obtain metrics from PostgreSQL instance.
If the home directory of the `zabbix` user doesn't exist, create it first:
mkdir -m u=rwx,g=rwx,o= -p /var/lib/zabbix
chown zabbix:zabbix /var/lib/zabbix
3. Copy the `template_db_postgresql.conf` file, containing user parameters, to the Zabbix agent configuration directory `/etc/zabbix/zabbix_agentd.d/` and restart Zabbix agent service.
If you want to use SSL/TLS encryption to protect communications with the remote PostgreSQL instance, you can modify the connection string in user parameters. For example, to enable required encryption in transport mode without identity checks you could append `?sslmode=required` to the end of the connection string for all keys that use `psql`:
UserParameter=pgsql.bgwriter[*], psql -qtAX postgresql://"$3":"$4"@"$1":"$2"/"$5"?sslmode=required -f "/var/lib/zabbix/postgresql/pgsql.bgwriter.sql"
Consult the PostgreSQL documentation about protection modes (https://www.postgresql.org/docs/current/libpq-ssl.html#LIBPQ-SSL-PROTECTION) and client connection parameters (https://www.postgresql.org/docs/current/libpq-connect.html#LIBPQ-CONNECT-SSLMODE).
Also, it is assumed that you set up the PostgreSQL instance to work in the desired encryption mode. Check the PostgreSQL documentation (https://www.postgresql.org/docs/current/ssl-tcp.html) for details.
4. Edit the `pg_hba.conf` configuration file to allow connections for the user `zbx_monitor`. You can check the PostgreSQL documentation for examples (https://www.postgresql.org/docs/current/auth-pg-hba-conf.html).
5. Specify the host name or IP address in the `{$PG.HOST}` macro. Adjust the port number with `{$PG.PORT}` macro if needed.
6. Set the password that you specified in step 1 in the macro `{$PG.PASSWORD}`.
You can discuss this template or leave feedback on our forum https://www.zabbix.com/forum/zabbix-suggestions-and-feedback/384190-%C2%A0discussion-thread-for-official-zabbix-template-db-postgresql
Generated by official Zabbix template tool "Templator"
vendor:
name: Zabbix
version: 7.0-2
groups:
- name: Templates/Databases
items:
- uuid: d469ec16aa434e3e82695d143abe479a
name: 'Bgwriter: Buffers allocated per second'
type: DEPENDENT
key: pgsql.bgwriter.buffers_alloc.rate
delay: '0'
value_type: FLOAT
description: 'Number of buffers allocated per second.'
preprocessing:
- type: JSONPATH
parameters:
- $.buffers_alloc
- type: CHANGE_PER_SECOND
parameters:
- ''
master_item:
key: 'pgsql.bgwriter["{$PG.HOST}","{$PG.PORT}","{$PG.USER}","{$PG.PASSWORD}","{$PG.DATABASE}"]'
tags:
- tag: component
value: bgwriter
- uuid: 511c3b3b363f43dd93746b3e0dad0f07
name: 'Bgwriter: Buffers written directly by a backend per second'
type: DEPENDENT
key: pgsql.bgwriter.buffers_backend.rate
delay: '0'
value_type: FLOAT
description: 'Number of buffers written directly by a backend per second. Available in PostgreSQL versions prior to 17.'
preprocessing:
- type: JSONPATH
parameters:
- $.buffers_backend
error_handler: DISCARD_VALUE
- type: CHANGE_PER_SECOND
parameters:
- ''
master_item:
key: 'pgsql.bgwriter["{$PG.HOST}","{$PG.PORT}","{$PG.USER}","{$PG.PASSWORD}","{$PG.DATABASE}"]'
tags:
- tag: component
value: bgwriter
- uuid: 19795654aab941db8a95b092dda58737
name: 'Bgwriter: Times a backend executed its own fsync per second'
type: DEPENDENT
key: pgsql.bgwriter.buffers_backend_fsync.rate
delay: '0'
value_type: FLOAT
description: 'Number of times a backend had to execute its own fsync call per second (normally the background writer handles those even when the backend does its own write). Available in PostgreSQL versions prior to 17.'
preprocessing:
- type: JSONPATH
parameters:
- $.buffers_backend_fsync
error_handler: DISCARD_VALUE
- type: CHANGE_PER_SECOND
parameters:
- ''
master_item:
key: 'pgsql.bgwriter["{$PG.HOST}","{$PG.PORT}","{$PG.USER}","{$PG.PASSWORD}","{$PG.DATABASE}"]'
tags:
- tag: component
value: bgwriter
- uuid: a366775a3079422184cfac96f34173d6
name: 'Checkpoint: Buffers written during checkpoints per second'
type: DEPENDENT
key: pgsql.bgwriter.buffers_checkpoint.rate
delay: '0'
value_type: FLOAT
description: 'Number of buffers written during checkpoints per second.'
preprocessing:
- type: JSONPATH
parameters:
- $.buffers_checkpoint
- type: CHANGE_PER_SECOND
parameters:
- ''
master_item:
key: 'pgsql.bgwriter["{$PG.HOST}","{$PG.PORT}","{$PG.USER}","{$PG.PASSWORD}","{$PG.DATABASE}"]'
tags:
- tag: component
value: bgwriter
- uuid: 62598e17214f44888fa57db4214a3b5f
name: 'Checkpoint: Buffers written by the background writer per second'
type: DEPENDENT
key: pgsql.bgwriter.buffers_clean.rate
delay: '0'
value_type: FLOAT
description: 'Number of buffers written by the background writer per second.'
preprocessing:
- type: JSONPATH
parameters:
- $.buffers_clean
- type: CHANGE_PER_SECOND
parameters:
- ''
master_item:
key: 'pgsql.bgwriter["{$PG.HOST}","{$PG.PORT}","{$PG.USER}","{$PG.PASSWORD}","{$PG.DATABASE}"]'
tags:
- tag: component
value: bgwriter
- uuid: 6c05e2cb877142fe8b1c03ab6566a134
name: 'Checkpoint: Requested per second'
type: DEPENDENT
key: pgsql.bgwriter.checkpoints_req.rate
delay: '0'
value_type: FLOAT
description: 'Number of requested checkpoints that have been performed per second.'
preprocessing:
- type: JSONPATH
parameters:
- $.checkpoints_req
- type: CHANGE_PER_SECOND
parameters:
- ''
master_item:
key: 'pgsql.bgwriter["{$PG.HOST}","{$PG.PORT}","{$PG.USER}","{$PG.PASSWORD}","{$PG.DATABASE}"]'
tags:
- tag: component
value: bgwriter
triggers:
- uuid: 62699d1627fe4141ac59291b138b4f7e
expression: 'last(/PostgreSQL by Zabbix agent active/pgsql.bgwriter.checkpoints_req.rate) > {$PG.CHECKPOINTS_REQ.MAX.WARN}'
name: 'PostgreSQL: Required checkpoints occur too frequently'
event_name: 'PostgreSQL: Required checkpoints occur too frequently (over {$PG.CHECKPOINTS_REQ.MAX.WARN})'
priority: AVERAGE
description: |
Checkpoints are points in the sequence of transactions at which it is guaranteed that the heap and index data files have been updated with all information written before that checkpoint. At checkpoint time, all dirty data pages are flushed to disk and a special checkpoint record is written to the log file.
https://www.postgresql.org/docs/current/wal-configuration.html
tags:
- tag: scope
value: performance
- uuid: 9f4020e7f0294ffb9e15b75982be5a68
name: 'Checkpoint: Scheduled per second'
type: DEPENDENT
key: pgsql.bgwriter.checkpoints_timed.rate
delay: '0'
value_type: FLOAT
description: 'Number of scheduled checkpoints that have been performed per second.'
preprocessing:
- type: JSONPATH
parameters:
- $.checkpoints_timed
- type: CHANGE_PER_SECOND
parameters:
- ''
master_item:
key: 'pgsql.bgwriter["{$PG.HOST}","{$PG.PORT}","{$PG.USER}","{$PG.PASSWORD}","{$PG.DATABASE}"]'
tags:
- tag: component
value: bgwriter
- uuid: bf59309e2fba4601920c64ab96f4d07e
name: 'Checkpoint: Checkpoint sync time per second'
type: DEPENDENT
key: pgsql.bgwriter.checkpoint_sync_time.rate
delay: '0'
value_type: FLOAT
units: s
description: 'Total amount of time per second that has been spent in the portion of checkpoint processing where files are synchronized to disk.'
preprocessing:
- type: JSONPATH
parameters:
- $.checkpoint_sync_time
- type: MULTIPLIER
parameters:
- '0.001'
- type: CHANGE_PER_SECOND
parameters:
- ''
master_item:
key: 'pgsql.bgwriter["{$PG.HOST}","{$PG.PORT}","{$PG.USER}","{$PG.PASSWORD}","{$PG.DATABASE}"]'
tags:
- tag: component
value: bgwriter
- uuid: 5bd159a9c2794486b0548f701605ccbc
name: 'Checkpoint: Checkpoint write time per second'
type: DEPENDENT
key: pgsql.bgwriter.checkpoint_write_time.rate
delay: '0'
value_type: FLOAT
units: s
description: 'Total amount of time per second that has been spent in the portion of checkpoint processing where files are written to disk.'
preprocessing:
- type: JSONPATH
parameters:
- $.checkpoint_write_time
- type: MULTIPLIER
parameters:
- '0.001'
- type: CHANGE_PER_SECOND
parameters:
- ''
master_item:
key: 'pgsql.bgwriter["{$PG.HOST}","{$PG.PORT}","{$PG.USER}","{$PG.PASSWORD}","{$PG.DATABASE}"]'
tags:
- tag: component
value: bgwriter
- uuid: 716b6c5c1f304d17ad9784ebee2062e1
name: 'Bgwriter: Number of bgwriter cleaning scan stopped per second'
type: DEPENDENT
key: pgsql.bgwriter.maxwritten_clean.rate
delay: '0'
value_type: FLOAT
description: 'Number of times the background writer stopped a cleaning scan because it had written too many buffers per second.'
preprocessing:
- type: JSONPATH
parameters:
- $.maxwritten_clean
- type: CHANGE_PER_SECOND
parameters:
- ''
master_item:
key: 'pgsql.bgwriter["{$PG.HOST}","{$PG.PORT}","{$PG.USER}","{$PG.PASSWORD}","{$PG.DATABASE}"]'
tags:
- tag: component
value: bgwriter
- uuid: 08043026cea14053a0addd4bdb7b7b8d
name: 'Get bgwriter'
type: ZABBIX_ACTIVE
key: 'pgsql.bgwriter["{$PG.HOST}","{$PG.PORT}","{$PG.USER}","{$PG.PASSWORD}","{$PG.DATABASE}"]'
history: 1h
value_type: TEXT
trends: '0'
description: |
Collect all metrics from pg_stat_bgwriter:
https://www.postgresql.org/docs/current/monitoring-stats.html#PG-STAT-BGWRITER-VIEW
tags:
- tag: component
value: raw
triggers:
- uuid: 33ad0c74e4a34656bd911ebc2920e70a
expression: 'nodata(/PostgreSQL by Zabbix agent active/pgsql.bgwriter["{$PG.HOST}","{$PG.PORT}","{$PG.USER}","{$PG.PASSWORD}","{$PG.DATABASE}"],30m) = 1'
name: 'PostgreSQL: Failed to get items'
event_name: 'PostgreSQL: Failed to get items (no data for 30m)'
priority: WARNING
description: 'Zabbix has not received any data for items for the last 30 minutes.'
dependencies:
- name: 'PostgreSQL: Service is down'
expression: 'last(/PostgreSQL by Zabbix agent active/pgsql.ping["{$PG.HOST}","{$PG.PORT}"]) = 0'
tags:
- tag: scope
value: availability
- uuid: 934e6647557f41cba46532a5a5c5d2ea
name: 'Cache hit ratio, %'
type: ZABBIX_ACTIVE
key: 'pgsql.cache.hit["{$PG.HOST}","{$PG.PORT}","{$PG.USER}","{$PG.PASSWORD}","{$PG.DATABASE}"]'
value_type: FLOAT
units: '%'
description: 'Cache hit ratio.'
tags:
- tag: component
value: cache
triggers:
- uuid: bd2fd99b03b54916963dd661c959dd2f
expression: 'max(/PostgreSQL by Zabbix agent active/pgsql.cache.hit["{$PG.HOST}","{$PG.PORT}","{$PG.USER}","{$PG.PASSWORD}","{$PG.DATABASE}"],5m) < {$PG.CACHE_HITRATIO.MIN.WARN}'
name: 'PostgreSQL: Cache hit ratio too low'
event_name: 'PostgreSQL: Cache hit ratio too low (under {$PG.CACHE_HITRATIO.MIN.WARN} in 5m)'
priority: WARNING
description: 'Cache hit ratio is lower than {$PG.CACHE_HITRATIO.MIN.WARN} for 5m.'
tags:
- tag: scope
value: performance
- uuid: 2d028578428949da8fa05d1f62f9f615
name: 'Config hash'
type: ZABBIX_ACTIVE
key: 'pgsql.config.hash["{$PG.HOST}","{$PG.PORT}","{$PG.USER}","{$PG.PASSWORD}","{$PG.DATABASE}"]'
delay: 15m
value_type: TEXT
trends: '0'
description: 'PostgreSQL configuration hash.'
preprocessing:
- type: DISCARD_UNCHANGED_HEARTBEAT
parameters:
- 1h
tags:
- tag: component
value: application
triggers:
- uuid: 483c370fa82f4c18ac9dbe7b07a4d7ff
expression: 'last(/PostgreSQL by Zabbix agent active/pgsql.config.hash["{$PG.HOST}","{$PG.PORT}","{$PG.USER}","{$PG.PASSWORD}","{$PG.DATABASE}"],#1)<>last(/PostgreSQL by Zabbix agent active/pgsql.config.hash["{$PG.HOST}","{$PG.PORT}","{$PG.USER}","{$PG.PASSWORD}","{$PG.DATABASE}"],#2) and length(last(/PostgreSQL by Zabbix agent active/pgsql.config.hash["{$PG.HOST}","{$PG.PORT}","{$PG.USER}","{$PG.PASSWORD}","{$PG.DATABASE}"]))>0'
name: 'PostgreSQL: Configuration has changed'
priority: INFO
description: 'PostgreSQL configuration has changed.'
tags:
- tag: scope
value: notice
- uuid: 7866090bfc5d4e1db50b50957b372685
name: 'Connections sum: Active'
type: DEPENDENT
key: pgsql.connections.sum.active
delay: '0'
description: 'Total number of connections executing a query.'
preprocessing:
- type: JSONPATH
parameters:
- $.active
master_item:
key: 'pgsql.connections.sum["{$PG.HOST}","{$PG.PORT}","{$PG.USER}","{$PG.PASSWORD}","{$PG.DATABASE}"]'
tags:
- tag: component
value: connections
- uuid: 7853f5db0cc54865ba0fc3323b4b9810
name: 'Connections sum: Idle'
type: DEPENDENT
key: pgsql.connections.sum.idle
delay: '0'
description: 'Total number of connections waiting for a new client command.'
preprocessing:
- type: JSONPATH
parameters:
- $.idle
master_item:
key: 'pgsql.connections.sum["{$PG.HOST}","{$PG.PORT}","{$PG.USER}","{$PG.PASSWORD}","{$PG.DATABASE}"]'
tags:
- tag: component
value: connections
- uuid: b609844ba35149e2a92e43ce5aa4c6f1
name: 'Connections sum: Idle in transaction'
type: DEPENDENT
key: pgsql.connections.sum.idle_in_transaction
delay: '0'
description: 'Total number of connections in a transaction state but not executing a query.'
preprocessing:
- type: JSONPATH
parameters:
- $.idle_in_transaction
master_item:
key: 'pgsql.connections.sum["{$PG.HOST}","{$PG.PORT}","{$PG.USER}","{$PG.PASSWORD}","{$PG.DATABASE}"]'
tags:
- tag: component
value: connections
- uuid: dc8be28daed141c789beab5e7c64c660
name: 'Connections sum: Prepared'
type: DEPENDENT
key: pgsql.connections.sum.prepared
delay: '0'
description: |
Total number of prepared transactions:
https://www.postgresql.org/docs/current/sql-prepare-transaction.html
preprocessing:
- type: JSONPATH
parameters:
- $.prepared
master_item:
key: 'pgsql.connections.sum["{$PG.HOST}","{$PG.PORT}","{$PG.USER}","{$PG.PASSWORD}","{$PG.DATABASE}"]'
tags:
- tag: component
value: connections
- uuid: c04d920d78e54039bca114e94c655a17
name: 'Connections sum: Total'
type: DEPENDENT
key: pgsql.connections.sum.total
delay: '0'
description: 'Total number of connections.'
preprocessing:
- type: JSONPATH
parameters:
- $.total
master_item:
key: 'pgsql.connections.sum["{$PG.HOST}","{$PG.PORT}","{$PG.USER}","{$PG.PASSWORD}","{$PG.DATABASE}"]'
tags:
- tag: component
value: connections
- uuid: ea0eaf2f784f476e9ce72fa119f8badb
name: 'Connections sum: Total, %'
type: DEPENDENT
key: pgsql.connections.sum.total_pct
delay: '0'
units: '%'
description: 'Total number of connections, in percentage.'
preprocessing:
- type: JSONPATH
parameters:
- $.total_pct
master_item:
key: 'pgsql.connections.sum["{$PG.HOST}","{$PG.PORT}","{$PG.USER}","{$PG.PASSWORD}","{$PG.DATABASE}"]'
tags:
- tag: component
value: connections
triggers:
- uuid: b4673d7606514a6cb5b3ef61b5b05ce1
expression: 'min(/PostgreSQL by Zabbix agent active/pgsql.connections.sum.total_pct,5m) > {$PG.CONN_TOTAL_PCT.MAX.WARN}'
name: 'PostgreSQL: Total number of connections is too high'
event_name: 'PostgreSQL: Total number of connections is too high (over {$PG.CONN_TOTAL_PCT.MAX.WARN} in 5m)'
priority: AVERAGE
description: 'Total number of current connections exceeds the limit of {$PG.CONN_TOTAL_PCT.MAX.WARN}% out of the maximum number of concurrent connections to the database server (the "max_connections" setting).'
tags:
- tag: scope
value: performance
- uuid: e19ab5dbf64348158c6033073c1a1058
name: 'Connections sum: Waiting'
type: DEPENDENT
key: pgsql.connections.sum.waiting
delay: '0'
description: |
Total number of waiting connections:
https://www.postgresql.org/docs/current/monitoring-stats.html#WAIT-EVENT-TABLE
preprocessing:
- type: JSONPATH
parameters:
- $.waiting
master_item:
key: 'pgsql.connections.sum["{$PG.HOST}","{$PG.PORT}","{$PG.USER}","{$PG.PASSWORD}","{$PG.DATABASE}"]'
tags:
- tag: component
value: connections
- uuid: 13cce1cb170f4c9db977cb49fc603f79
name: 'Get connections sum'
type: ZABBIX_ACTIVE
key: 'pgsql.connections.sum["{$PG.HOST}","{$PG.PORT}","{$PG.USER}","{$PG.PASSWORD}","{$PG.DATABASE}"]'
history: '0'
value_type: TEXT
trends: '0'
description: |
Collect all metrics from pg_stat_activity:
https://www.postgresql.org/docs/current/monitoring-stats.html#PG-STAT-ACTIVITY-VIEW
tags:
- tag: component
value: raw
- uuid: bea2e947b16b4a3dac660e664a505904
name: 'Get dbstat'
type: ZABBIX_ACTIVE
key: 'pgsql.dbstat["{$PG.HOST}","{$PG.PORT}","{$PG.USER}","{$PG.PASSWORD}","{$PG.DATABASE}"]'
history: '0'
value_type: TEXT
trends: '0'
description: |
Collect all metrics from pg_stat_database per database:
https://www.postgresql.org/docs/current/monitoring-stats.html#PG-STAT-DATABASE-VIEW
tags:
- tag: component
value: raw
- uuid: e5adbe1c2fc74943926cf45ff5efbff3
name: 'Get locks'
type: ZABBIX_ACTIVE
key: 'pgsql.locks["{$PG.HOST}","{$PG.PORT}","{$PG.USER}","{$PG.PASSWORD}","{$PG.DATABASE}"]'
history: '0'
value_type: TEXT
trends: '0'
description: |
Collect all metrics from pg_locks per database:
https://www.postgresql.org/docs/current/explicit-locking.html#LOCKING-TABLES
tags:
- tag: component
value: raw
- uuid: 2ab77e9548014233b0945bdeb9c134bd
name: 'Ping time'
type: ZABBIX_ACTIVE
key: 'pgsql.ping.time["{$PG.HOST}","{$PG.PORT}","{$PG.USER}","{$PG.PASSWORD}","{$PG.DATABASE}"]'
value_type: FLOAT
units: s
description: 'Used to get the `SELECT 1` query execution time.'
preprocessing:
- type: REGEX
parameters:
- 'Time:\s+(\d+\.\d+)\s+ms'
- \1
- type: MULTIPLIER
parameters:
- '0.001'
tags:
- tag: component
value: application
- tag: component
value: health
triggers:
- uuid: 0b54c409159f494c969c040d295b5cfb
expression: 'min(/PostgreSQL by Zabbix agent active/pgsql.ping.time["{$PG.HOST}","{$PG.PORT}","{$PG.USER}","{$PG.PASSWORD}","{$PG.DATABASE}"],5m) > {$PG.PING_TIME.MAX.WARN}'
name: 'PostgreSQL: Response too long'
event_name: 'PostgreSQL: Response too long (over {$PG.PING_TIME.MAX.WARN})'
priority: AVERAGE
description: 'Response is taking too long (over {$PG.PING_TIME.MAX.WARN} for 5m).'
dependencies:
- name: 'PostgreSQL: Service is down'
expression: 'last(/PostgreSQL by Zabbix agent active/pgsql.ping["{$PG.HOST}","{$PG.PORT}"]) = 0'
tags:
- tag: scope
value: availability
- tag: scope
value: performance
- uuid: 058b3cd8308b4692a5cb3e89a47886bd
name: Ping
type: ZABBIX_ACTIVE
key: 'pgsql.ping["{$PG.HOST}","{$PG.PORT}"]'
description: 'Used to test a connection to see if it is alive. It is set to 0 if the instance doesn''t accept the connections.'
valuemap:
name: 'Service state'
preprocessing:
- type: JAVASCRIPT
parameters:
- 'return value.search(/accepting connections/)>0 ? 1 : 0'
- type: DISCARD_UNCHANGED_HEARTBEAT
parameters:
- 1h
tags:
- tag: component
value: application
- tag: component
value: health
triggers:
- uuid: 32a43d55902d46b09f602dc89e3a2586
expression: 'last(/PostgreSQL by Zabbix agent active/pgsql.ping["{$PG.HOST}","{$PG.PORT}"]) = 0'
name: 'PostgreSQL: Service is down'
priority: HIGH
description: 'Last test of a connection was unsuccessful.'
tags:
- tag: scope
value: availability
- uuid: 2a4de36d7b434260b264a63ab444a430
name: 'Get queries'
type: ZABBIX_ACTIVE
key: 'pgsql.queries["{$PG.HOST}","{$PG.PORT}","{$PG.USER}","{$PG.PASSWORD}","{$PG.DATABASE}","{$PG.QUERY_ETIME.MAX.WARN}"]'
history: '0'
value_type: TEXT
trends: '0'
description: 'Collect all metrics by query execution time.'
tags:
- tag: component
value: raw
- uuid: 401331b4eab0439ca954551bce2f0c2e
name: 'Replication: Standby count'
type: ZABBIX_ACTIVE
key: 'pgsql.replication.count["{$PG.HOST}","{$PG.PORT}","{$PG.USER}","{$PG.PASSWORD}","{$PG.DATABASE}"]'
description: 'Number of standby servers.'
tags:
- tag: component
value: replication
- uuid: 2005dff88ab64458b3970a40e5bf0aff
name: 'Replication: Lag in seconds'
type: ZABBIX_ACTIVE
key: 'pgsql.replication.lag.sec["{$PG.HOST}","{$PG.PORT}","{$PG.USER}","{$PG.PASSWORD}","{$PG.DATABASE}"]'
units: s
description: 'Replication lag with master, in seconds.'
tags:
- tag: component
value: replication
triggers:
- uuid: 99adc9f76c0b42a08c22271b9206ce18
expression: 'min(/PostgreSQL by Zabbix agent active/pgsql.replication.lag.sec["{$PG.HOST}","{$PG.PORT}","{$PG.USER}","{$PG.PASSWORD}","{$PG.DATABASE}"],5m) > {$PG.REPL_LAG.MAX.WARN}'
name: 'PostgreSQL: Streaming lag with master is too high'
event_name: 'PostgreSQL: Streaming lag with master is too high (over {$PG.REPL_LAG.MAX.WARN} in 5m)'
priority: AVERAGE
description: 'Replication lag with master is higher than {$PG.REPL_LAG.MAX.WARN} for 5m.'
tags:
- tag: scope
value: availability
- tag: scope
value: performance
- uuid: 808f71865b934ac68512a3d6fa8b4aab
name: 'Replication: Recovery role'
type: ZABBIX_ACTIVE
key: 'pgsql.replication.recovery_role["{$PG.HOST}","{$PG.PORT}","{$PG.USER}","{$PG.PASSWORD}","{$PG.DATABASE}"]'
description: 'Replication role: 1 — recovery is still in progress (standby mode), 0 — master mode.'
valuemap:
name: 'PostgreSQL recovery role'
tags:
- tag: component
value: replication
- uuid: 5c4061c4081d41fa86741a296378d031
name: 'Replication: Status'
type: ZABBIX_ACTIVE
key: 'pgsql.replication.status["{$PG.HOST}","{$PG.PORT}","{$PG.USER}","{$PG.PASSWORD}","{$PG.DATABASE}"]'
description: 'Replication status: 0 — streaming is down, 1 — streaming is up, 2 — master mode.'
valuemap:
name: 'PostgreSQL replication status'
tags:
- tag: component
value: replication
triggers:
- uuid: 63b498ebd0484bc59f701e4179ed4fb2
expression: 'max(/PostgreSQL by Zabbix agent active/pgsql.replication.status["{$PG.HOST}","{$PG.PORT}","{$PG.USER}","{$PG.PASSWORD}","{$PG.DATABASE}"],5m)=0'
name: 'PostgreSQL: Replication is down'
priority: AVERAGE
description: 'Replication is enabled and data streaming was down for 5m.'
tags:
- tag: scope
value: availability
- uuid: ecbeae6a23e74cc89c670daf60f81833
name: 'Transactions: Max active transaction time'
type: DEPENDENT
key: pgsql.transactions.active
delay: '0'
value_type: FLOAT
units: s
description: 'Current max active transaction time.'
preprocessing:
- type: JSONPATH
parameters:
- $.active
master_item:
key: 'pgsql.transactions["{$PG.HOST}","{$PG.PORT}","{$PG.USER}","{$PG.PASSWORD}","{$PG.DATABASE}"]'
tags:
- tag: component
value: transactions
- uuid: 406d76761c0b4e0dbe83a14f48874fed
name: 'Transactions: Max idle transaction time'
type: DEPENDENT
key: pgsql.transactions.idle
delay: '0'
value_type: FLOAT
units: s
description: 'Current max idle transaction time.'
preprocessing:
- type: JSONPATH
parameters:
- $.idle
master_item:
key: 'pgsql.transactions["{$PG.HOST}","{$PG.PORT}","{$PG.USER}","{$PG.PASSWORD}","{$PG.DATABASE}"]'
tags:
- tag: component
value: transactions
- uuid: 3e0f09be15284811a4f9864be8aaa1e7
name: 'Transactions: Max prepared transaction time'
type: DEPENDENT
key: pgsql.transactions.prepared
delay: '0'
value_type: FLOAT
units: s
description: 'Current max prepared transaction time.'
preprocessing:
- type: JSONPATH
parameters:
- $.prepared
master_item:
key: 'pgsql.transactions["{$PG.HOST}","{$PG.PORT}","{$PG.USER}","{$PG.PASSWORD}","{$PG.DATABASE}"]'
tags:
- tag: component
value: transactions
- uuid: 2c5f5402e73942ef9a51d7965b9e705b
name: 'Transactions: Max waiting transaction time'
type: DEPENDENT
key: pgsql.transactions.waiting
delay: '0'
value_type: FLOAT
units: s
description: 'Current max waiting transaction time.'
preprocessing:
- type: JSONPATH
parameters:
- $.waiting
master_item:
key: 'pgsql.transactions["{$PG.HOST}","{$PG.PORT}","{$PG.USER}","{$PG.PASSWORD}","{$PG.DATABASE}"]'
tags:
- tag: component
value: transactions
- uuid: b22ed1707bd84c4faa010803b2c594fa
name: 'Get transactions'
type: ZABBIX_ACTIVE
key: 'pgsql.transactions["{$PG.HOST}","{$PG.PORT}","{$PG.USER}","{$PG.PASSWORD}","{$PG.DATABASE}"]'
history: '0'
value_type: TEXT
trends: '0'
description: 'Collect metrics by transaction execution time.'
tags:
- tag: component
value: raw
- uuid: d310b47d3e38466a980494fb0f9dfb01
name: Uptime
type: ZABBIX_ACTIVE
key: 'pgsql.uptime["{$PG.HOST}","{$PG.PORT}","{$PG.USER}","{$PG.PASSWORD}","{$PG.DATABASE}"]'
units: uptime
description: 'Time since the server started.'
tags:
- tag: component
value: application
triggers:
- uuid: a7c05ccff4c342018777471d1f3a17b7
expression: 'last(/PostgreSQL by Zabbix agent active/pgsql.uptime["{$PG.HOST}","{$PG.PORT}","{$PG.USER}","{$PG.PASSWORD}","{$PG.DATABASE}"]) < 10m'
name: 'PostgreSQL: Service has been restarted'
event_name: 'PostgreSQL: Service has been restarted (uptime < 10m)'
priority: AVERAGE
description: 'PostgreSQL uptime is less than 10 minutes.'
tags:
- tag: scope
value: notice
- uuid: 9798496e21914a8cbdee1cd85decf3e8
name: Version
type: ZABBIX_ACTIVE
key: 'pgsql.version["{$PG.HOST}","{$PG.PORT}","{$PG.USER}","{$PG.PASSWORD}","{$PG.DATABASE}"]'
delay: 15m
value_type: CHAR
trends: '0'
description: 'PostgreSQL version.'
preprocessing:
- type: DISCARD_UNCHANGED_HEARTBEAT
parameters:
- 1d
tags:
- tag: component
value: application
triggers:
- uuid: e06391b8cfe74fb5ad3b3bb2718b5e58
expression: 'last(/PostgreSQL by Zabbix agent active/pgsql.version["{$PG.HOST}","{$PG.PORT}","{$PG.USER}","{$PG.PASSWORD}","{$PG.DATABASE}"],#1)<>last(/PostgreSQL by Zabbix agent active/pgsql.version["{$PG.HOST}","{$PG.PORT}","{$PG.USER}","{$PG.PASSWORD}","{$PG.DATABASE}"],#2) and length(last(/PostgreSQL by Zabbix agent active/pgsql.version["{$PG.HOST}","{$PG.PORT}","{$PG.USER}","{$PG.PASSWORD}","{$PG.DATABASE}"]))>0'
name: 'PostgreSQL: Version has changed'
event_name: 'PostgreSQL: Version has changed (new version value received: {ITEM.VALUE})'
priority: INFO
tags:
- tag: scope
value: notice
- uuid: b1c6d3ff86f240df8f2c3a14a47e4df1
name: 'WAL: Segments count'
type: DEPENDENT
key: pgsql.wal.count
delay: '0'
description: 'Number of WAL segments.'
preprocessing:
- type: JSONPATH
parameters:
- $.count
master_item:
key: 'pgsql.wal.stat["{$PG.HOST}","{$PG.PORT}","{$PG.USER}","{$PG.PASSWORD}","{$PG.DATABASE}"]'
tags:
- tag: component
value: wal
- uuid: 9ca8653ea8304b5392d1c39111381751
name: 'Get WAL'
type: ZABBIX_ACTIVE
key: 'pgsql.wal.stat["{$PG.HOST}","{$PG.PORT}","{$PG.USER}","{$PG.PASSWORD}","{$PG.DATABASE}"]'
delay: 5m
history: '0'
value_type: TEXT
trends: '0'
description: 'Collect write-ahead log (WAL) metrics.'
tags:
- tag: component
value: raw
- uuid: 08580207e58142a393e310b0d592a7d5
name: 'WAL: Bytes written'
type: DEPENDENT
key: pgsql.wal.write
delay: '0'
units: B
description: 'WAL write, in bytes.'
preprocessing:
- type: JSONPATH
parameters:
- $.write
- type: CHANGE_PER_SECOND
parameters:
- ''
master_item:
key: 'pgsql.wal.stat["{$PG.HOST}","{$PG.PORT}","{$PG.USER}","{$PG.PASSWORD}","{$PG.DATABASE}"]'
tags:
- tag: component
value: wal
discovery_rules:
- uuid: d9625ea888804a8b82d395e1e002c6cd
name: 'Database discovery'
type: ZABBIX_ACTIVE
key: 'pgsql.discovery.db["{$PG.HOST}","{$PG.PORT}","{$PG.USER}","{$PG.PASSWORD}","{$PG.DATABASE}"]'
delay: 1h
filter:
conditions:
- macro: '{#DBNAME}'
value: '{$PG.LLD.FILTER.DBNAME}'
formulaid: A
description: |
Discovers databases (DB) in the database management system (DBMS), except:
- templates;
- default "postgres" DB;
- DBs that do not allow connections.
item_prototypes:
- uuid: f8d430b69f4f4f2aa04e2906cc4ab3cd
name: 'DB [{#DBNAME}]: Database size'
type: ZABBIX_ACTIVE
key: 'pgsql.db.size["{$PG.HOST}","{$PG.PORT}","{$PG.USER}","{$PG.PASSWORD}","{$PG.DATABASE}","{#DBNAME}"]'
delay: 15m
units: B
description: 'Database size.'
tags:
- tag: component
value: storage
- tag: database
value: '{#DBNAME}'
- uuid: aa8e864297914f25bb6cc6b914871a46
name: 'DB [{#DBNAME}]: Blocks hit per second'
type: DEPENDENT
key: 'pgsql.dbstat.blks_hit.rate["{#DBNAME}"]'
delay: '0'
value_type: FLOAT
description: 'Total number of times per second disk blocks were found already in the buffer cache, so that a read was not necessary.'
preprocessing:
- type: JSONPATH
parameters:
- $.blks_hit
- type: CHANGE_PER_SECOND
parameters:
- ''
master_item:
key: 'pgsql.dbstat.get_metrics["{#DBNAME}"]'
tags:
- tag: component
value: cache
- tag: database
value: '{#DBNAME}'
- uuid: 69d6cc93dbff4669a18b6e12fb6e8b7a
name: 'DB [{#DBNAME}]: Disk blocks read per second'
type: DEPENDENT
key: 'pgsql.dbstat.blks_read.rate["{#DBNAME}"]'
delay: '0'
value_type: FLOAT
description: 'Total number of disk blocks read per second in this database.'
preprocessing:
- type: JSONPATH
parameters:
- $.blks_read
- type: CHANGE_PER_SECOND
parameters:
- ''
master_item:
key: 'pgsql.dbstat.get_metrics["{#DBNAME}"]'
tags:
- tag: component
value: storage
- tag: database
value: '{#DBNAME}'
- uuid: 8894ff8a7e4641559efd456a9024ef9a
name: 'DB [{#DBNAME}]: Detected conflicts per second'
type: DEPENDENT
key: 'pgsql.dbstat.conflicts.rate["{#DBNAME}"]'
delay: '0'
value_type: FLOAT
description: 'Total number of queries canceled due to conflicts with recovery in this database per second.'
preprocessing:
- type: JSONPATH
parameters:
- $.conflicts
- type: CHANGE_PER_SECOND
parameters:
- ''
master_item:
key: 'pgsql.dbstat.get_metrics["{#DBNAME}"]'
tags:
- tag: component
value: queries
- tag: database
value: '{#DBNAME}'
trigger_prototypes:
- uuid: e35f79c06fba41dfb9d9c35e4a13a043
expression: 'min(/PostgreSQL by Zabbix agent active/pgsql.dbstat.conflicts.rate["{#DBNAME}"],5m) > {$PG.CONFLICTS.MAX.WARN:"{#DBNAME}"}'
name: 'PostgreSQL: DB [{#DBNAME}]: Too many recovery conflicts'
event_name: 'PostgreSQL: DB [{#DBNAME}]: Too many recovery conflicts (over {$PG.CONFLICTS.MAX.WARN:"{#DBNAME}"} in 5m)'
priority: AVERAGE
description: |
The primary and standby servers are in many ways loosely connected. Actions on the primary will have an effect on the standby. As a result, there is potential for negative interactions or conflicts between them.
https://www.postgresql.org/docs/current/hot-standby.html#HOT-STANDBY-CONFLICT
tags:
- tag: scope
value: performance
- uuid: 8a3dfbedb1f54b93bc6ca90d9476677c
name: 'DB [{#DBNAME}]: Detected deadlocks per second'
type: DEPENDENT
key: 'pgsql.dbstat.deadlocks.rate["{#DBNAME}"]'
delay: '0'
value_type: FLOAT
description: 'Total number of detected deadlocks in this database per second.'
preprocessing:
- type: JSONPATH
parameters:
- $.deadlocks
- type: CHANGE_PER_SECOND
parameters:
- ''
master_item:
key: 'pgsql.dbstat.get_metrics["{#DBNAME}"]'
tags:
- tag: component
value: deadlocks
- tag: database
value: '{#DBNAME}'
trigger_prototypes:
- uuid: 5243a46334674a06b52efdef93bce0ec
expression: 'min(/PostgreSQL by Zabbix agent active/pgsql.dbstat.deadlocks.rate["{#DBNAME}"],5m) > {$PG.DEADLOCKS.MAX.WARN:"{#DBNAME}"}'
name: 'PostgreSQL: DB [{#DBNAME}]: Deadlock occurred'
event_name: 'PostgreSQL: DB [{#DBNAME}]: Deadlock occurred (over {$PG.DEADLOCKS.MAX.WARN:"{#DBNAME}"} in 5m)'
priority: HIGH
description: 'Number of deadlocks detected per second exceeds {$PG.DEADLOCKS.MAX.WARN:"{#DBNAME}"} for 5m.'
tags:
- tag: scope
value: availability
- uuid: f7a0b95d306542ddb8b9730650f4fc27
name: 'DB [{#DBNAME}]: Get dbstat'
type: DEPENDENT
key: 'pgsql.dbstat.get_metrics["{#DBNAME}"]'
delay: '0'
history: '0'
value_type: TEXT
trends: '0'
description: 'Get dbstat metrics for database "{#DBNAME}".'
preprocessing:
- type: JSONPATH
parameters:
- '$[''{#DBNAME}'']'
error_handler: DISCARD_VALUE
master_item:
key: 'pgsql.dbstat["{$PG.HOST}","{$PG.PORT}","{$PG.USER}","{$PG.PASSWORD}","{$PG.DATABASE}"]'
tags:
- tag: component
value: raw
- tag: database
value: '{#DBNAME}'
- uuid: eabd8d2f4a9d4a48be75d0d56eb48e17
name: 'DB [{#DBNAME}]: Temp_bytes written per second'
type: DEPENDENT
key: 'pgsql.dbstat.temp_bytes.rate["{#DBNAME}"]'
delay: '0'
units: B
description: 'Total amount of data written to temporary files by queries in this database.'
preprocessing:
- type: JSONPATH
parameters:
- $.temp_bytes
- type: CHANGE_PER_SECOND
parameters:
- ''
master_item:
key: 'pgsql.dbstat.get_metrics["{#DBNAME}"]'
tags:
- tag: component
value: storage
- tag: database
value: '{#DBNAME}'
- uuid: 51288ac46f5c49ae8cafe421bbb41d29
name: 'DB [{#DBNAME}]: Temp_files created per second'
type: DEPENDENT
key: 'pgsql.dbstat.temp_files.rate["{#DBNAME}"]'
delay: '0'
description: 'Total number of temporary files created by queries in this database.'
preprocessing:
- type: JSONPATH
parameters:
- $.temp_files
- type: CHANGE_PER_SECOND
parameters:
- ''
master_item:
key: 'pgsql.dbstat.get_metrics["{#DBNAME}"]'
tags:
- tag: component
value: storage
- tag: database
value: '{#DBNAME}'
- uuid: 7ad48d3b888a4f24a091a597e3189fee
name: 'DB [{#DBNAME}]: Tuples deleted per second'
type: DEPENDENT
key: 'pgsql.dbstat.tup_deleted.rate["{#DBNAME}"]'
delay: '0'
value_type: FLOAT
description: 'Total number of rows deleted by queries in this database per second.'
preprocessing:
- type: JSONPATH
parameters:
- $.tup_deleted
- type: CHANGE_PER_SECOND
parameters:
- ''
master_item:
key: 'pgsql.dbstat.get_metrics["{#DBNAME}"]'
tags:
- tag: component
value: queries
- tag: database
value: '{#DBNAME}'
- uuid: c0688782315f49aba4a468d9d0bac3e6
name: 'DB [{#DBNAME}]: Tuples fetched per second'
type: DEPENDENT
key: 'pgsql.dbstat.tup_fetched.rate["{#DBNAME}"]'
delay: '0'
value_type: FLOAT
description: 'Total number of rows fetched by queries in this database per second.'
preprocessing:
- type: JSONPATH
parameters:
- $.tup_fetched
- type: CHANGE_PER_SECOND
parameters:
- ''
master_item:
key: 'pgsql.dbstat.get_metrics["{#DBNAME}"]'
tags:
- tag: component
value: queries
- tag: database
value: '{#DBNAME}'
- uuid: 308fc84decc04b738d3e00cdf8427164
name: 'DB [{#DBNAME}]: Tuples inserted per second'
type: DEPENDENT
key: 'pgsql.dbstat.tup_inserted.rate["{#DBNAME}"]'
delay: '0'
value_type: FLOAT
description: 'Total number of rows inserted by queries in this database per second.'
preprocessing:
- type: JSONPATH
parameters:
- $.tup_inserted
- type: CHANGE_PER_SECOND
parameters:
- ''
master_item:
key: 'pgsql.dbstat.get_metrics["{#DBNAME}"]'
tags:
- tag: component
value: queries
- tag: database
value: '{#DBNAME}'
- uuid: 42125b8816044bc09ec4904ea78402b0
name: 'DB [{#DBNAME}]: Tuples returned per second'
type: DEPENDENT
key: 'pgsql.dbstat.tup_returned.rate["{#DBNAME}"]'
delay: '0'
value_type: FLOAT
description: 'Number of rows returned by queries in this database per second.'
preprocessing:
- type: JSONPATH
parameters:
- $.tup_returned
- type: CHANGE_PER_SECOND
parameters:
- ''
master_item:
key: 'pgsql.dbstat.get_metrics["{#DBNAME}"]'
tags:
- tag: component
value: queries
- tag: database
value: '{#DBNAME}'
- uuid: 495797c1a134404d88c4216aebff3f28
name: 'DB [{#DBNAME}]: Tuples updated per second'
type: DEPENDENT
key: 'pgsql.dbstat.tup_updated.rate["{#DBNAME}"]'
delay: '0'
value_type: FLOAT
description: 'Total number of rows updated by queries in this database per second.'
preprocessing:
- type: JSONPATH
parameters:
- $.tup_updated
- type: CHANGE_PER_SECOND
parameters:
- ''
master_item:
key: 'pgsql.dbstat.get_metrics["{#DBNAME}"]'
tags:
- tag: component
value: queries
- tag: database
value: '{#DBNAME}'
- uuid: 88b787af729944e8b262ca99dcefe8a3
name: 'DB [{#DBNAME}]: Commits per second'
type: DEPENDENT
key: 'pgsql.dbstat.xact_commit.rate["{#DBNAME}"]'
delay: '0'
value_type: FLOAT
description: 'Number of transactions in this database that have been committed per second.'
preprocessing:
- type: JSONPATH
parameters:
- $.xact_commit
- type: CHANGE_PER_SECOND
parameters:
- ''
master_item:
key: 'pgsql.dbstat.get_metrics["{#DBNAME}"]'
tags:
- tag: component
value: transactions
- tag: database
value: '{#DBNAME}'
- uuid: 2f31f5f8b36c4742b9a74862b17b30c0
name: 'DB [{#DBNAME}]: Rollbacks per second'
type: DEPENDENT
key: 'pgsql.dbstat.xact_rollback.rate["{#DBNAME}"]'
delay: '0'
value_type: FLOAT
description: 'Total number of transactions in this database that have been rolled back.'
preprocessing:
- type: JSONPATH
parameters:
- $.xact_rollback
- type: CHANGE_PER_SECOND
parameters:
- ''
master_item:
key: 'pgsql.dbstat.get_metrics["{#DBNAME}"]'
tags:
- tag: component
value: transactions
- tag: database
value: '{#DBNAME}'
- uuid: 50147f7140144de2af4200b9be95535a
name: 'DB [{#DBNAME}]: Frozen XID before autovacuum, %'
type: DEPENDENT
key: 'pgsql.frozenxid.prc_before_av["{#DBNAME}"]'
delay: '0'
value_type: FLOAT
units: '%'
description: |
Preventing Transaction ID Wraparound Failures:
https://www.postgresql.org/docs/current/routine-vacuuming.html#VACUUM-FOR-WRAPAROUND
preprocessing:
- type: JSONPATH
parameters:
- $.prc_before_av
master_item:
key: 'pgsql.frozenxid["{$PG.HOST}","{$PG.PORT}","{$PG.USER}","{$PG.PASSWORD}","{#DBNAME}"]'
tags:
- tag: component
value: transactions
- tag: database
value: '{#DBNAME}'
- uuid: 2cf70e1bfa084b92b7155a1f41351069
name: 'DB [{#DBNAME}]: Frozen XID before stop, %'
type: DEPENDENT
key: 'pgsql.frozenxid.prc_before_stop["{#DBNAME}"]'
delay: '0'
value_type: FLOAT
units: '%'
description: |
Preventing Transaction ID Wraparound Failures:
https://www.postgresql.org/docs/current/routine-vacuuming.html#VACUUM-FOR-WRAPAROUND
preprocessing:
- type: JSONPATH
parameters:
- $.prc_before_stop
master_item:
key: 'pgsql.frozenxid["{$PG.HOST}","{$PG.PORT}","{$PG.USER}","{$PG.PASSWORD}","{#DBNAME}"]'
tags:
- tag: component
value: transactions
- tag: database
value: '{#DBNAME}'
trigger_prototypes:
- uuid: 0c207f7271ad4df19977722a976b8ccc
expression: 'last(/PostgreSQL by Zabbix agent active/pgsql.frozenxid.prc_before_stop["{#DBNAME}"])<{$PG.FROZENXID_PCT_STOP.MIN.HIGH:"{#DBNAME}"}'
name: 'PostgreSQL: DB [{#DBNAME}]: VACUUM FREEZE is required to prevent wraparound'
event_name: 'PostgreSQL: DB [{#DBNAME}]: VACUUM FREEZE is required to prevent wraparound (frozen XID less than {$PG.FROZENXID_PCT_STOP.MIN.HIGH:"{#DBNAME}"} %)'
priority: AVERAGE
description: |
Preventing Transaction ID Wraparound Failures:
https://www.postgresql.org/docs/current/routine-vacuuming.html#VACUUM-FOR-WRAPAROUND
tags:
- tag: scope
value: availability
- uuid: 2e0e02f98b3c45d195f93e1ed8ec343d
name: 'DB [{#DBNAME}]: Get frozen XID'
type: ZABBIX_ACTIVE
key: 'pgsql.frozenxid["{$PG.HOST}","{$PG.PORT}","{$PG.USER}","{$PG.PASSWORD}","{#DBNAME}"]'
history: '0'
value_type: TEXT
trends: '0'
tags:
- tag: component
value: raw
- tag: database
value: '{#DBNAME}'
- uuid: 220503c9eeac46ea8656f7b5a149c29d
name: 'DB [{#DBNAME}]: Num of locks total'
type: DEPENDENT
key: 'pgsql.locks.total["{#DBNAME}"]'
delay: '0'
description: 'Total number of locks in this database.'
preprocessing:
- type: JSONPATH
parameters:
- '$[''{#DBNAME}''].total'
master_item:
key: 'pgsql.locks["{$PG.HOST}","{$PG.PORT}","{$PG.USER}","{$PG.PASSWORD}","{$PG.DATABASE}"]'
tags:
- tag: component
value: locks
- tag: database
value: '{#DBNAME}'
trigger_prototypes:
- uuid: 7a235edcda5d4482a9a3f3e5d741ee6e
expression: 'min(/PostgreSQL by Zabbix agent active/pgsql.locks.total["{#DBNAME}"],5m)>{$PG.LOCKS.MAX.WARN:"{#DBNAME}"}'
name: 'PostgreSQL: DB [{#DBNAME}]: Number of locks is too high'
event_name: 'PostgreSQL: DB [{#DBNAME}]: Number of locks is too high (over {$PG.LOCKS.MAX.WARN:"{#DBNAME}"} in 5m)'
priority: WARNING
tags:
- tag: scope
value: availability
- uuid: 1e31cbe913ef44b1896fc44cf11cb18c
name: 'DB [{#DBNAME}]: Get queries'
type: DEPENDENT
key: 'pgsql.queries.get_metrics["{#DBNAME}"]'
delay: '0'
history: '0'
value_type: TEXT
trends: '0'
description: 'Get queries metrics for database "{#DBNAME}".'
preprocessing:
- type: JSONPATH
parameters:
- '$[''{#DBNAME}'']'
error_handler: DISCARD_VALUE
master_item:
key: 'pgsql.queries["{$PG.HOST}","{$PG.PORT}","{$PG.USER}","{$PG.PASSWORD}","{$PG.DATABASE}","{$PG.QUERY_ETIME.MAX.WARN}"]'
tags:
- tag: component
value: raw
- tag: database
value: '{#DBNAME}'
- uuid: ed9c08ef16c845c08788de774405cbeb
name: 'DB [{#DBNAME}]: Queries slow maintenance count'
type: DEPENDENT
key: 'pgsql.queries.mro.slow_count["{#DBNAME}"]'
delay: '0'
description: 'Slow maintenance query count for this database.'
preprocessing:
- type: JSONPATH
parameters:
- $.mro_slow_count
master_item:
key: 'pgsql.queries.get_metrics["{#DBNAME}"]'
tags:
- tag: component
value: queries
- tag: database
value: '{#DBNAME}'
- uuid: a405b92ed32c4424a4e0136016370da4
name: 'DB [{#DBNAME}]: Queries max maintenance time'
type: DEPENDENT
key: 'pgsql.queries.mro.time_max["{#DBNAME}"]'
delay: '0'
units: s
description: 'Max maintenance query time for this database.'
preprocessing:
- type: JSONPATH
parameters:
- $.mro_time_max
master_item:
key: 'pgsql.queries.get_metrics["{#DBNAME}"]'
tags:
- tag: component
value: queries
- tag: database
value: '{#DBNAME}'
- uuid: 58406e650bf74db2ab216d35f4ef8f60
name: 'DB [{#DBNAME}]: Queries sum maintenance time'
type: DEPENDENT
key: 'pgsql.queries.mro.time_sum["{#DBNAME}"]'
delay: '0'
units: s
description: 'Sum maintenance query time for this database.'
preprocessing:
- type: JSONPATH
parameters:
- $.mro_time_sum
master_item:
key: 'pgsql.queries.get_metrics["{#DBNAME}"]'
tags:
- tag: component
value: queries
- tag: database
value: '{#DBNAME}'
- uuid: 04b8af083191408284aab798ed5c2ac4
name: 'DB [{#DBNAME}]: Queries slow query count'
type: DEPENDENT
key: 'pgsql.queries.query.slow_count["{#DBNAME}"]'
delay: '0'
description: 'Slow query count for this database.'
preprocessing:
- type: JSONPATH
parameters:
- $.query_slow_count
master_item:
key: 'pgsql.queries.get_metrics["{#DBNAME}"]'
tags:
- tag: component
value: queries
- tag: database
value: '{#DBNAME}'
trigger_prototypes:
- uuid: fe5e595cd37c40c3b99aa28a12575b3d
expression: 'min(/PostgreSQL by Zabbix agent active/pgsql.queries.query.slow_count["{#DBNAME}"],5m)>{$PG.SLOW_QUERIES.MAX.WARN:"{#DBNAME}"}'
name: 'PostgreSQL: DB [{#DBNAME}]: Too many slow queries'
event_name: 'PostgreSQL: DB [{#DBNAME}]: Too many slow queries (over {$PG.SLOW_QUERIES.MAX.WARN:"{#DBNAME}"} in 5m)'
priority: WARNING
description: 'The number of detected slow queries exceeds the limit of {$PG.SLOW_QUERIES.MAX.WARN:"{#DBNAME}"}.'
tags:
- tag: scope
value: performance
- uuid: d47d6e5857534981aeb5e92ef6423c7d
name: 'DB [{#DBNAME}]: Queries max query time'
type: DEPENDENT
key: 'pgsql.queries.query.time_max["{#DBNAME}"]'
delay: '0'
units: s
description: 'Max query time for this database.'
preprocessing:
- type: JSONPATH
parameters:
- $.query_time_max
master_item:
key: 'pgsql.queries.get_metrics["{#DBNAME}"]'
tags:
- tag: component
value: queries
- tag: database
value: '{#DBNAME}'
- uuid: a5c184f0d7c74a52983cccb836fe3d61
name: 'DB [{#DBNAME}]: Queries sum query time'
type: DEPENDENT
key: 'pgsql.queries.query.time_sum["{#DBNAME}"]'
delay: '0'
units: s
description: 'Sum query time for this database.'
preprocessing:
- type: JSONPATH
parameters:
- $.query_time_sum
master_item:
key: 'pgsql.queries.get_metrics["{#DBNAME}"]'
tags:
- tag: component
value: queries
- tag: database
value: '{#DBNAME}'
- uuid: 4b71f7bbc17c4695beb75cfc9bc67da0
name: 'DB [{#DBNAME}]: Queries slow transaction count'
type: DEPENDENT
key: 'pgsql.queries.tx.slow_count["{#DBNAME}"]'
delay: '0'
description: 'Slow transaction query count for this database.'
preprocessing:
- type: JSONPATH
parameters:
- $.tx_slow_count
master_item:
key: 'pgsql.queries.get_metrics["{#DBNAME}"]'
tags:
- tag: component
value: queries
- tag: database
value: '{#DBNAME}'
- uuid: 5489fc69a7ce45a0a0c0cff565a62189
name: 'DB [{#DBNAME}]: Queries max transaction time'
type: DEPENDENT
key: 'pgsql.queries.tx.time_max["{#DBNAME}"]'
delay: '0'
units: s
description: 'Max transaction query time for this database.'
preprocessing:
- type: JSONPATH
parameters:
- $.tx_time_max
master_item:
key: 'pgsql.queries.get_metrics["{#DBNAME}"]'
tags:
- tag: component
value: queries
- tag: database
value: '{#DBNAME}'
- uuid: 3283a1520f1b4adabf01964efdaaa31c
name: 'DB [{#DBNAME}]: Queries sum transaction time'
type: DEPENDENT
key: 'pgsql.queries.tx.time_sum["{#DBNAME}"]'
delay: '0'
units: s
description: 'Sum transaction query time for this database.'
preprocessing:
- type: JSONPATH
parameters:
- $.tx_time_sum
master_item:
key: 'pgsql.queries.get_metrics["{#DBNAME}"]'
tags:
- tag: component
value: queries
- tag: database
value: '{#DBNAME}'
- uuid: 7e7e322396c24c70bb479ae84b79bbcd
name: 'DB [{#DBNAME}]: Index scans per second'
type: DEPENDENT
key: 'pgsql.scans.idx.rate["{#DBNAME}"]'
delay: '0'
description: 'Number of index scans in the database per second.'
preprocessing:
- type: JSONPATH
parameters:
- $.idx
- type: CHANGE_PER_SECOND
parameters:
- ''
master_item:
key: 'pgsql.scans["{$PG.HOST}","{$PG.PORT}","{$PG.USER}","{$PG.PASSWORD}","{#DBNAME}"]'
tags:
- tag: component
value: scans
- tag: database
value: '{#DBNAME}'
- uuid: c64cdbfa58994f699fb7ad7c3fd38b5f
name: 'DB [{#DBNAME}]: Sequential scans per second'
type: DEPENDENT
key: 'pgsql.scans.seq.rate["{#DBNAME}"]'
delay: '0'
value_type: FLOAT
description: 'Number of sequential scans in this database per second.'
preprocessing:
- type: JSONPATH
parameters:
- $.seq
- type: CHANGE_PER_SECOND
parameters:
- ''
master_item:
key: 'pgsql.scans["{$PG.HOST}","{$PG.PORT}","{$PG.USER}","{$PG.PASSWORD}","{#DBNAME}"]'
tags:
- tag: component
value: scans
- tag: database
value: '{#DBNAME}'
- uuid: 8ee891f2e0ae4c74a24ebffc67380f01
name: 'DB [{#DBNAME}]: Get scans'
type: ZABBIX_ACTIVE
key: 'pgsql.scans["{$PG.HOST}","{$PG.PORT}","{$PG.USER}","{$PG.PASSWORD}","{#DBNAME}"]'
history: '0'
value_type: TEXT
trends: '0'
description: 'Number of scans done for table/index in this database.'
tags:
- tag: component
value: raw
- tag: database
value: '{#DBNAME}'
graph_prototypes:
- uuid: 692254ddbb2646ed8f8f73e28d400d28
name: 'DB [{#DBNAME}]: Block hit/read'
ymin_type_1: FIXED
graph_items:
- color: 199C0D
item:
host: 'PostgreSQL by Zabbix agent active'
key: 'pgsql.dbstat.blks_hit.rate["{#DBNAME}"]'
- sortorder: '1'
color: F63100
item:
host: 'PostgreSQL by Zabbix agent active'
key: 'pgsql.dbstat.blks_read.rate["{#DBNAME}"]'
- uuid: 0faea1cf0ef4422cabc9af14f3e774e9
name: 'DB [{#DBNAME}]: Database size'
ymin_type_1: FIXED
graph_items:
- color: 199C0D
item:
host: 'PostgreSQL by Zabbix agent active'
key: 'pgsql.db.size["{$PG.HOST}","{$PG.PORT}","{$PG.USER}","{$PG.PASSWORD}","{$PG.DATABASE}","{#DBNAME}"]'
- uuid: 61a7e55b8e614ae58a5e8675babba974
name: 'DB [{#DBNAME}]: Events'
ymin_type_1: FIXED
graph_items:
- drawtype: GRADIENT_LINE
color: 199C0D
item:
host: 'PostgreSQL by Zabbix agent active'
key: 'pgsql.dbstat.xact_commit.rate["{#DBNAME}"]'
- sortorder: '1'
color: F63100
item:
host: 'PostgreSQL by Zabbix agent active'
key: 'pgsql.dbstat.conflicts.rate["{#DBNAME}"]'
- sortorder: '2'
color: 00611C
item:
host: 'PostgreSQL by Zabbix agent active'
key: 'pgsql.dbstat.deadlocks.rate["{#DBNAME}"]'
- sortorder: '3'
color: F7941D
item:
host: 'PostgreSQL by Zabbix agent active'
key: 'pgsql.dbstat.xact_rollback.rate["{#DBNAME}"]'
- uuid: 1ef3d8b8ac0d48d9b19551ceb60de933
name: 'DB [{#DBNAME}]: Locks'
ymin_type_1: FIXED
graph_items:
- color: 199C0D
item:
host: 'PostgreSQL by Zabbix agent active'
key: 'pgsql.locks.total["{#DBNAME}"]'
- uuid: 27541a985dc04626836b8c11a038f328
name: 'DB [{#DBNAME}]: Queries'
ymin_type_1: FIXED
graph_items:
- color: 199C0D
yaxisside: RIGHT
item:
host: 'PostgreSQL by Zabbix agent active'
key: 'pgsql.queries.mro.time_max["{#DBNAME}"]'
- sortorder: '1'
color: F63100
yaxisside: RIGHT
item:
host: 'PostgreSQL by Zabbix agent active'
key: 'pgsql.queries.query.time_max["{#DBNAME}"]'
- sortorder: '2'
color: 00611C
yaxisside: RIGHT
item:
host: 'PostgreSQL by Zabbix agent active'
key: 'pgsql.queries.tx.time_max["{#DBNAME}"]'
- sortorder: '3'
drawtype: GRADIENT_LINE
color: F7941D
item:
host: 'PostgreSQL by Zabbix agent active'
key: 'pgsql.queries.mro.time_sum["{#DBNAME}"]'
- sortorder: '4'
drawtype: GRADIENT_LINE
color: FC6EA3
item:
host: 'PostgreSQL by Zabbix agent active'
key: 'pgsql.queries.query.time_sum["{#DBNAME}"]'
- sortorder: '5'
drawtype: GRADIENT_LINE
color: 6C59DC
item:
host: 'PostgreSQL by Zabbix agent active'
key: 'pgsql.queries.tx.time_sum["{#DBNAME}"]'
- uuid: 7d858a9a047b453096471773f8a31063
name: 'DB [{#DBNAME}]: Slow queries'
ymin_type_1: FIXED
graph_items:
- color: 199C0D
item:
host: 'PostgreSQL by Zabbix agent active'
key: 'pgsql.queries.mro.slow_count["{#DBNAME}"]'
- sortorder: '1'
color: F63100
item:
host: 'PostgreSQL by Zabbix agent active'
key: 'pgsql.queries.query.slow_count["{#DBNAME}"]'
- sortorder: '2'
color: 00611C
item:
host: 'PostgreSQL by Zabbix agent active'
key: 'pgsql.queries.tx.slow_count["{#DBNAME}"]'
- uuid: 806181664b4b4e44b28a099b0281edad
name: 'DB [{#DBNAME}]: Temp files'
graph_items:
- drawtype: GRADIENT_LINE
color: 199C0D
item:
host: 'PostgreSQL by Zabbix agent active'
key: 'pgsql.dbstat.temp_bytes.rate["{#DBNAME}"]'
- sortorder: '1'
color: F63100
yaxisside: RIGHT
item:
host: 'PostgreSQL by Zabbix agent active'
key: 'pgsql.dbstat.temp_files.rate["{#DBNAME}"]'
- uuid: e652d9ffb74b4abab75f811dd696bf21
name: 'DB [{#DBNAME}]: Tuples'
ymin_type_1: FIXED
graph_items:
- color: 199C0D
item:
host: 'PostgreSQL by Zabbix agent active'
key: 'pgsql.dbstat.tup_deleted.rate["{#DBNAME}"]'
- sortorder: '1'
color: F63100
item:
host: 'PostgreSQL by Zabbix agent active'
key: 'pgsql.dbstat.tup_fetched.rate["{#DBNAME}"]'
- sortorder: '2'
color: 00611C
item:
host: 'PostgreSQL by Zabbix agent active'
key: 'pgsql.dbstat.tup_inserted.rate["{#DBNAME}"]'
- sortorder: '3'
color: F7941D
item:
host: 'PostgreSQL by Zabbix agent active'
key: 'pgsql.dbstat.tup_returned.rate["{#DBNAME}"]'
- sortorder: '4'
color: FC6EA3
item:
host: 'PostgreSQL by Zabbix agent active'
key: 'pgsql.dbstat.tup_updated.rate["{#DBNAME}"]'
tags:
- tag: class
value: database
- tag: target
value: postgresql
macros:
- macro: '{$PG.CACHE_HITRATIO.MIN.WARN}'
value: '90'
description: 'Minimum cache hit ratio percentage for trigger expression.'
- macro: '{$PG.CHECKPOINTS_REQ.MAX.WARN}'
value: '5'
description: 'Maximum required checkpoint occurrences for trigger expression.'
- macro: '{$PG.CONFLICTS.MAX.WARN}'
value: '0'
description: 'Maximum number of recovery conflicts for trigger expression.'
- macro: '{$PG.CONN_TOTAL_PCT.MAX.WARN}'
value: '90'
description: 'Maximum percentage of current connections for trigger expression.'
- macro: '{$PG.DATABASE}'
value: postgres
description: 'Default PostgreSQL database for the connection.'
- macro: '{$PG.DEADLOCKS.MAX.WARN}'
value: '0'
description: 'Maximum number of detected deadlocks for trigger expression.'
- macro: '{$PG.FROZENXID_PCT_STOP.MIN.HIGH}'
value: '75'
description: 'Minimum frozen XID before stop percentage for trigger expression.'
- macro: '{$PG.HOST}'
value: localhost
description: 'Hostname or IP of PostgreSQL host.'
- macro: '{$PG.LLD.FILTER.DBNAME}'
value: .+
description: 'Filter of discoverable databases.'
- macro: '{$PG.LOCKS.MAX.WARN}'
value: '100'
description: 'Maximum number of locks for trigger expression.'
- macro: '{$PG.PASSWORD}'
value: '<Put the password here>'
description: 'PostgreSQL user password.'
- macro: '{$PG.PING_TIME.MAX.WARN}'
value: 1s
description: 'Maximum time of connection response for trigger expression.'
- macro: '{$PG.PORT}'
value: '5432'
description: 'PostgreSQL service port.'
- macro: '{$PG.QUERY_ETIME.MAX.WARN}'
value: '30'
description: 'Execution time limit for count of slow queries.'
- macro: '{$PG.REPL_LAG.MAX.WARN}'
value: 10m
description: 'Maximum replication lag time for trigger expression.'
- macro: '{$PG.SLOW_QUERIES.MAX.WARN}'
value: '5'
description: 'Slow queries count threshold for a trigger.'
- macro: '{$PG.USER}'
value: zbx_monitor
description: 'PostgreSQL username.'
dashboards:
- uuid: 1311b2e221bf4de49c394bf689333810
name: 'PostgreSQL databases'
pages:
- widgets:
- type: graphprototype
width: '36'
height: '5'
fields:
- type: INTEGER
name: columns
value: '1'
- type: GRAPH_PROTOTYPE
name: graphid.0
value:
host: 'PostgreSQL by Zabbix agent active'
name: 'DB [{#DBNAME}]: Tuples'
- type: STRING
name: reference
value: AAAAA
- type: graphprototype
'y': '5'
width: '36'
height: '5'
fields:
- type: INTEGER
name: columns
value: '1'
- type: GRAPH_PROTOTYPE
name: graphid.0
value:
host: 'PostgreSQL by Zabbix agent active'
name: 'DB [{#DBNAME}]: Block hit/read'
- type: STRING
name: reference
value: AAAAC
- type: graphprototype
'y': '10'
width: '36'
height: '5'
fields:
- type: INTEGER
name: columns
value: '1'
- type: GRAPH_PROTOTYPE
name: graphid.0
value:
host: 'PostgreSQL by Zabbix agent active'
name: 'DB [{#DBNAME}]: Locks'
- type: STRING
name: reference
value: AAAAE
- type: graphprototype
'y': '15'
width: '36'
height: '5'
fields:
- type: INTEGER
name: columns
value: '1'
- type: GRAPH_PROTOTYPE
name: graphid.0
value:
host: 'PostgreSQL by Zabbix agent active'
name: 'DB [{#DBNAME}]: Queries'
- type: STRING
name: reference
value: AAAAG
- type: graphprototype
x: '36'
width: '36'
height: '5'
fields:
- type: INTEGER
name: columns
value: '1'
- type: GRAPH_PROTOTYPE
name: graphid.0
value:
host: 'PostgreSQL by Zabbix agent active'
name: 'DB [{#DBNAME}]: Events'
- type: STRING
name: reference
value: AAAAB
- type: graphprototype
x: '36'
'y': '5'
width: '36'
height: '5'
fields:
- type: INTEGER
name: columns
value: '1'
- type: GRAPH_PROTOTYPE
name: graphid.0
value:
host: 'PostgreSQL by Zabbix agent active'
name: 'DB [{#DBNAME}]: Temp files'
- type: STRING
name: reference
value: AAAAD
- type: graphprototype
x: '36'
'y': '10'
width: '36'
height: '5'
fields:
- type: INTEGER
name: columns
value: '1'
- type: GRAPH_PROTOTYPE
name: graphid.0
value:
host: 'PostgreSQL by Zabbix agent active'
name: 'DB [{#DBNAME}]: Database size'
- type: STRING
name: reference
value: AAAAF
- type: graphprototype
x: '36'
'y': '15'
width: '36'
height: '5'
fields:
- type: INTEGER
name: columns
value: '1'
- type: GRAPH_PROTOTYPE
name: graphid.0
value:
host: 'PostgreSQL by Zabbix agent active'
name: 'DB [{#DBNAME}]: Slow queries'
- type: STRING
name: reference
value: AAAAH
- uuid: 2d6268f99f9748d18cb0bb4aee1fc550
name: 'PostgreSQL stat'
pages:
- widgets:
- type: graph
width: '36'
height: '5'
fields:
- type: GRAPH
name: graphid.0
value:
host: 'PostgreSQL by Zabbix agent active'
name: 'PostgreSQL connections'
- type: STRING
name: reference
value: AAAAI
- type: graph
'y': '5'
width: '36'
height: '5'
fields:
- type: GRAPH
name: graphid.0
value:
host: 'PostgreSQL by Zabbix agent active'
name: 'PostgreSQL ping'
- type: STRING
name: reference
value: AAAAK
- type: graph
'y': '10'
width: '36'
height: '5'
fields:
- type: GRAPH
name: graphid.0
value:
host: 'PostgreSQL by Zabbix agent active'
name: 'PostgreSQL replication lag'
- type: STRING
name: reference
value: AAAAM
- type: graph
'y': '15'
width: '36'
height: '5'
fields:
- type: GRAPH
name: graphid.0
value:
host: 'PostgreSQL by Zabbix agent active'
name: 'PostgreSQL bgwriter'
- type: STRING
name: reference
value: AAAAO
- type: graph
x: '36'
width: '36'
height: '5'
fields:
- type: GRAPH
name: graphid.0
value:
host: 'PostgreSQL by Zabbix agent active'
name: 'PostgreSQL transactions'
- type: STRING
name: reference
value: AAAAJ
- type: graph
x: '36'
'y': '5'
width: '36'
height: '5'
fields:
- type: GRAPH
name: graphid.0
value:
host: 'PostgreSQL by Zabbix agent active'
name: 'PostgreSQL uptime'
- type: STRING
name: reference
value: AAAAL
- type: graph
x: '36'
'y': '10'
width: '36'
height: '5'
fields:
- type: GRAPH
name: graphid.0
value:
host: 'PostgreSQL by Zabbix agent active'
name: 'PostgreSQL WAL'
- type: STRING
name: reference
value: AAAAN
- type: graph
x: '36'
'y': '15'
width: '36'
height: '5'
fields:
- type: GRAPH
name: graphid.0
value:
host: 'PostgreSQL by Zabbix agent active'
name: 'PostgreSQL checkpoints'
- type: STRING
name: reference
value: AAAAP
valuemaps:
- uuid: 6337031a50574f65aec828b7dd48beaf
name: 'PostgreSQL recovery role'
mappings:
- value: '0'
newvalue: Master
- value: '1'
newvalue: Standby
- uuid: 0e115837e8c54923ad10a9b7adcda3dd
name: 'PostgreSQL replication status'
mappings:
- value: '0'
newvalue: Down
- value: '1'
newvalue: Up
- value: '2'
newvalue: Master
- uuid: 5bc68afd88094e0fb14572246050181f
name: 'Service state'
mappings:
- value: '0'
newvalue: Down
- value: '1'
newvalue: Up
graphs:
- uuid: 0f8ec9f5313348bfbe3b11836f6011d6
name: 'PostgreSQL bgwriter'
ymin_type_1: FIXED
graph_items:
- color: 199C0D
yaxisside: RIGHT
item:
host: 'PostgreSQL by Zabbix agent active'
key: pgsql.bgwriter.buffers_alloc.rate
- sortorder: '1'
color: F63100
yaxisside: RIGHT
item:
host: 'PostgreSQL by Zabbix agent active'
key: pgsql.bgwriter.buffers_clean.rate
- sortorder: '2'
color: 00611C
yaxisside: RIGHT
item:
host: 'PostgreSQL by Zabbix agent active'
key: pgsql.bgwriter.buffers_backend.rate
- sortorder: '3'
color: F7941D
yaxisside: RIGHT
item:
host: 'PostgreSQL by Zabbix agent active'
key: pgsql.bgwriter.buffers_checkpoint.rate
- sortorder: '4'
color: FC6EA3
item:
host: 'PostgreSQL by Zabbix agent active'
key: pgsql.bgwriter.maxwritten_clean.rate
- sortorder: '5'
color: 6C59DC
item:
host: 'PostgreSQL by Zabbix agent active'
key: pgsql.bgwriter.buffers_backend_fsync.rate
- uuid: c15a7590e6594541acb6327852af11fa
name: 'PostgreSQL checkpoints'
ymin_type_1: FIXED
graph_items:
- color: 199C0D
item:
host: 'PostgreSQL by Zabbix agent active'
key: pgsql.bgwriter.checkpoints_timed.rate
- sortorder: '1'
color: F63100
item:
host: 'PostgreSQL by Zabbix agent active'
key: pgsql.bgwriter.checkpoints_req.rate
- sortorder: '2'
color: 00611C
yaxisside: RIGHT
item:
host: 'PostgreSQL by Zabbix agent active'
key: pgsql.bgwriter.checkpoint_sync_time.rate
- sortorder: '3'
color: F7941D
yaxisside: RIGHT
item:
host: 'PostgreSQL by Zabbix agent active'
key: pgsql.bgwriter.checkpoint_write_time.rate
- uuid: 6748cbe523f44028bc84899cf3c68881
name: 'PostgreSQL connections'
ymin_type_1: FIXED
graph_items:
- drawtype: GRADIENT_LINE
color: 199C0D
yaxisside: RIGHT
item:
host: 'PostgreSQL by Zabbix agent active'
key: pgsql.connections.sum.total
- sortorder: '1'
color: F63100
item:
host: 'PostgreSQL by Zabbix agent active'
key: pgsql.connections.sum.total_pct
- sortorder: '2'
color: 00611C
yaxisside: RIGHT
item:
host: 'PostgreSQL by Zabbix agent active'
key: pgsql.connections.sum.active
- sortorder: '3'
color: F7941D
yaxisside: RIGHT
item:
host: 'PostgreSQL by Zabbix agent active'
key: pgsql.connections.sum.idle
- sortorder: '4'
color: FC6EA3
yaxisside: RIGHT
item:
host: 'PostgreSQL by Zabbix agent active'
key: pgsql.connections.sum.idle_in_transaction
- sortorder: '5'
color: 6C59DC
yaxisside: RIGHT
item:
host: 'PostgreSQL by Zabbix agent active'
key: pgsql.connections.sum.prepared
- sortorder: '6'
color: C7A72D
yaxisside: RIGHT
item:
host: 'PostgreSQL by Zabbix agent active'
key: pgsql.connections.sum.waiting
- uuid: 5705f8c49a6343b39e4a1a574f14b16d
name: 'PostgreSQL ping'
ymin_type_1: FIXED
graph_items:
- drawtype: GRADIENT_LINE
color: 199C0D
item:
host: 'PostgreSQL by Zabbix agent active'
key: 'pgsql.ping["{$PG.HOST}","{$PG.PORT}"]'
- sortorder: '1'
color: F63100
yaxisside: RIGHT
item:
host: 'PostgreSQL by Zabbix agent active'
key: 'pgsql.ping.time["{$PG.HOST}","{$PG.PORT}","{$PG.USER}","{$PG.PASSWORD}","{$PG.DATABASE}"]'
- uuid: 8687fc6723b8477ba4c909b4d348303c
name: 'PostgreSQL replication lag'
ymin_type_1: FIXED
graph_items:
- color: 199C0D
item:
host: 'PostgreSQL by Zabbix agent active'
key: 'pgsql.replication.lag.sec["{$PG.HOST}","{$PG.PORT}","{$PG.USER}","{$PG.PASSWORD}","{$PG.DATABASE}"]'
- uuid: 245d91951a8048d1ad091cdcacb5bbeb
name: 'PostgreSQL transactions'
ymin_type_1: FIXED
graph_items:
- color: 199C0D
yaxisside: RIGHT
item:
host: 'PostgreSQL by Zabbix agent active'
key: pgsql.transactions.active
- sortorder: '1'
color: F63100
yaxisside: RIGHT
item:
host: 'PostgreSQL by Zabbix agent active'
key: pgsql.transactions.idle
- sortorder: '2'
color: 00611C
yaxisside: RIGHT
item:
host: 'PostgreSQL by Zabbix agent active'
key: pgsql.transactions.prepared
- sortorder: '3'
color: F7941D
yaxisside: RIGHT
item:
host: 'PostgreSQL by Zabbix agent active'
key: pgsql.transactions.waiting
- uuid: dc9cd08e1f6a4e3594eef539b3d00df9
name: 'PostgreSQL uptime'
show_triggers: 'NO'
ymin_type_1: FIXED
graph_items:
- color: 199C0D
item:
host: 'PostgreSQL by Zabbix agent active'
key: 'pgsql.uptime["{$PG.HOST}","{$PG.PORT}","{$PG.USER}","{$PG.PASSWORD}","{$PG.DATABASE}"]'
- sortorder: '1'
color: F63100
yaxisside: RIGHT
item:
host: 'PostgreSQL by Zabbix agent active'
key: 'pgsql.cache.hit["{$PG.HOST}","{$PG.PORT}","{$PG.USER}","{$PG.PASSWORD}","{$PG.DATABASE}"]'
- uuid: 1fd6ffdc171146d6b05d9891ab56312c
name: 'PostgreSQL WAL'
ymin_type_1: FIXED
graph_items:
- color: 199C0D
item:
host: 'PostgreSQL by Zabbix agent active'
key: pgsql.wal.write
- sortorder: '1'
color: F63100
yaxisside: RIGHT
item:
host: 'PostgreSQL by Zabbix agent active'
key: pgsql.wal.count