Compare commits

..

No commits in common. "83fa12ec54496cde28497cff988de6f762fd528e" and "45953848e2336d7229093b3b588a22ef7f64e8d3" have entirely different histories.

2 changed files with 13 additions and 93 deletions

View File

@ -226,7 +226,7 @@ metrics:
type: row type: row
query: query:
100000: > 100000: >
SELECT COUNT(*) FILTER (WHERE has_sequence_privilege(c.oid, 'SELECT,USAGE')) AS visible_sequences, SELECT COUNT(*) FILTER (WHERE has_sequence_privilege(c.oid, 'SELECT,USAGE')) AS readable_sequences,
COUNT(*) AS total_sequences COUNT(*) AS total_sequences
FROM pg_class AS c FROM pg_class AS c
WHERE relkind = 'S'; WHERE relkind = 'S';

View File

@ -785,76 +785,6 @@ zabbix_export:
value: PostgreSQL value: PostgreSQL
- tag: Database - tag: Database
value: '{#DBNAME}' value: '{#DBNAME}'
- uuid: 5960120dd01c4926b0fc1fbe9c011507
name: 'Database max sequence usage in {#DBNAME}'
type: HTTP_AGENT
key: 'pgmon_db_max_sequence[{#DBNAME}]'
delay: 5m
value_type: FLOAT
units: '%'
description: 'The percent of the currently configured value range for the most utilized sequence.'
url: 'http://localhost:{$AGENT_PORT}/sequence_usage'
query_fields:
- name: dbname
value: '{#DBNAME}'
tags:
- tag: Application
value: PostgreSQL
- tag: Database
value: '{#DBNAME}'
- uuid: 48b9cc80ac4d4aee9e9f3a5d6f7d4a95
name: 'Total number of sequences on {#DBNAME}'
type: DEPENDENT
key: 'pgmon_db_sequences[total,{#DBNAME}]'
delay: '0'
description: 'Total number of sequences in the database.'
preprocessing:
- type: JSONPATH
parameters:
- $.total_sequences
master_item:
key: 'pgmon_db_sequence_visibility[{#DBNAME}]'
tags:
- tag: Application
value: PostgreSQL
- tag: Database
value: '{#DBNAME}'
- uuid: 6521a9bab2ac47bf85429832d289bbac
name: 'Visible sequences on {#DBNAME}'
type: DEPENDENT
key: 'pgmon_db_sequences[visible,{#DBNAME}]'
delay: '0'
description: 'Number of sequences in the database for which Zabbix can see stats.'
preprocessing:
- type: JSONPATH
parameters:
- $.visible_sequences
master_item:
key: 'pgmon_db_sequence_visibility[{#DBNAME}]'
tags:
- tag: Application
value: PostgreSQL
- tag: Database
value: '{#DBNAME}'
- uuid: 00f2da3eb99940839410a6ecd5df153f
name: 'Database sequence visibility in {#DBNAME}'
type: HTTP_AGENT
key: 'pgmon_db_sequence_visibility[{#DBNAME}]'
delay: 30m
value_type: TEXT
trends: '0'
description: 'Statistics about the number of sequences that exist and the number Zabbix can actually see stats for.'
url: 'http://localhost:{$AGENT_PORT}/sequence_visibility'
query_fields:
- name: dbname
value: '{#DBNAME}'
tags:
- tag: Application
value: PostgreSQL
- tag: Database
value: '{#DBNAME}'
- tag: Type
value: Raw
- uuid: 492b3cac15f348c2b85f97b69c114d1b - uuid: 492b3cac15f348c2b85f97b69c114d1b
name: 'Database Stats for {#DBNAME}' name: 'Database Stats for {#DBNAME}'
type: HTTP_AGENT type: HTTP_AGENT
@ -873,17 +803,6 @@ zabbix_export:
value: '{#DBNAME}' value: '{#DBNAME}'
- tag: Type - tag: Type
value: Raw value: Raw
trigger_prototypes:
- uuid: d29d0fd9d9d34b5ebd649592b0829ce5
expression: 'last(/PostgreSQL by pgmon/pgmon_db_sequences[total,{#DBNAME}]) <> last(/PostgreSQL by pgmon/pgmon_db_sequences[visible,{#DBNAME}])'
name: 'Sequences not visible to Zabbix on {#DBNAME}'
priority: WARNING
description: 'There are sequences for which Zabbix cannot see usage statistics'
tags:
- tag: Application
value: PostgreSQL
- tag: Component
value: Sequence
graph_prototypes: graph_prototypes:
- uuid: 1f7de43b77714f819e61c31273712b70 - uuid: 1f7de43b77714f819e61c31273712b70
name: 'DML Totals for {#DBNAME}' name: 'DML Totals for {#DBNAME}'
@ -1581,7 +1500,6 @@ zabbix_export:
delay: '0' delay: '0'
history: 90d history: 90d
value_type: FLOAT value_type: FLOAT
units: s
description: '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.' description: '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.'
preprocessing: preprocessing:
- type: JSONPATH - type: JSONPATH
@ -1597,12 +1515,13 @@ zabbix_export:
- tag: Database - tag: Database
value: '{#DBNAME}' value: '{#DBNAME}'
- uuid: 624f8f085a3642c9a10a03361c17763d - uuid: 624f8f085a3642c9a10a03361c17763d
name: 'Last flush LSN lag for {#REPID}' name: 'Last flush LSN for {#REPID}'
type: DEPENDENT type: DEPENDENT
key: 'pgmon_rep[flush_lsn,repid={#REPID}]' key: 'pgmon_rep[flush_lsn,repid={#REPID}]'
delay: '0' delay: '0'
history: 90d history: 90d
units: B value_type: TEXT
trends: '0'
description: 'Last write-ahead log location flushed to disk by this standby server' description: 'Last write-ahead log location flushed to disk by this standby server'
preprocessing: preprocessing:
- type: JSONPATH - type: JSONPATH
@ -1624,7 +1543,6 @@ zabbix_export:
delay: '0' delay: '0'
history: 90d history: 90d
value_type: FLOAT value_type: FLOAT
units: s
description: '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.' description: '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.'
preprocessing: preprocessing:
- type: JSONPATH - type: JSONPATH
@ -1640,12 +1558,13 @@ zabbix_export:
- tag: Database - tag: Database
value: '{#DBNAME}' value: '{#DBNAME}'
- uuid: fe1bed51845d4694bae8f53deed4846d - uuid: fe1bed51845d4694bae8f53deed4846d
name: 'Last replay LSN lag for {#REPID}' name: 'Last replay LSN for {#REPID}'
type: DEPENDENT type: DEPENDENT
key: 'pgmon_rep[replay_lsn,repid={#REPID}]' key: 'pgmon_rep[replay_lsn,repid={#REPID}]'
delay: '0' delay: '0'
history: 90d history: 90d
units: B value_type: TEXT
trends: '0'
description: 'Last write-ahead log location replayed into the database on this standby server' description: 'Last write-ahead log location replayed into the database on this standby server'
preprocessing: preprocessing:
- type: JSONPATH - type: JSONPATH
@ -1661,12 +1580,13 @@ zabbix_export:
- tag: Database - tag: Database
value: '{#DBNAME}' value: '{#DBNAME}'
- uuid: 68c179d0e33f45f9bf82d2d4125763f0 - uuid: 68c179d0e33f45f9bf82d2d4125763f0
name: 'Last sent LSN lag for {#REPID}' name: 'Last sent LSN for {#REPID}'
type: DEPENDENT type: DEPENDENT
key: 'pgmon_rep[sent_lsn,repid={#REPID}]' key: 'pgmon_rep[sent_lsn,repid={#REPID}]'
delay: '0' delay: '0'
history: 90d history: 90d
units: B value_type: TEXT
trends: '0'
description: 'Last write-ahead log location sent on this connection' description: 'Last write-ahead log location sent on this connection'
preprocessing: preprocessing:
- type: JSONPATH - type: JSONPATH
@ -1716,7 +1636,6 @@ zabbix_export:
delay: '0' delay: '0'
history: 90d history: 90d
value_type: FLOAT value_type: FLOAT
units: s
description: '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.' description: '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.'
preprocessing: preprocessing:
- type: JSONPATH - type: JSONPATH
@ -1732,12 +1651,13 @@ zabbix_export:
- tag: Database - tag: Database
value: '{#DBNAME}' value: '{#DBNAME}'
- uuid: 57fb03cf63af4b0a91d8e36d6ff64d30 - uuid: 57fb03cf63af4b0a91d8e36d6ff64d30
name: 'Last write LSN lag for {#REPID}' name: 'Last write LSN for {#REPID}'
type: DEPENDENT type: DEPENDENT
key: 'pgmon_rep[write_lsn,repid={#REPID}]' key: 'pgmon_rep[write_lsn,repid={#REPID}]'
delay: '0' delay: '0'
history: 90d history: 90d
units: B value_type: TEXT
trends: '0'
description: '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.' description: '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.'
preprocessing: preprocessing:
- type: JSONPATH - type: JSONPATH