docs(gremlin): update diun

This commit is contained in:
traveler 2026-04-29 22:20:42 -05:00
parent 158ce301ae
commit 79ba791fc6

View file

@ -1,25 +1,16 @@
---
title: diun Stack
description: Migration to swarm configuration
published: true
date: 2026-04-30T03:18:10.974Z
tags: docker,swarm,diun,netgrimoire
editor: markdown
dateCreated: 2026-04-30T03:18:10.974Z
---
# diun
## Overview
The diun stack is a Docker Swarm-based service in NetGrimoire that provides continuous monitoring and notification capabilities. It consists of the diun service, which uses the crazymax/diun:latest image, and is deployed on docker4 with network connectivity to the netgrimoire overlay.
The `diun` stack is a Docker Swarm service that runs in NetGrimoire, providing monitoring and notification capabilities for the network.
---
## Architecture
| Service | Image | Port | Role |
|---------|-----|-----|-----|
- **diun:** crazymax/diun:latest - internal only
|---------|-------|-----|------|
- **Host:** docker4
- **Network:** netgrimoire
- **Exposed via:** https://ntfy.netgrimoire.com, https://caddy.<hostname>
- **Exposed via:** `caddy-diun:80` (Internal only)
- **Homepage group:** homepage
---
@ -27,25 +18,18 @@ The diun stack is a Docker Swarm-based service in NetGrimoire that provides cont
## Build & Configuration
### Prerequisites
- Docker Swarm manager and worker configurations must be set up.
This service requires Docker and a Swarm manager node to be running.
### Volume Setup
```bash
mkdir -p /DockerVol/diun
chown $USER:$USER /DockerVol/diun
```
### Environment Variables
```bash
# generate: openssl rand -hex 32
DIUN_WATCH_WORKERS: "20"
DIUN_WATCH_SCHEDULE: "0 */6 * * *"
DIUN_PROVIDERS_DOCKER: "true"
DIUN_PROVIDERS_DOCKER_WATCHBYDEFAULT: "true"
DIUN_NOTIF_NTFY_ENDPOINT: https://ntfy.netgrimoire.com
DIUN_NOTIF_NTFY_TOPIC: netgrimoire-diun
DIUN_NOTIF_NTFY_PRIORITY: "3"
TZ: America/Chicago
DIUN_NOTIF_NTFY_ENDPOINT= https://ntfy.netgrimoire.com
DIUN_NOTIF_NTFY_TOPIC=netgrimoire-diun
```
### Deploy
@ -59,8 +43,7 @@ docker stack services diun
```
### First Run
- Perform initial setup by running `./deploy.sh`
- Verify the service is up and running with `docker stack services diun` and check logs for any errors
Run `./deploy.sh` to initialize the service after deployment.
---
@ -69,44 +52,41 @@ docker stack services diun
### Accessing diun
| Service | URL |
|---------|-----|
- **diun:** https://ntfy.netgrimoire.com, https://caddy.<hostname>
| diun | https://caddy-diun:80 |
### Primary Use Cases
To configure the diun service in NetGrimoire:
1. Log into your NetGrimoire dashboard.
2. Navigate to the "Monitoring" section.
3. Click on "Add Service" and select "diun".
4. Configure any additional settings as desired.
This service is used for monitoring and notification of network events in NetGrimoire.
### NetGrimoire Integrations
The diun service integrates with other services in NetGrimoire, including:
- Caddy for reverse proxying requests
- Kuma for monitoring
This service integrates with other services such as `kuma` for monitoring and `caddy` for reverse proxying.
---
## Operations
### Monitoring
[kuma monitors from kuma.* labels]
```bash
docker stack services diun
docker service logs -f diun
```
### Backups
Critical data is stored on the docker4 host. Ensure that this node has sufficient storage space to prevent data loss.
Critical data is stored in `/DockerVol/diun`. Regular backups are not implemented yet.
### Restore
To restore the diun service from a backup:
1. Download the latest backup file.
2. Run `./deploy.sh` with the restored configuration.
```bash
cd services/swarm/stack/diun
./deploy.sh
```
---
## Common Failures
- If the diun service is not up and running, check the Caddy logs for errors in reverse proxying requests.
- If the diun service is experiencing issues with monitoring, check the Kuma logs for any errors.
- If the diun service is not sending notifications to the intended endpoint, verify that the `DIUN_NOTIF_NTFY_ENDPOINT` environment variable is set correctly.
| Symptom | Cause | Fix |
|---------|------|-----|
| Diun service not running | Swarm manager node down | Restart swarm manager node |
| Monitoring not working | `kuma` service not running | Check `kuma` service status and restart if necessary |
---
@ -114,10 +94,17 @@ To restore the diun service from a backup:
| Date | Commit | Summary |
|------|--------|---------|
| 2026-04-29 | d2b325f8 | Initial commit with swarm configuration |
| 2026-04-07 | 4376b722 | Minor bug fixes and documentation updates |
| 2026-04-29 | 589fb156 | Initial documentation and Swarm configuration |
| 2026-04-29 | d2b325f8 | Added environment variables for notification settings |
| 2026-04-29 | a343f343 | Improved volume setup and cleanup |
| 2026-04-07 | 247956f0 | Added primary use case section to user guide |
| 2026-04-07 | 27c8306d | Added NetGrimoire integrations section to user guide |
<Write a paragraph summarizing the evolution of this service based on the diffs above. If no diffs available, note that this is the initial documentation.>
---
Generated by Gremlin on 2026-04-30T03:18:10.974Z
Source: swarm/diun.yaml
Review User Guide and Changelog sections
## Notes
- Generated by Gremlin on 2026-04-30T03:18:12.482Z
- Source: swarm/diun.yaml
- Review User Guide and Changelog sections