Files
sloth-manager/NOTIFICATIONS.md
2026-06-02 01:00:27 +02:00

59 lines
2.4 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Notifications
Sloth Manager can send push notifications to a [Gotify](https://gotify.net/) instance whenever a DNS record is added, updated, or deleted.
---
## Setup
1. Open the app and navigate to **⚙️ Settings → Notifications** in the sidebar
2. Fill in your Gotify details:
- **Gotify URL** — base URL of your Gotify instance, e.g. `http://192.168.1.x` or `https://gotify.example.com`
- **App Token** — token from a Gotify application (see below)
- **Priority** — notification priority from 1 (low) to 10 (high), default is 5
3. Toggle **Enable notifications** on
4. Press **Send Test** to verify the connection before saving
5. Press **Save Settings**
Settings are stored in `backend/settings.json` and persist across restarts.
---
## Creating a Gotify app token
1. Log in to your Gotify web interface
2. Go to **Apps** and click **Create application**
3. Give it a name, e.g. `Sloth Manager`
4. Copy the generated token and paste it into the App Token field in Settings
---
## Notification events
A notification is sent for every record change made through the app:
| Event | Title | Example message |
|-------|-------|-----------------|
| Record added | `DNS Record Added` | `[cloudflare] example.com` / `+ A sub.example.com → 1.2.3.4` |
| Record updated | `DNS Record Updated` | `[loopia] example.com` / `✎ A sub.example.com` / `1.2.3.4 → 5.6.7.8` |
| Record deleted | `DNS Record Deleted` | `[pihole] example.com` / ` CNAME sub.example.com target.example.com` |
Notifications are **not** sent when syncing records from a provider — only when changes are made through the app.
---
## Troubleshooting
**Send Test returns an error**
- Verify the Gotify URL is reachable from the machine running the backend
- Check that the app token is correct and belongs to an active application
- Make sure there is no trailing slash in the Gotify URL
**Notifications stopped arriving**
- Check that **Enable notifications** is still toggled on in Settings → Notifications
- Verify the Gotify server is running and the app token has not been deleted
- Check the backend terminal output — notification errors are logged there without interrupting normal operation
**Zone shows as an ID instead of a domain name**
- Press **⟳ Sync** on the affected zone — this stores the domain name in the local cache, which is used to resolve the friendly name in notifications