yzl
93958d0fb0
|
1 year ago | |
---|---|---|
.. | ||
README.md | 1 year ago | |
template_db_postgresql_odbc.yaml | 1 year ago |
README.md
PostgreSQL by ODBC
Overview
This template is designed for the effortless deployment of PostgreSQL monitoring by Zabbix via ODBC and doesn't require any external scripts.
Requirements
Zabbix version: 7.0 and higher.
Tested versions
This template has been tested on:
- PostgreSQL 11-15
Configuration
Zabbix should be configured according to the instructions in the Templates out of the box section.
Setup
- Create the PostgreSQL user for monitoring (
<password>
at your discretion) and inherit permissions from the default rolepg_monitor
:
CREATE USER zbx_monitor WITH PASSWORD '<PASSWORD>' INHERIT;
GRANT pg_monitor TO zbx_monitor;
- Edit the
pg_hba.conf
configuration file to allow TCP connections for the userzbx_monitor
. For example, you could add one of the following rows to allow local connections from the same host:
# TYPE DATABASE USER ADDRESS METHOD
host all zbx_monitor localhost trust
host all zbx_monitor 127.0.0.1/32 md5
host all zbx_monitor ::1/128 scram-sha-256
For more information please read the PostgreSQL documentation https://www.postgresql.org/docs/current/auth-pg-hba-conf.html
.
-
Install the PostgreSQL ODBC driver. Check the
Zabbix documentation
for details about ODBC checks andrecommended parameters page
. -
Set up the connection string with the
{$PG.CONNSTRING}
macro. The minimum required parameters are:
Driver=
- set the name of the driver which will be used for monitoring (from theodbcinst.ini
file) or specify the path to the driver file (for example/usr/lib64/psqlodbcw.so
);Servername=
- set the host name or IP address of the PostgreSQL instance;Port=
- adjust the port number if needed.
Note: if you want to use SSL/TLS encryption to protect communications with the remote PostgreSQL instance, you can also specify encryption parameters here.
It is assumed that you set up the PostgreSQL instance to work in the desired encryption mode. Check the PostgreSQL documentation
for details.
For example, to enable required encryption in transport mode without identity checks, the connection string could look like this (replace <instanceip>
with the address of the PostgreSQL instance):
Servername=<instanceip>;Port=5432;Driver=/usr/lib64/psqlodbcw.so;SSLmode=require
- Set the password that you specified in step 1 in the macro
{$PG.PASSWORD}
.
Macros used
Name | Description | Default |
---|---|---|
{$PG.PASSWORD} | PostgreSQL user password. |
<Put the password here> |
{$PG.USER} | PostgreSQL username. |
zbx_monitor |
{$PG.CONNSTRING} | Connection string for the PostgreSQL instance. |
Macro too long. Please see the template. |
{$PG.LLD.FILTER.DBNAME} | Filter of discoverable databases. |
.+ |
{$PG.CONN_TOTAL_PCT.MAX.WARN} | Maximum percentage of current connections for trigger expression. |
90 |
{$PG.DATABASE} | Default PostgreSQL database for the connection. |
postgres |
{$PG.DEADLOCKS.MAX.WARN} | Maximum number of detected deadlocks for trigger expression. |
0 |
{$PG.LLD.FILTER.APPLICATION} | Filter of discoverable applications. |
.+ |
{$PG.CONFLICTS.MAX.WARN} | Maximum number of recovery conflicts for trigger expression. |
0 |
{$PG.QUERY_ETIME.MAX.WARN} | Execution time limit for count of slow queries. |
30 |
{$PG.SLOW_QUERIES.MAX.WARN} | Slow queries count threshold for a trigger. |
5 |
Items
Name | Description | Type | Key and additional info |
---|---|---|---|
PostgreSQL: Get bgwriter | Collect all metrics from pg_stat_bgwriter: https://www.postgresql.org/docs/current/monitoring-stats.html#PG-STAT-BGWRITER-VIEW |
Database monitor | db.odbc.select[pgsql.bgwriter,,"Database={$PG.DATABASE};{$PG.CONNSTRING}"] |
PostgreSQL: Get archive | Collect archive status metrics. |
Database monitor | db.odbc.select[pgsql.archive,,"Database={$PG.DATABASE};{$PG.CONNSTRING}"] |
PostgreSQL: Get dbstat | Collect all metrics from pg_stat_database per database: https://www.postgresql.org/docs/current/monitoring-stats.html#PG-STAT-DATABASE-VIEW |
Database monitor | db.odbc.select[pgsql.dbstat,,"Database={$PG.DATABASE};{$PG.CONNSTRING}"] |
PostgreSQL: Get dbstat sum | Collect all metrics from pg_stat_database as sums for all databases: https://www.postgresql.org/docs/current/monitoring-stats.html#PG-STAT-DATABASE-VIEW |
Database monitor | db.odbc.select[pgsql.dbstat.sum,,"Database={$PG.DATABASE};{$PG.CONNSTRING}"] |
PostgreSQL: Get connections sum | Collect all metrics from pg_stat_activity: https://www.postgresql.org/docs/current/monitoring-stats.html#PG-STAT-ACTIVITY-VIEW |
Database monitor | db.odbc.select[pgsql.connections.sum,,"Database={$PG.DATABASE};{$PG.CONNSTRING}"] |
PostgreSQL: Get WAL | Collect write-ahead log (WAL) metrics. |
Database monitor | db.odbc.select[pgsql.wal.stat,,"Database={$PG.DATABASE};{$PG.CONNSTRING}"] |
PostgreSQL: Get locks | Collect all metrics from pg_locks per database: https://www.postgresql.org/docs/current/explicit-locking.html#LOCKING-TABLES |
Database monitor | db.odbc.select[pgsql.locks,,"Database={$PG.DATABASE};{$PG.CONNSTRING}"] |
PostgreSQL: Get replication | Collect 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. |
Database monitor | db.odbc.select[pgsql.replication.process,,"Database={$PG.DATABASE};{$PG.CONNSTRING}"] Preprocessing
|
PostgreSQL: Get queries | Collect all metrics by query execution time. |
Database monitor | db.odbc.select[pgsql.queries,,"Database={$PG.DATABASE};{$PG.CONNSTRING}"] |
WAL: Bytes written | WAL write, in bytes. |
Dependent item | pgsql.wal.write Preprocessing
|
WAL: Bytes received | WAL receive, in bytes. |
Dependent item | pgsql.wal.receive Preprocessing
|
WAL: Segments count | Number of WAL segments. |
Dependent item | pgsql.wal.count Preprocessing
|
Bgwriter: Buffers allocated per second | Number of buffers allocated per second. |
Dependent item | pgsql.bgwriter.buffers_alloc.rate Preprocessing
|
Bgwriter: Buffers written directly by a backend per second | Number of buffers written directly by a backend per second. |
Dependent item | pgsql.bgwriter.buffers_backend.rate Preprocessing
|
Bgwriter: Number of bgwriter cleaning scan stopped per second | Number of times the background writer stopped a cleaning scan because it had written too many buffers per second. |
Dependent item | pgsql.bgwriter.maxwritten_clean.rate Preprocessing
|
Bgwriter: Times a backend executed its own fsync per second | 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). |
Dependent item | pgsql.bgwriter.buffers_backend_fsync.rate Preprocessing
|
Checkpoint: Buffers written by the background writer per second | Number of buffers written by the background writer per second. |
Dependent item | pgsql.bgwriter.buffers_clean.rate Preprocessing
|
Checkpoint: Buffers written during checkpoints per second | Number of buffers written during checkpoints per second. |
Dependent item | pgsql.bgwriter.buffers_checkpoint.rate Preprocessing
|
Checkpoint: Scheduled per second | Number of scheduled checkpoints that have been performed per second. |
Dependent item | pgsql.bgwriter.checkpoints_timed.rate Preprocessing
|
Checkpoint: Requested per second | Number of requested checkpoints that have been performed per second. |
Dependent item | pgsql.bgwriter.checkpoints_req.rate Preprocessing
|
Checkpoint: Checkpoint write time per second | Total amount of time per second that has been spent in the portion of checkpoint processing where files are written to disk. |
Dependent item | pgsql.bgwriter.checkpoint_write_time.rate Preprocessing
|
Checkpoint: Checkpoint sync time per second | Total amount of time per second that has been spent in the portion of checkpoint processing where files are synchronized to disk. |
Dependent item | pgsql.bgwriter.checkpoint_sync_time.rate Preprocessing
|
Archive: Count of archived files | Count of archived files. |
Dependent item | pgsql.archive.count_archived_files Preprocessing
|
Archive: Count of failed attempts to archive files | Count of failed attempts to archive files. |
Dependent item | pgsql.archive.failed_trying_to_archive Preprocessing
|
Archive: Count of files in archive_status need to archive | Count of files to archive. |
Dependent item | pgsql.archive.count_files_to_archive Preprocessing
|
Archive: Size of files need to archive | Size of files to archive. |
Dependent item | pgsql.archive.size_files_to_archive Preprocessing
|
Dbstat: Blocks read time | Time spent reading data file blocks by backends. |
Dependent item | pgsql.dbstat.sum.blk_read_time Preprocessing
|
Dbstat: Blocks write time | Time spent writing data file blocks by backends. |
Dependent item | pgsql.dbstat.sum.blk_write_time Preprocessing
|
Dbstat: Committed transactions per second | Number of transactions that have been committed per second. |
Dependent item | pgsql.dbstat.sum.xact_commit.rate Preprocessing
|
Dbstat: Conflicts per second | Number of queries canceled per second due to conflicts with recovery (conflicts occur only on standby servers; see pg_stat_database_conflicts for details). |
Dependent item | pgsql.dbstat.sum.conflicts.rate Preprocessing
|
Dbstat: Deadlocks per second | Number of deadlocks detected per second. |
Dependent item | pgsql.dbstat.sum.deadlocks.rate Preprocessing
|
Dbstat: Disk blocks read per second | Number of disk blocks read per second. |
Dependent item | pgsql.dbstat.sum.blks_read.rate Preprocessing
|
Dbstat: Hit blocks read per second | Number of times per second disk blocks were found already in the buffer cache. |
Dependent item | pgsql.dbstat.sum.blks_hit.rate Preprocessing
|
Dbstat: Number temp bytes per second | Total amount of data written per second to temporary files by queries. |
Dependent item | pgsql.dbstat.sum.temp_bytes.rate Preprocessing
|
Dbstat: Number temp files per second | Number of temporary files created by queries per second. |
Dependent item | pgsql.dbstat.sum.temp_files.rate Preprocessing
|
Dbstat: Roll backed transactions per second | Number of transactions that have been rolled back per second. |
Dependent item | pgsql.dbstat.sum.xact_rollback.rate Preprocessing
|
Dbstat: Rows deleted per second | Number of rows deleted by queries per second. |
Dependent item | pgsql.dbstat.sum.tup_deleted.rate Preprocessing
|
Dbstat: Rows fetched per second | Number of rows fetched by queries per second. |
Dependent item | pgsql.dbstat.sum.tup_fetched.rate Preprocessing
|
Dbstat: Rows inserted per second | Number of rows inserted by queries per second. |
Dependent item | pgsql.dbstat.sum.tup_inserted.rate Preprocessing
|
Dbstat: Rows returned per second | Number of rows returned by queries per second. |
Dependent item | pgsql.dbstat.sum.tup_returned.rate Preprocessing
|
Dbstat: Rows updated per second | Number of rows updated by queries per second. |
Dependent item | pgsql.dbstat.sum.tup_updated.rate Preprocessing
|
Dbstat: Backends connected | Number of connected backends. |
Dependent item | pgsql.dbstat.sum.numbackends Preprocessing
|
Connections sum: Active | Total number of connections executing a query. |
Dependent item | pgsql.connections.sum.active Preprocessing
|
Connections sum: Fastpath function call | Total number of connections executing a fast-path function. |
Dependent item | pgsql.connections.sum.fastpath_function_call Preprocessing
|
Connections sum: Idle | Total number of connections waiting for a new client command. |
Dependent item | pgsql.connections.sum.idle Preprocessing
|
Connections sum: Idle in transaction | Total number of connections in a transaction state but not executing a query. |
Dependent item | pgsql.connections.sum.idle_in_transaction Preprocessing
|
Connections sum: Prepared | Total number of prepared transactions: https://www.postgresql.org/docs/current/sql-prepare-transaction.html |
Dependent item | pgsql.connections.sum.prepared Preprocessing
|
Connections sum: Total | Total number of connections. |
Dependent item | pgsql.connections.sum.total Preprocessing
|
Connections sum: Total, % | Total number of connections, in percentage. |
Dependent item | pgsql.connections.sum.total_pct Preprocessing
|
Connections sum: Waiting | Total number of waiting connections: https://www.postgresql.org/docs/current/monitoring-stats.html#WAIT-EVENT-TABLE |
Dependent item | pgsql.connections.sum.waiting Preprocessing
|
Connections sum: Idle in transaction (aborted) | Total number of connections in a transaction state but not executing a query, and where one of the statements in the transaction caused an error. |
Dependent item | pgsql.connections.sum.idle_in_transaction_aborted Preprocessing
|
Connections sum: Disabled | Total number of disabled connections. |
Dependent item | pgsql.connections.sum.disabled Preprocessing
|
PostgreSQL: Age of oldest xid | Age of oldest xid. |
Database monitor | db.odbc.select[pgsql.oldest.xid,,"Database={$PG.DATABASE};{$PG.CONNSTRING}"] |
PostgreSQL: Count of autovacuum workers | Number of autovacuum workers. |
Database monitor | db.odbc.select[pgsql.autovacuum.count,,"Database={$PG.DATABASE};{$PG.CONNSTRING}"] |
PostgreSQL: Cache hit ratio, % | Cache hit ratio. |
Calculated | pgsql.cache.hit |
PostgreSQL: Uptime | Time since the server started. |
Database monitor | db.odbc.select[pgsql.uptime,,"Database={$PG.DATABASE};{$PG.CONNSTRING}"] |
PostgreSQL: Replication: Lag in bytes | Replication lag with master, in bytes. |
Database monitor | db.odbc.select[pgsql.replication.lag.b,,"Database={$PG.DATABASE};{$PG.CONNSTRING}"] |
PostgreSQL: Replication: Lag in seconds | Replication lag with master, in seconds. |
Database monitor | db.odbc.select[pgsql.replication.lag.sec,,"Database={$PG.DATABASE};{$PG.CONNSTRING}"] |
PostgreSQL: Replication: Recovery role | Replication role: 1 — recovery is still in progress (standby mode), 0 — master mode. |
Database monitor | db.odbc.select[pgsql.replication.recovery_role,,"Database={$PG.DATABASE};{$PG.CONNSTRING}"] |
PostgreSQL: Replication: Standby count | Number of standby servers. |
Database monitor | db.odbc.select[pgsql.replication.count,,"Database={$PG.DATABASE};{$PG.CONNSTRING}"] |
PostgreSQL: Replication: Status | Replication status: 0 — streaming is down, 1 — streaming is up, 2 — master mode. |
Database monitor | db.odbc.select[pgsql.replication.status,,"Database={$PG.DATABASE};{$PG.CONNSTRING}"] |
PostgreSQL: Ping | Used to test a connection to see if it is alive. It is set to 0 if the query is unsuccessful. |
Database monitor | db.odbc.select[pgsql.ping,,"Database={$PG.DATABASE};{$PG.CONNSTRING}"] Preprocessing
|
Triggers
Name | Description | Expression | Severity | Dependencies and additional info |
---|---|---|---|---|
PostgreSQL: Total number of connections is too high | 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). |
min(/PostgreSQL by ODBC/pgsql.connections.sum.total_pct,5m) > {$PG.CONN_TOTAL_PCT.MAX.WARN} |
Average | |
PostgreSQL: Oldest xid is too big | last(/PostgreSQL by ODBC/db.odbc.select[pgsql.oldest.xid,,"Database={$PG.DATABASE};{$PG.CONNSTRING}"]) > 18000000 |
Average | ||
PostgreSQL: Service has been restarted | PostgreSQL uptime is less than 10 minutes. |
last(/PostgreSQL by ODBC/db.odbc.select[pgsql.uptime,,"Database={$PG.DATABASE};{$PG.CONNSTRING}"]) < 10m |
Average | |
PostgreSQL: Service is down | Last test of a connection was unsuccessful. |
last(/PostgreSQL by ODBC/db.odbc.select[pgsql.ping,,"Database={$PG.DATABASE};{$PG.CONNSTRING}"])=0 |
High |
LLD rule Replication discovery
Name | Description | Type | Key and additional info |
---|---|---|---|
Replication discovery | Discovers replication lag metrics. |
Database monitor | db.odbc.select[pgsql.replication.process.discovery,,"Database={$PG.DATABASE};{$PG.CONNSTRING}"] Preprocessing
|
Item prototypes for Replication discovery
Name | Description | Type | Key and additional info |
---|---|---|---|
Application [{#APPLICATION_NAME}]: Get replication | Collect 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. |
Dependent item | pgsql.replication.get_metrics["{#APPLICATION_NAME}"] Preprocessing
|
Application [{#APPLICATION_NAME}]: Replication flush lag | Time elapsed between flushing recent WAL locally and receiving notification that this standby server has written and flushed it (but not yet applied it). This can be used to gauge the delay that synchronous_commit level on incurred while committing if this server was configured as a synchronous standby. |
Dependent item | pgsql.replication.process.flush_lag["{#APPLICATION_NAME}"] Preprocessing
|
Application [{#APPLICATION_NAME}]: Replication replay lag | Time elapsed between flushing recent WAL locally and receiving notification that this standby server has written, flushed and applied it. This can be used to gauge the delay that synchronous_commit level remote_apply incurred while committing if this server was configured as a synchronous standby. |
Dependent item | pgsql.replication.process.replay_lag["{#APPLICATION_NAME}"] Preprocessing
|
Application [{#APPLICATION_NAME}]: Replication write lag | Time elapsed between flushing recent WAL locally and receiving notification that this standby server has written it (but not yet flushed it or applied it). This can be used to gauge the delay that synchronous_commit level remote_write incurred while committing if this server was configured as a synchronous standby. |
Dependent item | pgsql.replication.process.write_lag["{#APPLICATION_NAME}"] Preprocessing
|
LLD rule Database discovery
Name | Description | Type | Key and additional info |
---|---|---|---|
Database discovery | Discovers databases (DB) in the database management system (DBMS), except: - templates; - default "postgres" DB; - DBs that do not allow connections. |
Database monitor | db.odbc.select[pgsql.db.discovery,,"Database={$PG.DATABASE};{$PG.CONNSTRING}"] |
Item prototypes for Database discovery
Name | Description | Type | Key and additional info |
---|---|---|---|
DB [{#DBNAME}]: Get dbstat | Get dbstat metrics for database "{#DBNAME}". |
Dependent item | pgsql.dbstat.get_metrics["{#DBNAME}"] Preprocessing
|
DB [{#DBNAME}]: Get locks | Get locks metrics for database "{#DBNAME}". |
Dependent item | pgsql.locks.get_metrics["{#DBNAME}"] Preprocessing
|
DB [{#DBNAME}]: Get queries | Get queries metrics for database "{#DBNAME}". |
Dependent item | pgsql.queries.get_metrics["{#DBNAME}"] Preprocessing
|
DB [{#DBNAME}]: Database age | Database age. |
Database monitor | db.odbc.select[pgsql.db.age,,"Database={#DBNAME};{$PG.CONNSTRING}"] |
DB [{#DBNAME}]: Bloating tables | Number of bloating tables. |
Database monitor | db.odbc.select[pgsql.db.bloating_tables,,"Database={#DBNAME};{$PG.CONNSTRING}"] |
DB [{#DBNAME}]: Database size | Database size. |
Database monitor | db.odbc.select[pgsql.db.size,,"Database={#DBNAME};{$PG.CONNSTRING}"] |
DB [{#DBNAME}]: Blocks hit per second | Total number of times per second disk blocks were found already in the buffer cache, so that a read was not necessary. |
Dependent item | pgsql.dbstat.blks_hit.rate["{#DBNAME}"] Preprocessing
|
DB [{#DBNAME}]: Disk blocks read per second | Total number of disk blocks read per second in this database. |
Dependent item | pgsql.dbstat.blks_read.rate["{#DBNAME}"] Preprocessing
|
DB [{#DBNAME}]: Detected conflicts per second | Total number of queries canceled due to conflicts with recovery in this database per second. |
Dependent item | pgsql.dbstat.conflicts.rate["{#DBNAME}"] Preprocessing
|
DB [{#DBNAME}]: Detected deadlocks per second | Total number of detected deadlocks in this database per second. |
Dependent item | pgsql.dbstat.deadlocks.rate["{#DBNAME}"] Preprocessing
|
DB [{#DBNAME}]: Temp_bytes written per second | Total amount of data written to temporary files by queries in this database. |
Dependent item | pgsql.dbstat.temp_bytes.rate["{#DBNAME}"] Preprocessing
|
DB [{#DBNAME}]: Temp_files created per second | Total number of temporary files created by queries in this database. |
Dependent item | pgsql.dbstat.temp_files.rate["{#DBNAME}"] Preprocessing
|
DB [{#DBNAME}]: Tuples deleted per second | Total number of rows deleted by queries in this database per second. |
Dependent item | pgsql.dbstat.tup_deleted.rate["{#DBNAME}"] Preprocessing
|
DB [{#DBNAME}]: Tuples fetched per second | Total number of rows fetched by queries in this database per second. |
Dependent item | pgsql.dbstat.tup_fetched.rate["{#DBNAME}"] Preprocessing
|
DB [{#DBNAME}]: Tuples inserted per second | Total number of rows inserted by queries in this database per second. |
Dependent item | pgsql.dbstat.tup_inserted.rate["{#DBNAME}"] Preprocessing
|
DB [{#DBNAME}]: Tuples returned per second | Number of rows returned by queries in this database per second. |
Dependent item | pgsql.dbstat.tup_returned.rate["{#DBNAME}"] Preprocessing
|
DB [{#DBNAME}]: Tuples updated per second | Total number of rows updated by queries in this database per second. |
Dependent item | pgsql.dbstat.tup_updated.rate["{#DBNAME}"] Preprocessing
|
DB [{#DBNAME}]: Commits per second | Number of transactions in this database that have been committed per second. |
Dependent item | pgsql.dbstat.xact_commit.rate["{#DBNAME}"] Preprocessing
|
DB [{#DBNAME}]: Rollbacks per second | Total number of transactions in this database that have been rolled back. |
Dependent item | pgsql.dbstat.xact_rollback.rate["{#DBNAME}"] Preprocessing
|
DB [{#DBNAME}]: Backends connected | Number of backends currently connected to this database. |
Dependent item | pgsql.dbstat.numbackends["{#DBNAME}"] Preprocessing
|
DB [{#DBNAME}]: Disk blocks read time per second | Time spent reading data file blocks by backends per second. |
Dependent item | pgsql.dbstat.blk_read_time.rate["{#DBNAME}"] Preprocessing
|
DB [{#DBNAME}]: Disk blocks write time per second | Time spent writing data file blocks by backends per second. |
Dependent item | pgsql.dbstat.blk_write_time.rate["{#DBNAME}"] Preprocessing
|
DB [{#DBNAME}]: Num of accessexclusive locks | Number of accessexclusive locks for this database. |
Dependent item | pgsql.locks.accessexclusive["{#DBNAME}"] Preprocessing
|
DB [{#DBNAME}]: Num of accessshare locks | Number of accessshare locks for this database. |
Dependent item | pgsql.locks.accessshare["{#DBNAME}"] Preprocessing
|
DB [{#DBNAME}]: Num of exclusive locks | Number of exclusive locks for this database. |
Dependent item | pgsql.locks.exclusive["{#DBNAME}"] Preprocessing
|
DB [{#DBNAME}]: Num of rowexclusive locks | Number of rowexclusive locks for this database. |
Dependent item | pgsql.locks.rowexclusive["{#DBNAME}"] Preprocessing
|
DB [{#DBNAME}]: Num of rowshare locks | Number of rowshare locks for this database. |
Dependent item | pgsql.locks.rowshare["{#DBNAME}"] Preprocessing
|
DB [{#DBNAME}]: Num of sharerowexclusive locks | Number of total sharerowexclusive for this database. |
Dependent item | pgsql.locks.sharerowexclusive["{#DBNAME}"] Preprocessing
|
DB [{#DBNAME}]: Num of shareupdateexclusive locks | Number of shareupdateexclusive locks for this database. |
Dependent item | pgsql.locks.shareupdateexclusive["{#DBNAME}"] Preprocessing
|
DB [{#DBNAME}]: Num of share locks | Number of share locks for this database. |
Dependent item | pgsql.locks.share["{#DBNAME}"] Preprocessing
|
DB [{#DBNAME}]: Num of locks total | Total number of locks in this database. |
Dependent item | pgsql.locks.total["{#DBNAME}"] Preprocessing
|
DB [{#DBNAME}]: Queries max maintenance time | Max maintenance query time for this database. |
Dependent item | pgsql.queries.mro.time_max["{#DBNAME}"] Preprocessing
|
DB [{#DBNAME}]: Queries max query time | Max query time for this database. |
Dependent item | pgsql.queries.query.time_max["{#DBNAME}"] Preprocessing
|
DB [{#DBNAME}]: Queries max transaction time | Max transaction query time for this database. |
Dependent item | pgsql.queries.tx.time_max["{#DBNAME}"] Preprocessing
|
DB [{#DBNAME}]: Queries slow maintenance count | Slow maintenance query count for this database. |
Dependent item | pgsql.queries.mro.slow_count["{#DBNAME}"] Preprocessing
|
DB [{#DBNAME}]: Queries slow query count | Slow query count for this database. |
Dependent item | pgsql.queries.query.slow_count["{#DBNAME}"] Preprocessing
|
DB [{#DBNAME}]: Queries slow transaction count | Slow transaction query count for this database. |
Dependent item | pgsql.queries.tx.slow_count["{#DBNAME}"] Preprocessing
|
DB [{#DBNAME}]: Queries sum maintenance time | Sum maintenance query time for this database. |
Dependent item | pgsql.queries.mro.time_sum["{#DBNAME}"] Preprocessing
|
DB [{#DBNAME}]: Queries sum query time | Sum query time for this database. |
Dependent item | pgsql.queries.query.time_sum["{#DBNAME}"] Preprocessing
|
DB [{#DBNAME}]: Queries sum transaction time | Sum transaction query time for this database. |
Dependent item | pgsql.queries.tx.time_sum["{#DBNAME}"] Preprocessing
|
Trigger prototypes for Database discovery
Name | Description | Expression | Severity | Dependencies and additional info |
---|---|---|---|---|
DB [{#DBNAME}]: Too many recovery conflicts | 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. |
min(/PostgreSQL by ODBC/pgsql.dbstat.conflicts.rate["{#DBNAME}"],5m) > {$PG.CONFLICTS.MAX.WARN:"{#DBNAME}"} |
Average | |
DB [{#DBNAME}]: Deadlock occurred | Number of deadlocks detected per second exceeds {$PG.DEADLOCKS.MAX.WARN:"{#DBNAME}"} for 5m. |
min(/PostgreSQL by ODBC/pgsql.dbstat.deadlocks.rate["{#DBNAME}"],5m) > {$PG.DEADLOCKS.MAX.WARN:"{#DBNAME}"} |
High | |
DB [{#DBNAME}]: Too many slow queries | The number of detected slow queries exceeds the limit of {$PG.SLOW_QUERIES.MAX.WARN:"{#DBNAME}"}. |
min(/PostgreSQL by ODBC/pgsql.queries.query.slow_count["{#DBNAME}"],5m)>{$PG.SLOW_QUERIES.MAX.WARN:"{#DBNAME}"} |
Warning |
Feedback
Please report any issues with the template at https://support.zabbix.com
You can also provide feedback, discuss the template, or ask for help at ZABBIX forums