this post was submitted on 23 Jul 2023
43 points (93.9% liked)

Selfhosted

39980 readers
727 users here now

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.

Rules:

  1. Be civil: we're here to support and learn from one another. Insults won't be tolerated. Flame wars are frowned upon.

  2. No spam posting.

  3. Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it's not obvious why your post topic revolves around selfhosting, please include details to make it clear.

  4. Don't duplicate the full text of your blog or github here. Just post the link for folks to click.

  5. Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).

  6. No trolling.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

founded 1 year ago
MODERATORS
 

I've had a home server for years, at first using Windows Server, then Unraid, and now using Ubuntu server. I've long known that I should keep a close eye on my spinning rust, but I never really knew the best way to have that monitoring quietly automated in the background, only sending me a message when something bad shows up. If it matters at all (I assume it doesn't) I am using ZFS on Ubuntu (but not using ZFS as root. It's mounted in e.g ~/user/storage. My primary drive is an SSD)

What are you all using for hard drive monitoring? What are you using for notifications and (generally) how are you linking those two together?

you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 3 points 1 year ago* (last edited 1 year ago)

Ingredients

  • A 10-line Python script that parses the zpool status and looks for errors
  • A systemd one-shot service that runs it and puts the output into node_exporter
  • A systemd timer that runs the service every 5 minutes
  • A Prometheus container that among other things has an alert for changes in the zpool health data

Result

Once this is setup, it's trivial to add other checks like smartmontools, etc. If you add Alertmanager, you can get emails and other alerts sent to you while you're not looking.