Skip to content

zfs_zpool.sh: add vdev and pool data error metrics - #279

Open
satwell wants to merge 1 commit into
prometheus-community:masterfrom
satwell:zfs-error-metrics
Open

satwell wants to merge 1 commit into
prometheus-community:masterfrom
satwell:zfs-error-metrics

Conversation

@satwell

@satwell satwell commented Oct 14, 2026

Copy link
Copy Markdown

Parses zpool status -p to get data for these new gauge metrics:

  • zfs_zpool_vdev_errors provides read, write, and checksum errors per vdev.
  • zfs_zpool_data_errors provides a count of persistent data errors per pool.

Example output from zpool status -p on OpenZFS 2.3.9:

  pool: data
 state: ONLINE
status: One or more devices has experienced an error resulting in data
        corruption.  Applications may be affected.
action: Restore the file in question if possible.  Otherwise restore the
        entire pool from backup.
   see: https://openzfs.github.io/openzfs-docs/msg/ZFS-8000-8A
  scan: scrub repaired 128K in 09:30:07 with 0 errors on Sun Oct  4 09:30:18 2026
config:

        NAME                                      STATE     READ WRITE CKSUM
        data                                      ONLINE       0     0     0
          mirror-0                                ONLINE       0     0     0
            df0dcbff-d596-4bfa-8a51-1306c3fed300  ONLINE       0     0     0
            fa09ff7a-6a6b-44f8-8e19-c1979b05415e  ONLINE       0     0     0

errors: 1 data errors, use '-v' for a list

  pool: ssd
 state: ONLINE
  scan: scrub repaired 0B in 00:00:23 with 0 errors on Sun Oct 11 00:00:27 2026
config:

        NAME                                    STATE     READ WRITE CKSUM
        ssd                                     ONLINE       0     0     0
          462990f2-1505-45fa-b505-3ca7bcae611b  ONLINE       0     0     0

errors: No known data errors

Parses `zpool status -p` to get data for these new gauge metrics:

- zfs_zpool_vdev_errors provides read, write, and checksum errors
  per vdev.
- zfs_zpool_data_errors provides a count of persistent data errors
  per pool.

Signed-off-by: Steve Atwell <satwell@disjoint.net>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant