Skip to content

Latest commit

 

History

History
5493 lines (4854 loc) · 117 KB

metrics.md

File metadata and controls

5493 lines (4854 loc) · 117 KB

Mamonsu: metrics

Metrics:

Mamonsu Health metrics

Default config:
        max_memory_usage = 40 Mb

Items

  1. Plugin Errors

    Zabbix item:

    Name Mamonsu: plugin errors
    Key mamonsu.plugin.errors[]
    Type Text
    Units
    Delta As Is

    Plugin Errors collects Mamonsu error messages. It might be PostgreSQL extensions errors, rights errors, etc.

  2. Plugin Health

    Zabbix item:

    Name Mamonsu: plugin keep alive
    Key mamonsu.plugin.keepalive[]
    Type Numeric (float)
    Units
    Delta As Is

    Plugin Health indicates that Mamonsu is running.

  3. RSS Memory Maximum Usage (for UNIX only)

    Zabbix item:

    Name Mamonsu: rss memory max usage
    Key mamonsu.memory.rss[max]
    Type Numeric (float)
    Units Bytes
    Delta As Is

    RSS Memory Maximum Usage shows amount of RSS memory allocated to Mamonsu in bytes.

Triggers

  1. Mamonsu plugin errors on {HOSTNAME}. {ITEM.LASTVALUE}
    Shows Mamonsu last error message text.

  2. Mamonsu nodata from {HOSTNAME}
    Triggers if there is no response from Mamonsu server more than 3 minutes.

  3. Mamonsu agent memory usage alert on {HOSTNAME}: {ITEM.LASTVALUE} bytes
    Triggers if RSS Memory Maximum Usage exceeds max_memory_usage.

System metrics

*nix

Default config:
        up_time = 300

Items

Block Devices
Block Devices metrics use information from /proc/diskstats.

  1. Block Devices Read Speed

    Zabbix item:

    Name Block devices: read byte/s
    Key system.disk.all_read_b[]
    Type Numeric (float)
    Units
    Delta Speed Per Second
  2. Block Devices Read Requests

    Zabbix item:

    Name Block devices: read requests
    Key system.disk.all_read[]
    Type Numeric (float)
    Units
    Delta Speed Per Second
  3. Block Devices Write Speed

    Zabbix item:

    Name Block devices: write byte/s
    Key system.disk.all_write_b[]
    Type Numeric (float)
    Units
    Delta Speed Per Second
  4. Block Devices Write Requests

    Zabbix item:

    Name Block devices: write requests
    Key system.disk.all_write[]
    Type Numeric (float)
    Units
    Delta Speed Per Second

Load Average
System Load Average Over 1 minute uses information from /proc/loadavg so no need for delta in Zabbix.

  1. System Load Average Over 1 Minute

    Zabbix item:

    Name System load average over 1 minute
    Key system.la[1]
    Type Numeric (float)
    Units
    Delta As Is

Memory
Memory metrics use information from /proc/meminfo.

  1. Active Memory

    Zabbix item:

    Name Active: Memory recently used
    Key system.memory[active]
    Type Numeric (float)
    Units Bytes
    Delta As Is
  2. Apps Memory

    Zabbix item:

    Name Apps: User-space applications
    Key system.memory[apps]
    Type Numeric (float)
    Units Bytes
    Delta As Is

    Apps Memory calculated as MemTotal - (MemFree + Buffers + Cached + SwapCached + Slab + PageTables).

  3. Buffers Memory

    Zabbix item:

    Name Buffers: Block device cache and dirty
    Key system.memory[buffers]
    Type Numeric (float)
    Units Bytes
    Delta As Is
  4. Cached Memory

    Zabbix item:

    Name Cached: Parked file data (file content) cache
    Key system.memory[cached]
    Type Numeric (float)
    Units Bytes
    Delta As Is
  5. Committed_AS Memory

    Zabbix item:

    Name Committed_AS: Total committed memory
    Key system.memory[committed]
    Type Numeric (float)
    Units Bytes
    Delta As Is
  6. MemFree Memory

    Zabbix item:

    Name Free: Wasted memory
    Key system.memory[unused]
    Type Numeric (float)
    Units Bytes
    Delta As Is
  7. Inactive Memory

    Zabbix item:

    Name Inactive: Memory not currently used
    Key system.memory[inactive]
    Type Numeric (float)
    Units Bytes
    Delta As Is
  8. Mapped Memory

    Zabbix item:

    Name Mapped: All mmap()ed pages
    Key system.memory[mapped]
    Type Numeric (float)
    Units Bytes
    Delta As Is
  9. PageTables Memory

    Zabbix item:

    Name PageTables: Map bt virtual and physical
    Key system.memory[page_tables]
    Type Numeric (float)
    Units Bytes
    Delta As Is
  10. Slab Memory

    Zabbix item:

    Name Slab: Kernel used memory (inode cache)
    Key system.memory[slab]
    Type Numeric (float)
    Units Bytes
    Delta As Is
  11. Swap Memory

    Zabbix item:

    Name Swap: Swap space used
    Key system.memory[swap]
    Type Numeric (float)
    Units Bytes
    Delta As Is

    Swap Memory calculated as SwapTotal - SwapCached.

  12. SwapCached Memory

    Zabbix item:

    Name SwapCached: Fetched unmod yet swap pages
    Key system.memory[swap_cache]
    Type Numeric (float)
    Units Bytes
    Delta As Is
  13. VMallocUsed Memory

    Zabbix item:

    Name VMallocUsed: vmaloc() allocated by kernel
    Key system.memory[vmalloc_used]
    Type Numeric (float)
    Units Bytes
    Delta As Is

Open Files
Open Files uses information from /proc/sys/fs/file-nr.

  1. Open Files

    Zabbix item:

    Name Opened files
    Key system.open_files[]
    Type Numeric (float)
    Units
    Delta As Is

Processes
Processes metrics use information from /proc/stat.

  1. Forkrate

    Zabbix item:

    Name Processes: forkrate
    Key system.processes[forkrate]
    Type Numeric (float)
    Units
    Delta Speed Per Second

    Forkrate shows number of processes created by calls to the fork() and clone() system calls.

  2. Blocked

    Zabbix item:

    Name Processes: in state blocked
    Key system.processes[blocked]
    Type Numeric (float)
    Units
    Delta As Is
  3. Running

    Zabbix item:

    Name Processes: in state running
    Key system.processes[running]
    Type Numeric (float)
    Units
    Delta As Is

CPU
CPU metrics use information from /proc/stat.

  1. Nice

    Zabbix item:

    Name CPU time spent by nice(1)d programs
    Key system.cpu[nice]
    Type Numeric (float)
    Units
    Delta Speed Per Second
  2. User

    Zabbix item:

    Name CPU time spent by normal programs and daemons
    Key system.cpu[user]
    Type Numeric (float)
    Units
    Delta Speed Per Second
  3. System

    Zabbix item:

    Name CPU time spent by the kernel in system activities
    Key system.cpu[system]
    Type Numeric (float)
    Units
    Delta Speed Per Second
  4. Softirq

    Zabbix item:

    Name CPU time spent handling batched interrupts
    Key system.cpu[softirq]
    Type Numeric (float)
    Units
    Delta Speed Per Second
  5. Irq

    Zabbix item:

    Name CPU time spent handling interrupts
    Key system.cpu[irq]
    Type Numeric (float)
    Units
    Delta Speed Per Second
  6. Idle

    Zabbix item:

    Name CPU time spent Idle CPU time
    Key system.cpu[idle]
    Type Numeric (float)
    Units
    Delta Speed Per Second
  7. IOwait

    Zabbix item:

    Name CPU time spent waiting for I/O operations
    Key system.cpu[iowait]
    Type Numeric (float)
    Units
    Delta Speed Per Second

Uptime
Uptime uses information from cat /proc/uptime.

  1. Uptime

    Zabbix item:

    Name System up_time
    Key system.up_time[]
    Type Numeric (float)
    Units Uptime
    Delta As Is

    Uptime shows system uptime in units of time.

Discovery Rules

  1. Block Device Discovery

    Items:

    Name Block device {#BLOCKDEVICE}: read operations Block device {#BLOCKDEVICE}: write operations Block device {#BLOCKDEVICE}: read byte/s Block device {#BLOCKDEVICE}: write byte/s Block device {#BLOCKDEVICE}: utilization
    Key system.disk.read[{#BLOCKDEVICE}] system.disk.write[{#BLOCKDEVICE}] system.disk.read_b[{#BLOCKDEVICE}] system.disk.write_b[{#BLOCKDEVICE}] system.disk.utilization[{#BLOCKDEVICE}]
    Type Numeric (float) Numeric (float) Numeric (float) Numeric (float) Numeric (float)
    Units Bytes Bytes %
    Delta Speed Per Second Speed Per Second Speed Per Second Speed Per Second Speed Per Second

    Graphs:

    Name Block device overview: {#BLOCKDEVICE} byte/s Block device overview: {#BLOCKDEVICE} operations
    Metrics Block device {#BLOCKDEVICE}: read byte/s
    Block device {#BLOCKDEVICE}: write byte/s
    Block device {#BLOCKDEVICE}: utilization
    Block device {#BLOCKDEVICE}: read operations
    Block device {#BLOCKDEVICE}: write operations
    Block device {#BLOCKDEVICE}: utilization
  2. Net Iface Discovery

    Items:

    Name Network device {#NETDEVICE}: RX bytes/s Network device {#NETDEVICE}: RX drops/s Network device {#NETDEVICE}: RX errors/s Network device {#NETDEVICE}: TX bytes/s Network device {#NETDEVICE}: TX drops/s Network device {#NETDEVICE}: TX errors/s
    Key system.net.rx_bytes[{#NETDEVICE}] system.net.rx_drop[{#NETDEVICE}] system.net.rx_errs[{#NETDEVICE}] system.net.tx_bytes[{#NETDEVICE}] system.net.tx_drop[{#NETDEVICE}] system.net.tx_errs[{#NETDEVICE}]
    Type Numeric (float) Numeric (float) Numeric (float) Numeric (float) Numeric (float) Numeric (float)
    Units Bytes Bytes
    Delta Speed Per Second Speed Per Second Speed Per Second Speed Per Second Speed Per Second Speed Per Second

    Graphs:

    Name Network device: {#NETDEVICE}
    Metrics Network device {#NETDEVICE}: RX bytes/s
    Network device {#NETDEVICE}: TX bytes/s
  3. VFS Discovery

    Items:

    Name Mount point {#MOUNTPOINT}: free Mount point {#MOUNTPOINT}: free inodes in percent Mount point {#MOUNTPOINT}: free in percents Mount point {#MOUNTPOINT}: used
    Key system.vfs.free[{#MOUNTPOINT}] system.vfs.percent_inode_free[{#MOUNTPOINT}] system.vfs.percent_free[{#MOUNTPOINT}] system.vfs.used[{#MOUNTPOINT}]
    Type Numeric (float) Numeric (float) Numeric (float) Numeric (float)
    Units Bytes % % Bytes
    Delta As Is As Is As Is As Is

    Graphs:

    Name Mount point overview: {#MOUNTPOINT}
    Metrics Mount point {#MOUNTPOINT}: used
    Mount point {#MOUNTPOINT}: free

    Triggers:

    Name Free disk space less then 10% on mountpoint {#MOUNTPOINT} (hostname={HOSTNAME} value={ITEM.LASTVALUE}) Free inode space less then 10% on mountpoint {#MOUNTPOINT} (hostname={HOSTNAME} value={ITEM.LASTVALUE})
    Expression Triggers if Mount point {#MOUNTPOINT}: free in percent exceeds vfs_inode_percent_free. Triggers if Mount point {#MOUNTPOINT}: free inodes in percent exceeds vfs_inode_percent_free.
  4. pg_probackup Discovery

    Items:

Name Key Storage Description
Pg_probackup dir {#BACKUPDIR}: size pg_probackup.dir.size[{#BACKUPDIR}] 31d Total catalog size: /backups + /wal
Pg_probackup dir {#BACKUPDIR}/backups: size pg_probackup.dir.size[{#BACKUPDIR}/backups] 31d Subdirectory Size /backups
Pg_probackup dir {#BACKUPDIR}/wal: size pg_probackup.dir.size[{#BACKUPDIR}/wal] 31d Subdirectory Size /wal
Pg_probackup dir {#BACKUPDIR}: duration full backup pg_probackup.dir.duration_full[{#BACKUPDIR}] 31d Duration in seconds of creating a complete backup
Pg_probackup dir {#BACKUPDIR}: duration incremental backup pg_probackup.dir.duration_inc[{#BACKUPDIR}] 31d Duration in seconds of creating an incremental backup
Pg_probackup dir {#BACKUPDIR}: start time backup pg_probackup.dir.start_time_backup[{#BACKUPDIR}] Time (unixtime) start creating backup
Pg_probackup dir {#BACKUPDIR}: end time backup pg_probackup.dir.end_time_backup[{#BACKUPDIR}] Time (UnixTime) Completion of Bacup Creation
Pg_probackup dir {#BACKUPDIR}: mode pg_probackup.dir.mode_backup[{#BACKUPDIR}] Current backup mode
Pg_probackup dir {#BACKUPDIR}: status pg_probackup.dir.status_backup[{#BACKUPDIR}] Current backup status
Pg_probackup dir {#BACKUPDIR}: error pg_probackup.dir.error[{#BACKUPDIR}] A sign of an erroneous state or "ok" if everything is fine
Graphs:
  1. Pg_probackup: backup dir: {#BACKUPDIR} size

Shows 3 metrics with information about the size of directories with archival copies:

Key Side graphs Description
pg_probackup.dir.size[{#BACKUPDIR}] (Left Side) Total Directory Size /backups + /wal
pg_probackup.dir.size[{#BACKUPDIR}/backups] (Left Side) Subdirectory size /backups
pg_probackup.dir.size[{#BACKUPDIR}/wal] (Right Side) Subdirectory size /wal
  1. Pg_probackup: backup dir: {#BACKUPDIR} duration

Shows 2 metrics with a duration of creating archive copies:

Key Side graphs Description
pg_probackup.dir.duration_full[{#BACKUPDIR}] (Left Side) Duration in seconds of creating a complete backup
pg_probackup.dir.duration_inc[{#BACKUPDIR}] (Right Side) Duration in seconds of creating an incremental backup
Triggers:

The following alerts have been created that allow you to monitor the status of archive directories:

  • The alert triggers if the creation of a backup is performed more than indicated in the configuration parameter max_time_run_backup2alert_in_sec. Time is specified in seconds and default value = 21600 (6 hours). The current state is monitored in which the process of creating a backfill.
Category Details
Importance: Warning
Name: Backup runs too long on {HOSTNAME} in pg_probackup dir {#BACKUPDIR} (RUNNING)
Expression: {PostgresPro-Linux:pg_probackup.dir.status_backup[{#BACKUPDIR}].last()}="RUNNING" and ( {PostgresPro-Linux:pg_probackup.dir.start_time_backup[{#BACKUPDIR}].now()}-{PostgresPro-Linux:pg_probackup.dir.start_time_backup[{#BACKUPDIR}].last()}) > max_time_run_backup2alert_in_sec
  • The alert triggers if it does not create a new backup longer than indicated in the configuration parameter max_time_lack_backupup2alert_in_sec. Time is specified in seconds and default value = 100800 (28 hours). It is monitored that the next backup (the type of backup of any) will be created no later than indicated in the parameter.
Category Details
Importance: Warning
Name: Long time no backups on {HOSTNAME} in pg_probackup dir {#BACKUPDIR}
Expression: ( {PostgresPro-Linux:pg_probackup.dir.end_time_backup[{#BACKUPDIR}].now()} -{PostgresPro-Linux:pg_probackup.dir.end_time_backup[{#BACKUPDIR}].last()}) > max_time_lack_backup2alert_in_sec
  • Alert triggers if an error occurred when creating a backup - 'error', 'corrupt', 'orphan'. Controls the state of any archive copy, not only the latter. Active all the time has any historical copy with an erroneous state.
Category Details
Importance: Average
Name: Error in pg_probackup dir {#BACKUPDIR} (hostname={HOSTNAME} value={ITEM.LASTVALUE})
Expression: {PostgresPro-Linux:pg_probackup.dir.error[{#BACKUPDIR}].str(ok)}<>1

Graphs

Name Block devices: read/write bytes Block devices: read/write operations CPU time spent Memory overview Processes overview
Metrics Block devices: read byte/s
Block devices: write byte/s
Block devices: read requests
Block devices: write requests
CPU time spent by normal programs and daemons
CPU time spent by nice(1)d programs
CPU time spent by the kernel in system activities
CPU time spent Idle CPU time
CPU time spent waiting for I/O operations avg
CPU time spent handling interrupts
CPU time spent handling batched interrupts
Apps: User-space applications
Buffers: Block device cache and dirty
Swap: Swap space used
Cached: Parked file data (file content) cache
Free: Wasted memory
Slab: Kernel used memory (inode cache)
SwapCached: Fetched unmod yet swap pages
PageTables: Map bt virtual and physical
VMallocUsed: vmaloc() allocated by kernel
Committed_AS: Total committed memory
Mapped: All mmap()ed pages
Active: Memory recently used
Inactive: Memory not currently used
Processes: in state running
Processes: in state blocked
Processes: forkrate

Triggers

  1. Process fork-rate to frequently on {HOSTNAME}
    Triggers if Processes: forkrate greater than 500.

  2. System was restarted on {HOSTNAME} (up_time={ITEM.LASTVALUE})
    Triggers if System up_time fails up_time.

Windows

Items

Memory

  1. Cached

    Zabbix item:

    Name Memory cached
    Key system.memory[cache]
    Type Numeric (float)
    Units Bytes
    Delta As Is
  2. Available

    Zabbix item:

    Name Memory available
    Key system.memory[available]
    Type Numeric (float)
    Units Bytes
    Delta As Is
  3. Free

    Zabbix item:

    Name Memory free
    Key system.memory[free]
    Type Numeric (float)
    Units Bytes
    Delta As Is

CPU

  1. User time

    Zabbix item:

    Name CPU User time
    Key system.cpu[user_time]
    Type Numeric (float)
    Units %
    Delta As Is
  2. Idle time

    Zabbix item:

    Name CPU Idle time
    Key system.cpu[idle_time]
    Type Numeric (float)
    Units %
    Delta As Is
  3. Privileged Time

    Zabbix item:

    Name CPU Privileged time
    Key system.cpu[privileged_time]
    Type Numeric (float)
    Units %
    Delta As Is

Network

  1. Output Queue Length

    Zabbix item:

    Name Network Output Queue Length
    Key system.network[total_output_queue]
    Type Numeric (float)
    Units
    Delta As Is
  2. Bytes Total

    Zabbix item:

    Name Network Bytes Total
    Key system.network[total_bytes]
    Type Numeric (float)
    Units Bytes
    Delta As Is

Discovery Rules

  1. Logical Disks Discovery

    Items:

    Name Logical device {#LOGICALDEVICE}: read op/sec Logical device {#LOGICALDEVICE}: write op/sec Logical device {#LOGICALDEVICE}: queue Logical device {#LOGICALDEVICE}: idle time (%)
    Key system.disk.read[{#LOGICALDEVICE}] system.disk.write[{#LOGICALDEVICE}] system.disk.queue_avg[{#LOGICALDEVICE}] system.disk.idle[{#LOGICALDEVICE}]
    Type Numeric (float) Numeric (float) Numeric (float) Numeric (float)
    Units %
    Delta Speed Per Second Speed Per Second As Is As Is

    Graphs:

    Name Logical devices overview: {#LOGICALDEVICE}
    Metrics Logical device {#LOGICALDEVICE}: read op/sec
    Logical device {#LOGICALDEVICE}: write op/sec
    Logical device {#LOGICALDEVICE}: queue

PostgreSQL metrics

Archiving

Default config:
        max_count_files = 2

Items

Archiving metrics use information from pg_stat_archiver.

  1. Archived Files

    Zabbix item:

    Name PostgreSQL archive command count archived files
    Key pgsql.archive_command[archived_files]
    Type Numeric (float)
    Units
    Delta Simple Change
    Supported Version 9.5+

    Archived Files maps archived_count.

  2. Attempts To Archive Files

    Zabbix item:

    Name PostgreSQL archive command count attempts to archive files
    Key pgsql.archive_command[failed_trying_to_archive]
    Type Numeric (float)
    Units
    Delta Simple Change
    Supported Version 9.5+

    Attempts To Archive Files maps failed_count.

  3. Files Need To Archive

    Zabbix item:

    Name PostgreSQL archive command count files in archive_status need to archive
    Key pgsql.archive_command[count_files_to_archive]
    Type Numeric (float)
    Units
    Delta As Is
    Supported Version 9.5+

    Files Need To Archive is calculated as difference between current WAL number and last archived WAL number. You can find SQL-query that calculates this metric in plugin source code.

  4. Size Of Files Need To Archive

    Zabbix item:

    Name PostgreSQL archive command size of files need to archive
    Key pgsql.archive_command[size_files_to_archive]
    Type Numeric (float)
    Units
    Delta As Is
    Supported Version 9.5+

    Size Of Files Need To Archive is calculated as difference between current WAL number and last archived WAL number multiplied by wal_segment_size. You can find SQL-query that calculates this metric in plugin source code.

Graphs

Name PostgreSQL archive command archive status
Metrics PostgreSQL archive command count files in archive_status need to archive
PostgreSQL archive command count archived files
PostgreSQL archive command count attempts to archive files

Triggers

  1. PostgreSQL count files in ./archive_status on {HOSTNAME} more than 2
    Triggers if PostgreSQL archive command count files in archive_status need to archive exceeds max_count_files.

Autovacuum

Items

Autovacuum metrics use information from pg_stat_activity.

  1. Autovacuum Workers

    Zabbix item:

    Name PostgreSQL: count of autovacuum workers
    Key pgsql.autovacumm.count[]
    Type Numeric (float)
    Units
    Delta As Is
    Supported Version 9.5+

    Autovacuum Workers calculates as summa of avtovacuum queries with not idle state.

Background Writer

Items

Background Writer metrics use information from pg_stat_bgwriter.

  1. Buffers Allocated

    Zabbix item:

    Name PostgreSQL bgwriter: buffers allocated
    Key pgsql.bgwriter[buffers_alloc]
    Type Numeric (float)
    Units
    Delta Simple Change
    Supported Version 9.5+

    Buffers Allocated maps buffers_alloc.

  2. Buffers Written

    Zabbix item:

    Name PostgreSQL bgwriter: buffers written
    Key pgsql.bgwriter[buffers_clean]
    Type Numeric (float)
    Units
    Delta Simple Change
    Supported Version 9.5+

    Buffers Written maps buffers_clean.

  3. Buffers Written Directly By a Backend

    Zabbix item:

    Name PostgreSQL bgwriter: buffers written directly by a backend
    Key pgsql.bgwriter[buffers_backend]
    Type Numeric (float)
    Units
    Delta Simple Change
    Supported Version 9.5+

    Buffers Written Directly By a Backend maps buffers_backend.

  4. Buffers Written During Checkpoints

    Zabbix item:

    Name PostgreSQL bgwriter: buffers written during checkpoints
    Key pgsql.bgwriter[buffers_checkpoint]
    Type Numeric (float)
    Units
    Delta Simple Change
    Supported Version 9.5+

    Buffers Written During Checkpoints maps buffers_checkpoint.

  5. Bgwriter Stopped a Cleaning Scan

    Zabbix item:

    Name PostgreSQL bgwriter: number of bgwriter stopped by max write count
    Key pgsql.bgwriter[maxwritten_clean]
    Type Numeric (float)
    Units
    Delta Simple Change
    Supported Version 9.5+

    Bgwriter Stopped a Cleaning Scan maps maxwritten_clean.

  6. Backend Executes Its Own Fsync Call

    Zabbix item:

    Name PostgreSQL bgwriter: times a backend execute its own fsync
    Key pgsql.bgwriter[buffers_backend_fsync]
    Type Numeric (float)
    Units
    Delta Simple Change
    Supported Version 9.5+

    Backend Executes Its Own Fsync Call maps buffers_backend_fsync.

Graphs

Name PostgreSQL bgwriter buffers PostgreSQL bgwriter write/sync
Metrics PostgreSQL bgwriter: buffers written during checkpoints
PostgreSQL bgwriter: buffers written
PostgreSQL bgwriter: buffers written directly by a backend
PostgreSQL bgwriter: buffers allocated
PostgreSQL bgwriter: number of bgwriter stopped by max write count
PostgreSQL bgwriter: times a backend execute its own fsync

Blocks

Items

Blocks metrics use information from pg_stat_database.

  1. Blocks Hit

    Zabbix item:

    Name PostgreSQL blocks: hit
    Key pgsql.blocks[hit]
    Type Numeric (float)
    Units
    Delta Speed Per Second
    Supported Version 9.5+

    Blocks Hit maps blks_hit.

  2. Blocks Read

    Zabbix item:

    Name PostgreSQL blocks: read
    Key pgsql.blocks[read]
    Type Numeric (float)
    Units
    Delta Speed Per Second
    Supported Version 9.5+

    Blocks Read maps blks_read.

Graphs

Name PostgreSQL instance: rate
Metrics PostgreSQL transactions: committed
PostgreSQL blocks: hit
PostgreSQL blocks: read

Checkpoints

Default config:
        max_checkpoint_by_wal_in_hour = 12

Items

Checkpoints metrics use information from pg_stat_bgwriter.

  1. Checkpoints Sync Time

    Zabbix item:

    Name PostgreSQL checkpoint: sync time
    Key pgsql.checkpoint[checkpoint_sync_time]
    Type Numeric (float)
    Units ms
    Delta Speed Per Second
    Supported Version 9.5+

    Checkpoints Sync Time maps checkpoint_sync_time.

  2. Checkpoints Write Time

    Zabbix item:

    Name PostgreSQL checkpoint: write time
    Key pgsql.checkpoint[write_time]
    Type Numeric (float)
    Units ms
    Delta Speed Per Second
    Supported Version 9.5+

    Checkpoints Write Time maps checkpoint_write_time.

  3. Scheduled Checkpoints

    Zabbix item:

    Name PostgreSQL checkpoints: by timeout (in hour)
    Key pgsql.checkpoint[count_timed]
    Type Numeric (float)
    Units
    Delta Speed Per Second
    Supported Version 9.5+

    Scheduled Checkpoints maps checkpoints_timed.

  4. Requested Checkpoints

    Zabbix item:

    Name PostgreSQL checkpoints: by wal (in hour)
    Key pgsql.checkpoint[count_wal]
    Type Numeric (float)
    Units
    Delta Speed Per Second
    Supported Version 9.5+

    Requested Checkpoints maps checkpoints_req.

Graphs

Name PostgreSQL checkpoints PostgreSQL checkpoints write/sync
Metrics PostgreSQL checkpoints: by timeout (in hour)
PostgreSQL checkpoints: by wal (in hour)
PostgreSQL checkpoint: write time
PostgreSQL checkpoint: sync time

Triggers

  1. PostgreSQL required checkpoints occurs to frequently on {HOSTNAME}
    Triggers if PostgreSQL checkpoints: by wal (in hour) exceeds max_checkpoint_by_wal_in_hour.

Connections

Default config:
        percent_connections_tr = 90

Items

Connections metrics use information from pg_stat_activity.

  1. Max Connections

    Zabbix item:

    Name PostgreSQL: max connections
    Key pgsql.connections[max_connections]
    Type Numeric (float)
    Units
    Delta As Is
    Supported Version 9.5+

    Max Connections maps pg_settings max_connections.

  2. Active

    Zabbix item:

    Name PostgreSQL: number of active connections
    Key pgsql.connections[active]
    Type Numeric (float)
    Units
    Delta As Is
    Supported Version 9.5+

    Active calculates as summa of connections from pg_stat_activity with state active.

  3. Disabled

    Zabbix item:

    Name PostgreSQL: number of disabled
    Key pgsql.connections[disabled]
    Type Numeric (float)
    Units
    Delta As Is
    Supported Version 9.5+

    Disabled calculates as summa of connections from pg_stat_activity with state disabled.

  4. Fastpath Function Call

    Zabbix item:

    Name PostgreSQL: number of fastpath function call
    Key pgsql.connections[fastpath_function_call]
    Type Numeric (float)
    Units
    Delta As Is
    Supported Version 9.5+

    Fastpath Function Call calculates as summa of connections from pg_stat_activity with state fastpath function call.

  5. Idle

    Zabbix item:

    Name PostgreSQL: number of idle connections
    Key pgsql.connections[idle]
    Type Numeric (float)
    Units
    Delta As Is
    Supported Version 9.5+

    Idle calculates as summa of connections from pg_stat_activity with state idle.

  6. Idle in Transaction

    Zabbix item:

    Name PostgreSQL: number of idle in transaction connections
    Key pgsql.connections[idle_in_transaction]
    Type Numeric (float)
    Units
    Delta As Is
    Supported Version 9.5+

    Idle in Transaction calculates as summa of connections from pg_stat_activity with state idle in transaction.

  7. Idle in Transaction (aborted)

    Zabbix item:

    Name PostgreSQL: number of idle in transaction (aborted)
    Key pgsql.connections[idle_in_transaction_aborted]
    Type Numeric (float)
    Units
    Delta As Is
    Supported Version 9.5+

    Idle in Transaction (aborted) calculates as summa of connections from pg_stat_activity with state idle in transaction (aborted).

  8. Total

    Zabbix item:

    Name PostgreSQL: number of total connections
    Key pgsql.connections[total]
    Type Numeric (float)
    Units
    Delta As Is
    Supported Version 9.5+

    Total calculates as summa of all connections from pg_stat_activity with not null state.

  9. Waiting

    Zabbix item:

    Name PostgreSQL: number of waiting connections
    Key pgsql.connections[waiting]
    Type Numeric (float)
    Units
    Delta As Is
    Supported Version 9.5+

    Waiting calculates as summa of all connections from pg_stat_activity with not null state and wait_event_type.

Graphs

Name PostgreSQL connections
Metrics PostgreSQL: number of active connections
PostgreSQL: number of idle connections
PostgreSQL: number of idle in transaction connections
PostgreSQL: number of idle in transaction (aborted)
PostgreSQL: number of fastpath function call
PostgreSQL: number of disabled
PostgreSQL: number of total connections
PostgreSQL: number of waiting connections
PostgreSQL: max connections

Triggers

  1. PostgreSQL many connections on {HOSTNAME} (total connections more than 90% max connections)
    Triggers if connections count exceeds percent_connections_tr.

Databases

Discovery Rules

  1. Database Discovery

    Items:

    Name Count of bloating tables in database: {#DATABASE} Database {#DATABASE}: size Max age (datfrozenxid) in: {#DATABASE}
    Key pgsql.database.bloating_tables[{#DATABASE}] pgsql.database.size[{#DATABASE}] pgsql.database.max_age[{#DATABASE}]
    Type Numeric (float) Numeric (float) Numeric (float)
    Units Bytes
    Delta As Is As Is As Is

    Graphs:

    Name Database: {#DATABASE} size Database bloating overview: {#DATABASE} Database max age overview: {#DATABASE}
    Metrics Database {#DATABASE}: size Count of bloating tables in database: {#DATABASE}
    PostgreSQL: count of autovacuum workers
    Max age (datfrozenxid) in: {#DATABASE}
    PostgreSQL: count of autovacuum workers

Events

Items

Events metrics use information from pg_stat_database.

  1. Conflicts

    Zabbix item:

    Name PostgreSQL event: conflicts
    Key pgsql.events[conflicts]
    Type Numeric (float)
    Units
    Delta Simple Change
    Supported Version 9.5+

    Conflicts maps conflicts.

  2. Deadlocks

    Zabbix item:

    Name PostgreSQL event: deadlocks
    Key pgsql.events[deadlocks]
    Type Numeric (float)
    Units
    Delta Simple Change
    Supported Version 9.5+

    Deadlocks maps deadlocks.

  3. Rollbacks

    Zabbix item:

    Name PostgreSQL event: rollbacks
    Key pgsql.events[xact_rollback]
    Type Numeric (float)
    Units
    Delta Simple Change
    Supported Version 9.5+
    Supported Version 9.5+

    Rollbacks maps xact_rollback.

  4. Checksum Failures

    Zabbix item:

    Name PostgreSQL event: checksum_failures
    Key pgsql.events[checksum_failures]
    Type Numeric (float)
    Units
    Delta Simple Change
    Supported Version 12+

    Checksum Failures maps checksum_failures.

Graphs

Name PostgreSQL instance: events
Metrics PostgreSQL event: conflicts
PostgreSQL event: deadlocks
PostgreSQL event: rollbacks
PostgreSQL event: checksum_failures

Health

Default config:
        uptime = 600
        cache = 80

Items

  1. Ping

    Zabbix item:

    Name PostgreSQL: ping
    Key pgsql.ping[]
    Type Numeric (float)
    Units ms
    Delta As Is
    Supported Version 9.5+

    Ping calculates as difference between ping query start time and time of receiving ping query result.

  2. Cache Hit Ratio

    Zabbix item:

    Name PostgreSQL: cache hit ratio
    Key pgsql.cache[hit]
    Type Numeric (float)
    Units %
    Delta Simple Change
    Supported Version 9.5+

    Cache Hit Ratio calculates as ratio between last value of Blocks hit and summa of last values of Blocks hit and Blocks read.

  3. Service Uptime

    Zabbix item:

    Name PostgreSQL: service uptime
    Key pgsql.uptime[]
    Type Numeric (float)
    Units Unixtime
    Delta As Is
    Supported Version 9.5+

    Service Uptime maps pg_postmaster_start_time.

Triggers

  1. PostgreSQL cache hit ratio too low on {HOSTNAME} ({ITEM.LASTVALUE})
    Triggers if PostgreSQL: cache hit ratio fails cache.

  2. PostgreSQL service was restarted on {HOSTNAME} (uptime={ITEM.LASTVALUE})
    Triggers if PostgreSQL: service uptime fails uptime.

  3. PostgreSQL no ping from PostgreSQL for 3 minutes {HOSTNAME}
    Triggers if there is no data from PostgreSQL: ping more than 3 minutes.

Memory Leak

Default config:
        private_anon_mem_threshold = 1 Gb
        interval = 60

Items

  1. private_anon_mem_threshold Exceeding Count

    Zabbix item:

    Name PostgreSQL: number of pids which private anonymous memory exceeds private_anon_mem_threshold
    Key pgsql.memory_leak_diagnostic.count_diff[]
    Type Numeric (float)
    Units
    Delta As Is
    Supported Version 9.5+
  2. private_anon_mem_threshold Exceeding Messages Text

    Zabbix item:

    Name PostgreSQL: number of pids which private anonymous memory exceeds private_anon_mem_threshold, text of message
    Key pgsql.memory_leak_diagnostic.msg_text[]
    Type Text
    Units
    Delta As Is
    Supported Version 9.5+

Triggers

  1. PostgreSQL: number of pids which private anonymous memory exceeds private_anon_mem_threshold on {HOSTNAME}. {ITEM.LASTVALUE}
    Triggers if there is memory leak errors. Shows memory leak error messages text.

pg_buffercache

Items

pg_buffercache metrics use information from pg_buffercache.

  1. Shared Buffer Size

    Zabbix item:

    Name PostgreSQL: shared buffer size
    Key pgsql.buffers[size]
    Type Numeric (float)
    Units Bytes
    Delta As Is
    Supported Version 9.5+

    Shared Buffer Size calculates as count of all rows in pg_buffercache multiplied by block_size.

  2. Shared Buffer Twice Used Size

    Zabbix item:

    Name PostgreSQL: shared buffer twice used size
    Key pgsql.buffers[twice_used]
    Type Numeric (float)
    Units Bytes
    Delta As Is
    Supported Version 9.5+

    Shared Buffer Twice Used Size calculates as count of all rows in pg_buffercache where usagecount greater than 1 multiplied by block_size.

  3. Shared Buffer Dirty Size

    Zabbix item:

    Name PostgreSQL: shared buffer dirty size
    Key pgsql.buffers[dirty]
    Type Numeric (float)
    Units Bytes
    Delta As Is
    Supported Version 9.5+

    Shared Buffer Dirty Size calculates as count of all isdirty rows in pg_buffercache multiplied by block_size.

Graphs

Name PostgreSQL: shared buffer
Metrics PostgreSQL: shared buffer size
PostgreSQL: shared buffer twice used size
PostgreSQL: shared buffer dirty size

pg_locks

Items

pg_locks metrics use information from pg_locks.

  1. Access Exclusive

    Zabbix item:

    Name PostgreSQL locks: ALTER TABLE, DROP TABLE, TRUNCATE, REINDEX, CLUSTER, VACUUM FULL, LOCK TABLE
    Key pgsql.pg_locks[accessexclusive]
    Type Numeric (float)
    Units
    Delta As Is
    Supported Version 9.5+

    Access Exclusive calculates as summa of locks from pg_locks with mode Access Exclusive.

  2. Access Share

    Zabbix item:

    Name PostgreSQL locks: Read only queries
    Key pgsql.pg_locks[accessshare]
    Type Numeric (float)
    Units
    Delta As Is
    Supported Version 9.5+

    Access Share calculates as summa of locks from pg_locks with mode Access Share.

  3. Exclusive

    Zabbix item:

    Name PostgreSQL locks: Locks from application or some operation on system catalogs
    Key pgsql.pg_locks[exclusive]
    Type Numeric (float)
    Units
    Delta As Is
    Supported Version 9.5+

    Exclusive calculates as summa of locks from pg_locks with mode Exclusive.

  4. Row Exclusive

    Zabbix item:

    Name PostgreSQL locks: Write queries
    Key pgsql.pg_locks[rowexclusive]
    Type Numeric (float)
    Units
    Delta As Is
    Supported Version 9.5+

    Row Exclusive calculates as summa of locks from pg_locks with mode Row Exclusive.

  5. Row Share

    Zabbix item:

    Name PostgreSQL locks: SELECT FOR SHARE and SELECT FOR UPDATE
    Key pgsql.pg_locks[rowshare]
    Type Numeric (float)
    Units
    Delta As Is
    Supported Version 9.5+

    Row Share calculates as summa of locks from pg_locks with mode Row Share.

  6. Share Row Exclusive

    Zabbix item:

    Name PostgreSQL locks: Locks from application
    Key pgsql.pg_locks[sharerowexclusive]
    Type Numeric (float)
    Units
    Delta As Is
    Supported Version 9.5+

    Share Row Exclusive calculates as summa of locks from pg_locks with mode Share Row Exclusive.

  7. Share Update Exclusive

    Zabbix item:

    Name PostgreSQL locks: VACUUM, ANALYZE, CREATE INDEX CONCURRENTLY
    Key pgsql.pg_locks[shareupdateexclusive]
    Type Numeric (float)
    Units
    Delta As Is
    Supported Version 9.5+

    Share Update Exclusive calculates as summa of locks from pg_locks with mode Share Update Exclusive.

  8. Share

    Zabbix item:

    Name PostgreSQL locks: CREATE INDEX
    Key pgsql.pg_locks[share]
    Type Numeric (float)
    Units
    Delta As Is
    Supported Version 9.5+

    Share calculates as summa of locks from pg_locks with mode Share.

Graphs

Name PostgreSQL locks sampling
Metrics PostgreSQL locks: Read only queries
PostgreSQL locks: SELECT FOR SHARE and SELECT FOR UPDATE
PostgreSQL locks: Write queries
PostgreSQL locks: VACUUM, ANALYZE, CREATE INDEX CONCURRENTLY
PostgreSQL locks: CREATE INDEX
PostgreSQL locks: Locks from application
PostgreSQL locks: Locks from application or some operation on system catalogs
PostgreSQL locks: ALTER TABLE, DROP TABLE, TRUNCATE, REINDEX, CLUSTER, VACUUM FULL, LOCK TABLE

pg_stat_statements

Items

pg_stat_statements metrics use information from pg_stat_statements and pg_stat_statements_info.

  1. Amount of WAL Files

    Zabbix item:

    Name PostgreSQL statements: amount of wal files
    Key pgsql.stat[wal_bytes]
    Type Numeric (float)
    Units Bytes
    Delta Speed Per Second
    Supported Version 9.5+

    Amount of WAL Files maps wal_bytes.

  2. Amount of WAL Records

    Zabbix item:

    Name PostgreSQL statements: amount of wal records
    Key pgsql.stat[wal_records]
    Type Numeric (float)
    Units Bytes
    Delta Speed Per Second
    Supported Version 9.5+

    Amount of WAL Records maps wal_records.

  3. Dirty Bytes

    Zabbix item:

    Name PostgreSQL statements: dirty bytes/s
    Key pgsql.stat[dirty_bytes]
    Type Numeric (float)
    Units Bytes
    Delta Speed Per Second
    Supported Version 9.5+

    Dirty Bytes calculates as summa of shared_blks_dirtied and local_blks_dirtied.

  4. WAL FPI

    Zabbix item:

    Name PostgreSQL statements: full page writes
    Key pgsql.stat[wal_fpi]
    Type Numeric (float)
    Units Bytes
    Delta Speed Per Second
    Supported Version 9.5+

    WAL FPI maps wal_fpi.

  5. Read IO Time

    Zabbix item:

    Name PostgreSQL statements: read io time
    Key pgsql.stat[read_time]
    Type Numeric (float)
    Units s
    Delta Speed Per Second
    Supported Version 9.5+

    Read IO Time maps blk_read_time

  6. Write IO Time

    Zabbix item:

    Name PostgreSQL statements: write io time
    Key pgsql.stat[write_time]
    Type Numeric (float)
    Units s
    Delta Speed Per Second
    Supported Version 9.5+

    Write IO Time maps blk_write_time

  7. Other Time

    Zabbix item:

    Name PostgreSQL statements: other (mostly cpu) time
    Key pgsql.stat[other_time]
    Type Numeric (float)
    Units s
    Delta Speed Per Second
    Supported Version 9.5+

    Other Time calculates as total_time - blk_read_time - blk_write_time.

  8. Read Speed

    Zabbix item:

    Name PostgreSQL statements: read bytes/s
    Key pgsql.stat[read_bytes]
    Type Numeric (float)
    Units Bytes
    Delta Speed Per Second
    Supported Version 9.5+

    Read Speed calculates as shared_blks_read, local_blks_read and temp_blks_read.

  9. Write Speed

    Zabbix item:

    Name PostgreSQL statements: write bytes/s
    Key pgsql.stat[write_bytes]
    Type Numeric (float)
    Units Bytes
    Delta Speed Per Second
    Supported Version 9.5+

    Write Speed calculates as summa of shared_blks_written and local_blks_written.

  10. Last Statistic Reset

    Zabbix item:

    Name PostgreSQL statements: last statistics reset
    Key pgsql.stat_info[stats_reset]
    Type Numeric (float)
    Units Unixtime
    Delta As Is
    Supported Version 14+

    Last Statistic Reset maps stats_reset.

  11. pg_stat_statements.max Exceeding Count

    Zabbix item:

    Name PostgreSQL statements: the number of times the pg_stat_statements.max was exceeded
    Key pgsql.stat_info[dealloc]
    Type Numeric (float)
    Units Bytes
    Delta Speed Per Second
    Supported Version 14+

    pg_stat_statements.max Exceeding Count maps dealloc.

Graphs

Name PostgreSQL statements: bytes PostgreSQL statements: spend time PostgreSQL statements: wal statistics
Metrics PostgreSQL statements: read bytes/s
PostgreSQL statements: write bytes/s
PostgreSQL statements: dirty bytes/s
PostgreSQL statements: read io time
PostgreSQL statements: write io time
PostgreSQL statements: other (mostly cpu) time
PostgreSQL statements: amount of wal files
PostgreSQL statements: amount of wal records
PostgreSQL statements: full page writes

Prepared Transactions

Default config:
        max_prepared_transaction_time = 18000

Items

Prepared Transactions metrics use information from pg_prepared_xacts.

  1. Prepared Transactions Count

    Zabbix item:

    Name PostgreSQL: number of prepared transactions
    Key pgsql.prepared.count
    Type Numeric (float)
    Units
    Delta As Is
    Supported Version 9.5+

    Prepared Transactions Count calculates as summa of all rows in pg_prepared_xacts.

  2. Oldest Prepared Transaction Time

    Zabbix item:

    Name PostgreSQL: oldest prepared transaction time in sec
    Key pgsql.prepared.oldest
    Type Numeric (float)
    Units
    Delta As Is
    Supported Version 9.5+

    Oldest Prepared Transaction Time calculates as max(now() - prepared).

Graphs

Name PostgreSQL prepared transaction
Metrics PostgreSQL: number of prepared transactions
PostgreSQL: oldest prepared transaction time in sec

Triggers

  1. PostgreSQL prepared transaction is too old on {HOSTNAME}
    Triggers if PostgreSQL: oldest prepared transaction time in sec exceeds max_prepared_transaction_time.

Relations

Discovery Rules

  1. Relation Size Discovery

    Items:

    Name Relation size: {#RELATIONNAME}
    Key pgsql.relation.size[{#RELATIONNAME}]
    Type Numeric (float)
    Units Bytes
    Delta As Is

    Graphs:

    Name PostgreSQL relation size: {#RELATIONNAME}
    Metrics Relation size: {#RELATIONNAME}

Replication

Default config:
        lag_more_than_in_sec = 300

Items

Replication metrics use information from pg_replication_slots.

  1. Non-active Replication Slots

    Zabbix item:

    Name PostgreSQL: count non-active replication slots
    Key pgsql.replication.non_active_slots[]
    Type Numeric (float)
    Units
    Delta As Is
    Supported Version 9.5+

    Non-active Replication Slots calculates as count of slots with false active status.

  2. Streaming Replication Lag

    Zabbix item:

    Name PostgreSQL: streaming replication lag
    Key pgsql.replication_lag[sec]
    Type Numeric (float)
    Units
    Delta As Is
    Supported Version 9.5+

    Streaming Replication Lag calculates as difference between now and pg_last_xact_replay_timestamp.

Discovery Rules

  1. Replication Lag Discovery

    Items:

    Name Delta of total lag for {#APPLICATION_NAME} Time elapsed between flushing recent WAL locally and receiving notification that this standby server {#APPLICATION_NAME} has written, flushed and applied Time elapsed between flushing recent WAL locally and receiving notification that this standby server {#APPLICATION_NAME} has written and flushed it Time elapsed between flushing recent WAL locally and receiving notification that this standby server {#APPLICATION_NAME} has written it
    Key pgsql.replication.total_lag[{#APPLICATION_NAME}] pgsql.replication.replay_lag[{#APPLICATION_NAME}] pgsql.replication.flush_lag[{#APPLICATION_NAME}] pgsql.replication.write_lag[{#APPLICATION_NAME}]
    Type Numeric (float) Numeric (float) Numeric (float) Numeric (float)
    Units Text Text Text
    Delta As Is As Is As Is As Is

    Graphs:

    Name Delta of total lag for {#APPLICATION_NAME}
    Metrics Delta of total lag for {#APPLICATION_NAME}

Triggers

  1. PostgreSQL number of non-active replication slots on {HOSTNAME} (value={ITEM.LASTVALUE})

  2. PostgreSQL streaming lag too high on {HOSTNAME} (value={ITEM.LASTVALUE})
    Triggers if PostgreSQL: streaming replication lag exceeds lag_more_than_in_sec.

Temp Files

Items

Temp Files metrics use information from pg_stat_database.

  1. Temp Bytes

    Zabbix item:

    Name PostgreSQL temp: bytes written
    Key pgsql.temp[bytes]
    Type Numeric (float)
    Units Bytes
    Delta Simple Change
    Supported Version 9.5+

    Temp Bytes maps temp_bytes.

  2. Temp Files

    Zabbix item:

    Name PostgreSQL temp: files created
    Key pgsql.temp[files]
    Type Numeric (float)
    Units
    Delta Simple Change
    Supported Version 9.5+

    Temp Files maps temp_files.

Graphs

Name PostgreSQL instance: temp files
Metrics PostgreSQL temp: bytes written
PostgreSQL temp: files created

Transactions

Default config:
        max_xid_age = 18000000
        max_transaction_time = 18000

Items

  1. Committed

    Zabbix item:

    Name PostgreSQL transactions: committed
    Key pgsql.transactions[committed]
    Type Numeric (float)
    Units
    Delta Speed Per Second
    Supported Version 9.5+

    Committed maps xact_commit from pg_stat_database.

  2. Oldest Transaction Time

    Zabbix item:

    Name PostgreSQL: oldest transaction running time in sec
    Key pgsql.oldest[transaction_time]
    Type Numeric (float)
    Units s
    Delta As Is
    Supported Version 9.5+

    Oldest Transaction Time calculates based on data from pg_stat_activity. You can find SQL-query that calculates this metric in plugin source code.

  3. Oldest XID Age

    Zabbix item:

    Name PostgreSQL: age of oldest xid
    Key pgsql.oldest[xid_age]
    Type Numeric (float)
    Units
    Delta As Is
    Supported Version 9.5+

    Oldest XID Age calculates based on data from pg_stat_activity. You can find SQL-query that calculates this metric in plugin source code.

Triggers

  1. PostgreSQL oldest xid is too big on {HOSTNAME}
    Triggers if PostgreSQL: age of oldest xid exceeds max_xid_age.

  2. PostgreSQL query running is too old on {HOSTNAME}
    Triggers if PostgreSQL: oldest transaction running time in sec exceeds max_transaction_time.

Tuples

Items

Tuples metrics use information from pg_stat_database.

  1. Deleted

    Zabbix item:

    Name PostgreSQL tuples: deleted
    Key pgsql.tuples[deleted]
    Type Numeric (float)
    Units
    Delta Speed Per Second
    Supported Version 9.5+

    Deleted maps tup_deleted.

  2. Fetched

    Zabbix item:

    Name PostgreSQL tuples: fetched
    Key pgsql.tuples[fetched]
    Type Numeric (float)
    Units
    Delta Speed Per Second
    Supported Version 9.5+

    Fetched maps tup_fetched.

  3. Inserted

    Zabbix item:

    Name PostgreSQL tuples: inserted
    Key pgsql.tuples[inserted]
    Type Numeric (float)
    Units
    Delta Speed Per Second
    Supported Version 9.5+

    Inserted maps tup_inserted.

  4. Returned

    Zabbix item:

    Name PostgreSQL tuples: returned
    Key pgsql.tuples[returned]
    Type Numeric (float)
    Units
    Delta Speed Per Second
    Supported Version 9.5+

    Returned maps tup_returned.

  5. Updated

    Zabbix item:

    Name PostgreSQL tuples: updated
    Key pgsql.tuples[updated]
    Type Numeric (float)
    Units
    Delta Speed Per Second
    Supported Version 9.5+

    Updated maps tup_updated.

Graphs

Name PostgreSQL instance: tuples
Metrics PostgreSQL tuples: deleted
PostgreSQL tuples: fetched
PostgreSQL tuples: inserted avg
PostgreSQL tuples: returned
PostgreSQL tuples: updated

WAL

Items

WAL metrics use information from pg_stat_wal.

  1. WAL Count

    Zabbix item:

    Name PostgreSQL: count of xlog files
    Key pgsql.wal.count[]
    Type Numeric (float)
    Units
    Delta As Is
    Supported Version 9.5+

    WAL count calculates as count of WAL files in pg_wal directory via pg_ls_dir().

  2. WAL Write Speed

    Zabbix item:

    Name PostgreSQL: wal write speed
    Key pgsql.wal.write[]
    Type Numeric (float)
    Units Bytes
    Delta Speed Per Second
    Supported Version 9.5+

    WAL Write Speed calculates as difference between current WAL file and 0/00000000.

  3. WAL Buffers Full

    Zabbix item:

    Name PostgreSQL: wal buffers full
    Key pgsql.wal.buffers_full
    Type Numeric (float)
    Units
    Delta Simple Change
    Supported Version 14+

    WAL Buffers Full maps wal_buffers_full.

  4. WAL FPI Generated

    Zabbix item:

    Name PostgreSQL: wal full page images generated
    Key pgsql.wal.fpi.count[]
    Type Numeric (float)
    Units
    Delta Speed Per Seconds
    Supported Version 14+

    WAL FPI Generated maps wal_fpi.

  5. WAL Records Generated

    Zabbix item:

    Name PostgreSQL: wal records generated
    Key pgsql.wal.records.count[]
    Type Numeric (float)
    Units
    Delta Speed Per Seconds
    Supported Version 14+

    WAL Records Generated maps wal_records.

  6. WAL Sync Time

    Zabbix item:

    Name PostgreSQL: wal sync time (ms)
    Key pgsql.wal.sync_time
    Type Numeric (float)
    Units ms
    Delta Simple Change
    Supported Version 14+

    WAL Sync Time maps wal_sync_time.

  7. WAL Write Time

    Zabbix item:

    Name PostgreSQL: wal write time (ms)
    Key pgsql.wal.write_time
    Type Numeric (float)
    Units
    Delta Simple Change
    Supported Version 14+

    WAL Write Time maps wal_write_time.

  8. WAL Sync Duty

    Zabbix item:

    Name PostgreSQL: wal sync duty (%)
    Key pgsql.wal.sync_duty
    Type Numeric (float)
    Units %
    Delta Simple Change
    Supported Version 14+

    WAL Sync Duty calculates as change of wal_sync_time per Mamonsu interval.

Postgres Pro metrics

Compressed File System

Default config:
        force_enable = False

Items

Compressed File System metrics use information from cfs* functions.

  1. Compressed Files

    Zabbix item:

    Name PostgreSQL cfs compression: compressed files
    Key pgsql.cfs.activity[compressed_files]
    Type Numeric (float)
    Units
    Delta Speed Per Second
    Supported Version 9.5+

    Compressed Files maps cfs_gc_activity_processed_files().

  2. Scanned Files

    Zabbix item:

    Name PostgreSQL cfs compression: scanned files
    Key pgsql.cfs.activity[scanned_files]
    Type Numeric (float)
    Units
    Delta Speed Per Second
    Supported Version 9.5+

    Scanned Files maps cfs_gc_activity_scanned_files().

  3. Current Ratio

    Zabbix item:

    Name PostgreSQL cfs compression: current ratio
    Key pgsql.cfs.activity[current_compress_ratio]
    Type Numeric (float)
    Units
    Delta As Is
    Supported Version 9.5+
  4. Total Ratio

    Zabbix item:

    Name PostgreSQL cfs compression: total ratio
    Key pgsql.cfs.activity[total_compress_ratio]
    Type Numeric (float)
    Units
    Delta As Is
    Supported Version 9.5+
  5. Scanned Speed

    Zabbix item:

    Name PostgreSQL cfs compression: scanned byte/s
    Key pgsql.cfs.activity[scanned_bytes]
    Type Numeric (float)
    Units
    Delta Speed Per Second
    Supported Version 9.5+

    Scanned Speed maps cfs_gc_activity_processed_pages().

  6. Written Speed

    Zabbix item:

    Name PostgreSQL cfs compression: written byte/s
    Key pgsql.cfs.activity[written_bytes]
    Type Numeric (float)
    Units
    Delta Speed Per Second
    Supported Version 9.5+

    Written Speed maps cfs_gc_activity_processed_bytes().

Discovery Rules

  1. Compressed Relations Discovery

    Items:

    Name Relation {#COMPRESSED_RELATION}: compress ratio
    Key pgsql.cfs.compress_ratio[{#COMPRESSED_RELATION}]
    Type Numeric (float)
    Units
    Delta As Is

    Graphs:

    Name Relation {#COMPRESSED_RELATION}: compress ratio
    Metrics Relation {#COMPRESSED_RELATION}: compress ratio

pg_wait_sampling

Items

pg_wait_sampling metrics use information from pg_wait_sampling_profile.

Buffer Locks

  1. Buffer Locks

    Zabbix item:

    Name PostgreSQL waits: Buffer locks
    Key pgsql.all_lock[buffer]
    Type Numeric (float)
    Units
    Delta Speed Per Second
    Supported Version 9.5+

Heavyweight Locks

  1. Heavyweight Locks

    Zabbix item:

    Name PostgreSQL waits: Heavyweight locks
    Key pgsql.all_lock[hwlock]
    Type Numeric (float)
    Units
    Delta Speed Per Second
    Supported Version 9.5+
  2. Advisory User Lock

    Zabbix item:

    Name PostgreSQL waits: advisory user lock
    Key pgsql.hwlock[advisory]
    Type Numeric (float)
    Units
    Delta Speed Per Second
    Supported Version 9.5+
  3. Extend a Relation

    Zabbix item:

    Name PostgreSQL waits: extend a relation
    Key pgsql.hwlock[extend]
    Type Numeric (float)
    Units
    Delta Speed Per Second
    Supported Version 9.5+
  4. Lock On a Relation

    Zabbix item:

    Name PostgreSQL waits: lock on a relation
    Key pgsql.hwlock[relation]
    Type Numeric (float)
    Units
    Delta Speed Per Second
    Supported Version 9.5+
  5. Lock On a Tuple

    Zabbix item:

    Name PostgreSQL waits: lock on a tuple
    Key pgsql.hwlock[tuple]
    Type Numeric (float)
    Units
    Delta Speed Per Second
    Supported Version 9.5+
  6. Lock On Database Object

    Zabbix item:

    Name PostgreSQL waits: lock on database object
    Key pgsql.hwlock[object]
    Type Numeric (float)
    Units
    Delta Speed Per Second
    Supported Version 9.5+
  7. Lock On Page

    Zabbix item:

    Name PostgreSQL waits: lock on page
    Key pgsql.hwlock[page]
    Type Numeric (float)
    Units
    Delta Speed Per Second
    Supported Version 9.5+
  8. Speculative Insertion Lock

    Zabbix item:

    Name PostgreSQL waits: speculative insertion lock
    Key pgsql.hwlock[speculative_token]
    Type Numeric (float)
    Units
    Delta Speed Per Second
    Supported Version 9.5+
  9. Transaction to Finish

    Zabbix item:

    Name PostgreSQL waits: transaction to finish
    Key pgsql.hwlock[transactionid]
    Type Numeric (float)
    Units
    Delta Speed Per Second
    Supported Version 9.5+
  10. Userlock

    Zabbix item:

    Name PostgreSQL waits: userlock
    Key pgsql.hwlock[userlock]
    Type Numeric (float)
    Units
    Delta Speed Per Second
    Supported Version 9.5+
  11. Virtual XID Lock

    Zabbix item:

    Name PostgreSQL waits: virtual xid lock
    Key pgsql.hwlock[virtualxid]
    Type Numeric (float)
    Units
    Delta Speed Per Second
    Supported Version 9.5+

Lightweight Locks

  1. Lightweight Locks

    Zabbix item:

    Name PostgreSQL waits: Lightweight locks
    Key pgsql.all_lock[lwlock]
    Type Numeric (float)
    Units
    Delta Speed Per Second
    Supported Version 9.5+
  2. Buffer Operations

    Zabbix item:

    Name PostgreSQL waits: Buffer operations
    Key pgsql.lwlock[buffer]
    Type Numeric (float)
    Units
    Delta Speed Per Second
    Supported Version 9.5+
  3. CLOG Access

    Zabbix item:

    Name PostgreSQL waits: CLOG access
    Key pgsql.lwlock[clog]
    Type Numeric (float)
    Units
    Delta Speed Per Second
    Supported Version 9.5+
  4. Replication Locks

    Zabbix item:

    Name PostgreSQL waits: Replication Locks
    Key pgsql.lwlock[replication]
    Type Numeric (float)
    Units
    Delta Speed Per Second
    Supported Version 9.5+
  5. WAL Access

    Zabbix item:

    Name PostgreSQL waits: WAL access
    Key pgsql.lwlock[wal]
    Type Numeric (float)
    Units
    Delta Speed Per Second
    Supported Version 9.5+
  6. XID Access

    Zabbix item:

    Name PostgreSQL waits: XID access
    Key pgsql.lwlock[xid]
    Type Numeric (float)
    Units
    Delta Speed Per Second
    Supported Version 9.5+
  7. Other Operations

    Zabbix item:

    Name PostgreSQL waits: Other operations
    Key pgsql.lwlock[other]
    Type Numeric (float)
    Units
    Delta Speed Per Second
    Supported Version 9.5+

Graphs

Name PostgreSQL waits: Heavyweight locks PostgreSQL waits: Lightweight locks PostgreSQL waits: Locks by type
Metrics PostgreSQL waits: lock on a relation
PostgreSQL waits: extend a relation
PostgreSQL waits: lock on page
PostgreSQL waits: lock on a tuple
PostgreSQL waits: transaction to finish
PostgreSQL waits: virtual xid lock
PostgreSQL waits: speculative insertion lock
PostgreSQL waits: lock on database object
PostgreSQL waits: userlock
PostgreSQL waits: advisory user lock
PostgreSQL waits: XID access
PostgreSQL waits: WAL access
PostgreSQL waits: CLOG access
PostgreSQL waits: Replication Locks
PostgreSQL waits: Buffer operations
PostgreSQL waits: Other operations
PostgreSQL waits: Lightweight locks
PostgreSQL waits: Heavyweight locks
PostgreSQL waits: Buffer locks