zabbix_export: version: '7.0' template_groups: - uuid: b9390195ecad4986968746a2a9b56354 name: 'My Templates' templates: - uuid: 5e4ccbbfed424b968a4b7fc22bd4ca1e template: 'PostgreSQL by pgmon' name: 'PostgreSQL by pgmon' description: 'Monitor PostgreSQL using pgmon' groups: - name: 'My Templates' items: - uuid: 8706eccb7edc4fa394f552fc31f401a9 name: 'Max Frozen XID Age' key: 'web.page.get[localhost,/max_frozen_age,{$AGENT_PORT}]' history: 90d trends: '0' description: 'Maximum age of any frozen XID in any database' preprocessing: - type: REGEX parameters: - '\n\s?\n([\s\S]*)' - \1 - type: MATCHES_REGEX parameters: - '^[0-9]+$' tags: - tag: Application value: PostgreSQL - uuid: ee88f5f4d2384f97946d049af5af4502 name: 'PostgreSQL version' key: 'web.page.get[localhost,/version,{$AGENT_PORT}]' delay: 1h history: 90d description: 'PostgreSQL Server version number' preprocessing: - type: REGEX parameters: - '\n\s?\n([\s\S]*)' - \1 - type: MATCHES_REGEX parameters: - '^[0-9]+$' tags: - tag: Application value: PostgreSQL discovery_rules: - uuid: 085de335305e435dbb4439bd52e0d35d name: 'Discover Databases' key: 'web.page.get[localhost,/discover_dbs,{$AGENT_PORT}]' delay: 10m lifetime: 30d enabled_lifetime_type: DISABLE_NEVER item_prototypes: - uuid: a30babe4a6f4440bba2a3ee46eff7ce2 name: 'Time spent executing statements on {#DBNAME}' type: DEPENDENT key: 'pgmon_db[active_time,{#DBNAME}]' history: 90d value_type: FLOAT units: s description: 'Time spent executing SQL statements in this database, in milliseconds (this corresponds to the states active and fastpath function call in pg_stat_activity)' preprocessing: - type: JSONPATH parameters: - $.active_time - type: MULTIPLIER parameters: - '0.001' master_item: key: 'web.page.get[localhost,/db_stats?datname={#DBNAME},{$AGENT_PORT}]' tags: - tag: Application value: PostgreSQL - tag: Database value: '{#DBNAME}' - uuid: ea2a9c0db25a478d819cb290e4c734d2 name: 'Number of backends on {#DBNAME}' type: DEPENDENT key: 'pgmon_db[backends,{#DBNAME}]' history: 90d description: 'Number of backends currently connected to this database, or NULL for shared objects. 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.' preprocessing: - type: JSONPATH parameters: - $.numbackends master_item: key: 'web.page.get[localhost,/db_stats?datname={#DBNAME},{$AGENT_PORT}]' tags: - tag: Application value: PostgreSQL - tag: Database value: '{#DBNAME}' - uuid: f115a12170744a449d11c24badfc61db name: 'Blocks hit on {#DBNAME}' type: DEPENDENT key: 'pgmon_db[blks_hit,{#DBNAME}]' history: 90d description: '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)' preprocessing: - type: JSONPATH parameters: - $.blks_hit master_item: key: 'web.page.get[localhost,/db_stats?datname={#DBNAME},{$AGENT_PORT}]' tags: - tag: Application value: PostgreSQL - tag: Database value: '{#DBNAME}' - uuid: 361e6ae0b27344aeb5f7faea46eaab3f name: 'Blocks read on {#DBNAME}' type: DEPENDENT key: 'pgmon_db[blks_read,{#DBNAME}]' history: 90d description: 'Number of disk blocks read in this database' preprocessing: - type: JSONPATH parameters: - $.blks_read master_item: key: 'web.page.get[localhost,/db_stats?datname={#DBNAME},{$AGENT_PORT}]' tags: - tag: Application value: PostgreSQL - tag: Database value: '{#DBNAME}' - uuid: b8ed3d0016c04c4d828f34fba2e54456 name: 'Time spent reading blocks on {#DBNAME}' type: DEPENDENT key: 'pgmon_db[blk_read_time,{#DBNAME}]' history: 90d value_type: FLOAT units: s description: 'Time spent reading data file blocks by backends in this database, in milliseconds (if track_io_timing is enabled, otherwise zero)' preprocessing: - type: JSONPATH parameters: - $.blk_read_time - type: MULTIPLIER parameters: - '0.001' master_item: key: 'web.page.get[localhost,/db_stats?datname={#DBNAME},{$AGENT_PORT}]' tags: - tag: Application value: PostgreSQL - tag: Database value: '{#DBNAME}' - uuid: 8c29b1920ebe4bbdaaaeeb23074f0587 name: 'Time spent writing blocks on {#DBNAME}' type: DEPENDENT key: 'pgmon_db[blk_write_time,{#DBNAME}]' history: 90d value_type: FLOAT units: s description: 'Time spent writing data file blocks by backends in this database, in milliseconds (if track_io_timing is enabled, otherwise zero)' preprocessing: - type: JSONPATH parameters: - $.blk_write_time - type: MULTIPLIER parameters: - '0.001' master_item: key: 'web.page.get[localhost,/db_stats?datname={#DBNAME},{$AGENT_PORT}]' tags: - tag: Application value: PostgreSQL - tag: Database value: '{#DBNAME}' - uuid: 33b27a2a9ee4446994d03760a8f8f353 name: 'Total number of checksum failures on {#DBNAME}' type: DEPENDENT key: 'pgmon_db[checksum_failures,{#DBNAME}]' history: 90d description: 'Number of data page checksum failures detected in this database (or on a shared object), or NULL if data checksums are not enabled.' preprocessing: - type: JSONPATH parameters: - $.checksum_failures - type: MATCHES_REGEX parameters: - '^[0-9]+$' error_handler: CUSTOM_VALUE error_handler_params: '0' master_item: key: 'web.page.get[localhost,/db_stats?datname={#DBNAME},{$AGENT_PORT}]' tags: - tag: Application value: PostgreSQL - tag: Database value: '{#DBNAME}' - uuid: 45b7fe9cb8514f4ca60a0fef5a651903 name: 'Total number of conflicts on {#DBNAME}' type: DEPENDENT key: 'pgmon_db[conflicts,{#DBNAME}]' history: 90d description: '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.)' preprocessing: - type: JSONPATH parameters: - $.conflicts master_item: key: 'web.page.get[localhost,/db_stats?datname={#DBNAME},{$AGENT_PORT}]' tags: - tag: Application value: PostgreSQL - tag: Database value: '{#DBNAME}' - uuid: 402067f4ba8f486ca5881f59f67cbee1 name: 'Total number of deadlocks on {#DBNAME}' type: DEPENDENT key: 'pgmon_db[deadlocks,{#DBNAME}]' history: 90d description: 'Number of deadlocks detected in this database' preprocessing: - type: JSONPATH parameters: - $.deadlocks master_item: key: 'web.page.get[localhost,/db_stats?datname={#DBNAME},{$AGENT_PORT}]' tags: - tag: Application value: PostgreSQL - tag: Database value: '{#DBNAME}' - uuid: ef4cc7644dc14969b703cc43db06727e name: 'Time spent in idle transactions on {#DBNAME}' type: DEPENDENT key: 'pgmon_db[idle_in_transaction_time,{#DBNAME}]' history: 90d value_type: FLOAT units: s description: 'Time spent idling while in a transaction in this database, in milliseconds (this corresponds to the states idle in transaction and idle in transaction (aborted) in pg_stat_activity)' preprocessing: - type: JSONPATH parameters: - $.idle_in_transaction_time - type: MULTIPLIER parameters: - '0.001' master_item: key: 'web.page.get[localhost,/db_stats?datname={#DBNAME},{$AGENT_PORT}]' tags: - tag: Application value: PostgreSQL - tag: Database value: '{#DBNAME}' - uuid: a07d6f6ec90846619296f1637fffd677 name: 'Total number of sessions on {#DBNAME}' type: DEPENDENT key: 'pgmon_db[sessions,{#DBNAME}]' history: 90d description: 'Total number of sessions established to this database' preprocessing: - type: JSONPATH parameters: - $.sessions master_item: key: 'web.page.get[localhost,/db_stats?datname={#DBNAME},{$AGENT_PORT}]' tags: - tag: Application value: PostgreSQL - tag: Database value: '{#DBNAME}' - uuid: 23efc8770d2f4c93a96b9d4de6780c7a name: 'Total number of abandoned sessions on {#DBNAME}' type: DEPENDENT key: 'pgmon_db[sessions_abandoned,{#DBNAME}]' history: 90d description: 'Number of database sessions to this database that were terminated because connection to the client was lost' preprocessing: - type: JSONPATH parameters: - $.sessions_abandoned master_item: key: 'web.page.get[localhost,/db_stats?datname={#DBNAME},{$AGENT_PORT}]' tags: - tag: Application value: PostgreSQL - tag: Database value: '{#DBNAME}' - uuid: e95b7ade648743dba6427304feca1a8c name: 'Total number of fatal sessions on {#DBNAME}' type: DEPENDENT key: 'pgmon_db[sessions_fatal,{#DBNAME}]' history: 90d description: 'Number of database sessions to this database that were terminated by fatal errors' preprocessing: - type: JSONPATH parameters: - $.sessions_fatal master_item: key: 'web.page.get[localhost,/db_stats?datname={#DBNAME},{$AGENT_PORT}]' tags: - tag: Application value: PostgreSQL - tag: Database value: '{#DBNAME}' - uuid: 87f773582b5147aeadd14f38da2dbc29 name: 'Total number of terminated sessions on {#DBNAME}' type: DEPENDENT key: 'pgmon_db[sessions_killed,{#DBNAME}]' history: 90d description: 'Number of database sessions to this database that were terminated by operator intervention' preprocessing: - type: JSONPATH parameters: - $.sessions_killed master_item: key: 'web.page.get[localhost,/db_stats?datname={#DBNAME},{$AGENT_PORT}]' tags: - tag: Application value: PostgreSQL - tag: Database value: '{#DBNAME}' - uuid: 83bb18e4bcd54c1f8ef10c56a5cd9a47 name: 'Total temp file size on {#DBNAME}' type: DEPENDENT key: 'pgmon_db[temp_bytes,{#DBNAME}]' history: 90d units: b description: '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.' preprocessing: - type: JSONPATH parameters: - $.temp_bytes master_item: key: 'web.page.get[localhost,/db_stats?datname={#DBNAME},{$AGENT_PORT}]' tags: - tag: Application value: PostgreSQL - tag: Database value: '{#DBNAME}' - uuid: 936c1178c6c04a8caf882308b2cbbd10 name: 'Total number of temp files on {#DBNAME}' type: DEPENDENT key: 'pgmon_db[temp_files,{#DBNAME}]' history: 90d description: '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.' preprocessing: - type: JSONPATH parameters: - $.temp_files master_item: key: 'web.page.get[localhost,/db_stats?datname={#DBNAME},{$AGENT_PORT}]' tags: - tag: Application value: PostgreSQL - tag: Database value: '{#DBNAME}' - uuid: 2fcec7a5c0ee4fd6a7356a58fa9a44f8 name: 'Tuples deleted on {#DBNAME}' type: DEPENDENT key: 'pgmon_db[tup_deleted,{#DBNAME}]' history: 90d description: 'Number of rows deleted by queries in this database' preprocessing: - type: JSONPATH parameters: - $.tup_deleted master_item: key: 'web.page.get[localhost,/db_stats?datname={#DBNAME},{$AGENT_PORT}]' tags: - tag: Application value: PostgreSQL - tag: Database value: '{#DBNAME}' - uuid: bb453280f88e4442ba0f733a50b40dd0 name: 'Tuples fetched by index scans on {#DBNAME}' type: DEPENDENT key: 'pgmon_db[tup_fetched,{#DBNAME}]' history: 90d description: 'Number of live rows fetched by index scans in this database' preprocessing: - type: JSONPATH parameters: - $.tup_fetched master_item: key: 'web.page.get[localhost,/db_stats?datname={#DBNAME},{$AGENT_PORT}]' tags: - tag: Application value: PostgreSQL - tag: Database value: '{#DBNAME}' - uuid: a1d1fa5a51fa4c228aa934e19c9c9f1d name: 'Tuples inserted on {#DBNAME}' type: DEPENDENT key: 'pgmon_db[tup_inserted,{#DBNAME}]' history: 90d description: 'Number of rows inserted by queries in this database' preprocessing: - type: JSONPATH parameters: - $.tup_inserted master_item: key: 'web.page.get[localhost,/db_stats?datname={#DBNAME},{$AGENT_PORT}]' tags: - tag: Application value: PostgreSQL - tag: Database value: '{#DBNAME}' - uuid: 009f2d0268f24b1996611837956f20e5 name: 'Tuples returned by sequential scans on {#DBNAME}' type: DEPENDENT key: 'pgmon_db[tup_returned,{#DBNAME}]' history: 90d description: 'Number of live rows fetched by sequential scans and index entries returned by index scans in this database' preprocessing: - type: JSONPATH parameters: - $.tup_returned master_item: key: 'web.page.get[localhost,/db_stats?datname={#DBNAME},{$AGENT_PORT}]' tags: - tag: Application value: PostgreSQL - tag: Database value: '{#DBNAME}' - uuid: 46344f38be2f40faa45b9e9a2fce5273 name: 'Tuples updated on {#DBNAME}' type: DEPENDENT key: 'pgmon_db[tup_updated,{#DBNAME}]' history: 90d description: 'Number of rows updated by queries in this database' preprocessing: - type: JSONPATH parameters: - $.tup_updated master_item: key: 'web.page.get[localhost,/db_stats?datname={#DBNAME},{$AGENT_PORT}]' tags: - tag: Application value: PostgreSQL - tag: Database value: '{#DBNAME}' - uuid: 3886a2b0df3b481f98a15b38502522ab name: 'Total number of commits on {#DBNAME}' type: DEPENDENT key: 'pgmon_db[xact_commit,{#DBNAME}]' history: 90d description: 'Number of transactions in this database that have been committed' preprocessing: - type: JSONPATH parameters: - $.xact_commit master_item: key: 'web.page.get[localhost,/db_stats?datname={#DBNAME},{$AGENT_PORT}]' tags: - tag: Application value: PostgreSQL - tag: Database value: '{#DBNAME}' - uuid: 5716033b216445fbb895dc5b546c003d name: 'Total number of rollbacks on {#DBNAME}' type: DEPENDENT key: 'pgmon_db[xact_rollback,{#DBNAME}]' history: 90d description: 'Number of transactions in this database that have been rolled back' preprocessing: - type: JSONPATH parameters: - $.xact_rollback master_item: key: 'web.page.get[localhost,/db_stats?datname={#DBNAME},{$AGENT_PORT}]' tags: - tag: Application value: PostgreSQL - tag: Database value: '{#DBNAME}' - uuid: a67f50d2a3fd44f98e79bb98158bfe10 name: 'Tuples fetched by index scans on {#DBNAME} - 1h delta' type: CALCULATED key: 'pgmon_db_delta[tup_fetched,1h,{#DBNAME}]' delay: 10m history: 90d params: 'last(//pgmon_db[tup_fetched,{#DBNAME}]) - last(//pgmon_db[tup_fetched,{#DBNAME}], #1:now-1h)' tags: - tag: Application value: PostgreSQL - tag: Database value: '{#DBNAME}' - uuid: a81ba5a7c96d40bca9cc0861da574b49 name: 'Tuples fetched by index scans on {#DBNAME} - 1m delta' type: CALCULATED key: 'pgmon_db_delta[tup_fetched,1m,{#DBNAME}]' history: 90d params: 'last(//pgmon_db[tup_fetched,{#DBNAME}]) - last(//pgmon_db[tup_fetched,{#DBNAME}], #1:now-1m)' tags: - tag: Application value: PostgreSQL - tag: Database value: '{#DBNAME}' - uuid: 3bfa9b7db9394b6d9e0cac6255524f50 name: 'Tuples fetched by index scans on {#DBNAME} - 5m delta' type: CALCULATED key: 'pgmon_db_delta[tup_fetched,5m,{#DBNAME}]' history: 90d params: 'last(//pgmon_db[tup_fetched,{#DBNAME}]) - last(//pgmon_db[tup_fetched,{#DBNAME}], #1:now-5m)' tags: - tag: Application value: PostgreSQL - tag: Database value: '{#DBNAME}' - uuid: 261e83e1e87c42d587a9409a8a26f971 name: 'Tuples returned by sequential scans on {#DBNAME} - 1h delta' type: CALCULATED key: 'pgmon_db_delta[tup_returned,1h,{#DBNAME}]' delay: 10m history: 90d params: 'last(//pgmon_db[tup_returned,{#DBNAME}]) - last(//pgmon_db[tup_returned,{#DBNAME}], #1:now-1h)' tags: - tag: Application value: PostgreSQL - tag: Database value: '{#DBNAME}' - uuid: e46c4ec2a21d48288337b90549fbf757 name: 'Tuples returned by sequential scans on {#DBNAME} - 1m delta' type: CALCULATED key: 'pgmon_db_delta[tup_returned,1m,{#DBNAME}]' delay: 10m history: 90d params: 'last(//pgmon_db[tup_returned,{#DBNAME}]) - last(//pgmon_db[tup_returned,{#DBNAME}], #1:now-1m)' tags: - tag: Application value: PostgreSQL - tag: Database value: '{#DBNAME}' - uuid: 26a42b55d7f949588f0739388ff52831 name: 'Tuples returned by sequential scans on {#DBNAME} - 5m delta' type: CALCULATED key: 'pgmon_db_delta[tup_returned,5m,{#DBNAME}]' delay: 10m history: 90d params: 'last(//pgmon_db[tup_returned,{#DBNAME}]) - last(//pgmon_db[tup_returned,{#DBNAME}], #1:now-5m)' tags: - tag: Application value: PostgreSQL - tag: Database value: '{#DBNAME}' - uuid: 492b3cac15f348c2b85f97b69c114d1b name: 'Database Stats for {#DBNAME}' key: 'web.page.get[localhost,/db_stats?datname={#DBNAME},{$AGENT_PORT}]' history: '0' value_type: TEXT preprocessing: - type: REGEX parameters: - '\n\s?\n([\s\S]*)' - \1 tags: - tag: Application value: PostgreSQL - tag: Database value: '{#DBNAME}' graph_prototypes: - uuid: 4949cdfbda614af796a2856fdfa9ac3f name: 'Time breakdown for {#DBNAME} on {#CLUSTER}' graph_items: - color: 199C0D calc_fnc: ALL item: host: 'PostgreSQL by pgmon' key: 'pgmon_db[active_time,{#DBNAME}]' - sortorder: '1' color: F63100 calc_fnc: ALL item: host: 'PostgreSQL by pgmon' key: 'pgmon_db[idle_in_transaction_time,{#DBNAME}]' - sortorder: '2' color: 2774A4 calc_fnc: ALL item: host: 'PostgreSQL by pgmon' key: 'pgmon_db[blk_read_time,{#DBNAME}]' - sortorder: '3' color: F7941D calc_fnc: ALL item: host: 'PostgreSQL by pgmon' key: 'pgmon_db[blk_write_time,{#DBNAME}]' lld_macro_paths: - lld_macro: '{#DBNAME}' path: $.datname preprocessing: - type: REGEX parameters: - '\n\s?\n([\s\S]*)' - \1 - uuid: 8ec029d577ae4872858e2e5cfd1cc40e name: 'Discover Replication' key: 'web.page.get[localhost,/discover_rep,{$AGENT_PORT}]' delay: 10m lifetime: 30d enabled_lifetime_type: DISABLE_NEVER item_prototypes: - uuid: 3a5a60620e6a4db694e47251148d82f5 name: 'Flush lag for {#REPID}' type: DEPENDENT key: 'pgmon_rep[flush_lag,repid={#REPID}]' history: 90d value_type: FLOAT 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: - type: JSONPATH parameters: - $.flush_lag master_item: key: 'web.page.get[localhost,/rep_stats?repid={#REPID},{$AGENT_PORT}]' tags: - tag: Application value: PostgreSQL - tag: Component value: Replication - tag: Database value: '{#DBNAME}' - uuid: 624f8f085a3642c9a10a03361c17763d name: 'Last flush LSN for {#REPID}' type: DEPENDENT key: 'pgmon_rep[flush_lsn,repid={#REPID}]' history: 90d value_type: TEXT description: 'Last write-ahead log location flushed to disk by this standby server' preprocessing: - type: JSONPATH parameters: - $.flush_lsn master_item: key: 'web.page.get[localhost,/rep_stats?repid={#REPID},{$AGENT_PORT}]' tags: - tag: Application value: PostgreSQL - tag: Component value: Replication - tag: Database value: '{#DBNAME}' - uuid: 442a0f4baa224ad69fd883879e5c768b name: 'Replay lag for {#REPID}' type: DEPENDENT key: 'pgmon_rep[replay_lag,repid={#REPID}]' history: 90d value_type: FLOAT 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: - type: JSONPATH parameters: - $.replay_lag master_item: key: 'web.page.get[localhost,/rep_stats?repid={#REPID},{$AGENT_PORT}]' tags: - tag: Application value: PostgreSQL - tag: Component value: Replication - tag: Database value: '{#DBNAME}' - uuid: fe1bed51845d4694bae8f53deed4846d name: 'Last replay LSN for {#REPID}' type: DEPENDENT key: 'pgmon_rep[replay_lsn,repid={#REPID}]' history: 90d value_type: TEXT description: 'Last write-ahead log location replayed into the database on this standby server' preprocessing: - type: JSONPATH parameters: - $.replay_lsn master_item: key: 'web.page.get[localhost,/rep_stats?repid={#REPID},{$AGENT_PORT}]' tags: - tag: Application value: PostgreSQL - tag: Component value: Replication - tag: Database value: '{#DBNAME}' - uuid: 68c179d0e33f45f9bf82d2d4125763f0 name: 'Last sent LSN for {#REPID}' type: DEPENDENT key: 'pgmon_rep[sent_lsn,repid={#REPID}]' history: 90d value_type: TEXT description: 'Last write-ahead log location sent on this connection' preprocessing: - type: JSONPATH parameters: - $.sent_lsn master_item: key: 'web.page.get[localhost,/rep_stats?repid={#REPID},{$AGENT_PORT}]' tags: - tag: Application value: PostgreSQL - tag: Component value: Replication - tag: Database value: '{#DBNAME}' - uuid: be57b23dc0ce48a7a000a207c9868855 name: 'Replication state for {#REPID}' type: DEPENDENT key: 'pgmon_rep[state,repid={#REPID}]' history: 90d value_type: TEXT description: | Current WAL sender state. Possible values are: * startup: This WAL sender is starting up. * catchup: This WAL sender's connected standby is catching up with the primary. * streaming: This WAL sender is streaming changes after its connected standby server has caught up with the primary. * backup: This WAL sender is sending a backup. * stopping: This WAL sender is stopping. preprocessing: - type: JSONPATH parameters: - $.state master_item: key: 'web.page.get[localhost,/rep_stats?repid={#REPID},{$AGENT_PORT}]' tags: - tag: Application value: PostgreSQL - tag: Component value: Replication - tag: Database value: '{#DBNAME}' - uuid: c056cc1202b7412d89bf3927c2858248 name: 'Write lag for {#REPID}' type: DEPENDENT key: 'pgmon_rep[write_lag,repid={#REPID}]' history: 90d value_type: FLOAT 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: - type: JSONPATH parameters: - $.write_lag master_item: key: 'web.page.get[localhost,/rep_stats?repid={#REPID},{$AGENT_PORT}]' tags: - tag: Application value: PostgreSQL - tag: Component value: Replication - tag: Database value: '{#DBNAME}' - uuid: 57fb03cf63af4b0a91d8e36d6ff64d30 name: 'Last write LSN for {#REPID}' type: DEPENDENT key: 'pgmon_rep[write_lsn,repid={#REPID}]' history: 90d value_type: TEXT 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: - type: JSONPATH parameters: - $.write_lsn master_item: key: 'web.page.get[localhost,/rep_stats?repid={#REPID},{$AGENT_PORT}]' tags: - tag: Application value: PostgreSQL - tag: Component value: Replication - tag: Database value: '{#DBNAME}' - uuid: efbe11f37c2f499488bdc5853c3d89e6 name: 'Replication Stats for {#REPID}' key: 'web.page.get[localhost,/rep_stats?repid={#REPID},{$AGENT_PORT}]' history: '0' value_type: TEXT preprocessing: - type: REGEX parameters: - '\n\s?\n([\s\S]*)' - \1 tags: - tag: Application value: PostgreSQL - tag: Component value: Replication - tag: Database value: '{#DBNAME}' lld_macro_paths: - lld_macro: '{#AGENT}' path: $.agent - lld_macro: '{#CLIENT_ADDR}' path: $.client_addr - lld_macro: '{#CLUSTER}' path: $.cluster - lld_macro: '{#REPID}' path: $.repid - lld_macro: '{#STATE}' path: $.state preprocessing: - type: REGEX parameters: - '\n\s?\n([\s\S]*)' - \1 macros: - macro: '{$AGENT_PORT}' value: '5400' description: 'The port the agent listens on'