diff --git a/README-STREAMING.md b/README-STREAMING.md
new file mode 100644
index 0000000..cd9849f
--- /dev/null
+++ b/README-STREAMING.md
@@ -0,0 +1,69 @@
+# libzbxpgsql-streaming
+Monitoring Add-On for libzbxpgsql v1.1 to monitor PostgreSQL Streaming Replication on Zabbix
+
+Ref: https://github.com/robbrucks/libzbxpgsql-streaming
+
+## Setup
+
+*This Document assumes you have the libzbxpgsql v1.1 module installed, configured, and already succesfully monitoring your postgres database clusters (instances)*
+
+If you have set up Streaming Replication as in https://wiki.postgresql.org/wiki/Streaming_Replication #37 you can also add following Templates and configuration to the host.
+
+ * Main Template called `Template_PostgreSQL_Server_3.0_Streaming.xml`
+ * Secondary Template called `Template_PostgreSQL_Server_3.0_Streaming_Secondary.xml`
+
+ In order to use the Secondary one it is necessary to prepare it:
+
+ * Variable `@Secondary@` is for UI Names
+ * Variable `@SECONDARY@` is for separating `PG_CONN` from main template - #112, #107
+
+ sed -e 's/@Secondary@/SomeNiceName/g; s/@SECONDARY@/INSTANCENAME/g;' Template_PostgreSQL_Server_3.0_Streaming_Secondary.xml > Template_PostgreSQL_Server_3.0_Streaming_SomeNiceName.xml
+
+This will distinguish instances running on same host but different ports.
+
+1. Copy the `libzbxpgsql-streaming.conf` file as `libzbxpgsql.conf` into the `/etc/zabbix` directory on your master and slave DB servers
+1. Execute the SQL script `sql/replication_pump_func.sql` on each *master* DB cluster against the same database as defined in your {$PG\_DB} macro in Zabbix (the `postgres` database by default)
+ ```
+ psql -f replication_pump_func.sql -U postgres -d postgres
+ ```
+1. If you will be using a DB user other than `postgres` to connect to the DB from the Zabbix agent, you will need to grant execute on the function to that user:
+ ```
+ psql -c 'GRANT EXECUTE ON FUNCTION replication_pump() TO your_zabbix_user;' -U postgres postgres
+ ```
+1. Link the `Template App PostgreSQL Streaming` template to your master and each of your slave DB hosts via the Zabbix UI
+1. Restart the zabbix-agent on your DB servers
+
+## What is monitored?
+* Count of WAL log bytes waiting to be applied on each _connected_ slave ("lag bytes"; measured on the master)
+* Number of seconds a slave is behind the master ("lag seconds"; measured on each slave)
+* Whether or not replication has been paused on a slave
+
+## What does it alert on?
+* If "lag bytes" exceeds the value of Zabbix macro variable "{$PG\_ALRT\_SLAVE\_LAG\_BYTES}" (default 100mb)
+* If "lag seconds" exceeds the value of Zabbix macro variable "{$PG\_ALRT\_SLAVE\_LAG\_SECS}" (default 300 seconds)
+* If replication is manually paused on a slave
+
+## What's up with the "Replication Master Log Pump" thingy?
+Get ready for a lengthy explanation...
+
+On a master/slave setup using streaming replication, selecting from the `pg_last_xact_replay_timestamp()` function on the slaves will report the timestamp of the last update replayed. This works fine when the master has constant update activity, but if there is a period of time where there are no updates on the master then the replay timestamp will not get updated on the slaves (since there are no changes to stream). This can cause the slave to _appear_ to be significantly behind the master despite actually being up to date.
+
+I discovered that issuing a simple `NOTIFY` command on the master will cause the notification to be streamed to the slaves. The PostgreSQL documentation indicates that the notification is discarded if there are no corresponding listeners, so this appears to be a relatively harmless and lightweight method to force the replay timestamp to be updated on the slaves.
+
+The `NOTIFY` command does not make any changes to data or schemas in the database and it does not require any special permissions to execute.
+
+Unfortunately libzbxpgsql cannot issue a `NOTIFY` command directly, so I had to implement it using a function.
+
+So the `PostgreSQL Streaming Replication Master Log Pump` item runs this function every 30 seconds to execute a `NOTIFY` and "pumps" the WAL log stream.
+
+By issuing the `NOTIFY` every 30 seconds I can ensure that the replay timestamp on the slaves is updated at least that frequently, even if a master goes "quiet". Then if the timestamp fails to get updated for longer than 30 seconds I can alert that there is truly a problem with replication.
+
+This seemed a far more elegant solution than creating a single-row table with a timestamp, regularly updating it, and watching for the timestamp update on the slaves. It eliminates the need for a table, permissions, and frequent vacuums of the table.
+
+## But I can alert on lag bytes...
+Yes, this template also measures the lag bytes as reported by the master in the `pg_stat_replication` view, and it will alert if lag bytes becomes high. But the `pg_stat_replication` view has a critical weakness: if communication with the slave is lost, the corresponding row in `pg_stat_replication` for that slave is immediately deleted and you will not know how far behind replication is. Since that row is gone, Zabbix can't measure any lag and can't alert that the slave is falling behind.
+
+## What am I trying to solve here?
+I'm trying to solve one of the more commonly encountered problems with replication: How can I tell that a communication issue has stalled streaming replication?
+
+I think I've solved it - but please let me know if I've got something wrong...
diff --git a/README.md b/README.md
index a5a02ef..d81c995 100644
--- a/README.md
+++ b/README.md
@@ -45,6 +45,28 @@ To build the RPM package on a RHEL6+ family system with `rpm-build` installed:
make rpm
+## Templates
+
+For Zabbix 3.0 there are 2 templates:
+
+* Main Template called `Template_PostgreSQL_Server_3.0.xml`
+* Secondary Template called `Template_PostgreSQL_Server_3.0_Secondary.xml`
+
+In order to use the Secondary one it is necessary to prepare it:
+
+* Variable `@Secondary@` is for UI Names
+* Variable `@SECONDARY@` is for separating `PG_CONN` from main template - #112, #107
+
+```
+sed -e 's/@Secondary@/SomeNiceName/g; s/@SECONDARY@/INSTANCENAME/g;' Template_PostgreSQL_Server_3.0_Secondary.xml > Template_PostgreSQL_Server_3.0_SomeNiceName.xml
+```
+
+This will distinguish instances running on same host but different ports.
+
+## Streaming Monitoring
+
+Please follow instructions as per README-STREAMING.md
+
## License
diff --git a/conf/libzbxpgsql-streaming.conf b/conf/libzbxpgsql-streaming.conf
new file mode 100644
index 0000000..8d319eb
--- /dev/null
+++ b/conf/libzbxpgsql-streaming.conf
@@ -0,0 +1,144 @@
+# File: /etc/zabbix/libzbxpgsql.conf
+#
+# This file contains configuration for all pg.* keys.
+#
+# By default, this file is loaded from /etc/zabbix/libzbxpgsql.conf, unless
+# the PGCONFIGFILE environment variable is set to a different path.
+#
+# The config file is only read at startup of Zabbix agent. If you modify the
+# config file, you will need to restart the Zabbix agent for it to take effect.
+#
+# Syntax errors in the config file will prevent Zabbix from starting.
+#
+# The config files are parsed by the C libconfig module:
+# http://www.hyperrealm.com/main.php?s=libconfig
+#
+# Comment lines begin with a hash '#'.
+#
+# The format for defining named SQL queries is:
+# queries = {
+# SQLkey = "SQL statement";
+# };
+#
+# Requirements:
+# - The SQL key must be alphanumeric and can contain dashes and underscores
+# (-DO NOT- use asterisks or spaces in the key name).
+# - The entire SQL statement must be enclosed in double quotes.
+# - If your SQL statement needs to utilize double-quotes, then they MUST be
+# escaped by a backslash:
+# "SELECT \"UPPERCASECOLUMN\" from table;";
+# - A semicolon is required at the end of each config entry.
+#
+# Example Query Setup (with substitution variables):
+# * Zabbix agent key, including a named query:
+# pg_query.integer[,,myquery,45,200]
+#
+# * Matching query from the config file:
+# myquery = "Select $1::int + $2::int;";
+#
+# * The agent will return the integer: 245
+#
+# SQL statements can span multiple lines, and may optionally contain extra
+# begin/end quotes on each line. The following two examples are both valid:
+#
+# GoodSQL1 = "select count(*)
+# from pg_stat_activity;";
+#
+# AlsoGood = "select count(*) "
+# " from pg_stat_activity;";
+#
+
+# Example Queries
+queries = {
+ teststr = "SELECT $1::text || $2::text;";
+ testint = "SELECT $1::int;";
+ testdbl = "SELECT $1::decimal;";
+ testdsc = "SELECT * FROM pg_database;";
+
+
+######################################################
+# _____ _ _ _ _
+# | __ \ | (_) | | (_)
+# | |__) |___ _ __ | |_ ___ __ _| |_ _ ___ _ __
+# | _ // _ \ '_ \| | |/ __/ _` | __| |/ _ \| '_ \
+# | | \ \ __/ |_) | | | (_| (_| | |_| | (_) | | | |
+# |_| \_\___| .__/|_|_|\___\__,_|\__|_|\___/|_| |_|
+# | |
+# |_|
+######################################################
+# NOTES!
+#
+# 1. The following SQL:
+# "now() > pg_last_xact_replay_timestamp()"
+# is required in certain corner cases where
+# time drift between two servers causes a
+# negative time lag which converts into a huge
+# unsigned number shown for lag in Zabbix.
+#
+# 2. The "replpump" method appears to be a good
+# way to force streaming to occur on "quiet"
+# databases without performing updates, but
+# I do not know if there are any potential
+# long-term problems with constantly issuing
+# a notification with no listeners. Based on
+# emails to pg-general it *should not* be a
+# problem.
+#
+
+# Replication Master Discovery
+dscrepmstr = "select case when client_hostname is not null "
+ "then client_hostname "
+ "else case when client_addr is not null "
+ "then host(client_addr) "
+ "else 'localhost'::text "
+ "end "
+ "end as \"PGSLAVE\" "
+ ", case when client_addr is not null "
+ "then host(client_addr) "
+ "else 'localhost'::text "
+ " end as \"PGSLAVEIP\" "
+ "from pg_stat_replication"
+ ";";
+
+# Replication Slave Discovery
+dscrepslave = "select 'Slave' as \"PGSLV\" "
+ ", 'repllag' as \"PGSLVLAG\" "
+ ", 'replpaused' as \"PGSLVPAUSED\" "
+ "where pg_is_in_recovery() = TRUE; "
+ ";";
+
+# Force replication to stream when master is idle (EXPERIMENTAL!)
+# (executed on master)
+replpump = "select replication_pump();";
+
+# Replication lag seconds (measured on slave)
+repllag = "select case when pg_is_in_recovery() = TRUE "
+ "then case when now() > pg_last_xact_replay_timestamp() "
+ "then extract(epoch from now() - pg_last_xact_replay_timestamp())::int "
+ "else 0::int "
+ "end "
+ "else 0::int "
+ "end "
+ ";";
+
+# Replication lag bytes (measured on master)
+repllagbytes = "select pg_xlog_location_diff(pg_current_xlog_location(),replay_location) "
+ "from pg_stat_replication "
+ "where ( ( $1::text != 'localhost' "
+ "and client_addr = $1::inet) "
+ "or ( $1::text = 'localhost' "
+ "and client_addr is null) ) "
+ ";";
+
+# Replication paused (measured on slave)
+replpaused = "select case when pg_is_in_recovery() = TRUE "
+ "then case when pg_is_xlog_replay_paused() = TRUE "
+ "then 1::int "
+ "else 0::int "
+ "end "
+ "else 0::int "
+ "end"
+ ";";
+
+};
+
diff --git a/conf/libzbxpgsql.conf b/conf/libzbxpgsql.conf
index 6d5a46e..70dfe9a 100644
--- a/conf/libzbxpgsql.conf
+++ b/conf/libzbxpgsql.conf
@@ -55,3 +55,4 @@ queries = {
testdbl = "SELECT $1::decimal;";
testdsc = "SELECT * FROM pg_database;";
};
+
diff --git a/sql/replication_pump_func.sql b/sql/replication_pump_func.sql
new file mode 100644
index 0000000..919e0e8
--- /dev/null
+++ b/sql/replication_pump_func.sql
@@ -0,0 +1,29 @@
+SET ROLE postgres;
+
+-- If there are slaves and this DB is NOT in recovery,
+-- then issue a fake notify command to force the log
+-- to stream. This will update pg_last_xact_replay_timestamp
+-- on all slaves.
+
+BEGIN;
+
+ CREATE OR REPLACE FUNCTION replication_pump()
+ RETURNS void
+ AS $$
+ DECLARE slavect int;
+ BEGIN
+ SELECT count(*) INTO slavect FROM pg_stat_replication;
+ IF slavect > 0 AND pg_is_in_recovery() = FALSE THEN
+ NOTIFY libzbxpgsql_fake_notify;
+ END IF;
+ END;
+ $$
+ LANGUAGE plpgsql
+ VOLATILE
+ ;
+
+ REVOKE ALL ON FUNCTION replication_pump() FROM public;
+ GRANT EXECUTE ON FUNCTION replication_pump() TO postgres;
+
+COMMIT;
+
diff --git a/templates/Template_PostgreSQL_Server_3.0_Secondary.xml b/templates/Template_PostgreSQL_Server_3.0_Secondary.xml
new file mode 100644
index 0000000..aa6712c
--- /dev/null
+++ b/templates/Template_PostgreSQL_Server_3.0_Secondary.xml
@@ -0,0 +1,6015 @@
+
+
+ 3.0
+ 2018-05-13T22:11:39Z
+
+
+ Templates
+
+
+
+
+ Template App PostgreSQL @Secondary@
+ Template App PostgreSQL @Secondary@
+
+
+
+ Templates
+
+
+
+
+ PostgreSQL Backend Connections (@Secondary@)
+
+
+ PostgreSQL Background Writer (@Secondary@)
+
+
+ PostgreSQL Configuration (@Secondary@)
+
+
+ PostgreSQL Database Backend Connections (@Secondary@)
+
+
+ PostgreSQL Database Capacity (@Secondary@)
+
+
+ PostgreSQL Database Disk IO (@Secondary@)
+
+
+ PostgreSQL Database Errors (@Secondary@)
+
+
+ PostgreSQL Database Performance (@Secondary@)
+
+
+ PostgreSQL Database Temp File Utilization (@Secondary@)
+
+
+ PostgreSQL Index Statistics (@Secondary@)
+
+
+ PostgreSQL MVCC (@Secondary@)
+
+
+ PostgreSQL Prepared Transactions (@Secondary@)
+
+
+ PostgreSQL Server (@Secondary@)
+
+
+ PostgreSQL Tablespace Statistics (@Secondary@)
+
+
+ PostgreSQL Table Statistics (@Secondary@)
+
+
+
+ -
+ PostgreSQL Backends connected (Total)
+ 7
+
+ 0
+
+ pg.backends.count[{$PG_CONN_@SECONDARY@},{$PG_DB}]
+ 60
+ 7
+ 365
+ 0
+ 3
+
+
+
+
+ 0
+ 0
+
+ 0
+
+
+
+ 0
+
+
+
+
+
+ Returns the total number of backend connections (including the check query itself).
+
+Accepts the default connection parameters plus the following:
+Database: count only the given database name or OID
+User: count only the given user name or OID
+Client: count only the given IP address or hostname
+Waiting: true|false count only backends waiting on a lock
+
+Requires libzbxpgsql v1.0.0 or above.
+ 0
+
+
+ PostgreSQL Backend Connections (@Secondary@)
+
+
+
+
+
+ -
+ PostgreSQL Backends connections available
+ 7
+
+
+ pg.backends.free[{$PG_CONN_@SECONDARY@},{$PG_DB}]
+ 60
+ 7
+ 365
+ 0
+ 3
+
+
+ 0
+
+
+ 0
+ 0
+
+ 0
+
+ 1
+
+
+
+ 0
+ 0
+
+
+
+
+
+ Returns the total number of available backend connections remaining (excluding the check query itself).
+
+Requires libzbxpgsql v1.0.0 or above.
+ 0
+
+
+ PostgreSQL Backend Connections (@Secondary@)
+
+
+
+
+
+ -
+ PostgreSQL Backends connections used %
+ 7
+
+ 1
+
+ pg.backends.ratio[{$PG_CONN_@SECONDARY@},{$PG_DB}]
+ 60
+ 7
+ 365
+ 0
+ 0
+
+ %
+ 0
+
+
+ 0
+ 0
+
+ 0
+
+ 100
+
+
+
+ 0
+ 0
+
+
+
+
+
+ Returns the total number of used backend connections as a ratio of the total available.
+
+Requires libzbxpgsql v1.0.0 or above.
+ 0
+
+
+ PostgreSQL Backend Connections (@Secondary@)
+
+
+
+
+
+ -
+ PostgreSQL Buffers allocated/sec
+ 7
+
+ 0
+
+ pg.buffers_alloc[{$PG_CONN_@SECONDARY@},{$PG_DB}]
+ 60
+ 7
+ 365
+ 0
+ 3
+
+
+ 1
+
+
+ 0
+ 0
+
+ 0
+
+ 1
+
+
+
+ 0
+ 0
+
+
+
+
+
+ Number of buffers allocated
+ 0
+
+
+ PostgreSQL Background Writer (@Secondary@)
+
+
+
+
+
+
+ 10
+
+
+
+
+
+
+ -
+ PostgreSQL Buffers written directly by a backend/sec
+ 7
+
+
+ pg.buffers_backend[{$PG_CONN_@SECONDARY@},{$PG_DB}]
+ 60
+ 7
+ 365
+ 0
+ 3
+
+
+
+
+ 0
+ 0
+
+ 0
+
+
+
+ 0
+
+
+
+
+
+ Number of buffers written directly by a backend
+ 0
+
+
+ PostgreSQL Background Writer (@Secondary@)
+
+
+
+
+
+
+ 10
+
+
+
+
+
+
+ -
+ PostgreSQL Backend fsync call executions/sec
+ 7
+
+
+ pg.buffers_backend_fsync[{$PG_CONN_@SECONDARY@},{$PG_DB}]
+ 60
+ 7
+ 365
+ 0
+ 3
+
+
+
+
+ 0
+ 0
+
+ 0
+
+
+
+ 0
+
+
+
+
+
+ Number of times a backend had to execute its own fsync call (normally the background writer handles those even when the backend does its own write)
+ 0
+
+
+ PostgreSQL Background Writer (@Secondary@)
+
+
+
+
+
+
+ 10
+
+
+
+
+
+
+ -
+ PostgreSQL Buffers written during checkpoints/sec
+ 7
+
+
+ pg.buffers_checkpoint[{$PG_CONN_@SECONDARY@},{$PG_DB}]
+ 60
+ 7
+ 365
+ 0
+ 3
+
+
+
+
+ 0
+ 0
+
+ 0
+
+
+
+ 0
+
+
+
+
+
+ Number of buffers written during checkpoints
+ 0
+
+
+ PostgreSQL Background Writer (@Secondary@)
+
+
+
+
+
+
+ 10
+
+
+
+
+
+
+ -
+ PostgreSQL Buffers written by the background writer/sec
+ 7
+
+
+ pg.buffers_clean[{$PG_CONN_@SECONDARY@},{$PG_DB}]
+ 60
+ 7
+ 365
+ 0
+ 3
+
+
+
+
+ 0
+ 0
+
+ 0
+
+
+
+ 0
+
+
+
+
+
+ Number of buffers written by the background writer
+ 0
+
+
+ PostgreSQL Background Writer (@Secondary@)
+
+
+
+
+
+
+ 10
+
+
+
+
+
+
+ -
+ PostgreSQL Checkpoints performed on request
+ 7
+
+
+ pg.checkpoints_req[{$PG_CONN_@SECONDARY@},{$PG_DB}]
+ 60
+ 7
+ 365
+ 0
+ 3
+
+
+
+
+ 0
+ 0
+
+ 0
+
+
+
+ 0
+
+
+
+
+
+ Number of requested checkpoints that have been performed
+ 0
+
+
+ PostgreSQL Background Writer (@Secondary@)
+
+
+
+
+
+
+
+
+ -
+ PostgreSQL Checkpoints performed on schedule
+ 7
+
+
+ pg.checkpoints_timed[{$PG_CONN_@SECONDARY@},{$PG_DB}]
+ 60
+ 7
+ 365
+ 0
+ 3
+
+
+
+
+ 0
+ 0
+
+ 0
+
+
+
+ 0
+
+
+
+
+
+ Number of scheduled checkpoints that have been performed
+ 0
+
+
+ PostgreSQL Background Writer (@Secondary@)
+
+
+
+
+
+
+
+
+ -
+ PostgreSQL Average interval between checkpoints
+ 7
+
+
+ pg.checkpoint_avg_interval[{$PG_CONN_@SECONDARY@},{$PG_DB}]
+ 60
+ 7
+ 365
+ 0
+ 0
+
+ s
+
+
+ 0
+ 0
+
+ 0
+
+
+
+ 0
+
+
+
+
+
+ Returns the average interval in seconds between each checkpoint that has occurred since statistics were reset, or 0 if no checkpoints have occurred.
+
+Requires libzbxpgsql v1.0.0 or above.
+ 0
+
+
+ PostgreSQL Background Writer (@Secondary@)
+
+
+
+
+
+
+
+
+ -
+ PostgreSQL Checkpoint sync time
+ 7
+
+
+ pg.checkpoint_sync_time[{$PG_CONN_@SECONDARY@},{$PG_DB}]
+ 60
+ 7
+ 365
+ 0
+ 0
+
+ s
+
+
+ 0
+ 0
+
+ 0
+
+
+
+ 0
+
+
+
+
+
+ Total amount of time that has been spent in the portion of checkpoint processing where files are synchronized to disk, in milliseconds
+ 0
+
+
+ PostgreSQL Background Writer (@Secondary@)
+
+
+
+
+
+
+ 1
+ 0.001
+
+
+
+
+
+ -
+ PostgreSQL Checkpoint time
+ 7
+
+
+ pg.checkpoint_time_ratio[{$PG_CONN_@SECONDARY@},{$PG_DB}]
+ 60
+ 7
+ 365
+ 0
+ 0
+
+ %
+
+
+ 0
+ 0
+
+ 0
+
+
+
+ 0
+
+
+
+
+
+ Returns the percentage of time spent writing or syncing checkpoints since statistics were reset.
+
+Requires libzbxpgsql v1.0.0 or above.
+ 0
+
+
+ PostgreSQL Background Writer (@Secondary@)
+
+
+
+
+
+
+ 1
+ 100
+
+
+
+
+
+ -
+ PostgreSQL Checkpoint write time
+ 7
+
+
+ pg.checkpoint_write_time[{$PG_CONN_@SECONDARY@},{$PG_DB}]
+ 60
+ 7
+ 365
+ 0
+ 0
+
+ s
+
+
+ 0
+ 0
+
+ 0
+
+
+
+ 0
+
+
+
+
+
+ Total amount of time that has been spent in the portion of checkpoint processing where files are written to disk, in milliseconds
+ 0
+
+
+ PostgreSQL Background Writer (@Secondary@)
+
+
+
+
+
+
+ 1
+ 0.001
+
+
+
+
+
+ -
+ PostgreSQL Server responding
+ 7
+
+
+ pg.connect[{$PG_CONN_@SECONDARY@},{$PG_DB}]
+ 60
+ 7
+ 365
+ 0
+ 3
+
+
+
+
+ 0
+ 0
+
+ 0
+
+
+
+ 0
+
+
+
+
+
+ Returns 1 on successful connection, otherwise 0.
+
+Accepts only the default connection parameters.
+NOTE: If you are using connection pooling, this parameter should bypass the connection pooler and connect directly to your PostgreSQL server. Create a second item key to check the availability of your connection pooler.
+
+Requires libzbxpgsql v1.0.0 or above.
+ 0
+
+
+ PostgreSQL Server (@Secondary@)
+
+
+
+
+
+
+
+
+ -
+ PostgreSQL Database transaction ID age (oldest)
+ 7
+
+
+ pg.db.xid_age[{$PG_CONN_@SECONDARY@},{$PG_DB}]
+ 60
+ 7
+ 365
+ 0
+ 3
+
+ / 2M
+
+
+ 0
+ 0
+
+ 0
+
+
+
+ 0
+
+
+
+
+
+ Returns the age (as a transaction count) of the oldest Transaction ID for all readable databases.
+
+Requires libzbxpgsql v1.0.0 or above.
+ 0
+
+
+ PostgreSQL MVCC (@Secondary@)
+
+
+
+
+
+
+
+
+ -
+ PostgreSQL Background writer stops
+ 7
+
+
+ pg.maxwritten_clean[{$PG_CONN_@SECONDARY@},{$PG_DB}]
+ 60
+ 7
+ 365
+ 0
+ 3
+
+
+
+
+ 0
+ 0
+
+ 0
+
+
+
+ 0
+
+
+
+
+
+ Number of times the background writer stopped a cleaning scan because it had written too many buffers
+ 0
+
+
+ PostgreSQL Background Writer (@Secondary@)
+
+
+
+
+
+
+
+
+ -
+ PostgreSQL Prepared transaction age
+ 7
+
+
+ pg.prepared_xacts_age[{$PG_CONN_@SECONDARY@},{$PG_DB}]
+ 60
+ 7
+ 365
+ 0
+ 3
+
+ s
+
+
+ 0
+ 0
+
+ 0
+
+
+
+ 0
+
+
+
+
+
+ Returns the age of the oldest transaction that is currently prepared for two phase commit.
+
+Requires libzbxpgsql v1.0.0 or above.
+ 0
+
+
+ PostgreSQL Prepared Transactions (@Secondary@)
+
+
+
+
+
+
+
+
+ -
+ PostgreSQL Prepared transaction count
+ 7
+
+
+ pg.prepared_xacts_count[{$PG_CONN_@SECONDARY@},{$PG_DB}]
+ 60
+ 7
+ 365
+ 0
+ 3
+
+
+
+
+ 0
+ 0
+
+ 0
+
+
+
+ 0
+
+
+
+
+
+ Returns the number of transactions that are currently prepared for two phase commit.
+
+Requires libzbxpgsql v1.0.0 or above.
+ 0
+
+
+ PostgreSQL Prepared Transactions (@Secondary@)
+
+
+
+
+
+
+
+
+ -
+ PostgreSQL Prepared transaction used %
+ 7
+
+
+ pg.prepared_xacts_ratio[{$PG_CONN_@SECONDARY@},{$PG_DB}]
+ 60
+ 7
+ 365
+ 0
+ 0
+
+ %
+
+
+ 0
+ 0
+
+ 0
+
+
+
+ 0
+
+
+
+
+
+ Returns the number of transactions that are currently prepared for two phase commit as a percentage of the maximum available prepared transactions.
+
+Requires libzbxpgsql v1.0.0 or above.
+ 0
+
+
+ PostgreSQL Prepared Transactions (@Secondary@)
+
+
+
+
+
+
+ 1
+ 100
+
+
+
+
+
+ -
+ PostgreSQL Longest running query
+ 7
+
+
+ pg.queries.longest[{$PG_CONN_@SECONDARY@},{$PG_DB}]
+ 60
+ 7
+ 365
+ 0
+ 0
+
+ s
+
+
+ 0
+ 0
+
+ 0
+
+
+
+ 0
+
+
+
+
+
+ The duration in seconds of the longest running, currently active query for all databases.
+
+Requires libzbxpgsql v1.0.0 or above.
+ 0
+
+
+ PostgreSQL Backend Connections (@Secondary@)
+
+
+
+
+
+
+
+
+ -
+ PostgreSQL Server start time
+ 7
+
+
+ pg.starttime[{$PG_CONN_@SECONDARY@},{$PG_DB}]
+ 60
+ 7
+ 0
+ 0
+ 4
+
+
+
+
+ 0
+ 0
+
+ 0
+
+
+
+ 0
+
+
+
+
+
+ Returns the UTC timestamp that the PostgreSQL server process started.
+
+Accepts only the default connection parameters.
+
+Requires libzbxpgsql v1.0.0 or above.
+ 0
+
+
+ PostgreSQL Server (@Secondary@)
+
+
+
+
+
+
+
+
+ -
+ PostgreSQL Background writer statistics last reset
+ 7
+
+
+ pg.stats_reset[{$PG_CONN_@SECONDARY@},{$PG_DB}]
+ 60
+ 7
+ 0
+ 0
+ 4
+
+
+
+
+ 0
+ 0
+
+ 0
+
+
+
+ 0
+
+
+
+
+
+ Time at which the background writer statistics were last reset
+ 0
+
+
+ PostgreSQL Background Writer (@Secondary@)
+
+
+
+
+
+
+
+
+ -
+ PostgreSQL Server uptime
+ 7
+
+
+ pg.uptime[{$PG_CONN_@SECONDARY@},{$PG_DB}]
+ 60
+ 7
+ 365
+ 0
+ 3
+
+ s
+
+
+ 0
+ 0
+
+ 0
+
+
+
+ 0
+
+
+
+
+
+ Returns the number of seconds since the PostgreSQL server process started
+
+Accepts only the default connection parameters.
+
+Requires libzbxpgsql v1.0.0 or above.
+ 0
+
+
+ PostgreSQL Server (@Secondary@)
+
+
+
+
+
+
+
+
+ -
+ PostgreSQL Server version
+ 7
+
+
+ pg.version[{$PG_CONN_@SECONDARY@},{$PG_DB}]
+ 60
+ 7
+ 0
+ 0
+ 4
+
+
+
+
+ 0
+ 0
+
+ 0
+
+
+
+ 0
+
+
+
+
+
+
+ 0
+
+
+ PostgreSQL Server (@Secondary@)
+
+
+
+
+
+
+
+
+
+
+
+ Discover PostgreSQL Databases
+ 7
+
+
+ pg.db.discovery[{$PG_CONN_@SECONDARY@},{$PG_DB}]
+ 1h
+ 0
+
+
+
+ 0
+ 0
+
+ 0
+
+
+
+ 0
+
+
+
+
+
+
+ 0
+
+
+
+ 30d
+ Discover all databases available for connection
+
+
+ PostgreSQL Database disk block hits/sec on {#PATH}
+ 7
+
+
+ pg.db.blks_hit[{$PG_CONN_@SECONDARY@},{$PG_DB},{#DATABASE}]
+ 60
+ 7
+ 365
+ 0
+ 3
+
+
+
+
+ 0
+ 0
+
+ 0
+
+
+
+ 0
+
+
+
+
+
+ Number of times disk blocks were found already in the buffer cache, so that a read was not necessary (this only includes hits in the PostgreSQL buffer cache, not the operating system's file system cache)
+ 0
+
+
+ PostgreSQL Database Disk IO (@Secondary@)
+
+
+
+
+
+
+ 10
+
+
+
+
+
+
+
+
+ PostgreSQL Database disk blocks read/sec on {#PATH}
+ 7
+
+
+ pg.db.blks_read[{$PG_CONN_@SECONDARY@},{$PG_DB},{#DATABASE}]
+ 60
+ 7
+ 365
+ 0
+ 0
+
+
+
+
+ 0
+ 0
+
+ 0
+
+
+
+ 0
+
+
+
+
+
+ Number of disk blocks read in this database
+ 0
+
+
+ PostgreSQL Database Disk IO (@Secondary@)
+
+
+
+
+
+
+ 10
+
+
+
+
+
+
+
+
+ PostgreSQL Database time spent reading data on {#PATH}
+ 7
+
+
+ pg.db.blk_read_time[{$PG_CONN_@SECONDARY@},{$PG_DB},{#DATABASE}]
+ 60
+ 7
+ 365
+ 0
+ 0
+
+ s
+
+
+ 0
+ 0
+
+ 0
+
+
+
+ 0
+
+
+
+
+
+ Time spent reading data file blocks by backends in this database, in seconds
+ 0
+
+
+ PostgreSQL Database Disk IO (@Secondary@)
+
+
+
+
+
+
+ 1
+ 0.001
+
+
+
+
+
+
+
+ PostgreSQL Database time spent writing data on {#PATH}
+ 7
+
+
+ pg.db.blk_write_time[{$PG_CONN_@SECONDARY@},{$PG_DB},{#DATABASE}]
+ 60
+ 7
+ 365
+ 0
+ 0
+
+ s
+
+
+ 0
+ 0
+
+ 0
+
+
+
+ 0
+
+
+
+
+
+ Time spent writing data file blocks by backends in this database, in seconds
+ 0
+
+
+ PostgreSQL Database Disk IO (@Secondary@)
+
+
+
+
+
+
+ 1
+ 0.001
+
+
+
+
+
+
+
+ PostgreSQL Database conflicts/sec on {#PATH}
+ 7
+
+
+ pg.db.conflicts[{$PG_CONN_@SECONDARY@},{$PG_DB},{#DATABASE}]
+ 60
+ 7
+ 365
+ 0
+ 0
+
+
+
+
+ 0
+ 0
+
+ 0
+
+
+
+ 0
+
+
+
+
+
+ Number of queries canceled due to conflicts with recovery in this database. (Conflicts occur only on standby servers; see pg_stat_database_conflicts for details.)
+ 0
+
+
+ PostgreSQL Database Errors (@Secondary@)
+
+
+
+
+
+
+ 10
+
+
+
+
+
+
+
+
+ PostgreSQL Database deadlocks/sec on {#PATH}
+ 7
+
+
+ pg.db.deadlocks[{$PG_CONN_@SECONDARY@},{$PG_DB},{#DATABASE}]
+ 60
+ 7
+ 365
+ 0
+ 0
+
+
+
+
+ 0
+ 0
+
+ 0
+
+
+
+ 0
+
+
+
+
+
+ Number of deadlocks detected in this database
+ 0
+
+
+ PostgreSQL Database Errors (@Secondary@)
+
+
+
+
+
+
+ 10
+
+
+
+
+
+
+
+
+ PostgreSQL Database backends connected on {#PATH}
+ 7
+
+
+ pg.db.numbackends[{$PG_CONN_@SECONDARY@},{$PG_DB},{#DATABASE}]
+ 60
+ 7
+ 365
+ 0
+ 3
+
+
+
+
+ 0
+ 0
+
+ 0
+
+
+
+ 0
+
+
+
+
+
+ Number of backends currently connected to this database. This is the only column in this view that returns a value reflecting current state; all other columns return the accumulated values since the last reset.
+ 0
+
+
+ PostgreSQL Backend Connections (@Secondary@)
+
+
+
+
+
+
+
+
+
+
+ PostgreSQL Database disk size on {#PATH}
+ 7
+
+
+ pg.db.size[{$PG_CONN_@SECONDARY@},{$PG_DB},{#DATABASE}]
+ 60
+ 7
+ 365
+ 0
+ 3
+
+ B
+
+
+ 0
+ 0
+
+ 0
+
+
+
+ 0
+
+
+
+
+
+
+ 0
+
+
+ PostgreSQL Database Capacity (@Secondary@)
+
+
+
+
+
+
+
+
+
+
+ PostgreSQL Database statistics last reset on {#PATH}
+ 7
+
+
+ pg.db.stats_reset[{$PG_CONN_@SECONDARY@},{$PG_DB},{#DATABASE}]
+ 60
+ 7
+ 0
+ 0
+ 4
+
+
+
+
+ 0
+ 0
+
+ 0
+
+
+
+ 0
+
+
+
+
+
+ Time at which these statistics were last reset
+ 0
+
+
+ PostgreSQL Database Errors (@Secondary@)
+
+
+
+
+
+
+
+
+
+
+ PostgreSQL Database temp data write/sec on {#PATH}
+ 7
+
+
+ pg.db.temp_bytes[{$PG_CONN_@SECONDARY@},{$PG_DB},{#DATABASE}]
+ 60
+ 7
+ 365
+ 0
+ 0
+
+ Bps
+
+
+ 0
+ 0
+
+ 0
+
+
+
+ 0
+
+
+
+
+
+ Total amount of data written to temporary files by queries in this database. All temporary files are counted, regardless of why the temporary file was created, and regardless of the log_temp_files setting.
+ 0
+
+
+ PostgreSQL Database Temp File Utilization (@Secondary@)
+
+
+
+
+
+
+ 10
+
+
+
+
+
+
+
+
+ PostgreSQL Database temp files created/sec on {#PATH}
+ 7
+
+
+ pg.db.temp_files[{$PG_CONN_@SECONDARY@},{$PG_DB},{#DATABASE}]
+ 60
+ 7
+ 365
+ 0
+ 0
+
+
+
+
+ 0
+ 0
+
+ 0
+
+
+
+ 0
+
+
+
+
+
+ Number of temporary files created by queries in this database. All temporary files are counted, regardless of why the temporary file was created (e.g., sorting or hashing), and regardless of the log_temp_files setting.
+ 0
+
+
+ PostgreSQL Database Temp File Utilization (@Secondary@)
+
+
+
+
+
+
+ 10
+
+
+
+
+
+
+
+
+ PostgreSQL Database rows deleted/sec on {#PATH}
+ 7
+
+
+ pg.db.tup_deleted[{$PG_CONN_@SECONDARY@},{$PG_DB},{#DATABASE}]
+ 60
+ 7
+ 365
+ 0
+ 0
+
+
+
+
+ 0
+ 0
+
+ 0
+
+
+
+ 0
+
+
+
+
+
+ Number of rows deleted by queries in this database
+ 0
+
+
+ PostgreSQL Database Performance (@Secondary@)
+
+
+
+
+
+
+ 10
+
+
+
+
+
+
+
+
+ PostgreSQL Database rows fetched by bitmap scans/sec on {#PATH}
+ 7
+
+
+ pg.db.tup_fetched[{$PG_CONN_@SECONDARY@},{$PG_DB},{#DATABASE}]
+ 60
+ 7
+ 365
+ 0
+ 0
+
+
+
+
+ 0
+ 0
+
+ 0
+
+
+
+ 0
+
+
+
+
+
+ Number of rows fetched by queries in this database
+ 0
+
+
+ PostgreSQL Database Performance (@Secondary@)
+
+
+
+
+
+
+ 10
+
+
+
+
+
+
+
+
+ PostgreSQL Database rows inserted/sec on {#PATH}
+ 7
+
+
+ pg.db.tup_inserted[{$PG_CONN_@SECONDARY@},{$PG_DB},{#DATABASE}]
+ 60
+ 7
+ 365
+ 0
+ 0
+
+
+
+
+ 0
+ 0
+
+ 0
+
+
+
+ 0
+
+
+
+
+
+ Number of rows inserted by queries in this database
+ 0
+
+
+ PostgreSQL Database Performance (@Secondary@)
+
+
+
+
+
+
+ 10
+
+
+
+
+
+
+
+
+ PostgreSQL Database rows returned by sequential scans/sec on {#PATH}
+ 7
+
+
+ pg.db.tup_returned[{$PG_CONN_@SECONDARY@},{$PG_DB},{#DATABASE}]
+ 60
+ 7
+ 365
+ 0
+ 0
+
+
+
+
+ 0
+ 0
+
+ 0
+
+
+
+ 0
+
+
+
+
+
+ Number of rows returned by queries in this database
+ 0
+
+
+ PostgreSQL Database Performance (@Secondary@)
+
+
+
+
+
+
+ 10
+
+
+
+
+
+
+
+
+ PostgreSQL Database rows updated/sec on {#PATH}
+ 7
+
+
+ pg.db.tup_updated[{$PG_CONN_@SECONDARY@},{$PG_DB},{#DATABASE}]
+ 60
+ 7
+ 365
+ 0
+ 0
+
+
+
+
+ 0
+ 0
+
+ 0
+
+
+
+ 0
+
+
+
+
+
+ Number of rows updated by queries in this database
+ 0
+
+
+ PostgreSQL Database Performance (@Secondary@)
+
+
+
+
+
+
+ 10
+
+
+
+
+
+
+
+
+ PostgreSQL Database transactions committed/sec on {#PATH}
+ 7
+
+
+ pg.db.xact_commit[{$PG_CONN_@SECONDARY@},{$PG_DB},{#DATABASE}]
+ 60
+ 7
+ 365
+ 0
+ 0
+
+
+
+
+ 0
+ 0
+
+ 0
+
+
+
+ 0
+
+
+
+
+
+ Number of transactions in this database that have been committed
+ 0
+
+
+ PostgreSQL Database Performance (@Secondary@)
+
+
+
+
+
+
+ 10
+
+
+
+
+
+
+
+
+ PostgreSQL Database transactions rolled back/sec on {#PATH}
+ 7
+
+
+ pg.db.xact_rollback[{$PG_CONN_@SECONDARY@},{$PG_DB},{#DATABASE}]
+ 60
+ 7
+ 365
+ 0
+ 0
+
+
+
+
+ 0
+ 0
+
+ 0
+
+
+
+ 0
+
+
+
+
+
+ Number of transactions in this database that have been rolled back
+ 0
+
+
+ PostgreSQL Database Performance (@Secondary@)
+
+
+
+
+
+
+ 10
+
+
+
+
+
+
+
+
+ PostgreSQL Database transaction ID age on {#PATH}
+ 7
+
+
+ pg.db.xid_age[{$PG_CONN_@SECONDARY@},{$PG_DB},{#DATABASE}]
+ 60
+ 7
+ 365
+ 0
+ 3
+
+ / 2M
+
+
+ 0
+ 0
+
+ 0
+
+
+
+ 0
+
+
+
+
+
+ Returns the age (as a transaction count) of the current Transactions ID for this database.
+
+Requires libzbxpgsql v1.0.0 or above.
+ 0
+
+
+ PostgreSQL MVCC (@Secondary@)
+
+
+
+
+
+
+
+
+
+
+ PostgreSQL Database oldest prepared transaction on {#PATH}
+ 7
+
+
+ pg.prepared_xacts_age[{$PG_CONN_@SECONDARY@},{$PG_DB},{#DATABASE}]
+ 60
+ 7
+ 365
+ 0
+ 3
+
+ s
+
+
+ 0
+ 0
+
+ 0
+
+
+
+ 0
+
+
+
+
+
+ Returns the age of the oldest transaction that is currently prepared for two phase commit on this database.
+
+Requires libzbxpgsql v1.0.0 or above.
+ 0
+
+
+ PostgreSQL Prepared Transactions (@Secondary@)
+
+
+
+
+
+
+
+
+
+
+ PostgreSQL Database transactions prepared on {#PATH}
+ 7
+
+
+ pg.prepared_xacts_count[{$PG_CONN_@SECONDARY@},{$PG_DB},{#DATABASE}]
+ 60
+ 7
+ 365
+ 0
+ 3
+
+
+
+
+ 0
+ 0
+
+ 0
+
+
+
+ 0
+
+
+
+
+
+ Returns the number of transactions that are currently prepared for two phase commit on this database.
+
+Requires libzbxpgsql v1.0.0 or above.
+ 0
+
+
+ PostgreSQL Prepared Transactions (@Secondary@)
+
+
+
+
+
+
+
+
+
+
+ PostgreSQL Database longest running query on {#PATH}
+ 7
+
+
+ pg.queries.longest[{$PG_CONN_@SECONDARY@},{$PG_DB},{#DATABASE}]
+ 60
+ 7
+ 365
+ 0
+ 0
+
+ s
+
+
+ 0
+ 0
+
+ 0
+
+
+
+ 0
+
+
+
+
+
+ The duration in seconds of the longest running, currently active query for database {#DATABASE}.
+
+Requires libzbxpgsql v1.0.0 or above.
+ 0
+
+
+ PostgreSQL Backend Connections (@Secondary@)
+
+
+
+
+
+
+
+
+
+
+ PostgreSQL Database index scans/sec on {#PATH}
+ 7
+
+
+ pg.table.idx_scan[{$PG_CONN_@SECONDARY@},{#DATABASE}]
+ 60
+ 7
+ 365
+ 0
+ 3
+
+
+
+
+ 0
+ 0
+
+ 0
+
+
+
+ 0
+
+
+
+
+
+ Number of index scans initiated for all tables in this database.
+ 0
+
+
+ PostgreSQL Database Performance (@Secondary@)
+
+
+
+
+
+
+ 10
+
+
+
+
+
+
+
+
+ PostgreSQL Database live rows fetched by indexes/sec on {#PATH}
+ 7
+
+
+ pg.table.idx_tup_fetch[{$PG_CONN_@SECONDARY@},{#DATABASE}]
+ 60
+ 7
+ 365
+ 0
+ 3
+
+
+
+
+ 0
+ 0
+
+ 0
+
+
+
+ 0
+
+
+
+
+
+ Number of live rows fetched by index scans for all tables in this database.
+ 0
+
+
+ PostgreSQL Database Performance (@Secondary@)
+
+
+
+
+
+
+ 10
+
+
+
+
+
+
+
+
+ PostgreSQL Database estimated dead rows on {#PATH}
+ 7
+
+
+ pg.table.n_dead_tup[{$PG_CONN_@SECONDARY@},{#DATABASE}]
+ 60
+ 7
+ 365
+ 0
+ 3
+
+
+
+
+ 0
+ 0
+
+ 0
+
+
+
+ 0
+
+
+
+
+
+ Estimated number of dead rows for all tables in this database.
+ 0
+
+
+ PostgreSQL Database Capacity (@Secondary@)
+
+
+
+
+
+
+ 10
+
+
+
+
+
+
+
+
+ PostgreSQL Database estimated live rows on {#PATH}
+ 7
+
+
+ pg.table.n_live_tup[{$PG_CONN_@SECONDARY@},{#DATABASE}]
+ 60
+ 7
+ 365
+ 0
+ 3
+
+
+
+
+ 0
+ 0
+
+ 0
+
+
+
+ 0
+
+
+
+
+
+ Estimated number of live rows for all tables in this database.
+ 0
+
+
+ PostgreSQL Database Capacity (@Secondary@)
+
+
+
+
+
+
+ 10
+
+
+
+
+
+
+
+
+ PostgreSQL Database estimated modified rows since analyze on {#PATH}
+ 7
+
+
+ pg.table.n_mod_since_analyze[{$PG_CONN_@SECONDARY@},{#DATABASE}]
+ 60
+ 7
+ 365
+ 0
+ 3
+
+
+
+
+ 0
+ 0
+
+ 0
+
+
+
+ 0
+
+
+
+
+
+ Estimated number of rows modified since tables were analyzed in this database.
+ 0
+
+
+ PostgreSQL Database Capacity (@Secondary@)
+
+
+
+
+
+
+
+
+
+
+ PostgreSQL Database rows deleted/sec on {#PATH}
+ 7
+
+
+ pg.table.n_tup_del[{$PG_CONN_@SECONDARY@},{#DATABASE}]
+ 60
+ 7
+ 365
+ 0
+ 3
+
+
+
+
+ 0
+ 0
+
+ 0
+
+
+
+ 0
+
+
+
+
+
+ Number of rows deleted for all tables in this database.
+ 0
+
+
+ PostgreSQL Database Performance (@Secondary@)
+
+
+
+
+
+
+ 10
+
+
+
+
+
+
+
+
+ PostgreSQL Database rows hot updated on {#PATH}
+ 7
+
+
+ pg.table.n_tup_hot_upd[{$PG_CONN_@SECONDARY@},{#DATABASE}]
+ 60
+ 7
+ 365
+ 0
+ 3
+
+
+
+
+ 0
+ 0
+
+ 0
+
+
+
+ 0
+
+
+
+
+
+ Number of rows HOT updated (i.e., with no separate index update required) for all tables in this database.
+ 0
+
+
+ PostgreSQL Database Performance (@Secondary@)
+
+
+
+
+
+
+ 10
+
+
+
+
+
+
+
+
+ PostgreSQL Database rows inserted/sec on {#PATH}
+ 7
+
+
+ pg.table.n_tup_ins[{$PG_CONN_@SECONDARY@},{#DATABASE}]
+ 60
+ 7
+ 365
+ 0
+ 3
+
+
+
+
+ 0
+ 0
+
+ 0
+
+
+
+ 0
+
+
+
+
+
+ Number of rows inserted for all tables in this database.
+ 0
+
+
+ PostgreSQL Database Performance (@Secondary@)
+
+
+
+
+
+
+ 10
+
+
+
+
+
+
+
+
+ PostgreSQL Database rows updated/sec on {#PATH}
+ 7
+
+
+ pg.table.n_tup_upd[{$PG_CONN_@SECONDARY@},{#DATABASE}]
+ 60
+ 7
+ 365
+ 0
+ 3
+
+
+
+
+ 0
+ 0
+
+ 0
+
+
+
+ 0
+
+
+
+
+
+ Number of rows updated for all tables in this database.
+ 0
+
+
+ PostgreSQL Database Performance (@Secondary@)
+
+
+
+
+
+
+ 10
+
+
+
+
+
+
+
+
+ PostgreSQL Database estimated row count on {#PATH}
+ 7
+
+
+ pg.table.rows[{$PG_CONN_@SECONDARY@},{#DATABASE}]
+ 60
+ 7
+ 365
+ 0
+ 3
+
+
+
+
+ 0
+ 0
+
+ 0
+
+
+
+ 0
+
+
+
+
+
+ Estimated number of rows for all tables in this database.
+ 0
+
+
+ PostgreSQL Database Capacity (@Secondary@)
+
+
+
+
+
+
+
+
+
+
+ PostgreSQL Database sequential scans/sec on {#PATH}
+ 7
+
+
+ pg.table.seq_scan[{$PG_CONN_@SECONDARY@},{#DATABASE}]
+ 60
+ 7
+ 365
+ 0
+ 3
+
+
+
+
+ 0
+ 0
+
+ 0
+
+
+
+ 0
+
+
+
+
+
+ Number of sequential scans initiated on all tables in this database.
+ 0
+
+
+ PostgreSQL Database Performance (@Secondary@)
+
+
+
+
+
+
+ 10
+
+
+
+
+
+
+
+
+ PostgreSQL Database live rows fetched by scans/sec on {#PATH}
+ 7
+
+
+ pg.table.seq_tup_read[{$PG_CONN_@SECONDARY@},{#DATABASE}]
+ 60
+ 7
+ 365
+ 0
+ 3
+
+
+
+
+ 0
+ 0
+
+ 0
+
+
+
+ 0
+
+
+
+
+
+ Number of live rows fetched by sequential scans for all tables in this database.
+ 0
+
+
+ PostgreSQL Database Performance (@Secondary@)
+
+
+
+
+
+
+ 10
+
+
+
+
+
+
+
+
+
+
+
+ PostgreSQL (@Secondary@) Database blocks/sec on {#DATABASE}
+ 900
+ 200
+ 0.0000
+ 100.0000
+ 1
+ 1
+ 0
+ 1
+ 0
+ 0.0000
+ 0.0000
+ 1
+ 0
+ 0
+ 0
+
+
+ 0
+ 5
+ 00C800
+ 0
+ 2
+ 0
+ -
+ Template App PostgreSQL @Secondary@
+ pg.db.blks_hit[{$PG_CONN_@SECONDARY@},{$PG_DB},{#DATABASE}]
+
+
+
+ 1
+ 5
+ C80000
+ 0
+ 2
+ 0
+ -
+ Template App PostgreSQL @Secondary@
+ pg.db.blks_read[{$PG_CONN_@SECONDARY@},{$PG_DB},{#DATABASE}]
+
+
+
+
+
+ PostgreSQL (@Secondary@) Database blocks/sec on {#PATH}
+ 900
+ 200
+ 0.0000
+ 100.0000
+ 1
+ 1
+ 0
+ 1
+ 0
+ 0.0000
+ 0.0000
+ 1
+ 0
+ 0
+ 0
+
+
+ 0
+ 5
+ 00C800
+ 0
+ 2
+ 0
+ -
+ Template App PostgreSQL @Secondary@
+ pg.db.blks_hit[{$PG_CONN_@SECONDARY@},{$PG_DB},{#DATABASE}]
+
+
+
+ 1
+ 5
+ C80000
+ 0
+ 2
+ 0
+ -
+ Template App PostgreSQL @Secondary@
+ pg.db.blks_read[{$PG_CONN_@SECONDARY@},{$PG_DB},{#DATABASE}]
+
+
+
+
+
+ PostgreSQL (@Secondary@) Database disk size on {#DATABASE}
+ 900
+ 200
+ 0.0000
+ 100.0000
+ 1
+ 1
+ 0
+ 1
+ 0
+ 0.0000
+ 0.0000
+ 1
+ 0
+ 0
+ 0
+
+
+ 0
+ 5
+ 00C800
+ 0
+ 2
+ 0
+ -
+ Template App PostgreSQL @Secondary@
+ pg.db.size[{$PG_CONN_@SECONDARY@},{$PG_DB},{#DATABASE}]
+
+
+
+
+
+ PostgreSQL (@Secondary@) Database disk size on {#PATH}
+ 900
+ 200
+ 0.0000
+ 100.0000
+ 1
+ 1
+ 0
+ 1
+ 0
+ 0.0000
+ 0.0000
+ 1
+ 0
+ 0
+ 0
+
+
+ 0
+ 5
+ 00C800
+ 0
+ 2
+ 0
+ -
+ Template App PostgreSQL @Secondary@
+ pg.db.size[{$PG_CONN_@SECONDARY@},{$PG_DB},{#DATABASE}]
+
+
+
+
+
+ PostgreSQL (@Secondary@) Database errors/sec on {#DATABASE}
+ 900
+ 200
+ 0.0000
+ 100.0000
+ 1
+ 1
+ 0
+ 1
+ 0
+ 0.0000
+ 0.0000
+ 1
+ 0
+ 0
+ 0
+
+
+ 0
+ 5
+ C800C8
+ 0
+ 2
+ 0
+ -
+ Template App PostgreSQL @Secondary@
+ pg.db.conflicts[{$PG_CONN_@SECONDARY@},{$PG_DB},{#DATABASE}]
+
+
+
+ 1
+ 5
+ C80000
+ 0
+ 2
+ 0
+ -
+ Template App PostgreSQL @Secondary@
+ pg.db.deadlocks[{$PG_CONN_@SECONDARY@},{$PG_DB},{#DATABASE}]
+
+
+
+
+
+ PostgreSQL (@Secondary@) Database errors/sec on {#PATH}
+ 900
+ 200
+ 0.0000
+ 100.0000
+ 1
+ 1
+ 0
+ 1
+ 0
+ 0.0000
+ 0.0000
+ 1
+ 0
+ 0
+ 0
+
+
+ 0
+ 5
+ C800C8
+ 0
+ 2
+ 0
+ -
+ Template App PostgreSQL @Secondary@
+ pg.db.conflicts[{$PG_CONN_@SECONDARY@},{$PG_DB},{#DATABASE}]
+
+
+
+ 1
+ 5
+ C80000
+ 0
+ 2
+ 0
+ -
+ Template App PostgreSQL @Secondary@
+ pg.db.deadlocks[{$PG_CONN_@SECONDARY@},{$PG_DB},{#DATABASE}]
+
+
+
+
+
+ PostgreSQL (@Secondary@) Database index utilization on {#DATABASE}
+ 900
+ 200
+ 0.0000
+ 100.0000
+ 1
+ 1
+ 0
+ 1
+ 0
+ 0.0000
+ 0.0000
+ 1
+ 0
+ 0
+ 0
+
+
+ 0
+ 5
+ 00C800
+ 0
+ 2
+ 0
+ -
+ Template App PostgreSQL @Secondary@
+ pg.table.idx_tup_fetch[{$PG_CONN_@SECONDARY@},{#DATABASE}]
+
+
+
+ 1
+ 5
+ C80000
+ 0
+ 2
+ 0
+ -
+ Template App PostgreSQL @Secondary@
+ pg.table.seq_tup_read[{$PG_CONN_@SECONDARY@},{#DATABASE}]
+
+
+
+
+
+ PostgreSQL (@Secondary@) Database index utilization on {#PATH}
+ 900
+ 200
+ 0.0000
+ 100.0000
+ 1
+ 1
+ 0
+ 1
+ 0
+ 0.0000
+ 0.0000
+ 1
+ 0
+ 0
+ 0
+
+
+ 0
+ 5
+ 00C800
+ 0
+ 2
+ 0
+ -
+ Template App PostgreSQL @Secondary@
+ pg.table.idx_tup_fetch[{$PG_CONN_@SECONDARY@},{#DATABASE}]
+
+
+
+ 1
+ 5
+ C80000
+ 0
+ 2
+ 0
+ -
+ Template App PostgreSQL @Secondary@
+ pg.table.seq_tup_read[{$PG_CONN_@SECONDARY@},{#DATABASE}]
+
+
+
+
+
+ PostgreSQL (@Secondary@) Database IO time on {#DATABASE}
+ 900
+ 200
+ 0.0000
+ 100.0000
+ 1
+ 1
+ 0
+ 1
+ 0
+ 0.0000
+ 0.0000
+ 1
+ 0
+ 0
+ 0
+
+
+ 0
+ 5
+ 00C800
+ 0
+ 2
+ 0
+ -
+ Template App PostgreSQL @Secondary@
+ pg.db.blk_read_time[{$PG_CONN_@SECONDARY@},{$PG_DB},{#DATABASE}]
+
+
+
+ 1
+ 5
+ C80000
+ 0
+ 2
+ 0
+ -
+ Template App PostgreSQL @Secondary@
+ pg.db.blk_write_time[{$PG_CONN_@SECONDARY@},{$PG_DB},{#DATABASE}]
+
+
+
+
+
+ PostgreSQL (@Secondary@) Database IO time on {#PATH}
+ 900
+ 200
+ 0.0000
+ 100.0000
+ 1
+ 1
+ 0
+ 1
+ 0
+ 0.0000
+ 0.0000
+ 1
+ 0
+ 0
+ 0
+
+
+ 0
+ 5
+ 00C800
+ 0
+ 2
+ 0
+ -
+ Template App PostgreSQL @Secondary@
+ pg.db.blk_read_time[{$PG_CONN_@SECONDARY@},{$PG_DB},{#DATABASE}]
+
+
+
+ 1
+ 5
+ C80000
+ 0
+ 2
+ 0
+ -
+ Template App PostgreSQL @Secondary@
+ pg.db.blk_write_time[{$PG_CONN_@SECONDARY@},{$PG_DB},{#DATABASE}]
+
+
+
+
+
+ PostgreSQL (@Secondary@) Database row count on {#DATABASE}
+ 900
+ 200
+ 0.0000
+ 100.0000
+ 1
+ 1
+ 0
+ 1
+ 0
+ 0.0000
+ 0.0000
+ 1
+ 0
+ 0
+ 0
+
+
+ 0
+ 5
+ C80000
+ 0
+ 2
+ 0
+ -
+ Template App PostgreSQL @Secondary@
+ pg.table.n_dead_tup[{$PG_CONN_@SECONDARY@},{#DATABASE}]
+
+
+
+ 1
+ 5
+ 00C800
+ 0
+ 2
+ 0
+ -
+ Template App PostgreSQL @Secondary@
+ pg.table.n_live_tup[{$PG_CONN_@SECONDARY@},{#DATABASE}]
+
+
+
+ 2
+ 5
+ 0000C8
+ 0
+ 2
+ 0
+ -
+ Template App PostgreSQL @Secondary@
+ pg.table.rows[{$PG_CONN_@SECONDARY@},{#DATABASE}]
+
+
+
+
+
+ PostgreSQL (@Secondary@) Database row count on {#PATH}
+ 900
+ 200
+ 0.0000
+ 100.0000
+ 1
+ 1
+ 0
+ 1
+ 0
+ 0.0000
+ 0.0000
+ 1
+ 0
+ 0
+ 0
+
+
+ 0
+ 5
+ C80000
+ 0
+ 2
+ 0
+ -
+ Template App PostgreSQL @Secondary@
+ pg.table.n_dead_tup[{$PG_CONN_@SECONDARY@},{#DATABASE}]
+
+
+
+ 1
+ 5
+ 00C800
+ 0
+ 2
+ 0
+ -
+ Template App PostgreSQL @Secondary@
+ pg.table.n_live_tup[{$PG_CONN_@SECONDARY@},{#DATABASE}]
+
+
+
+ 2
+ 5
+ 0000C8
+ 0
+ 2
+ 0
+ -
+ Template App PostgreSQL @Secondary@
+ pg.table.rows[{$PG_CONN_@SECONDARY@},{#DATABASE}]
+
+
+
+
+
+ PostgreSQL (@Secondary@) Database row IO on {#DATABASE}
+ 900
+ 200
+ 0.0000
+ 100.0000
+ 1
+ 1
+ 0
+ 1
+ 0
+ 0.0000
+ 0.0000
+ 1
+ 0
+ 0
+ 0
+
+
+ 0
+ 5
+ C80000
+ 0
+ 2
+ 0
+ -
+ Template App PostgreSQL @Secondary@
+ pg.db.tup_deleted[{$PG_CONN_@SECONDARY@},{$PG_DB},{#DATABASE}]
+
+
+
+ 1
+ 5
+ 00C800
+ 0
+ 2
+ 0
+ -
+ Template App PostgreSQL @Secondary@
+ pg.db.tup_fetched[{$PG_CONN_@SECONDARY@},{$PG_DB},{#DATABASE}]
+
+
+
+ 2
+ 5
+ C800C8
+ 0
+ 2
+ 0
+ -
+ Template App PostgreSQL @Secondary@
+ pg.db.tup_inserted[{$PG_CONN_@SECONDARY@},{$PG_DB},{#DATABASE}]
+
+
+
+ 3
+ 5
+ 0000C8
+ 0
+ 2
+ 0
+ -
+ Template App PostgreSQL @Secondary@
+ pg.db.tup_returned[{$PG_CONN_@SECONDARY@},{$PG_DB},{#DATABASE}]
+
+
+
+ 4
+ 5
+ C8C800
+ 0
+ 2
+ 0
+ -
+ Template App PostgreSQL @Secondary@
+ pg.db.tup_updated[{$PG_CONN_@SECONDARY@},{$PG_DB},{#DATABASE}]
+
+
+
+
+
+ PostgreSQL (@Secondary@) Database row IO on {#PATH}
+ 900
+ 200
+ 0.0000
+ 100.0000
+ 1
+ 1
+ 0
+ 1
+ 0
+ 0.0000
+ 0.0000
+ 1
+ 0
+ 0
+ 0
+
+
+ 0
+ 5
+ C80000
+ 0
+ 2
+ 0
+ -
+ Template App PostgreSQL @Secondary@
+ pg.db.tup_deleted[{$PG_CONN_@SECONDARY@},{$PG_DB},{#DATABASE}]
+
+
+
+ 1
+ 5
+ 00C800
+ 0
+ 2
+ 0
+ -
+ Template App PostgreSQL @Secondary@
+ pg.db.tup_fetched[{$PG_CONN_@SECONDARY@},{$PG_DB},{#DATABASE}]
+
+
+
+ 2
+ 5
+ C800C8
+ 0
+ 2
+ 0
+ -
+ Template App PostgreSQL @Secondary@
+ pg.db.tup_inserted[{$PG_CONN_@SECONDARY@},{$PG_DB},{#DATABASE}]
+
+
+
+ 3
+ 5
+ 0000C8
+ 0
+ 2
+ 0
+ -
+ Template App PostgreSQL @Secondary@
+ pg.db.tup_returned[{$PG_CONN_@SECONDARY@},{$PG_DB},{#DATABASE}]
+
+
+
+ 4
+ 5
+ C8C800
+ 0
+ 2
+ 0
+ -
+ Template App PostgreSQL @Secondary@
+ pg.db.tup_updated[{$PG_CONN_@SECONDARY@},{$PG_DB},{#DATABASE}]
+
+
+
+
+
+ PostgreSQL (@Secondary@) Database row writes/sec on {#DATABASE}
+ 900
+ 200
+ 0.0000
+ 100.0000
+ 1
+ 1
+ 0
+ 1
+ 0
+ 0.0000
+ 0.0000
+ 1
+ 0
+ 0
+ 0
+
+
+ 0
+ 5
+ 0000C8
+ 0
+ 2
+ 0
+ -
+ Template App PostgreSQL @Secondary@
+ pg.table.n_tup_ins[{$PG_CONN_@SECONDARY@},{#DATABASE}]
+
+
+
+ 1
+ 5
+ C800C8
+ 0
+ 2
+ 0
+ -
+ Template App PostgreSQL @Secondary@
+ pg.table.n_tup_upd[{$PG_CONN_@SECONDARY@},{#DATABASE}]
+
+
+
+ 2
+ 5
+ 00C800
+ 0
+ 2
+ 0
+ -
+ Template App PostgreSQL @Secondary@
+ pg.table.n_tup_hot_upd[{$PG_CONN_@SECONDARY@},{#DATABASE}]
+
+
+
+ 3
+ 5
+ C80000
+ 0
+ 2
+ 0
+ -
+ Template App PostgreSQL @Secondary@
+ pg.table.n_tup_del[{$PG_CONN_@SECONDARY@},{#DATABASE}]
+
+
+
+
+
+ PostgreSQL (@Secondary@) Database row writes/sec on {#PATH}
+ 900
+ 200
+ 0.0000
+ 100.0000
+ 1
+ 1
+ 0
+ 1
+ 0
+ 0.0000
+ 0.0000
+ 1
+ 0
+ 0
+ 0
+
+
+ 0
+ 5
+ 0000C8
+ 0
+ 2
+ 0
+ -
+ Template App PostgreSQL @Secondary@
+ pg.table.n_tup_ins[{$PG_CONN_@SECONDARY@},{#DATABASE}]
+
+
+
+ 1
+ 5
+ C800C8
+ 0
+ 2
+ 0
+ -
+ Template App PostgreSQL @Secondary@
+ pg.table.n_tup_upd[{$PG_CONN_@SECONDARY@},{#DATABASE}]
+
+
+
+ 2
+ 5
+ 00C800
+ 0
+ 2
+ 0
+ -
+ Template App PostgreSQL @Secondary@
+ pg.table.n_tup_hot_upd[{$PG_CONN_@SECONDARY@},{#DATABASE}]
+
+
+
+ 3
+ 5
+ C80000
+ 0
+ 2
+ 0
+ -
+ Template App PostgreSQL @Secondary@
+ pg.table.n_tup_del[{$PG_CONN_@SECONDARY@},{#DATABASE}]
+
+
+
+
+
+ PostgreSQL (@Secondary@) Database transactions/sec on {#DATABASE}
+ 900
+ 200
+ 0.0000
+ 100.0000
+ 1
+ 1
+ 0
+ 1
+ 0
+ 0.0000
+ 0.0000
+ 1
+ 0
+ 0
+ 0
+
+
+ 0
+ 5
+ 00C800
+ 0
+ 2
+ 0
+ -
+ Template App PostgreSQL @Secondary@
+ pg.db.xact_commit[{$PG_CONN_@SECONDARY@},{$PG_DB},{#DATABASE}]
+
+
+
+ 1
+ 5
+ C80000
+ 0
+ 2
+ 0
+ -
+ Template App PostgreSQL @Secondary@
+ pg.db.xact_rollback[{$PG_CONN_@SECONDARY@},{$PG_DB},{#DATABASE}]
+
+
+
+
+
+ PostgreSQL (@Secondary@) Database transactions/sec on {#PATH}
+ 900
+ 200
+ 0.0000
+ 100.0000
+ 1
+ 1
+ 0
+ 1
+ 0
+ 0.0000
+ 0.0000
+ 1
+ 0
+ 0
+ 0
+
+
+ 0
+ 5
+ 00C800
+ 0
+ 2
+ 0
+ -
+ Template App PostgreSQL @Secondary@
+ pg.db.xact_commit[{$PG_CONN_@SECONDARY@},{$PG_DB},{#DATABASE}]
+
+
+
+ 1
+ 5
+ C80000
+ 0
+ 2
+ 0
+ -
+ Template App PostgreSQL @Secondary@
+ pg.db.xact_rollback[{$PG_CONN_@SECONDARY@},{$PG_DB},{#DATABASE}]
+
+
+
+
+
+
+
+
+
+ Discover PostgreSQL Indexes
+ 7
+
+
+ pg.index.discovery[{$PG_CONN_@SECONDARY@},{$PG_DB}]
+ 1h
+ 1
+
+
+
+ 0
+ 0
+
+ 0
+
+
+
+ 0
+
+
+
+
+
+
+ 0
+
+
+
+ 30d
+ Discover all indexes available to the connected user
+
+
+ PostgreSQL Index buffer hits/sec on {#PATH}
+ 7
+
+
+ pg.index.idx_blks_hit[{$PG_CONN_@SECONDARY@},{#DATABASE},{#INDEX}]
+ 60
+ 7
+ 365
+ 0
+ 3
+
+
+
+
+ 0
+ 0
+
+ 0
+
+
+
+ 0
+
+
+
+
+
+ Number of buffer hits in this index
+ 0
+
+
+ PostgreSQL Index Statistics (@Secondary@)
+
+
+
+
+
+
+ 10
+
+
+
+
+
+
+
+
+ PostgreSQL Index blocks read/sec on {#PATH}
+ 7
+
+
+ pg.index.idx_blks_read[{$PG_CONN_@SECONDARY@},{#DATABASE},{#INDEX}]
+ 60
+ 7
+ 365
+ 0
+ 3
+
+
+
+
+ 0
+ 0
+
+ 0
+
+
+
+ 0
+
+
+
+
+
+ Number of disk blocks read from this index
+ 0
+
+
+ PostgreSQL Index Statistics (@Secondary@)
+
+
+
+
+
+
+ 10
+
+
+
+
+
+
+
+
+ PostgreSQL Index scans/sec on {#PATH}
+ 7
+
+
+ pg.index.idx_scan[{$PG_CONN_@SECONDARY@},{#DATABASE},{#INDEX}]
+ 60
+ 7
+ 365
+ 0
+ 3
+
+
+
+
+ 0
+ 0
+
+ 0
+
+
+
+ 0
+
+
+
+
+
+ Number of index scans initiated on this index
+ 0
+
+
+ PostgreSQL Index Statistics (@Secondary@)
+
+
+
+
+
+
+ 10
+
+
+
+
+
+
+
+
+ PostgreSQL Index fetched/sec on {#PATH}
+ 7
+
+
+ pg.index.idx_tup_fetch[{$PG_CONN_@SECONDARY@},{#DATABASE},{#INDEX}]
+ 60
+ 7
+ 365
+ 0
+ 3
+
+
+
+
+ 0
+ 0
+
+ 0
+
+
+
+ 0
+
+
+
+
+
+ Number of live table rows fetched by simple index scans using this index
+ 0
+
+
+ PostgreSQL Index Statistics (@Secondary@)
+
+
+
+
+
+
+ 10
+
+
+
+
+
+
+
+
+ PostgreSQL Index entries returned/sec on {#PATH}
+ 7
+
+
+ pg.index.idx_tup_read[{$PG_CONN_@SECONDARY@},{#DATABASE},{#INDEX}]
+ 60
+ 7
+ 365
+ 0
+ 3
+
+
+
+
+ 0
+ 0
+
+ 0
+
+
+
+ 0
+
+
+
+
+
+ Number of index entries returned by scans on this index
+ 0
+
+
+ PostgreSQL Index Statistics (@Secondary@)
+
+
+
+
+
+
+ 10
+
+
+
+
+
+
+
+
+ PostgreSQL Index row count on {#PATH}
+ 7
+
+
+ pg.index.rows[{$PG_CONN_@SECONDARY@},{#DATABASE},{#INDEX}]
+ 60
+ 7
+ 365
+ 0
+ 3
+
+
+
+
+ 0
+ 0
+
+ 0
+
+
+
+ 0
+
+
+
+
+
+
+ 0
+
+
+ PostgreSQL Index Statistics (@Secondary@)
+
+
+
+
+
+
+
+
+
+
+ PostgreSQL Index size on {#PATH}
+ 7
+
+
+ pg.index.size[{$PG_CONN_@SECONDARY@},{#DATABASE},{#INDEX}]
+ 60
+ 7
+ 365
+ 0
+ 3
+
+ B
+
+
+ 0
+ 0
+
+ 0
+
+
+
+ 0
+
+
+
+
+
+
+ 0
+
+
+ PostgreSQL Index Statistics (@Secondary@)
+
+
+
+
+
+
+
+
+
+
+
+
+
+ PostgreSQL (@Secondary@) Index blocks/sec on {#PATH}
+ 900
+ 200
+ 0.0000
+ 100.0000
+ 1
+ 1
+ 0
+ 1
+ 0
+ 0.0000
+ 0.0000
+ 1
+ 0
+ 0
+ 0
+
+
+ 0
+ 5
+ C80000
+ 0
+ 2
+ 0
+ -
+ Template App PostgreSQL @Secondary@
+ pg.index.idx_blks_read[{$PG_CONN_@SECONDARY@},{#DATABASE},{#INDEX}]
+
+
+
+ 1
+ 5
+ 00C800
+ 0
+ 2
+ 0
+ -
+ Template App PostgreSQL @Secondary@
+ pg.index.idx_blks_hit[{$PG_CONN_@SECONDARY@},{#DATABASE},{#INDEX}]
+
+
+
+
+
+ PostgreSQL (@Secondary@) Index disk size on {#PATH}
+ 900
+ 200
+ 0.0000
+ 100.0000
+ 1
+ 1
+ 0
+ 1
+ 0
+ 0.0000
+ 0.0000
+ 1
+ 0
+ 0
+ 0
+
+
+ 0
+ 5
+ 00C800
+ 0
+ 2
+ 0
+ -
+ Template App PostgreSQL @Secondary@
+ pg.index.size[{$PG_CONN_@SECONDARY@},{#DATABASE},{#INDEX}]
+
+
+
+
+
+ PostgreSQL (@Secondary@) Index reads/sec on {#PATH}
+ 900
+ 200
+ 0.0000
+ 100.0000
+ 1
+ 1
+ 0
+ 1
+ 0
+ 0.0000
+ 0.0000
+ 1
+ 0
+ 0
+ 0
+
+
+ 0
+ 5
+ 00C800
+ 0
+ 2
+ 0
+ -
+ Template App PostgreSQL @Secondary@
+ pg.index.idx_tup_fetch[{$PG_CONN_@SECONDARY@},{#DATABASE},{#INDEX}]
+
+
+
+ 1
+ 5
+ 0000C8
+ 0
+ 2
+ 0
+ -
+ Template App PostgreSQL @Secondary@
+ pg.index.idx_tup_read[{$PG_CONN_@SECONDARY@},{#DATABASE},{#INDEX}]
+
+
+
+ 2
+ 5
+ C80000
+ 0
+ 2
+ 0
+ -
+ Template App PostgreSQL @Secondary@
+ pg.index.idx_scan[{$PG_CONN_@SECONDARY@},{#DATABASE},{#INDEX}]
+
+
+
+
+
+ PostgreSQL (@Secondary@) Index row count on {#PATH}
+ 900
+ 200
+ 0.0000
+ 100.0000
+ 1
+ 1
+ 0
+ 1
+ 0
+ 0.0000
+ 0.0000
+ 1
+ 0
+ 0
+ 0
+
+
+ 0
+ 5
+ 00C800
+ 0
+ 2
+ 0
+ -
+ Template App PostgreSQL @Secondary@
+ pg.index.rows[{$PG_CONN_@SECONDARY@},{#DATABASE},{#INDEX}]
+
+
+
+
+
+
+
+
+
+ Discover PostgreSQL Settings
+ 7
+
+
+ pg.setting.discovery[{$PG_CONN_@SECONDARY@},{$PG_DB}]
+ 1h
+ 1
+
+
+
+ 0
+ 0
+
+ 0
+
+
+
+ 0
+
+
+
+
+
+
+ 0
+
+
+
+ 30d
+ Discovers all known configuration settings.
+
+Accepts only the default connection parameters.
+
+Requires libzbxpgsql v1.0.0 or above.
+
+
+ PostgreSQL Setting: {#SETTING}
+ 7
+
+
+ pg.setting[{$PG_CONN_@SECONDARY@},{$PG_DB},{#SETTING}]
+ 60
+ 7
+ 0
+ 0
+ 4
+
+
+
+
+ 0
+ 0
+
+ 0
+
+
+
+ 0
+
+
+
+
+
+ Returns the runtime value of the {#SETTING} configuration setting.
+
+Category: {#CATEGORY}
+Description: {#DESCRIPTION}
+ 0
+
+
+ PostgreSQL Configuration (@Secondary@)
+
+
+
+
+
+
+
+
+
+
+
+
+ {Template App PostgreSQL @Secondary@:pg.setting[{$PG_CONN_@SECONDARY@},{$PG_DB},{#SETTING}].diff(0)}>0
+ 0
+
+ PostgreSQL (@Secondary@) Setting: {#SETTING} has changed
+ 0
+
+ https://www.postgresql.org/docs/current/static/runtime-config.html
+ 0
+ 1
+
+ 1
+ 0
+
+
+
+
+
+
+
+
+
+ Discover PostgreSQL Tables
+ 7
+
+
+ pg.table.discovery[{$PG_CONN_@SECONDARY@},{$PG_DB}]
+ 1h
+ 1
+
+
+
+ 0
+ 0
+
+ 0
+
+
+
+ 0
+
+
+
+
+
+
+ 0
+
+
+
+ 30d
+ Discovery PostgreSQL Tables available to the connected user
+
+
+ PostgreSQL Table analyze count on {#PATH}
+ 7
+
+
+ pg.table.analyze_count[{$PG_CONN_@SECONDARY@},{#DATABASE},{#TABLE}]
+ 60
+ 7
+ 365
+ 0
+ 3
+
+
+
+
+ 0
+ 0
+
+ 0
+
+
+
+ 0
+
+
+
+
+
+ Number of times this table has been manually analyzed
+ 0
+
+
+ PostgreSQL Table Statistics (@Secondary@)
+
+
+
+
+
+
+
+
+
+
+ PostgreSQL Table autoanalyze count on {#PATH}
+ 7
+
+
+ pg.table.autoanalyze_count[{$PG_CONN_@SECONDARY@},{#DATABASE},{#TABLE}]
+ 60
+ 7
+ 365
+ 0
+ 3
+
+
+
+
+ 0
+ 0
+
+ 0
+
+
+
+ 0
+
+
+
+
+
+ Number of times this table has been analyzed by the autovacuum daemon
+ 0
+
+
+ PostgreSQL Table Statistics (@Secondary@)
+
+
+
+
+
+
+
+
+
+
+ PostgreSQL Table autovacuum count on {#PATH}
+ 7
+
+
+ pg.table.autovacuum_count[{$PG_CONN_@SECONDARY@},{#DATABASE},{#TABLE}]
+ 60
+ 7
+ 365
+ 0
+ 3
+
+
+
+
+ 0
+ 0
+
+ 0
+
+
+
+ 0
+
+
+
+
+
+ Number of times this table has been vacuumed by the autovacuum daemon
+ 0
+
+
+ PostgreSQL Table Statistics (@Secondary@)
+
+
+
+
+
+
+
+
+
+
+ PostgreSQL Table index scans/sec on {#PATH}
+ 7
+
+
+ pg.table.idx_scan[{$PG_CONN_@SECONDARY@},{#DATABASE},{#TABLE}]
+ 60
+ 7
+ 365
+ 0
+ 0
+
+
+
+
+ 0
+ 0
+
+ 0
+
+
+
+ 0
+
+
+
+
+
+ Number of index scans initiated on this table
+ 0
+
+
+ PostgreSQL Table Statistics (@Secondary@)
+
+
+
+
+
+
+ 10
+
+
+
+
+
+
+
+
+ PostgreSQL Table live rows fetched by indexes/sec on {#PATH}
+ 7
+
+
+ pg.table.idx_tup_fetch[{$PG_CONN_@SECONDARY@},{#DATABASE},{#TABLE}]
+ 60
+ 7
+ 365
+ 0
+ 0
+
+
+
+
+ 0
+ 0
+
+ 0
+
+
+
+ 0
+
+
+
+
+
+ Number of live rows fetched by index scans
+ 0
+
+
+ PostgreSQL Table Statistics (@Secondary@)
+
+
+
+
+
+
+ 10
+
+
+
+
+
+
+
+
+ PostgreSQL Table last analyze on {#PATH}
+ 7
+
+
+ pg.table.last_analyze[{$PG_CONN_@SECONDARY@},{#DATABASE},{#TABLE}]
+ 60
+ 7
+ 0
+ 0
+ 4
+
+
+
+
+ 0
+ 0
+
+ 0
+
+
+
+ 0
+
+
+
+
+
+ Last time at which this table was manually analyzed
+ 0
+
+
+ PostgreSQL Table Statistics (@Secondary@)
+
+
+
+
+
+
+
+
+
+
+ PostgreSQL Table last auto-analyze on {#PATH}
+ 7
+
+
+ pg.table.last_autoanalyze[{$PG_CONN_@SECONDARY@},{#DATABASE},{#TABLE}]
+ 60
+ 7
+ 0
+ 0
+ 4
+
+
+
+
+ 0
+ 0
+
+ 0
+
+
+
+ 0
+
+
+
+
+
+ Last time at which this table was analyzed by the autovacuum daemon
+ 0
+
+
+ PostgreSQL Table Statistics (@Secondary@)
+
+
+
+
+
+
+
+
+
+
+ PostgreSQL Table last auto-vacuum on {#PATH}
+ 7
+
+
+ pg.table.last_autovacuum[{$PG_CONN_@SECONDARY@},{#DATABASE},{#TABLE}]
+ 60
+ 7
+ 0
+ 0
+ 4
+
+
+
+
+ 0
+ 0
+
+ 0
+
+
+
+ 0
+
+
+
+
+
+ Last time at which this table was vacuumed by the autovacuum daemon
+ 0
+
+
+ PostgreSQL Table Statistics (@Secondary@)
+
+
+
+
+
+
+
+
+
+
+ PostgreSQL Table last manual vacuum on {#PATH}
+ 7
+
+
+ pg.table.last_vacuum[{$PG_CONN_@SECONDARY@},{#DATABASE},{#TABLE}]
+ 60
+ 7
+ 0
+ 0
+ 4
+
+
+
+
+ 0
+ 0
+
+ 0
+
+
+
+ 0
+
+
+
+
+
+ Last time at which this table was manually vacuumed (not counting VACUUM FULL)
+ 0
+
+
+ PostgreSQL Table Statistics (@Secondary@)
+
+
+
+
+
+
+
+
+
+
+ PostgreSQL Table estimated dead rows on {#PATH}
+ 7
+
+
+ pg.table.n_dead_tup[{$PG_CONN_@SECONDARY@},{#DATABASE},{#TABLE}]
+ 60
+ 7
+ 365
+ 0
+ 3
+
+
+
+
+ 0
+ 0
+
+ 0
+
+
+
+ 0
+
+
+
+
+
+ Estimated number of dead rows
+ 0
+
+
+ PostgreSQL Table Statistics (@Secondary@)
+
+
+
+
+
+
+
+
+
+
+ PostgreSQL Table estimated live rows on {#PATH}
+ 7
+
+
+ pg.table.n_live_tup[{$PG_CONN_@SECONDARY@},{#DATABASE},{#TABLE}]
+ 60
+ 7
+ 365
+ 0
+ 3
+
+
+
+
+ 0
+ 0
+
+ 0
+
+
+
+ 0
+
+
+
+
+
+ Estimated number of live rows
+ 0
+
+
+ PostgreSQL Table Statistics (@Secondary@)
+
+
+
+
+
+
+
+
+
+
+ PostgreSQL Table rows deleted/sec on {#PATH}
+ 7
+
+
+ pg.table.n_tup_del[{$PG_CONN_@SECONDARY@},{#DATABASE},{#TABLE}]
+ 60
+ 7
+ 365
+ 0
+ 0
+
+
+
+
+ 0
+ 0
+
+ 0
+
+
+
+ 0
+
+
+
+
+
+ Number of rows deleted
+ 0
+
+
+ PostgreSQL Table Statistics (@Secondary@)
+
+
+
+
+
+
+ 10
+
+
+
+
+
+
+
+
+ PostgreSQL Table rows hot updated on {#PATH}
+ 7
+
+
+ pg.table.n_tup_hot_upd[{$PG_CONN_@SECONDARY@},{#DATABASE},{#TABLE}]
+ 60
+ 7
+ 365
+ 0
+ 0
+
+
+
+
+ 0
+ 0
+
+ 0
+
+
+
+ 0
+
+
+
+
+
+ Number of rows HOT updated (i.e., with no separate index update required)
+ 0
+
+
+ PostgreSQL Table Statistics (@Secondary@)
+
+
+
+
+
+
+ 10
+
+
+
+
+
+
+
+
+ PostgreSQL Table rows inserted/sec on {#PATH}
+ 7
+
+
+ pg.table.n_tup_ins[{$PG_CONN_@SECONDARY@},{#DATABASE},{#TABLE}]
+ 60
+ 7
+ 365
+ 0
+ 0
+
+
+
+
+ 0
+ 0
+
+ 0
+
+
+
+ 0
+
+
+
+
+
+ Number of rows inserted
+ 0
+
+
+ PostgreSQL Table Statistics (@Secondary@)
+
+
+
+
+
+
+ 10
+
+
+
+
+
+
+
+
+ PostgreSQL Table rows updated/sec on {#PATH}
+ 7
+
+
+ pg.table.n_tup_upd[{$PG_CONN_@SECONDARY@},{#DATABASE},{#TABLE}]
+ 60
+ 7
+ 365
+ 0
+ 0
+
+
+
+
+ 0
+ 0
+
+ 0
+
+
+
+ 0
+
+
+
+
+
+ Number of rows updated
+ 0
+
+
+ PostgreSQL Table Statistics (@Secondary@)
+
+
+
+
+
+
+ 10
+
+
+
+
+
+
+
+
+ PostgreSQL Table estimated row count on {#PATH}
+ 7
+
+
+ pg.table.rows[{$PG_CONN_@SECONDARY@},{#DATABASE},{#TABLE}]
+ 60
+ 7
+ 365
+ 0
+ 3
+
+
+
+
+ 0
+ 0
+
+ 0
+
+
+
+ 0
+
+
+
+
+
+
+ 0
+
+
+ PostgreSQL Table Statistics (@Secondary@)
+
+
+
+
+
+
+
+
+
+
+ PostgreSQL Table sequential scans/sec on {#PATH}
+ 7
+
+
+ pg.table.seq_scan[{$PG_CONN_@SECONDARY@},{#DATABASE},{#TABLE}]
+ 60
+ 7
+ 365
+ 0
+ 0
+
+
+
+
+ 0
+ 0
+
+ 0
+
+
+
+ 0
+
+
+
+
+
+ Number of sequential scans initiated on this table
+ 0
+
+
+ PostgreSQL Table Statistics (@Secondary@)
+
+
+
+
+
+
+ 10
+
+
+
+
+
+
+
+
+ PostgreSQL Table live rows fetched by scans/sec on {#PATH}
+ 7
+
+
+ pg.table.seq_tup_read[{$PG_CONN_@SECONDARY@},{#DATABASE},{#TABLE}]
+ 60
+ 7
+ 365
+ 0
+ 0
+
+
+
+
+ 0
+ 0
+
+ 0
+
+
+
+ 0
+
+
+
+
+
+ Number of live rows fetched by sequential scans
+ 0
+
+
+ PostgreSQL Table Statistics (@Secondary@)
+
+
+
+
+
+
+ 10
+
+
+
+
+
+
+
+
+ PostgreSQL Table disk size on {#PATH}
+ 7
+
+
+ pg.table.size[{$PG_CONN_@SECONDARY@},{#DATABASE},{#TABLE}]
+ 60
+ 7
+ 365
+ 0
+ 3
+
+ B
+
+
+ 0
+ 0
+
+ 0
+
+
+
+ 0
+
+
+
+
+
+
+ 0
+
+
+ PostgreSQL Table Statistics (@Secondary@)
+
+
+
+
+
+
+
+
+
+
+ PostgreSQL Table manual vacuum count on {#PATH}
+ 7
+
+
+ pg.table.vacuum_count[{$PG_CONN_@SECONDARY@},{#DATABASE},{#TABLE}]
+ 60
+ 7
+ 365
+ 0
+ 3
+
+
+
+
+ 0
+ 0
+
+ 0
+
+
+
+ 0
+
+
+
+
+
+ Number of times this table has been manually vacuumed (not counting VACUUM FULL)
+ 0
+
+
+ PostgreSQL Table Statistics (@Secondary@)
+
+
+
+
+
+
+
+
+
+
+
+
+
+ PostgreSQL (@Secondary@) Disk size on table {#PATH}
+ 900
+ 200
+ 0.0000
+ 100.0000
+ 1
+ 1
+ 0
+ 1
+ 0
+ 0.0000
+ 0.0000
+ 1
+ 0
+ 0
+ 0
+
+
+ 0
+ 5
+ 00C800
+ 0
+ 2
+ 0
+ -
+ Template App PostgreSQL @Secondary@
+ pg.table.size[{$PG_CONN_@SECONDARY@},{#DATABASE},{#TABLE}]
+
+
+
+
+
+ PostgreSQL (@Secondary@) Fetches/sec on table {#PATH}
+ 900
+ 200
+ 0.0000
+ 100.0000
+ 1
+ 1
+ 0
+ 1
+ 0
+ 0.0000
+ 0.0000
+ 1
+ 0
+ 0
+ 0
+
+
+ 0
+ 5
+ 00C800
+ 0
+ 2
+ 0
+ -
+ Template App PostgreSQL @Secondary@
+ pg.table.idx_tup_fetch[{$PG_CONN_@SECONDARY@},{#DATABASE},{#TABLE}]
+
+
+
+ 1
+ 5
+ C80000
+ 0
+ 2
+ 0
+ -
+ Template App PostgreSQL @Secondary@
+ pg.table.seq_tup_read[{$PG_CONN_@SECONDARY@},{#DATABASE},{#TABLE}]
+
+
+
+
+
+ PostgreSQL (@Secondary@) Maintenance on table {#PATH}
+ 900
+ 200
+ 0.0000
+ 100.0000
+ 1
+ 1
+ 0
+ 1
+ 0
+ 0.0000
+ 0.0000
+ 1
+ 0
+ 0
+ 0
+
+
+ 0
+ 5
+ C80000
+ 0
+ 2
+ 0
+ -
+ Template App PostgreSQL @Secondary@
+ pg.table.analyze_count[{$PG_CONN_@SECONDARY@},{#DATABASE},{#TABLE}]
+
+
+
+ 1
+ 5
+ 00C800
+ 0
+ 2
+ 0
+ -
+ Template App PostgreSQL @Secondary@
+ pg.table.autoanalyze_count[{$PG_CONN_@SECONDARY@},{#DATABASE},{#TABLE}]
+
+
+
+ 2
+ 5
+ 0000C8
+ 0
+ 2
+ 0
+ -
+ Template App PostgreSQL @Secondary@
+ pg.table.autovacuum_count[{$PG_CONN_@SECONDARY@},{#DATABASE},{#TABLE}]
+
+
+
+ 3
+ 5
+ C800C8
+ 0
+ 2
+ 0
+ -
+ Template App PostgreSQL @Secondary@
+ pg.table.vacuum_count[{$PG_CONN_@SECONDARY@},{#DATABASE},{#TABLE}]
+
+
+
+
+
+ PostgreSQL (@Secondary@) Row count on table {#PATH}
+ 900
+ 200
+ 0.0000
+ 100.0000
+ 1
+ 1
+ 0
+ 1
+ 0
+ 0.0000
+ 0.0000
+ 1
+ 0
+ 0
+ 0
+
+
+ 0
+ 5
+ C80000
+ 0
+ 2
+ 0
+ -
+ Template App PostgreSQL @Secondary@
+ pg.table.n_dead_tup[{$PG_CONN_@SECONDARY@},{#DATABASE},{#TABLE}]
+
+
+
+ 1
+ 5
+ 00C800
+ 0
+ 2
+ 0
+ -
+ Template App PostgreSQL @Secondary@
+ pg.table.n_live_tup[{$PG_CONN_@SECONDARY@},{#DATABASE},{#TABLE}]
+
+
+
+ 2
+ 5
+ 0000C8
+ 0
+ 2
+ 0
+ -
+ Template App PostgreSQL @Secondary@
+ pg.table.rows[{$PG_CONN_@SECONDARY@},{#DATABASE},{#TABLE}]
+
+
+
+
+
+ PostgreSQL (@Secondary@) Scans/sec on table {#PATH}
+ 900
+ 200
+ 0.0000
+ 100.0000
+ 1
+ 1
+ 0
+ 1
+ 0
+ 0.0000
+ 0.0000
+ 1
+ 0
+ 0
+ 0
+
+
+ 0
+ 5
+ 00C800
+ 0
+ 2
+ 0
+ -
+ Template App PostgreSQL @Secondary@
+ pg.table.idx_scan[{$PG_CONN_@SECONDARY@},{#DATABASE},{#TABLE}]
+
+
+
+ 1
+ 5
+ C80000
+ 0
+ 2
+ 0
+ -
+ Template App PostgreSQL @Secondary@
+ pg.table.seq_scan[{$PG_CONN_@SECONDARY@},{#DATABASE},{#TABLE}]
+
+
+
+
+
+ PostgreSQL (@Secondary@) Writes/sec on table {#PATH}
+ 900
+ 200
+ 0.0000
+ 100.0000
+ 1
+ 1
+ 0
+ 1
+ 0
+ 0.0000
+ 0.0000
+ 1
+ 0
+ 0
+ 0
+
+
+ 0
+ 5
+ 0000C8
+ 0
+ 2
+ 0
+ -
+ Template App PostgreSQL @Secondary@
+ pg.table.n_tup_ins[{$PG_CONN_@SECONDARY@},{#DATABASE},{#TABLE}]
+
+
+
+ 1
+ 5
+ C800C8
+ 0
+ 2
+ 0
+ -
+ Template App PostgreSQL @Secondary@
+ pg.table.n_tup_upd[{$PG_CONN_@SECONDARY@},{#DATABASE},{#TABLE}]
+
+
+
+ 2
+ 5
+ 00C800
+ 0
+ 2
+ 0
+ -
+ Template App PostgreSQL @Secondary@
+ pg.table.n_tup_hot_upd[{$PG_CONN_@SECONDARY@},{#DATABASE},{#TABLE}]
+
+
+
+ 3
+ 5
+ C80000
+ 0
+ 2
+ 0
+ -
+ Template App PostgreSQL @Secondary@
+ pg.table.n_tup_del[{$PG_CONN_@SECONDARY@},{#DATABASE},{#TABLE}]
+
+
+
+
+
+
+
+
+
+ Discover PostgreSQL Tablespaces
+ 7
+
+
+ pg.tablespace.discovery[{$PG_CONN_@SECONDARY@},{$PG_DB}]
+ 1h
+ 0
+
+
+
+ 0
+ 0
+
+ 0
+
+
+
+ 0
+
+
+
+
+
+
+ 0
+
+
+
+ 30d
+
+
+
+ PostgreSQL Tablespace disk size on ({#TABLESPACE})
+ 7
+
+
+ pg.tablespace.size[{$PG_CONN_@SECONDARY@},{$PG_DB},{#TABLESPACE}]
+ 60
+ 7
+ 365
+ 0
+ 3
+
+ B
+
+
+ 0
+ 0
+
+ 0
+
+
+
+ 0
+
+
+
+
+
+
+ 0
+
+
+ PostgreSQL Tablespace Statistics (@Secondary@)
+
+
+
+
+
+
+
+
+
+
+
+
+
+ PostgreSQL (@Secondary@) Disk size on {#TABLESPACE}
+ 900
+ 200
+ 0.0000
+ 100.0000
+ 1
+ 1
+ 0
+ 1
+ 0
+ 0.0000
+ 0.0000
+ 1
+ 0
+ 0
+ 0
+
+
+ 0
+ 5
+ 00C800
+ 0
+ 2
+ 0
+ -
+ Template App PostgreSQL @Secondary@
+ pg.tablespace.size[{$PG_CONN_@SECONDARY@},{$PG_DB},{#TABLESPACE}]
+
+
+
+
+
+
+
+
+
+
+
+
+ {$PG_BACKENDS_CRIT}
+ 5
+
+
+ {$PG_CONN_@SECONDARY@}
+ port=5442
+
+
+ {$PG_DB}
+ postgres
+
+
+ {$PG_PXACT_CRIT}
+ 90
+
+
+ {$PG_PXACT_WARN}
+ 80
+
+
+ {$PG_XID_CRIT}
+ 2146483648
+
+
+ {$PG_XID_WARN}
+ 2137483648
+
+
+
+
+
+
+
+
+ {Template App PostgreSQL @Secondary@:pg.backends.free[{$PG_CONN_@SECONDARY@},{$PG_DB}].last()}<{$PG_BACKENDS_CRIT}
+ 0
+
+ PostgreSQL (@Secondary@) Backend connections are exhausted on {HOST.NAME}
+ 0
+
+ https://www.postgresql.org/docs/current/static/runtime-config-connection.html#GUC-MAX-CONNECTIONS
+ 0
+ 4
+ Less than {$PG_BACKENDS_CRIT} backends connections are available.
+
+Investigate the issue immediately and consider increasing max_connections.
+ 0
+ 0
+
+
+
+
+ ({TRIGGER.VALUE}=0 and {Template App PostgreSQL @Secondary@:pg.prepared_xacts_ratio[{$PG_CONN_@SECONDARY@},{$PG_DB}].last()}>{$PG_PXACT_WARN} and {Template App PostgreSQL @Secondary@:pg.prepared_xacts_ratio[{$PG_CONN_@SECONDARY@},{$PG_DB}].last()}<{$PG_PXACT_CRIT}) or ({TRIGGER.VALUE}=1 and {Template App PostgreSQL @Secondary@:pg.prepared_xacts_ratio[{$PG_CONN_@SECONDARY@},{$PG_DB}].last()}>{$PG_PXACT_WARN})
+ 0
+
+ PostgreSQL (@Secondary@) Prepared transactions are near exhaustion on {HOST.NAME}
+ 0
+
+ https://www.postgresql.org/docs/current/static/runtime-config-resource.html#GUC-MAX-PREPARED-TRANSACTIONS
+ 0
+ 2
+ 80% of the maximum configured prepared transactions are in use.
+
+Investigate the issue and consider increasing max_prepared_transactions.
+ 0
+ 0
+
+
+
+
+ {Template App PostgreSQL @Secondary@:pg.uptime[{$PG_CONN_@SECONDARY@},{$PG_DB}].change(0)}<0
+ 0
+
+ PostgreSQL (@Secondary@) Server on {HOST.NAME} has just been restarted
+ 0
+
+
+ 0
+ 1
+
+ 0
+ 0
+
+
+
+
+ {Template App PostgreSQL @Secondary@:pg.connect[{$PG_CONN_@SECONDARY@},{$PG_DB}].max(#3)}<1
+ 0
+
+ PostgreSQL (@Secondary@) Server on {HOST.NAME} is unreachable for the last 3 polls
+ 0
+
+
+ 0
+ 4
+
+ 0
+ 0
+
+
+
+
+ {Template App PostgreSQL @Secondary@:pg.version[{$PG_CONN_@SECONDARY@},{$PG_DB}].diff(0)}>0
+ 0
+
+ PostgreSQL (@Secondary@) Server version was changed on {HOST.NAME}
+ 0
+
+
+ 0
+ 1
+
+ 0
+ 0
+
+
+
+
+ {Template App PostgreSQL @Secondary@:pg.db.xid_age[{$PG_CONN_@SECONDARY@},{$PG_DB}].last()}>{$PG_XID_CRIT}
+ 0
+
+ PostgreSQL (@Secondary@) Transaction IDs are exhausted on {HOST.NAME}
+ 0
+
+ https://www.postgresql.org/docs/current/static/routine-vacuuming.html#VACUUM-FOR-WRAPAROUND
+ 0
+ 4
+ Less than 1 million (0.0005%) Transactions IDs are remaining for allocation.
+
+Perform a VACUUM immediately to reset the available Transaction IDs and review your auto-vacuum policy.
+ 0
+ 0
+
+
+
+
+ ({TRIGGER.VALUE}=0 and {Template App PostgreSQL @Secondary@:pg.db.xid_age[{$PG_CONN_@SECONDARY@},{$PG_DB}].last()}>{$PG_XID_WARN} and {Template App PostgreSQL @Secondary@:pg.db.xid_age[{$PG_CONN_@SECONDARY@},{$PG_DB}].last()}<{$PG_XID_CRIT}) or ({TRIGGER.VALUE}=1 and {Template App PostgreSQL @Secondary@:pg.db.xid_age[{$PG_CONN_@SECONDARY@},{$PG_DB}].last()}>{$PG_XID_WARN})
+ 0
+
+ PostgreSQL (@Secondary@) Transaction IDs are near exhaustion on {HOST.NAME}
+ 0
+
+ https://www.postgresql.org/docs/current/static/routine-vacuuming.html#VACUUM-FOR-WRAPAROUND
+ 0
+ 2
+ Less than 10 million (0.04%) Transactions IDs are remaining for allocation.
+
+Perform a VACUUM as soon a possible to reset the available Transaction IDs and review your auto-vacuum policy.
+ 0
+ 0
+
+
+
+
+
+
+ PostgreSQL (@Secondary@) Backend Connections
+ 900
+ 200
+ 0.0000
+ 100.0000
+ 1
+ 1
+ 0
+ 1
+ 0
+ 0.0000
+ 0.0000
+ 0
+ 0
+ 0
+ 0
+
+
+ 0
+ 0
+ 000000
+ 0
+ 2
+ 0
+ -
+ Template App PostgreSQL @Secondary@
+ pg.backends.count[{$PG_CONN_@SECONDARY@},{$PG_DB}]
+
+
+
+
+
+ PostgreSQL (@Secondary@) Buffers
+ 900
+ 200
+ 0.0000
+ 100.0000
+ 1
+ 1
+ 0
+ 1
+ 0
+ 0.0000
+ 0.0000
+ 0
+ 0
+ 0
+ 0
+
+
+ 0
+ 0
+ 00C800
+ 0
+ 2
+ 0
+ -
+ Template App PostgreSQL @Secondary@
+ pg.buffers_alloc[{$PG_CONN_@SECONDARY@},{$PG_DB}]
+
+
+
+ 1
+ 0
+ C80000
+ 0
+ 2
+ 0
+ -
+ Template App PostgreSQL @Secondary@
+ pg.buffers_clean[{$PG_CONN_@SECONDARY@},{$PG_DB}]
+
+
+
+ 2
+ 0
+ 0000C8
+ 0
+ 2
+ 0
+ -
+ Template App PostgreSQL @Secondary@
+ pg.buffers_backend[{$PG_CONN_@SECONDARY@},{$PG_DB}]
+
+
+
+ 3
+ 0
+ C800C8
+ 0
+ 2
+ 0
+ -
+ Template App PostgreSQL @Secondary@
+ pg.buffers_checkpoint[{$PG_CONN_@SECONDARY@},{$PG_DB}]
+
+
+
+
+
+ PostgreSQL (@Secondary@) Checkpoints
+ 900
+ 200
+ 0.0000
+ 100.0000
+ 1
+ 1
+ 0
+ 1
+ 0
+ 0.0000
+ 0.0000
+ 0
+ 0
+ 0
+ 0
+
+
+ 0
+ 0
+ 00C800
+ 0
+ 2
+ 0
+ -
+ Template App PostgreSQL @Secondary@
+ pg.checkpoint_sync_time[{$PG_CONN_@SECONDARY@},{$PG_DB}]
+
+
+
+ 1
+ 0
+ 0000C8
+ 0
+ 2
+ 0
+ -
+ Template App PostgreSQL @Secondary@
+ pg.checkpoint_write_time[{$PG_CONN_@SECONDARY@},{$PG_DB}]
+
+
+
+
+
+ PostgreSQL (@Secondary@) Configuration thresholds
+ 900
+ 200
+ 0.0000
+ 100.0000
+ 1
+ 0
+ 0
+ 1
+ 0
+ 0.0000
+ 0.0000
+ 1
+ 1
+ 0
+ 0
+
+
+ 0
+ 5
+ C80000
+ 0
+ 2
+ 0
+ -
+ Template App PostgreSQL @Secondary@
+ pg.prepared_xacts_ratio[{$PG_CONN_@SECONDARY@},{$PG_DB}]
+
+
+
+ 1
+ 5
+ F63100
+ 0
+ 2
+ 0
+ -
+ Template App PostgreSQL @Secondary@
+ pg.backends.ratio[{$PG_CONN_@SECONDARY@},{$PG_DB}]
+
+
+
+
+
+
diff --git a/templates/Template_PostgreSQL_Server_3.0_Streaming.xml b/templates/Template_PostgreSQL_Server_3.0_Streaming.xml
new file mode 100644
index 0000000..6c5414c
--- /dev/null
+++ b/templates/Template_PostgreSQL_Server_3.0_Streaming.xml
@@ -0,0 +1,498 @@
+
+
+ 3.4
+ 2018-05-15T08:47:55Z
+
+
+ Templates
+
+
+
+
+ Template App PostgreSQL Streaming
+ Template App PostgreSQL Streaming
+ This template is used to monitor streaming replication on master and slave PostgreSQL clusters.
+
+Requirements:
+===========
+libzbxpgsql v1.1+ module
+Template App PostgreSQL (supplied with libzbxpgsql)
+streaming.conf file
+zabbix agent connecting to db as super-user
+
+Installation:
+- libzbxpgsql v1.1 (or higher) installed and configured
+- copy the streaming.conf file to /etc/zabbix directory
+- modify the /etc/zabbix/libzbxpgsql.conf file to include streaming.conf:
+#-----------------------------------------------
+queries = {
+@include "/etc/libzbxpgsql.d/streaming.conf"
+}
+#-----------------------------------------------
+- restart the zabbix agent
+- import the "Template App PostgreSQL Streaming" template into Zabbix
+- link the template to your db hosts
+
+Notes:
+=====
+The template included with libzbxpgsql, "Template App PostgreSQL", must be linked to the host and properly configured before linking this streaming template to the host.
+
+Trigger thresholds can be managed in the host macros.
+
+
+ Templates
+
+
+
+
+ PostgreSQL Streaming Replication
+
+
+
+ -
+ PostgreSQL Streaming Replication Master Log Pump
+ 7
+
+
+ pg.query.string[{$PG_CONN},{$PG_DB},replpump]
+ 30
+ 7d
+ 0
+ 0
+ 4
+
+
+
+
+ 0
+ 0
+
+ 0
+
+
+
+ 0
+
+
+
+
+
+ This executes function replication_pump() which issues a bogus NOTIFY command in PostgreSQL on a master with at least one slave. It doesn't really notify anything (because there are no listeners), but it does cause the pg_last_xact_replay_timestamp() to be updated on all slaves as a side effect.
+
+If you have a system that is busy 24x7 then this is not necessary.
+ 0
+
+
+ PostgreSQL Streaming Replication
+
+
+
+
+
+
+
+
+
+
+
+ PostgreSQL Streaming Master Discovery
+ 7
+
+
+ pg.query.discovery[{$PG_CONN},{$PG_DB},dscrepmstr]
+ 600
+ 0
+
+
+
+ 0
+ 0
+
+ 0
+
+
+
+ 0
+
+
+
+
+
+
+ 0
+
+
+
+ 30d
+ Discover a master with connected streaming slaves.
+
+
+ PostgreSQL Streaming Slave {#PGSLAVE} Lag Bytes
+ 7
+
+
+ pg.query.integer[{$PG_CONN},{$PG_DB},repllagbytes,{#PGSLAVEIP}]
+ 60
+ 30d
+ 400d
+ 0
+ 3
+
+ B
+
+
+ 0
+ 0
+
+ 0
+
+
+
+ 0
+
+
+
+
+
+ The number of log bytes that a streaming slave is behind its master. This metric is measured on the master.
+ 0
+
+
+ PostgreSQL Streaming Replication
+
+
+
+
+
+
+
+
+
+
+
+
+ {Template App PostgreSQL Streaming:pg.query.integer[{$PG_CONN},{$PG_DB},repllagbytes,{#PGSLAVEIP}].last()}>{$PG_ALRT_SLAVE_LAG_BYTES}
+ 0
+
+ PostgreSQL Streaming Replication lag bytes high on slave {#PGSLAVE}
+ 0
+
+
+ 0
+ 3
+
+ 0
+ 0
+
+
+
+
+
+
+ PostgreSQL Streaming Slave "{#PGSLAVE}" Lag Bytes
+ 900
+ 200
+ 0.0000
+ 100.0000
+ 1
+ 1
+ 0
+ 1
+ 0
+ 0.0000
+ 0.0000
+ 1
+ 0
+ 0
+ 0
+
+
+ 0
+ 5
+ BA4A00
+ 1
+ 4
+ 0
+ -
+ Template App PostgreSQL Streaming
+ pg.query.integer[{$PG_CONN},{$PG_DB},repllagbytes,{#PGSLAVEIP}]
+
+
+
+
+
+
+
+
+
+ PostgreSQL Streaming Slave Discovery
+ 7
+
+
+ pg.query.discovery[{$PG_CONN},{$PG_DB},dscrepslave]
+ 600
+ 0
+
+
+
+ 0
+ 0
+
+ 0
+
+
+
+ 0
+
+
+
+
+
+
+ 0
+
+
+
+ 30d
+ Discover a connected streaming slave.
+
+
+ PostgreSQL Streaming {#PGSLV} Lag Seconds
+ 7
+
+
+ pg.query.integer[{$PG_CONN},{$PG_DB},{#PGSLVLAG}]
+ 60
+ 90d
+ 365d
+ 0
+ 3
+
+ s
+
+
+ 0
+ 0
+
+ 0
+
+
+
+ 0
+
+
+
+
+
+ The number of seconds that a slave is behind the master in streaming replication.
+ 0
+
+
+ PostgreSQL Streaming Replication
+
+
+
+
+
+
+
+
+
+
+ PostgreSQL Streaming {#PGSLV} Repl Paused
+ 7
+
+
+ pg.query.integer[{$PG_CONN},{$PG_DB},{#PGSLVPAUSED}]
+ 60
+ 90d
+ 365d
+ 0
+ 3
+
+
+
+
+ 0
+ 0
+
+ 0
+
+
+
+ 0
+
+
+
+
+
+ Returns a 1 if streaming replication is paused on the slave, 0 if not paused.
+
+select pg_xlog_replay_pause(); -- pauses replication on slave
+select pg_xlog_replay_resume(); -- resumes replication on slave
+select pg_is_xlog_replay_paused(); -- true if paused, false if not paused
+ 0
+
+
+ PostgreSQL Streaming Replication
+
+
+
+
+
+
+
+
+
+
+
+
+ {Template App PostgreSQL Streaming:pg.query.integer[{$PG_CONN},{$PG_DB},{#PGSLVLAG}].last()}>{$PG_ALRT_SLAVE_LAG_SECS}
+ 0
+
+ PostgreSQL Streaming Replication is behind on slave {HOST.NAME1}
+ 0
+
+
+ 0
+ 3
+ PostgreSQL Streaming Replication on this host is behind the master by at least {$PG_ALRT_SLAVE_LAG_SECS} seconds.
+
+Measured by:
+select case when pg_is_in_recovery() = TRUE
+ then extract(epoch from now() - pg_last_xact_replay_timestamp())::int
+ else 0::int
+ end;
+ 0
+ 0
+
+
+
+
+ {Template App PostgreSQL Streaming:pg.query.integer[{$PG_CONN},{$PG_DB},{#PGSLVPAUSED}].last()}=1
+ 0
+
+ PostgreSQL Streaming Replication is paused on slave {HOST.NAME1}
+ 0
+
+
+ 0
+ 2
+ Streaming replication has been paused by administrator (select pg_xlog_replay_pause();).
+
+Determined by:
+select pg_is_xlog_replay_paused();
+
+It can be re-enabled by an administrator by executing "select pg_xlog_replay_resume();" on the slave.
+ 0
+ 0
+
+
+
+
+
+
+ PostgreSQL {#PGSLV} Replication Lag Seconds
+ 900
+ 200
+ 0.0000
+ 100.0000
+ 1
+ 1
+ 0
+ 1
+ 0
+ 0.0000
+ 0.0000
+ 1
+ 0
+ 0
+ 0
+
+
+ 0
+ 5
+ F63100
+ 1
+ 4
+ 0
+ -
+ Template App PostgreSQL Streaming
+ pg.query.integer[{$PG_CONN},{$PG_DB},{#PGSLVLAG}]
+
+
+
+
+
+
+
+
+
+
+
+
+ {$PG_ALRT_SLAVE_LAG_BYTES}
+ 104857600
+
+
+ {$PG_ALRT_SLAVE_LAG_SECS}
+ 300
+
+
+
+
+
+ PostgreSQL Streaming Replication Stats
+ 1
+ 2
+
+
+ 20
+ 500
+ 100
+ 0
+ 0
+ 1
+ 1
+ 0
+ 0
+ 0
+
+
+ 0
+ 0
+
+ PostgreSQL {#PGSLV} Replication Lag Seconds
+ Template App PostgreSQL Streaming
+
+ 6
+
+
+
+ 20
+ 500
+ 100
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 0
+
+
+ 0
+ 0
+
+ PostgreSQL Streaming Slave "{#PGSLAVE}" Lag Bytes
+ Template App PostgreSQL Streaming
+
+ 3
+
+
+
+
+
+
+
+
diff --git a/templates/Template_PostgreSQL_Server_3.0_Streaming_Secondary.xml b/templates/Template_PostgreSQL_Server_3.0_Streaming_Secondary.xml
new file mode 100644
index 0000000..eab558c
--- /dev/null
+++ b/templates/Template_PostgreSQL_Server_3.0_Streaming_Secondary.xml
@@ -0,0 +1,498 @@
+
+
+ 3.4
+ 2018-05-15T08:48:14Z
+
+
+ Templates
+
+
+
+
+ Template App PostgreSQL Streaming @Secondary@
+ Template App PostgreSQL Streaming @Secondary@
+ This template is used to monitor streaming replication on master and slave PostgreSQL clusters.
+
+Requirements:
+===========
+libzbxpgsql v1.1+ module
+Template App PostgreSQL (supplied with libzbxpgsql)
+streaming.conf file
+zabbix agent connecting to db as super-user
+
+Installation:
+- libzbxpgsql v1.1 (or higher) installed and configured
+- copy the streaming.conf file to /etc/zabbix directory
+- modify the /etc/zabbix/libzbxpgsql.conf file to include streaming.conf:
+#-----------------------------------------------
+queries = {
+@include "/etc/libzbxpgsql.d/streaming.conf"
+}
+#-----------------------------------------------
+- restart the zabbix agent
+- import the "Template App PostgreSQL Streaming" template into Zabbix
+- link the template to your db hosts
+
+Notes:
+=====
+The template included with libzbxpgsql, "Template App PostgreSQL", must be linked to the host and properly configured before linking this streaming template to the host.
+
+Trigger thresholds can be managed in the host macros.
+
+
+ Templates
+
+
+
+
+ PostgreSQL Streaming Replication (@Secondary@)
+
+
+
+ -
+ PostgreSQL Streaming Replication Master Log Pump
+ 7
+
+
+ pg.query.string[{$PG_CONN_@SECONDARY@},{$PG_DB},replpump]
+ 30
+ 7d
+ 0
+ 0
+ 4
+
+
+
+
+ 0
+ 0
+
+ 0
+
+
+
+ 0
+
+
+
+
+
+ This executes function replication_pump() which issues a bogus NOTIFY command in PostgreSQL on a master with at least one slave. It doesn't really notify anything (because there are no listeners), but it does cause the pg_last_xact_replay_timestamp() to be updated on all slaves as a side effect.
+
+If you have a system that is busy 24x7 then this is not necessary.
+ 0
+
+
+ PostgreSQL Streaming Replication (@Secondary@)
+
+
+
+
+
+
+
+
+
+
+
+ PostgreSQL Streaming Master Discovery
+ 7
+
+
+ pg.query.discovery[{$PG_CONN_@SECONDARY@},{$PG_DB},dscrepmstr]
+ 600
+ 0
+
+
+
+ 0
+ 0
+
+ 0
+
+
+
+ 0
+
+
+
+
+
+
+ 0
+
+
+
+ 30d
+ Discover a master with connected streaming slaves.
+
+
+ PostgreSQL Streaming Slave {#PGSLAVE} Lag Bytes
+ 7
+
+
+ pg.query.integer[{$PG_CONN_@SECONDARY@},{$PG_DB},repllagbytes,{#PGSLAVEIP}]
+ 60
+ 30d
+ 400d
+ 0
+ 3
+
+ B
+
+
+ 0
+ 0
+
+ 0
+
+
+
+ 0
+
+
+
+
+
+ The number of log bytes that a streaming slave is behind its master. This metric is measured on the master.
+ 0
+
+
+ PostgreSQL Streaming Replication (@Secondary@)
+
+
+
+
+
+
+
+
+
+
+
+
+ {Template App PostgreSQL Streaming (@Secondary@):pg.query.integer[{$PG_CONN_@SECONDARY@},{$PG_DB},repllagbytes,{#PGSLAVEIP}].last()}>{$PG_ALRT_SLAVE_LAG_BYTES}
+ 0
+
+ PostgreSQL (@Secondary@) Streaming Replication lag bytes high on slave {#PGSLAVE}
+ 0
+
+
+ 0
+ 3
+
+ 0
+ 0
+
+
+
+
+
+
+ PostgreSQL (@Secondary@) Streaming Slave "{#PGSLAVE}" Lag Bytes
+ 900
+ 200
+ 0.0000
+ 100.0000
+ 1
+ 1
+ 0
+ 1
+ 0
+ 0.0000
+ 0.0000
+ 1
+ 0
+ 0
+ 0
+
+
+ 0
+ 5
+ BA4A00
+ 1
+ 4
+ 0
+ -
+ Template App PostgreSQL Streaming (@Secondary@)
+ pg.query.integer[{$PG_CONN_@SECONDARY@},{$PG_DB},repllagbytes,{#PGSLAVEIP}]
+
+
+
+
+
+
+
+
+
+ PostgreSQL Streaming Slave Discovery
+ 7
+
+
+ pg.query.discovery[{$PG_CONN_@SECONDARY@},{$PG_DB},dscrepslave]
+ 600
+ 0
+
+
+
+ 0
+ 0
+
+ 0
+
+
+
+ 0
+
+
+
+
+
+
+ 0
+
+
+
+ 30d
+ Discover a connected streaming slave.
+
+
+ PostgreSQL Streaming {#PGSLV} Lag Seconds
+ 7
+
+
+ pg.query.integer[{$PG_CONN_@SECONDARY@},{$PG_DB},{#PGSLVLAG}]
+ 60
+ 90d
+ 365d
+ 0
+ 3
+
+ s
+
+
+ 0
+ 0
+
+ 0
+
+
+
+ 0
+
+
+
+
+
+ The number of seconds that a slave is behind the master in streaming replication.
+ 0
+
+
+ PostgreSQL Streaming Replication (@Secondary@)
+
+
+
+
+
+
+
+
+
+
+ PostgreSQL Streaming {#PGSLV} Repl Paused
+ 7
+
+
+ pg.query.integer[{$PG_CONN_@SECONDARY@},{$PG_DB},{#PGSLVPAUSED}]
+ 60
+ 90d
+ 365d
+ 0
+ 3
+
+
+
+
+ 0
+ 0
+
+ 0
+
+
+
+ 0
+
+
+
+
+
+ Returns a 1 if streaming replication is paused on the slave, 0 if not paused.
+
+select pg_xlog_replay_pause(); -- pauses replication on slave
+select pg_xlog_replay_resume(); -- resumes replication on slave
+select pg_is_xlog_replay_paused(); -- true if paused, false if not paused
+ 0
+
+
+ PostgreSQL Streaming Replication (@Secondary@)
+
+
+
+
+
+
+
+
+
+
+
+
+ {Template App PostgreSQL Streaming (@Secondary@):pg.query.integer[{$PG_CONN_@SECONDARY@},{$PG_DB},{#PGSLVLAG}].last()}>{$PG_ALRT_SLAVE_LAG_SECS}
+ 0
+
+ PostgreSQL (@Secondary@) Streaming Replication is behind on slave {HOST.NAME1}
+ 0
+
+
+ 0
+ 3
+ PostgreSQL Streaming Replication on this host is behind the master by at least {$PG_ALRT_SLAVE_LAG_SECS} seconds.
+
+Measured by:
+select case when pg_is_in_recovery() = TRUE
+ then extract(epoch from now() - pg_last_xact_replay_timestamp())::int
+ else 0::int
+ end;
+ 0
+ 0
+
+
+
+
+ {Template App PostgreSQL Streaming (@Secondary@):pg.query.integer[{$PG_CONN_@SECONDARY@},{$PG_DB},{#PGSLVPAUSED}].last()}=1
+ 0
+
+ PostgreSQL (@Secondary@) Streaming Replication is paused on slave {HOST.NAME1}
+ 0
+
+
+ 0
+ 2
+ Streaming replication has been paused by administrator (select pg_xlog_replay_pause();).
+
+Determined by:
+select pg_is_xlog_replay_paused();
+
+It can be re-enabled by an administrator by executing "select pg_xlog_replay_resume();" on the slave.
+ 0
+ 0
+
+
+
+
+
+
+ PostgreSQL (@Secondary@) {#PGSLV} Replication Lag Seconds
+ 900
+ 200
+ 0.0000
+ 100.0000
+ 1
+ 1
+ 0
+ 1
+ 0
+ 0.0000
+ 0.0000
+ 1
+ 0
+ 0
+ 0
+
+
+ 0
+ 5
+ F63100
+ 1
+ 4
+ 0
+ -
+ Template App PostgreSQL Streaming (@Secondary@)
+ pg.query.integer[{$PG_CONN_@SECONDARY@},{$PG_DB},{#PGSLVLAG}]
+
+
+
+
+
+
+
+
+
+
+
+
+ {$PG_ALRT_SLAVE_LAG_BYTES}
+ 104857600
+
+
+ {$PG_ALRT_SLAVE_LAG_SECS}
+ 300
+
+
+
+
+
+ PostgreSQL (@Secondary@) Streaming Replication Stats
+ 1
+ 2
+
+
+ 20
+ 500
+ 100
+ 0
+ 0
+ 1
+ 1
+ 0
+ 0
+ 0
+
+
+ 0
+ 0
+
+ PostgreSQL (@Secondary@) {#PGSLV} Replication Lag Seconds
+ Template App PostgreSQL Streaming (@Secondary@)
+
+ 6
+
+
+
+ 20
+ 500
+ 100
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 0
+
+
+ 0
+ 0
+
+ PostgreSQL (@Secondary@) Streaming Slave "{#PGSLAVE}" Lag Bytes
+ Template App PostgreSQL Streaming (@Secondary@)
+
+ 3
+
+
+
+
+
+
+
+