Add blog post: homelab health monitoring with Discord webhooks
Some checks failed
Deploy Blog / deploy (push) Has been cancelled
Some checks failed
Deploy Blog / deploy (push) Has been cancelled
This commit is contained in:
42
src/routes/posts/homelab-health-monitoring.md
Normal file
42
src/routes/posts/homelab-health-monitoring.md
Normal file
@@ -0,0 +1,42 @@
|
||||
---
|
||||
title: "Simple Homelab Health Monitoring with Discord Webhooks"
|
||||
date: "2026-02-04"
|
||||
excerpt: "A lightweight bash-based monitoring setup that sends daily system health summaries to Discord - no Prometheus required."
|
||||
---
|
||||
|
||||
I wanted a lightweight way to keep tabs on my homelab server (HP ProDesk 600 G2) without running a full monitoring stack like Prometheus/Grafana or Netdata. The solution: a couple of bash scripts that collect stats hourly and send a daily summary to Discord.
|
||||
|
||||
## The Setup
|
||||
|
||||
The system has two components:
|
||||
|
||||
**1. Collector** - Runs every hour via cron, appending CPU, memory, load, and disk usage to a daily CSV file. Data is retained for 7 days.
|
||||
|
||||
**2. Reporter** - Runs daily at 9 AM, calculates min/avg/max from the collected samples, checks for journal errors and SSD health, then sends a formatted embed to a Discord webhook.
|
||||
|
||||
## What Gets Monitored
|
||||
|
||||
- CPU usage (min/avg/max over 24h)
|
||||
- Memory usage (min/avg/max over 24h)
|
||||
- Load average (min/avg/max over 24h)
|
||||
- Disk usage (current)
|
||||
- SSD SMART health status
|
||||
- System errors from journalctl
|
||||
|
||||
The report color-codes itself: green for OK, yellow for warnings (high usage or errors present), red for critical issues.
|
||||
|
||||
## Why This Approach?
|
||||
|
||||
- **No dependencies** - Just bash, cron, and curl
|
||||
- **No services to manage** - Cron handles scheduling
|
||||
- **Minimal resource usage** - A few KB of CSV data per day
|
||||
- **Discord integration** - Notifications where I already am
|
||||
- **Actionable** - Only alerts on actual issues with `--errors-only` mode
|
||||
|
||||
## Sample Output
|
||||
|
||||
The Discord embed shows a clean summary with all the stats at a glance. If there are errors in the journal, they're included in a code block at the bottom.
|
||||
|
||||
## Source
|
||||
|
||||
The scripts are available at [git.jawhng.xyz/jawhng/homelab-monitoring-webhook](https://git.jawhng.xyz/jawhng/homelab-monitoring-webhook).
|
||||
Reference in New Issue
Block a user