Home
Help
Search
Login
Register
OPNsense Forum
»
Archive
»
23.7 Legacy Series
»
ZFS Scrub Cron Task - Notifications?
« previous
next »
Print
Pages: [
1
]
Author
Topic: ZFS Scrub Cron Task - Notifications? (Read 783 times)
rkubes
Newbie
Posts: 15
Karma: 1
ZFS Scrub Cron Task - Notifications?
«
on:
September 17, 2023, 09:00:42 pm »
My hardware is a simple single drive mini-PC, thus during a ZFS scrub, there wouldn't be any opportunity for it to correct data - just potentially identify bad data (failed checksums).
My question is does setting this Cron task provide any notifications if failures are found? Or would it just fail silently in the background and not provide benefit?
Even if there's a Monit alert that I can use in tandem that would still suffice. I just want to avoid having to log in specifically to look for errors, I'd want "proactive" alerting.
Any assistance or feedback would be greatly appreciated.
Edit:
For now, I've added a script that will run "zpool status -x" and check the output for the text that all pools are healthy. If it says that, then it returns 0, else it returns an error code.
Then I added a "custom" Monit alert for non-zero status that runs this script. This could potentially be superfluous if the scrub cron job would provide some kind of error or alert anyway.
I'm not going to mark this as "solved" yet, as I don't know if this is the right approach. I don't know the
way to simulate corruption, and don't want to spin up a test environment just to try to test the Monit service.
«
Last Edit: September 18, 2023, 05:24:17 am by rkubes
»
Logged
CJ
Hero Member
Posts: 832
Karma: 30
Re: ZFS Scrub Cron Task - Notifications?
«
Reply #1 on:
September 20, 2023, 03:44:15 pm »
If you look at the configutil files you can see what the actual command run for the scrub is and then work out what it returns. I see a checksum failed event in the monit options but I'm not sure if that's referring to zfs or not.
I need to get around to actually setting up monit and diffing into it's config. Unfortunately, it hasn't made it to the top of my todo list yet.
Logged
Have Answer, Will Blog
Print
Pages: [
1
]
« previous
next »
OPNsense Forum
»
Archive
»
23.7 Legacy Series
»
ZFS Scrub Cron Task - Notifications?