zrepl/zfs/zfscmd
Goran Mekic bc5e1ede04
metric to detect filesystems rules that don't match any local dataset (#653)
This PR adds a Prometheus counter called
`zrepl_zfs_list_unmatched_user_specified_dataset_count`.
Monitor for increases of the counter to detect filesystem filter rules that
have no effect because they don't match any local filesystem.

An example use case for this is the following story:
1. Someone sets up zrepl with `filesystems` filter for `zroot/pg14<`.
2. During the upgrade to Postgres 15, they rename the dataset to `zroot/pg15`,
   but forget to update the zrepl `filesystems` filter.
3. zrepl will not snapshot / replicate the `zroot/pg15<` datasets.

Since `filesystems` rules are always evaluated on the side that has the datasets,
we can smuggle this functionality into the `zfs` module's `ZFSList` function that
is used by all jobs with a `filesystems` filter.

Dashboard changes:
- histogram with increase in $__interval, one row per job
- table with increase in $__range
- explainer text box, so, people know what the previous two are about
We had to re-arrange some panels, hence the Git diff isn't great.

closes https://github.com/zrepl/zrepl/pull/653

Co-authored-by: Christian Schwarz <me@cschwarz.com>
Co-authored-by: Goran Mekić <meka@tilda.center>
2023-05-02 22:13:52 +02:00
..
zfscmd-logging-scraper [#307] add package trace, integrate it with logging, and adopt it throughout zrepl 2020-05-19 11:30:02 +02:00
zfscmd_context.go metric to detect filesystems rules that don't match any local dataset (#653) 2023-05-02 22:13:52 +02:00
zfscmd_logging.go zfscmd: fix crash in zfscmd_prometheus.go due to incorrectly extracted ProcessState 2020-04-21 14:10:25 +02:00
zfscmd_platform_test.bash zfs: introduce pkg zfs/zfscmd for command logging, status, prometheus metrics 2020-04-05 20:47:25 +02:00
zfscmd_platform_test.go [#307] add package trace, integrate it with logging, and adopt it throughout zrepl 2020-05-19 11:30:02 +02:00
zfscmd_prometheus.go zfscmd: fix crash in zfscmd_prometheus.go due to incorrectly extracted ProcessState 2020-04-21 14:10:25 +02:00
zfscmd_report.go zfscmd: fix crash in zfscmd_prometheus.go due to incorrectly extracted ProcessState 2020-04-21 14:10:25 +02:00
zfscmd.go zfs: rewrite SendStream, fix bug in Close() on FreeBSD, add platformtests 2021-09-19 20:11:31 +02:00