https://github.com/pablopunk/doctorz
Monitors ZFS Pools with `zpool status` and sends you an email if the pool has been degraded.
https://github.com/pablopunk/doctorz
Last synced: about 1 year ago
JSON representation
Monitors ZFS Pools with `zpool status` and sends you an email if the pool has been degraded.
- Host: GitHub
- URL: https://github.com/pablopunk/doctorz
- Owner: pablopunk
- Created: 2023-09-29T21:28:51.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-11-26T11:13:59.000Z (over 2 years ago)
- Last Synced: 2024-10-19T08:58:41.754Z (over 1 year ago)
- Language: TypeScript
- Homepage: https://registry.hub.docker.com/r/pablopunk/doctorz
- Size: 1.78 MB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# 🩺 Doctorz
> Monitors ZFS Pools with `zpool status` and sends you an email if the pool has been degraded.
## Config
1. Create a Sendgrid account
2. Setup an "sender" email address in Sendgrid
2. Get a Sendgrid API key
## Docker
```bash
docker run --privileged \
-e SENDGRID_API_KEY=your-api-key \
-e EMAIL_FROM=no-reply@example.com \
-e EMAIL_TO=your-email@example.com \
-e INTERVAL=600 \ # if not provided, defaults to 900sec (15 minutes)
pablopunk/doctorz
```
## Docker compose
```yaml
doctorz:
container_name: doctorz
image: pablopunk/doctorz
privileged: true
environment:
- SENDGRID_API_KEY=your-api-key
- EMAIL_FROM=no-reply@example.com
- EMAIL_TO=your-email@example.com
- INTERVAL=600 # if not provided, defaults to 900sec (15 minutes)
```
## Without docker
It's meant to run in **Docker**, but if you wanna run it manually I use [bun.sh](https://bun.sh) to run it instead of nodeJS. Make sure you copy `.env.example` to `.env` and replace it with your own values.
```bash
git clone https://github.com/pablopunk/doctorz && cd doctorz
cp .env.example .env # edit .env with your own values
bun run src/index.ts
```
## If it's degraded
You'll get an email when it's detected, and won't get notified again until is fixed: