7.4748ad4d098d447d492bb935c907f652fTemplates/Databasesd0ef7d659a8f4beaaabfc4b6134e737aPostgreSQL by Zabbix agent 2PostgreSQL by Zabbix agent 2This template is designed for the deployment of PostgreSQL monitoring by Zabbix via Zabbix agent 2 and uses a loadable plugin to run SQL queries.
Setup:
1. Deploy Zabbix agent 2 with the PostgreSQL plugin. Starting with Zabbix versions 6.0.10 / 6.2.4 / 6.4 PostgreSQL metrics are moved to a loadable plugin and require installation of a separate package or compilation of the plugin from sources (https://www.zabbix.com/documentation/7.0/manual/extensions/plugins/build).
2. Create the PostgreSQL user for monitoring (`<password>` at your discretion) and inherit permissions from the default role `pg_monitor`:
CREATE USER zbx_monitor WITH PASSWORD '<PASSWORD>' INHERIT;
GRANT pg_monitor TO zbx_monitor;
3. 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).
4. Set the connection string for the PostgreSQL instance in the `{$PG.CONNSTRING}` macro as URI, such as `<protocol(host:port)>`, or specify the named session - `<sessionname>`.
Note: if you want to use SSL/TLS encryption to protect communications with the remote PostgreSQL instance, a named session must be used. In that case, the instance URI should be specified in the `Plugins.PostgreSQL.Sessions.*.Uri` parameter in the PostgreSQL plugin configuration files alongside all the encryption parameters (type, cerfiticate/key filepaths if needed etc.).
You can check the PostgreSQL plugin documentation (https://git.zabbix.com/projects/AP/repos/postgresql/browse?at=refs%2Fheads%2Frelease%2F7.0) for details about agent plugin parameters and named sessions.
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.
Note that plugin TLS certificate validation relies on checking the Subject Alternative Names (SAN) instead of the Common Name (CN), check the cryptography package documentation (https://pkg.go.dev/crypto/x509) for details.
For example, to enable required encryption in transport mode without identity checks you could create the file `/etc/zabbix/zabbix_agent2.d/postgresql_myconn.conf` with the following configuration for the named session `myconn` (replace `<instanceip>` with the address of the PostgreSQL instance):
Plugins.PostgreSQL.Sessions.myconn.Uri=tcp://<instanceip>:5432
Plugins.PostgreSQL.Sessions.myconn.TLSConnect=required
Then set the `{$PG.CONNSTRING}` macro to `myconn` to use this named session.
5. Set the password that you specified in step 2 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"Zabbix7.0-0Templates/Databases- 04b1c83463f247b0a42f17c5d0a9ce14Archive: Count of archived filesDEPENDENTpgsql.archive.count_archived_files7dFLOATCount of archived files.JSONPATH$.archived_countpgsql.archive["{$PG.CONNSTRING}","{$PG.USER}","{$PG.PASSWORD}"]componentarchive
- 729208d50ef64e50b0bb342899e211c2Archive: Count of files in archive_status need to archiveDEPENDENTpgsql.archive.count_files_to_archive7dFLOATCount of files to archive.JSONPATH$.count_filespgsql.archive["{$PG.CONNSTRING}","{$PG.USER}","{$PG.PASSWORD}"]componentarchive
- b60523c62afc4813aeb64cf9598fb7bdArchive: Count of failed attempts to archive filesDEPENDENTpgsql.archive.failed_trying_to_archive7dFLOATCount of failed attempts to archive files.JSONPATH$.failed_countpgsql.archive["{$PG.CONNSTRING}","{$PG.USER}","{$PG.PASSWORD}"]componentarchive
- 285f434f79864d24a4e66d5a49c539e9Archive: Size of files need to archiveDEPENDENTpgsql.archive.size_files_to_archive7dFLOATSize of files to archive.JSONPATH$.size_filespgsql.archive["{$PG.CONNSTRING}","{$PG.USER}","{$PG.PASSWORD}"]componentarchive
- e9f4284fd3a1459e9c519dbdd8ee3425Get archivepgsql.archive["{$PG.CONNSTRING}","{$PG.USER}","{$PG.PASSWORD}"]0TEXTCollect archive status metrics.componentraw
- d9169b4b31554063b9d01d0d27b4beeeCount of autovacuum workerspgsql.autovacuum.count["{$PG.CONNSTRING}","{$PG.USER}","{$PG.PASSWORD}"]7dFLOATNumber of autovacuum workers.componentsystem
- c49f777ae0db48879bc946989bfc36f6Bgwriter: Buffers allocated per secondDEPENDENTpgsql.bgwriter.buffers_alloc.rate7dFLOATNumber of buffers allocated per second.JSONPATH$.buffers_allocCHANGE_PER_SECONDpgsql.bgwriter["{$PG.CONNSTRING}","{$PG.USER}","{$PG.PASSWORD}"]componentbgwriter
- 1624e89567824e0493492a3dcc979788Bgwriter: Buffers written directly by a backend per secondDEPENDENTpgsql.bgwriter.buffers_backend.rate7dFLOATNumber of buffers written directly by a backend per second.JSONPATH$.buffers_backendCHANGE_PER_SECONDpgsql.bgwriter["{$PG.CONNSTRING}","{$PG.USER}","{$PG.PASSWORD}"]componentbgwriter
- 6e5990d8a0854efd83b3e6a57aa2c2f9Bgwriter: Times a backend executed its own fsync per secondDEPENDENTpgsql.bgwriter.buffers_backend_fsync.rate7dFLOATNumber 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).JSONPATH$.buffers_backend_fsyncCHANGE_PER_SECONDpgsql.bgwriter["{$PG.CONNSTRING}","{$PG.USER}","{$PG.PASSWORD}"]componentbgwriter
- 3bf0496d313f4dfea67c95010be54372Checkpoint: Buffers written during checkpoints per secondDEPENDENTpgsql.bgwriter.buffers_checkpoint.rate7dFLOATNumber of buffers written during checkpoints per second.JSONPATH$.buffers_checkpointCHANGE_PER_SECONDpgsql.bgwriter["{$PG.CONNSTRING}","{$PG.USER}","{$PG.PASSWORD}"]componentbgwriter
- 65f4aeedbc7d40ed9a14e0dbd8024c4bCheckpoint: Buffers written by the background writer per secondDEPENDENTpgsql.bgwriter.buffers_clean.rate7dFLOATNumber of buffers written by the background writer per second.JSONPATH$.buffers_cleanCHANGE_PER_SECONDpgsql.bgwriter["{$PG.CONNSTRING}","{$PG.USER}","{$PG.PASSWORD}"]componentbgwriter
- 23fcb5ee8c19436b827001114961eb16Checkpoint: Requested per secondDEPENDENTpgsql.bgwriter.checkpoints_req.rate7dFLOATNumber of requested checkpoints that have been performed per second.JSONPATH$.checkpoints_reqCHANGE_PER_SECONDpgsql.bgwriter["{$PG.CONNSTRING}","{$PG.USER}","{$PG.PASSWORD}"]componentbgwriter
- 9c578a8e072940728cc00d94f52cec8dCheckpoint: Scheduled per secondDEPENDENTpgsql.bgwriter.checkpoints_timed.rate7dFLOATNumber of scheduled checkpoints that have been performed per second.JSONPATH$.checkpoints_timedCHANGE_PER_SECONDpgsql.bgwriter["{$PG.CONNSTRING}","{$PG.USER}","{$PG.PASSWORD}"]componentbgwriter
- b94507037a584b9391f610e59dd34e6cCheckpoint: Checkpoint sync time per secondDEPENDENTpgsql.bgwriter.checkpoint_sync_time.rate7dFLOATsTotal amount of time per second that has been spent in the portion of checkpoint processing where files are synchronized to disk.JSONPATH$.checkpoint_sync_timeMULTIPLIER0.001CHANGE_PER_SECONDpgsql.bgwriter["{$PG.CONNSTRING}","{$PG.USER}","{$PG.PASSWORD}"]componentbgwriter
- 26839587c46043caa2991e973962b954Checkpoint: Checkpoint write time per secondDEPENDENTpgsql.bgwriter.checkpoint_write_time.rate7dFLOATsTotal amount of time per second that has been spent in the portion of checkpoint processing where files are written to disk.JSONPATH$.checkpoint_write_timeMULTIPLIER0.001CHANGE_PER_SECONDpgsql.bgwriter["{$PG.CONNSTRING}","{$PG.USER}","{$PG.PASSWORD}"]componentbgwriter
- b83939ecfb094a7e9eb42cd9a7e2695cBgwriter: Number of bgwriter cleaning scan stopped per secondDEPENDENTpgsql.bgwriter.maxwritten_clean.rate7dFLOATNumber of times the background writer stopped a cleaning scan because it had written too many buffers per second.JSONPATH$.maxwritten_cleanCHANGE_PER_SECONDpgsql.bgwriter["{$PG.CONNSTRING}","{$PG.USER}","{$PG.PASSWORD}"]componentbgwriter
- 6020e17c25104cbfba182e9cddfe6336Get bgwriterpgsql.bgwriter["{$PG.CONNSTRING}","{$PG.USER}","{$PG.PASSWORD}"]0TEXTCollect all metrics from pg_stat_bgwriter:
https://www.postgresql.org/docs/current/monitoring-stats.html#PG-STAT-BGWRITER-VIEWcomponentraw
- b98d2328694f44598f2177b3f93d4b90Cache hit ratio, %CALCULATEDpgsql.cache.hit7dFLOAT%last(//pgsql.dbstat.sum.blks_hit.rate) * 100 / (last(//pgsql.dbstat.sum.blks_hit.rate) + last(//pgsql.dbstat.sum.blks_read.rate))Cache hit ratio.componentcache
- 2ea55460f0d34063ae4ab65b74ec852cConnections sum: ActiveDEPENDENTpgsql.connections.sum.active7dTotal number of connections executing a query.JSONPATH$.activepgsql.connections["{$PG.CONNSTRING}","{$PG.USER}","{$PG.PASSWORD}"]componentconnections
- 69f14028e98b48d489fbd7345c2213ddConnections sum: DisabledDEPENDENTpgsql.connections.sum.disabled7dTotal number of disabled connections.JSONPATH$.disabledpgsql.connections["{$PG.CONNSTRING}","{$PG.USER}","{$PG.PASSWORD}"]componentconnections
- 62a2401041724b4888bf058035dc6a0cConnections sum: Fastpath function callDEPENDENTpgsql.connections.sum.fastpath_function_call7dTotal number of connections executing a fast-path function.JSONPATH$.fastpath_function_callpgsql.connections["{$PG.CONNSTRING}","{$PG.USER}","{$PG.PASSWORD}"]componentconnections
- fc3b357cc8a24c4aad60784d1bfb7e18Connections sum: IdleDEPENDENTpgsql.connections.sum.idle7dTotal number of connections waiting for a new client command.JSONPATH$.idlepgsql.connections["{$PG.CONNSTRING}","{$PG.USER}","{$PG.PASSWORD}"]componentconnections
- b900a8123dfa48e0ac8fd4b92ae8678dConnections sum: Idle in transactionDEPENDENTpgsql.connections.sum.idle_in_transaction7dTotal number of connections in a transaction state but not executing a query.JSONPATH$.idle_in_transactionpgsql.connections["{$PG.CONNSTRING}","{$PG.USER}","{$PG.PASSWORD}"]componentconnections
- 99b0a3e14af44924b0319a0a9f6c16c7Connections sum: Idle in transaction (aborted)DEPENDENTpgsql.connections.sum.idle_in_transaction_aborted7dTotal number of connections in a transaction state but not executing a query, and where one of the statements in the transaction caused an error.JSONPATH$.idle_in_transaction_abortedpgsql.connections["{$PG.CONNSTRING}","{$PG.USER}","{$PG.PASSWORD}"]componentconnections
- 194c41f88e9e44879a70033913dd41d3Connections sum: PreparedDEPENDENTpgsql.connections.sum.prepared7dTotal number of prepared transactions:
https://www.postgresql.org/docs/current/sql-prepare-transaction.htmlJSONPATH$.preparedpgsql.connections["{$PG.CONNSTRING}","{$PG.USER}","{$PG.PASSWORD}"]componentconnections
- 1ec042e5853b430d9d7982c53c3fcf14Connections sum: TotalDEPENDENTpgsql.connections.sum.total7dTotal number of connections.JSONPATH$.totalpgsql.connections["{$PG.CONNSTRING}","{$PG.USER}","{$PG.PASSWORD}"]componentconnections
- 101149dd68994084a1cdab82c9d064f0Connections sum: Total, %DEPENDENTpgsql.connections.sum.total_pct7d%Total number of connections, in percentage.JSONPATH$.total_pctpgsql.connections["{$PG.CONNSTRING}","{$PG.USER}","{$PG.PASSWORD}"]componentconnections1d0903401af64d93ac16761808d672camin(/PostgreSQL by Zabbix agent 2/pgsql.connections.sum.total_pct,5m) > {$PG.CONN_TOTAL_PCT.MAX.WARN}Total number of connections is too highTotal number of connections is too high (over {$PG.CONN_TOTAL_PCT.MAX.WARN} in 5m)AVERAGETotal 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).scopeperformance
- f2c298008b914434b96da85a985e4a54Connections sum: WaitingDEPENDENTpgsql.connections.sum.waiting7dTotal number of waiting connections:
https://www.postgresql.org/docs/current/monitoring-stats.html#WAIT-EVENT-TABLEJSONPATH$.waitingpgsql.connections["{$PG.CONNSTRING}","{$PG.USER}","{$PG.PASSWORD}"]componentconnections
- e926ecd967f342bf90e9923825147d64Get connections sumpgsql.connections["{$PG.CONNSTRING}","{$PG.USER}","{$PG.PASSWORD}"]0TEXTCollect all metrics from pg_stat_activity:
https://www.postgresql.org/docs/current/monitoring-stats.html#PG-STAT-ACTIVITY-VIEWcomponentraw
- 1cab825fac8a49ba96dfbf7a696be729Custom queriespgsql.custom.query["{$PG.CONNSTRING}","{$PG.USER}","{$PG.PASSWORD}","{$PG.DATABASE}",""]1hTEXTDISABLEDExecute custom queries from file *.sql (check for option Plugins.Postgres.CustomQueriesPath at agent configuration).componentapplication
- 5c6de0fe332043bfb35c999b10893e4cDbstat: Hit blocks read per secondDEPENDENTpgsql.dbstat.sum.blks_hit.rate7dFLOATNumber of times per second disk blocks were found already in the buffer cacheJSONPATH$.blks_hitCHANGE_PER_SECONDpgsql.dbstat.sum["{$PG.CONNSTRING}","{$PG.USER}","{$PG.PASSWORD}"]componentcache
- 4dc3f2c23dfd4dfebe024a5c2d4409aeDbstat: Disk blocks read per secondDEPENDENTpgsql.dbstat.sum.blks_read.rate7dFLOATNumber of disk blocks read per second.JSONPATH$.blks_readCHANGE_PER_SECONDpgsql.dbstat.sum["{$PG.CONNSTRING}","{$PG.USER}","{$PG.PASSWORD}"]componentstorage
- 619211cc2afa4a159f36abf1a17d5476Dbstat: Blocks read timeDEPENDENTpgsql.dbstat.sum.blk_read_time7dFLOATsTime spent reading data file blocks by backends.JSONPATH$.blk_read_timeMULTIPLIER0.001pgsql.dbstat.sum["{$PG.CONNSTRING}","{$PG.USER}","{$PG.PASSWORD}"]componentstorage
- fba3b51d644c4c16ac71b3eda1be1701Dbstat: Blocks write timeDEPENDENTpgsql.dbstat.sum.blk_write_time7dFLOATsTime spent writing data file blocks by backends.JSONPATH$.blk_write_timeMULTIPLIER0.001pgsql.dbstat.sum["{$PG.CONNSTRING}","{$PG.USER}","{$PG.PASSWORD}"]componentstorage
- 1b98b9c95b32424baa68c354496ed2deDbstat: Checksum failures per secondDEPENDENTpgsql.dbstat.sum.checksum_failures.rate7dFLOATNumber of data page checksum failures per second detected (or on a shared object), or NULL if data checksums are not enabled. This metric is available since PostgreSQL 12.PostgreSQL checksum failure statusJSONPATH$.checksum_failuresMATCHES_REGEX^\d*$CUSTOM_VALUE-2CHANGE_PER_SECONDCUSTOM_VALUE-1pgsql.dbstat.sum["{$PG.CONNSTRING}","{$PG.USER}","{$PG.PASSWORD}"]componentsystem1d67b13f47134a538708c2a14dcfa6b1last(/PostgreSQL by Zabbix agent 2/pgsql.dbstat.sum.checksum_failures.rate)>0Dbstat: Checksum failures detectedAVERAGEData page checksum failures were detected on that DB instance:
https://www.postgresql.org/docs/current/checksums.htmlscopeavailability
- 0106dfc55ace4dacaff00ce2c98de2eaDbstat: Conflicts per secondDEPENDENTpgsql.dbstat.sum.conflicts.rate7dFLOATNumber of queries canceled per second due to conflicts with recovery (conflicts occur only on standby servers; see pg_stat_database_conflicts for details).JSONPATH$.conflictsCHANGE_PER_SECONDpgsql.dbstat.sum["{$PG.CONNSTRING}","{$PG.USER}","{$PG.PASSWORD}"]componentqueries
- e5d3838e5cf84be9ae83cacf22dc99afDbstat: Deadlocks per secondDEPENDENTpgsql.dbstat.sum.deadlocks.rate7dFLOATNumber of deadlocks detected per second.JSONPATH$.deadlocksCHANGE_PER_SECONDpgsql.dbstat.sum["{$PG.CONNSTRING}","{$PG.USER}","{$PG.PASSWORD}"]componentdeadlocks
- c61f60e6f7d24ffe99db480f6bbd9613Dbstat: Backends connectedDEPENDENTpgsql.dbstat.sum.numbackends7dNumber of connected backends.JSONPATH$.numbackendspgsql.dbstat.sum["{$PG.CONNSTRING}","{$PG.USER}","{$PG.PASSWORD}"]componentbackends
- 96cb6b388b2c480ead1568293dd81e70Dbstat: Number temp bytes per secondDEPENDENTpgsql.dbstat.sum.temp_bytes.rate7dFLOATbTotal amount of data written per second to temporary files by queries.JSONPATH$.temp_bytesCHANGE_PER_SECONDpgsql.dbstat.sum["{$PG.CONNSTRING}","{$PG.USER}","{$PG.PASSWORD}"]componentstorage
- bea47c8a95074ad3997aff64fcfcf49bDbstat: Number temp files per secondDEPENDENTpgsql.dbstat.sum.temp_files.rate7dFLOATNumber of temporary files created by queries per second.JSONPATH$.temp_filesCHANGE_PER_SECONDpgsql.dbstat.sum["{$PG.CONNSTRING}","{$PG.USER}","{$PG.PASSWORD}"]componentstorage
- 731f4adac9d34eaaaa1f8d5080fdf6ceDbstat: Rows deleted per secondDEPENDENTpgsql.dbstat.sum.tup_deleted.rate7dFLOATNumber of rows deleted by queries per second.JSONPATH$.tup_deletedCHANGE_PER_SECONDpgsql.dbstat.sum["{$PG.CONNSTRING}","{$PG.USER}","{$PG.PASSWORD}"]componentqueries
- 4eb6cc273484453bab1233de085363f5Dbstat: Rows fetched per secondDEPENDENTpgsql.dbstat.sum.tup_fetched.rate7dFLOATNumber of rows fetched by queries per second.JSONPATH$.tup_fetchedCHANGE_PER_SECONDpgsql.dbstat.sum["{$PG.CONNSTRING}","{$PG.USER}","{$PG.PASSWORD}"]componentqueries
- ae250ffa30c94df187c2010011e794aaDbstat: Rows inserted per secondDEPENDENTpgsql.dbstat.sum.tup_inserted.rate7dFLOATNumber of rows inserted by queries per second.JSONPATH$.tup_insertedCHANGE_PER_SECONDpgsql.dbstat.sum["{$PG.CONNSTRING}","{$PG.USER}","{$PG.PASSWORD}"]componentqueries
- 3253ed1c96db4a84974e62b85d80bc0fDbstat: Rows returned per secondDEPENDENTpgsql.dbstat.sum.tup_returned.rate7dFLOATNumber of rows returned by queries per second.JSONPATH$.tup_returnedCHANGE_PER_SECONDpgsql.dbstat.sum["{$PG.CONNSTRING}","{$PG.USER}","{$PG.PASSWORD}"]componentqueries
- 13feadafa00a4bd293fcf1a98ddf1f39Dbstat: Rows updated per secondDEPENDENTpgsql.dbstat.sum.tup_updated.rate7dFLOATNumber of rows updated by queries per second.JSONPATH$.tup_updatedCHANGE_PER_SECONDpgsql.dbstat.sum["{$PG.CONNSTRING}","{$PG.USER}","{$PG.PASSWORD}"]componentqueries
- bc8a3b29a6684b7f8a70a54b962f0e7eDbstat: Committed transactions per secondDEPENDENTpgsql.dbstat.sum.xact_commit.rate7dFLOATNumber of transactions that have been committed per second.JSONPATH$.xact_commitCHANGE_PER_SECONDpgsql.dbstat.sum["{$PG.CONNSTRING}","{$PG.USER}","{$PG.PASSWORD}"]componenttransactions
- 8aedfe3e385b447eb75b85f92301665aDbstat: Roll backed transactions per secondDEPENDENTpgsql.dbstat.sum.xact_rollback.rate7dFLOATNumber of transactions that have been rolled back per second.JSONPATH$.xact_rollbackCHANGE_PER_SECONDpgsql.dbstat.sum["{$PG.CONNSTRING}","{$PG.USER}","{$PG.PASSWORD}"]componenttransactions
- ddddde3084d54f55838b970f44290523Get dbstat sumpgsql.dbstat.sum["{$PG.CONNSTRING}","{$PG.USER}","{$PG.PASSWORD}"]0TEXTCollect all metrics from pg_stat_database as sums for all databases:
https://www.postgresql.org/docs/current/monitoring-stats.html#PG-STAT-DATABASE-VIEWcomponentraw
- 3be06ec14cba44d0892f3271a599c473Get dbstatpgsql.dbstat["{$PG.CONNSTRING}","{$PG.USER}","{$PG.PASSWORD}"]0TEXTCollect all metrics from pg_stat_database per database:
https://www.postgresql.org/docs/current/monitoring-stats.html#PG-STAT-DATABASE-VIEWcomponentraw
- 7112eeb300c14d959c79715462bf9563Get lockspgsql.locks["{$PG.CONNSTRING}","{$PG.USER}","{$PG.PASSWORD}"]0TEXTCollect all metrics from pg_locks per database:
https://www.postgresql.org/docs/current/explicit-locking.html#LOCKING-TABLEScomponentraw
- 0377fe6f2f8d4539b649c636ab012415Age of oldest xidpgsql.oldest.xid["{$PG.CONNSTRING}","{$PG.USER}","{$PG.PASSWORD}"]7dFLOATAge of oldest xid.componenttransactions2a5c11571d9d46f093ed9081f9d51504last(/PostgreSQL by Zabbix agent 2/pgsql.oldest.xid["{$PG.CONNSTRING}","{$PG.USER}","{$PG.PASSWORD}"]) > 18000000Oldest xid is too bigAVERAGEscopeavailability
- 56323e572fa443228987c62039153825Pingpgsql.ping["{$PG.CONNSTRING}","{$PG.USER}","{$PG.PASSWORD}"]7dUsed to test a connection to see if it is alive. It is set to 0 if the query is unsuccessful.Service stateDISCARD_UNCHANGED_HEARTBEAT1hcomponentapplicationcomponenthealth48a24a78519d47349200f0b41ceec56alast(/PostgreSQL by Zabbix agent 2/pgsql.ping["{$PG.CONNSTRING}","{$PG.USER}","{$PG.PASSWORD}"])=0Service is downHIGHLast test of a connection was unsuccessful.scopeavailability
- 01123126fcd54adc84c3bbfa227d9c0cGet queriespgsql.queries["{$PG.CONNSTRING}","{$PG.USER}","{$PG.PASSWORD}","{$PG.DATABASE}","{$PG.QUERY_ETIME.MAX.WARN}"]0TEXTCollect all metrics by query execution time.componentraw
- a171db459d6144e4ad294579fb8dc56dReplication: Standby countpgsql.replication.count["{$PG.CONNSTRING}","{$PG.USER}","{$PG.PASSWORD}"]7dNumber of standby servers.componentreplication
- da9ce769f9444a3f9600ce64c4ab2857Replication: Lag in bytespgsql.replication.lag.b["{$PG.CONNSTRING}","{$PG.USER}","{$PG.PASSWORD}"]7dBReplication lag with master, in bytes.componentreplication
- 5a9eb8ee4a484911903688e620eb618bReplication: Lag in secondspgsql.replication.lag.sec["{$PG.CONNSTRING}","{$PG.USER}","{$PG.PASSWORD}"]7dsReplication lag with master, in seconds.componentreplication
- 4120befb754d47e9a931f868c28badb9Get replicationpgsql.replication.process["{$PG.CONNSTRING}","{$PG.USER}","{$PG.PASSWORD}"]0TEXTCollect metrics from the pg_stat_replication, which contains information about the WAL sender process, showing statistics about replication to that sender's connected standby server.componentraw
- 4085b836bf614f3d910818074c386845Replication: Recovery rolepgsql.replication.recovery_role["{$PG.CONNSTRING}","{$PG.USER}","{$PG.PASSWORD}"]7dReplication role: 1 — recovery is still in progress (standby mode), 0 — master mode.PostgreSQL recovery rolecomponentreplication
- 3c83904cbad74ff7a0d10136a233e6c6Replication: Statuspgsql.replication.status["{$PG.CONNSTRING}","{$PG.USER}","{$PG.PASSWORD}"]7dReplication status: 0 — streaming is down, 1 — streaming is up, 2 — master mode.PostgreSQL replication statuscomponentreplication
- efa946a67e5844ecb905c68a2a6b85bbUptimepgsql.uptime["{$PG.CONNSTRING}","{$PG.USER}","{$PG.PASSWORD}"]7dFLOATsTime since the server started.componentapplication5fbabc5f60b74a369a13a260d25cce3clast(/PostgreSQL by Zabbix agent 2/pgsql.uptime["{$PG.CONNSTRING}","{$PG.USER}","{$PG.PASSWORD}"]) < 10mService has been restartedService has been restarted (uptime < 10m)AVERAGEPostgreSQL uptime is less than 10 minutes.scopenotice
- 523528aad175455fbd1daba161365651Versionpgsql.version["{$PG.CONNSTRING}","{$PG.USER}","{$PG.PASSWORD}"]15m7dCHARPostgreSQL version.DISCARD_UNCHANGED_HEARTBEAT1dcomponentapplication6b3ac2a19e114e1390e6e0793728f576last(/PostgreSQL by Zabbix agent 2/pgsql.version["{$PG.CONNSTRING}","{$PG.USER}","{$PG.PASSWORD}"],#1)<>last(/PostgreSQL by Zabbix agent 2/pgsql.version["{$PG.CONNSTRING}","{$PG.USER}","{$PG.PASSWORD}"],#2) and length(last(/PostgreSQL by Zabbix agent 2/pgsql.version["{$PG.CONNSTRING}","{$PG.USER}","{$PG.PASSWORD}"]))>0Version has changedVersion has changed (new version value received: {ITEM.VALUE})INFOscopenotice
- 6d5aa6213cf248749cbffdea9aff694fWAL: Segments countDEPENDENTpgsql.wal.count7dNumber of WAL segments.JSONPATH$.countpgsql.wal.stat["{$PG.CONNSTRING}","{$PG.USER}","{$PG.PASSWORD}"]componentwal
- 0e58a74b8a2d47d28f596196405b22b5WAL: Bytes receivedDEPENDENTpgsql.wal.receive7dBWAL receive, in bytes.JSONPATH$.receiveCHANGE_PER_SECONDpgsql.wal.stat["{$PG.CONNSTRING}","{$PG.USER}","{$PG.PASSWORD}"]componentwal
- c3d96741af454f6b9a3a49b6117c31beGet WALpgsql.wal.stat["{$PG.CONNSTRING}","{$PG.USER}","{$PG.PASSWORD}"]5m0TEXTCollect write-ahead log (WAL) metrics.componentraw
- 95f67516be544daf9ad8a1cad2e46114WAL: Bytes writtenDEPENDENTpgsql.wal.write7dBWAL write, in bytes.JSONPATH$.writeCHANGE_PER_SECONDpgsql.wal.stat["{$PG.CONNSTRING}","{$PG.USER}","{$PG.PASSWORD}"]componentwal
b1a4bfe1031a40529a7c38ac6bed3c6dDatabase discoverypgsql.db.discovery["{$PG.CONNSTRING}","{$PG.USER}","{$PG.PASSWORD}"]1hAND{#DBNAME}{$PG.LLD.FILTER.DBNAME}Discovers databases (DB) in the database management system (DBMS), except:
- templates;
- DBs that do not allow connections.1419ff1331734a4088349332e118ca94DB [{#DBNAME}]: Database agepgsql.db.age["{$PG.CONNSTRING}","{$PG.USER}","{$PG.PASSWORD}","{#DBNAME}"]10m7dDatabase age.componentapplicationdatabase{#DBNAME}4367ba7fdffd459ea2b18e1877bc74caDB [{#DBNAME}]: Bloating tablespgsql.db.bloating_tables["{$PG.CONNSTRING}","{$PG.USER}","{$PG.PASSWORD}","{#DBNAME}"]7dNumber of bloating tables.componenttablesdatabase{#DBNAME}b614a0909eec40bc841bf7446e842544DB [{#DBNAME}]: Database sizepgsql.db.size["{$PG.CONNSTRING}","{$PG.USER}","{$PG.PASSWORD}","{#DBNAME}"]5m7dBDatabase size.componentstoragedatabase{#DBNAME}4b1b1a4374c0429cb1790e774f181512DB [{#DBNAME}]: Blocks hit per secondDEPENDENTpgsql.dbstat.blks_hit.rate["{#DBNAME}"]7dFLOATTotal number of times per second disk blocks were found already in the buffer cache, so that a read was not necessary.JSONPATH$.blks_hitCHANGE_PER_SECONDpgsql.dbstat.get_metrics["{#DBNAME}"]componentcachedatabase{#DBNAME}841496e662cc43cf8db7728e96fcba76DB [{#DBNAME}]: Disk blocks read per secondDEPENDENTpgsql.dbstat.blks_read.rate["{#DBNAME}"]7dFLOATTotal number of disk blocks read per second in this database.JSONPATH$.blks_readCHANGE_PER_SECONDpgsql.dbstat.get_metrics["{#DBNAME}"]componentstoragedatabase{#DBNAME}0313d02ce8274bc9bcaee54d062300c8DB [{#DBNAME}]: Disk blocks read time per secondDEPENDENTpgsql.dbstat.blk_read_time.rate["{#DBNAME}"]7dFLOATsTime spent reading data file blocks by backends per second.JSONPATH$.blk_read_timeMULTIPLIER0.001CHANGE_PER_SECONDpgsql.dbstat.get_metrics["{#DBNAME}"]componentstoragedatabase{#DBNAME}e746a7760d554a0e9d41ba01c3be9db5DB [{#DBNAME}]: Disk blocks write timeDEPENDENTpgsql.dbstat.blk_write_time.rate["{#DBNAME}"]7dFLOATsTime spent writing data file blocks by backends per second.JSONPATH$.blk_write_timeMULTIPLIER0.001CHANGE_PER_SECONDpgsql.dbstat.get_metrics["{#DBNAME}"]componentstoragedatabase{#DBNAME}d44335162082498bbc42e29e938a4de7DB [{#DBNAME}]: Checksum failuresDEPENDENTpgsql.dbstat.checksum_failures.rate["{#DBNAME}"]7dFLOATNumber of data page checksum failures detected in this database.PostgreSQL checksum failure statusJSONPATH$.checksum_failuresMATCHES_REGEX^\d*$CUSTOM_VALUE-2CHANGE_PER_SECONDCUSTOM_VALUE-1pgsql.dbstat.get_metrics["{#DBNAME}"]componentsystemdatabase{#DBNAME}5995403b904349d296227647ca318f5blast(/PostgreSQL by Zabbix agent 2/pgsql.dbstat.checksum_failures.rate["{#DBNAME}"])>0DB [{#DBNAME}]: Checksum failures detectedAVERAGEData page checksum failures were detected on that database:
https://www.postgresql.org/docs/current/checksums.htmlscopeavailability4eb67f16bc2948a7927ed58c9d037466DB [{#DBNAME}]: Detected conflicts per secondDEPENDENTpgsql.dbstat.conflicts.rate["{#DBNAME}"]7dFLOATTotal number of queries canceled due to conflicts with recovery in this database per second.JSONPATH$.conflictsCHANGE_PER_SECONDpgsql.dbstat.get_metrics["{#DBNAME}"]componentqueriesdatabase{#DBNAME}05ac4216e1a941df8880224ffd38b806min(/PostgreSQL by Zabbix agent 2/pgsql.dbstat.conflicts.rate["{#DBNAME}"],5m) > {$PG.CONFLICTS.MAX.WARN:"{#DBNAME}"}DB [{#DBNAME}]: Too many recovery conflictsDB [{#DBNAME}]: Too many recovery conflicts (over {$PG.CONFLICTS.MAX.WARN:"{#DBNAME}"} in 5m)AVERAGEThe 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-CONFLICTscopeperformanced53da0cc702f4fe381e4d13d454ec229DB [{#DBNAME}]: Detected deadlocks per secondDEPENDENTpgsql.dbstat.deadlocks.rate["{#DBNAME}"]7dFLOATTotal number of detected deadlocks in this database per second.JSONPATH$.deadlocksCHANGE_PER_SECONDpgsql.dbstat.get_metrics["{#DBNAME}"]componentdeadlocksdatabase{#DBNAME}dd948e3ec19c419e8c9a62ace8d1695fmin(/PostgreSQL by Zabbix agent 2/pgsql.dbstat.deadlocks.rate["{#DBNAME}"],5m) > {$PG.DEADLOCKS.MAX.WARN:"{#DBNAME}"}DB [{#DBNAME}]: Deadlock occurredDB [{#DBNAME}]: Deadlock occurred (over {$PG.DEADLOCKS.MAX.WARN:"{#DBNAME}"} in 5m)HIGHNumber of deadlocks detected per second exceeds {$PG.DEADLOCKS.MAX.WARN:"{#DBNAME}"} for 5m.scopeavailability7ebf1570bebe4b9cb82474fe5aea0562DB [{#DBNAME}]: Get dbstatDEPENDENTpgsql.dbstat.get_metrics["{#DBNAME}"]0TEXTGet dbstat metrics for database "{#DBNAME}".JSONPATH$['{#DBNAME}']DISCARD_VALUEpgsql.dbstat["{$PG.CONNSTRING}","{$PG.USER}","{$PG.PASSWORD}"]componentrawdatabase{#DBNAME}2e31986867d24bca930d141cc5d9cc0fDB [{#DBNAME}]: Backends connectedDEPENDENTpgsql.dbstat.numbackends["{#DBNAME}"]7dNumber of backends currently connected to this database.JSONPATH$.numbackendspgsql.dbstat.get_metrics["{#DBNAME}"]componentbackendsdatabase{#DBNAME}82a2f4b2dc4f4dfe9a0a42144f603a8aDB [{#DBNAME}]: Temp_bytes written per secondDEPENDENTpgsql.dbstat.temp_bytes.rate["{#DBNAME}"]7dBTotal amount of data written to temporary files by queries in this database.JSONPATH$.temp_bytesCHANGE_PER_SECONDpgsql.dbstat.get_metrics["{#DBNAME}"]componentstoragedatabase{#DBNAME}480ffc23ca8d41e3ac86bb162007065fDB [{#DBNAME}]: Temp_files created per secondDEPENDENTpgsql.dbstat.temp_files.rate["{#DBNAME}"]7dTotal number of temporary files created by queries in this database.JSONPATH$.temp_filesCHANGE_PER_SECONDpgsql.dbstat.get_metrics["{#DBNAME}"]componentstoragedatabase{#DBNAME}cf288751fb894e5291b2d539b4c1a6a1DB [{#DBNAME}]: Tuples deleted per secondDEPENDENTpgsql.dbstat.tup_deleted.rate["{#DBNAME}"]7dFLOATTotal number of rows deleted by queries in this database per second.JSONPATH$.tup_deletedCHANGE_PER_SECONDpgsql.dbstat.get_metrics["{#DBNAME}"]componentqueriesdatabase{#DBNAME}a512a7a075244ccb90ab6824125a405eDB [{#DBNAME}]: Tuples fetched per secondDEPENDENTpgsql.dbstat.tup_fetched.rate["{#DBNAME}"]7dFLOATTotal number of rows fetched by queries in this database per second.JSONPATH$.tup_fetchedCHANGE_PER_SECONDpgsql.dbstat.get_metrics["{#DBNAME}"]componentqueriesdatabase{#DBNAME}2f24c195df5842f1bdf65a11dea3a315DB [{#DBNAME}]: Tuples inserted per secondDEPENDENTpgsql.dbstat.tup_inserted.rate["{#DBNAME}"]7dFLOATTotal number of rows inserted by queries in this database per second.JSONPATH$.tup_insertedCHANGE_PER_SECONDpgsql.dbstat.get_metrics["{#DBNAME}"]componentqueriesdatabase{#DBNAME}175c5051ef0c4a31b76270cacbdd7ed5DB [{#DBNAME}]: Tuples returned per secondDEPENDENTpgsql.dbstat.tup_returned.rate["{#DBNAME}"]7dFLOATNumber of rows returned by queries in this database per second.JSONPATH$.tup_returnedCHANGE_PER_SECONDpgsql.dbstat.get_metrics["{#DBNAME}"]componentqueriesdatabase{#DBNAME}9888b495d3f04cceb373c341bd4f1941DB [{#DBNAME}]: Tuples updated per secondDEPENDENTpgsql.dbstat.tup_updated.rate["{#DBNAME}"]7dFLOATTotal number of rows updated by queries in this database per second.JSONPATH$.tup_updatedCHANGE_PER_SECONDpgsql.dbstat.get_metrics["{#DBNAME}"]componentqueriesdatabase{#DBNAME}5b0ecb9c928c49a6a01b5df6aec931ddDB [{#DBNAME}]: Commits per secondDEPENDENTpgsql.dbstat.xact_commit.rate["{#DBNAME}"]7dFLOATNumber of transactions in this database that have been committed per second.JSONPATH$.xact_commitCHANGE_PER_SECONDpgsql.dbstat.get_metrics["{#DBNAME}"]componenttransactionsdatabase{#DBNAME}1d280198e31649fcb053d4c87a0e869dDB [{#DBNAME}]: Rollbacks per secondDEPENDENTpgsql.dbstat.xact_rollback.rate["{#DBNAME}"]7dFLOATTotal number of transactions in this database that have been rolled back.JSONPATH$.xact_rollbackCHANGE_PER_SECONDpgsql.dbstat.get_metrics["{#DBNAME}"]componenttransactionsdatabase{#DBNAME}8eb2bd907a0e4385bcac9e0f467f9748DB [{#DBNAME}]: Num of accessexclusive locksDEPENDENTpgsql.locks.accessexclusive["{#DBNAME}"]7dNumber of accessexclusive locks for this database.JSONPATH$.accessexclusivepgsql.locks.get_metrics["{#DBNAME}"]componentlocksdatabase{#DBNAME}5f783de0d6124fc0ae14522a4ad89189DB [{#DBNAME}]: Num of accessshare locksDEPENDENTpgsql.locks.accessshare["{#DBNAME}"]7dNumber of accessshare locks for this database.JSONPATH$.accesssharepgsql.locks.get_metrics["{#DBNAME}"]componentlocksdatabase{#DBNAME}3c754430815f411e9aa8dde593f6333aDB [{#DBNAME}]: Num of exclusive locksDEPENDENTpgsql.locks.exclusive["{#DBNAME}"]7dNumber of exclusive locks for this database.JSONPATH$.exclusivepgsql.locks.get_metrics["{#DBNAME}"]componentlocksdatabase{#DBNAME}2c7759f4c9e442cb80bd54ea3323501bDB [{#DBNAME}]: Get locksDEPENDENTpgsql.locks.get_metrics["{#DBNAME}"]0TEXTGet locks metrics for database "{#DBNAME}".JSONPATH$['{#DBNAME}']DISCARD_VALUEpgsql.locks["{$PG.CONNSTRING}","{$PG.USER}","{$PG.PASSWORD}"]componentrawdatabase{#DBNAME}b1ccea7698264d768da1299ec9d13738DB [{#DBNAME}]: Num of rowexclusive locksDEPENDENTpgsql.locks.rowexclusive["{#DBNAME}"]7dNumber of rowexclusive locks for this database.JSONPATH$.rowexclusivepgsql.locks.get_metrics["{#DBNAME}"]componentlocksdatabase{#DBNAME}b4b1402b99284f3bbf0ac0dff493449fDB [{#DBNAME}]: Num of rowshare locksDEPENDENTpgsql.locks.rowshare["{#DBNAME}"]7dNumber of rowshare locks for this database.JSONPATH$.rowshareDISCARD_VALUEpgsql.locks.get_metrics["{#DBNAME}"]componentlocksdatabase{#DBNAME}15eb93e90c1241a99aaff834d69cc5beDB [{#DBNAME}]: Num of sharerowexclusive locksDEPENDENTpgsql.locks.sharerowexclusive["{#DBNAME}"]7dNumber of total sharerowexclusive for this database.JSONPATH$.sharerowexclusivepgsql.locks.get_metrics["{#DBNAME}"]componentlocksdatabase{#DBNAME}04e6cec0423f4dddb09e6643561bdf77DB [{#DBNAME}]: Num of shareupdateexclusive locksDEPENDENTpgsql.locks.shareupdateexclusive["{#DBNAME}"]7dNumber of shareupdateexclusive locks for this database.JSONPATH$.shareupdateexclusivepgsql.locks.get_metrics["{#DBNAME}"]componentlocksdatabase{#DBNAME}8a410cf1f0be41fbb5a976f368f07430DB [{#DBNAME}]: Num of share locksDEPENDENTpgsql.locks.share["{#DBNAME}"]7dNumber of share locks for this database.JSONPATH$.sharepgsql.locks.get_metrics["{#DBNAME}"]componentlocksdatabase{#DBNAME}a982064d710644db85ebc1cde67bfe4dDB [{#DBNAME}]: Num of locks totalDEPENDENTpgsql.locks.total["{#DBNAME}"]7dTotal number of locks in this database.JSONPATH$.totalpgsql.locks.get_metrics["{#DBNAME}"]componentlocksdatabase{#DBNAME}75e704af5cb545fd9f83bec3f147dd04DB [{#DBNAME}]: Get queriesDEPENDENTpgsql.queries.get_metrics["{#DBNAME}"]0TEXTGet queries metrics for database "{#DBNAME}".JSONPATH$['{#DBNAME}']DISCARD_VALUEpgsql.queries["{$PG.CONNSTRING}","{$PG.USER}","{$PG.PASSWORD}","{$PG.DATABASE}","{$PG.QUERY_ETIME.MAX.WARN}"]componentrawdatabase{#DBNAME}4c8934820b7f46a195115c7214d4379cDB [{#DBNAME}]: Queries slow maintenance countDEPENDENTpgsql.queries.mro.slow_count["{#DBNAME}"]7dSlow maintenance query count for this database.JSONPATH$.mro_slow_countpgsql.queries.get_metrics["{#DBNAME}"]componentqueriesdatabase{#DBNAME}612c8f83e228406f86e70e8486a51f9bDB [{#DBNAME}]: Queries max maintenance timeDEPENDENTpgsql.queries.mro.time_max["{#DBNAME}"]7dsMax maintenance query time for this database.JSONPATH$.mro_time_maxpgsql.queries.get_metrics["{#DBNAME}"]componentqueriesdatabase{#DBNAME}9cde2701b5814142b064696dc974f45dDB [{#DBNAME}]: Queries sum maintenance timeDEPENDENTpgsql.queries.mro.time_sum["{#DBNAME}"]7dsSum maintenance query time for this database.JSONPATH$.mro_time_sumpgsql.queries.get_metrics["{#DBNAME}"]componentqueriesdatabase{#DBNAME}9e1191f80c3a4e9aa0d3aba2b2740fefDB [{#DBNAME}]: Queries slow query countDEPENDENTpgsql.queries.query.slow_count["{#DBNAME}"]7dSlow query count for this database.JSONPATH$.query_slow_countpgsql.queries.get_metrics["{#DBNAME}"]componentqueriesdatabase{#DBNAME}2bb34a2a7dee451cb5419a146d883601min(/PostgreSQL by Zabbix agent 2/pgsql.queries.query.slow_count["{#DBNAME}"],5m)>{$PG.SLOW_QUERIES.MAX.WARN:"{#DBNAME}"}DB [{#DBNAME}]: Too many slow queriesDB [{#DBNAME}]: Too many slow queries (over {$PG.SLOW_QUERIES.MAX.WARN:"{#DBNAME}"} in 5m)WARNINGThe number of detected slow queries exceeds the limit of {$PG.SLOW_QUERIES.MAX.WARN:"{#DBNAME}"}.scopeperformance73712df30d66494998bf11566eba409fDB [{#DBNAME}]: Queries max query timeDEPENDENTpgsql.queries.query.time_max["{#DBNAME}"]7dsMax query time for this database.JSONPATH$.query_time_maxpgsql.queries.get_metrics["{#DBNAME}"]componentqueriesdatabase{#DBNAME}ba95d84bc11b4df4aece8ddb51042339DB [{#DBNAME}]: Queries sum query timeDEPENDENTpgsql.queries.query.time_sum["{#DBNAME}"]7dsSum query time for this database.JSONPATH$.query_time_sumpgsql.queries.get_metrics["{#DBNAME}"]componentqueriesdatabase{#DBNAME}d31701d52f5941d5a24241c95db52373DB [{#DBNAME}]: Queries slow transaction countDEPENDENTpgsql.queries.tx.slow_count["{#DBNAME}"]7dSlow transaction query count for this database.JSONPATH$.tx_slow_countpgsql.queries.get_metrics["{#DBNAME}"]componentqueriesdatabase{#DBNAME}ecc24b3143254dd4b2fc01c12cefb345DB [{#DBNAME}]: Queries max transaction timeDEPENDENTpgsql.queries.tx.time_max["{#DBNAME}"]7dsMax transaction query time for this database.JSONPATH$.tx_time_maxpgsql.queries.get_metrics["{#DBNAME}"]componentqueriesdatabase{#DBNAME}178926a753614bb58206d82f68280097DB [{#DBNAME}]: Queries sum transaction timeDEPENDENTpgsql.queries.tx.time_sum["{#DBNAME}"]7dsSum transaction query time for this database.JSONPATH$.tx_time_sumpgsql.queries.get_metrics["{#DBNAME}"]componentqueriesdatabase{#DBNAME}af6eac83efc94d2a9f4a3501207fb5ceDB [{#DBNAME}]: LocksGRADIENT_LINE199C0D- PostgreSQL by Zabbix agent 2pgsql.locks.total["{#DBNAME}"]
1F63100- PostgreSQL by Zabbix agent 2pgsql.locks.accessexclusive["{#DBNAME}"]
200611C- PostgreSQL by Zabbix agent 2pgsql.locks.accessshare["{#DBNAME}"]
3F7941D- PostgreSQL by Zabbix agent 2pgsql.locks.exclusive["{#DBNAME}"]
4FC6EA3- PostgreSQL by Zabbix agent 2pgsql.locks.rowexclusive["{#DBNAME}"]
56C59DC- PostgreSQL by Zabbix agent 2pgsql.locks.rowshare["{#DBNAME}"]
6C7A72D- PostgreSQL by Zabbix agent 2pgsql.locks.sharerowexclusive["{#DBNAME}"]
7BA2A5D- PostgreSQL by Zabbix agent 2pgsql.locks.shareupdateexclusive["{#DBNAME}"]
8F230E0- PostgreSQL by Zabbix agent 2pgsql.locks.share["{#DBNAME}"]
9a518b4bf0f04609863bf9dc4c7f1ea2DB [{#DBNAME}]: Number of bloating tablesGRADIENT_LINE199C0D- PostgreSQL by Zabbix agent 2pgsql.db.bloating_tables["{$PG.CONNSTRING}","{$PG.USER}","{$PG.PASSWORD}","{#DBNAME}"]
4d46d39a1d1146c19a57b2b5b8086708DB [{#DBNAME}]: pg_stat_database metrics199C0D- PostgreSQL by Zabbix agent 2pgsql.dbstat.blks_hit.rate["{#DBNAME}"]
1F63100- PostgreSQL by Zabbix agent 2pgsql.dbstat.blks_read.rate["{#DBNAME}"]
200611C- PostgreSQL by Zabbix agent 2pgsql.dbstat.conflicts.rate["{#DBNAME}"]
3F7941D- PostgreSQL by Zabbix agent 2pgsql.dbstat.deadlocks.rate["{#DBNAME}"]
4FC6EA3- PostgreSQL by Zabbix agent 2pgsql.dbstat.temp_bytes.rate["{#DBNAME}"]
56C59DC- PostgreSQL by Zabbix agent 2pgsql.dbstat.temp_files.rate["{#DBNAME}"]
6C7A72D- PostgreSQL by Zabbix agent 2pgsql.dbstat.tup_deleted.rate["{#DBNAME}"]
7BA2A5D- PostgreSQL by Zabbix agent 2pgsql.dbstat.tup_fetched.rate["{#DBNAME}"]
8F230E0- PostgreSQL by Zabbix agent 2pgsql.dbstat.tup_inserted.rate["{#DBNAME}"]
95CCD18- PostgreSQL by Zabbix agent 2pgsql.dbstat.tup_returned.rate["{#DBNAME}"]
10BB2A02- PostgreSQL by Zabbix agent 2pgsql.dbstat.tup_updated.rate["{#DBNAME}"]
11AC41A5- PostgreSQL by Zabbix agent 2pgsql.dbstat.xact_commit.rate["{#DBNAME}"]
1289ABF8- PostgreSQL by Zabbix agent 2pgsql.dbstat.xact_rollback.rate["{#DBNAME}"]
98f4c88e15b742fb80e1ecd8aeab970dDB [{#DBNAME}]: QueriesFIXED199C0DRIGHT- PostgreSQL by Zabbix agent 2pgsql.queries.mro.time_max["{#DBNAME}"]
1F63100RIGHT- PostgreSQL by Zabbix agent 2pgsql.queries.query.time_max["{#DBNAME}"]
200611CRIGHT- PostgreSQL by Zabbix agent 2pgsql.queries.tx.time_max["{#DBNAME}"]
3GRADIENT_LINEF7941D- PostgreSQL by Zabbix agent 2pgsql.queries.mro.time_sum["{#DBNAME}"]
4GRADIENT_LINEFC6EA3- PostgreSQL by Zabbix agent 2pgsql.queries.query.time_sum["{#DBNAME}"]
5GRADIENT_LINE6C59DC- PostgreSQL by Zabbix agent 2pgsql.queries.tx.time_sum["{#DBNAME}"]
86853d8590344bad84aab1deb3d1cffcDB [{#DBNAME}]: SizeGRADIENT_LINE199C0D- PostgreSQL by Zabbix agent 2pgsql.db.size["{$PG.CONNSTRING}","{$PG.USER}","{$PG.PASSWORD}","{#DBNAME}"]
918a6fd8bd0e49c98f759778f44ab606DB [{#DBNAME}]: Slow queriesFIXED199C0D- PostgreSQL by Zabbix agent 2pgsql.queries.mro.slow_count["{#DBNAME}"]
1F63100- PostgreSQL by Zabbix agent 2pgsql.queries.query.slow_count["{#DBNAME}"]
200611C- PostgreSQL by Zabbix agent 2pgsql.queries.tx.slow_count["{#DBNAME}"]
e94f9017c06644a2bbcb48697381556dReplication discoverypgsql.replication.process.discovery["{$PG.CONNSTRING}","{$PG.USER}","{$PG.PASSWORD}"]15mAND{#APPLICATION_NAME}{$PG.LLD.FILTER.APPLICATION}Discovers replication lag metrics.a77e5e6702ff41af9defe102cbeeea74Application [{#APPLICATION_NAME}]: Get replicationDEPENDENTpgsql.replication.get_metrics["{#APPLICATION_NAME}"]0TEXTCollect metrics from the "pg_stat_replication" about the application "{#APPLICATION_NAME}" that is connected to this WAL sender, which contains information about the WAL sender process, showing statistics about replication to that sender's connected standby server.JSONPATH$['{#APPLICATION_NAME}']DISCARD_VALUEpgsql.replication.process["{$PG.CONNSTRING}","{$PG.USER}","{$PG.PASSWORD}"]application{#APPLICATION_NAME}componentraw15b83330044042668e618501160c37e4Application [{#APPLICATION_NAME}]: Replication flush lagDEPENDENTpgsql.replication.process.flush_lag["{#APPLICATION_NAME}"]7dFLOATsJSONPATH$.flush_lagpgsql.replication.get_metrics["{#APPLICATION_NAME}"]application{#APPLICATION_NAME}componentreplication0daf6e3c7843488cb3160a2bd6b09fbfApplication [{#APPLICATION_NAME}]: Replication replay lagDEPENDENTpgsql.replication.process.replay_lag["{#APPLICATION_NAME}"]7dFLOATsJSONPATH$.replay_lagpgsql.replication.get_metrics["{#APPLICATION_NAME}"]application{#APPLICATION_NAME}componentreplication2d96bc517d3a4c3fbcae8a7f1436bf72Application [{#APPLICATION_NAME}]: Replication write lagDEPENDENTpgsql.replication.process.write_lag["{#APPLICATION_NAME}"]7dFLOATsJSONPATH$.write_lagpgsql.replication.get_metrics["{#APPLICATION_NAME}"]application{#APPLICATION_NAME}componentreplicatione79dfe2d436d49da898772a9e7345825Application [{#APPLICATION_NAME}]: Replication lag199C0D- PostgreSQL by Zabbix agent 2pgsql.replication.process.flush_lag["{#APPLICATION_NAME}"]
1F63100- PostgreSQL by Zabbix agent 2pgsql.replication.process.replay_lag["{#APPLICATION_NAME}"]
200611C- PostgreSQL by Zabbix agent 2pgsql.replication.process.write_lag["{#APPLICATION_NAME}"]
classdatabasetargetpostgresql{$PG.CONFLICTS.MAX.WARN}0Maximum number of recovery conflicts for trigger expression.{$PG.CONNSTRING}tcp://localhost:5432URI or named session of the PostgreSQL instance.{$PG.CONN_TOTAL_PCT.MAX.WARN}90Maximum percentage of current connections for trigger expression.{$PG.DATABASE}postgresDefault PostgreSQL database for the connection.{$PG.DEADLOCKS.MAX.WARN}0Maximum number of detected deadlocks for trigger expression.{$PG.LLD.FILTER.APPLICATION}.+Filter of discoverable applications.{$PG.LLD.FILTER.DBNAME}.+Filter of discoverable databases.{$PG.PASSWORD}<Put the password here>PostgreSQL user password.{$PG.QUERY_ETIME.MAX.WARN}30Execution time limit for count of slow queries.{$PG.SLOW_QUERIES.MAX.WARN}5Slow queries count threshold for a trigger.{$PG.USER}zbx_monitorPostgreSQL username.e3ae726b06cc4663a3eef5a73909f796PostgreSQL databasesgraphprototype365INTEGERcolumns1GRAPH_PROTOTYPEgraphid.0PostgreSQL by Zabbix agent 2DB [{#DBNAME}]: pg_stat_database metricsSTRINGreferenceAAAAAgraphprototype5365INTEGERcolumns1GRAPH_PROTOTYPEgraphid.0PostgreSQL by Zabbix agent 2DB [{#DBNAME}]: SizeSTRINGreferenceAAAACgraphprototype10365INTEGERcolumns1GRAPH_PROTOTYPEgraphid.0PostgreSQL by Zabbix agent 2DB [{#DBNAME}]: QueriesSTRINGreferenceAAAAEgraphprototype36365INTEGERcolumns1GRAPH_PROTOTYPEgraphid.0PostgreSQL by Zabbix agent 2DB [{#DBNAME}]: LocksSTRINGreferenceAAAABgraphprototype365365INTEGERcolumns1GRAPH_PROTOTYPEgraphid.0PostgreSQL by Zabbix agent 2DB [{#DBNAME}]: Number of bloating tablesSTRINGreferenceAAAADgraphprototype3610365INTEGERcolumns1GRAPH_PROTOTYPEgraphid.0PostgreSQL by Zabbix agent 2DB [{#DBNAME}]: Slow queriesSTRINGreferenceAAAAFcd2d975b0d7e4f8e89afb1033fce4ce2PostgreSQL checksum failure status-2null9f38c01c325248d4b538c0582432b541PostgreSQL recovery role0Master1Standby0fba38eefa4c4073b46d3f8579fda314PostgreSQL replication status0Down1Up2Master6619a58602a44e83950d3d4b5180c0e9Service state0Down1Up