zrepl/daemon
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
..
filters metric to detect filesystems rules that don't match any local dataset (#653) 2023-05-02 22:13:52 +02:00
hooks run go1.19 gofmt and make adjustments as needed 2022-10-24 22:22:41 +02:00
job run go1.19 gofmt and make adjustments as needed 2022-10-24 22:22:41 +02:00
logging run go1.19 gofmt and make adjustments as needed 2022-10-24 22:22:41 +02:00
nethelpers format source tree using goimports 2019-03-22 19:41:12 +01:00
pruner zrepl status: hide progress bar once all filesystems reach terminal state (#674) 2023-05-02 19:28:56 +02:00
snapper snapper: fix delayed snapshots caused by system suspend/resume 2022-10-27 00:19:06 +02:00
control.go daemon/control: make http server {Read,Write}Timeout envconst-configurable 2021-12-18 15:14:33 +01:00
daemon.go Add --skip-cert-check flag to zrepl configcheck to prevent checking cert files 2022-07-08 20:18:41 +02:00
main.go [#307] add package trace, integrate it with logging, and adopt it throughout zrepl 2020-05-19 11:30:02 +02:00
pprof.go [#307] add package trace, integrate it with logging, and adopt it throughout zrepl 2020-05-19 11:30:02 +02:00
prometheus.go [#307] add package trace, integrate it with logging, and adopt it throughout zrepl 2020-05-19 11:30:02 +02:00