Add Beszel server monitoring dashboard
- Deployed Beszel hub in Dockge (10.5.0.10:8090) - Installed agents on PVE host and PBS (with Synology mount monitoring) - Created NPM proxy at dashboard.georgsen.dk - Created ~/bin/beszel helper script for API management - Added credentials for Beszel and Dockge - Updated all documentation Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
7982975922
commit
654e3ffbce
6 changed files with 148 additions and 0 deletions
12
CLAUDE.md
12
CLAUDE.md
|
|
@ -78,6 +78,18 @@ The `~/bin/dns` script manages Technitium DNS (internal zone: lab.georgsen.dk):
|
|||
~/bin/dns lookup <name> # Query DNS
|
||||
```
|
||||
|
||||
## Beszel Dashboard Access
|
||||
|
||||
The `~/bin/beszel` script manages the server monitoring dashboard:
|
||||
```bash
|
||||
~/bin/beszel list # List all systems
|
||||
~/bin/beszel status # Show system metrics (CPU, RAM, disk)
|
||||
~/bin/beszel add <name> <host> [port] # Add a system
|
||||
~/bin/beszel delete <id> # Delete a system
|
||||
```
|
||||
|
||||
Dashboard URL: https://dashboard.georgsen.dk
|
||||
|
||||
## Uptime Kuma API Access
|
||||
|
||||
The `~/bin/kuma` script manages Uptime Kuma monitors:
|
||||
|
|
|
|||
|
|
@ -38,6 +38,7 @@ Helper scripts available:
|
|||
- `~/bin/npm-api` - Nginx Proxy Manager API
|
||||
- `~/bin/dns` - Technitium DNS API
|
||||
- `~/bin/kuma` - Uptime Kuma monitoring API
|
||||
- `~/bin/beszel` - Beszel server dashboard API
|
||||
|
||||
## Quick Links
|
||||
|
||||
|
|
@ -49,3 +50,4 @@ Helper scripts available:
|
|||
| NPM Admin | http://10.5.0.1:81 |
|
||||
| Dockge | https://dockge.georgsen.dk |
|
||||
| PBS | https://pbs.georgsen.dk |
|
||||
| Dashboard | https://dashboard.georgsen.dk |
|
||||
|
|
|
|||
101
beszel/README.md
Normal file
101
beszel/README.md
Normal file
|
|
@ -0,0 +1,101 @@
|
|||
# Beszel - Server Monitoring Dashboard
|
||||
|
||||
## Overview
|
||||
|
||||
- **Hub URL:** https://dashboard.georgsen.dk (or http://10.5.0.10:8090)
|
||||
- **Credentials:** `~/.config/beszel/credentials`
|
||||
- **Backend:** PocketBase (REST API)
|
||||
- **Retention:** 30 days (automatic averaging)
|
||||
|
||||
## Architecture
|
||||
|
||||
```
|
||||
Hub (Dockge 10.5.0.10:8090)
|
||||
├── core (10.5.0.254:45876) - PVE host
|
||||
└── pbs (10.5.0.6:45876) - Backup server + Synology mount
|
||||
```
|
||||
|
||||
## Helper Script
|
||||
|
||||
```bash
|
||||
~/bin/beszel list # List all systems
|
||||
~/bin/beszel status # Show system metrics
|
||||
~/bin/beszel add <name> <host> [port] # Add a system
|
||||
~/bin/beszel delete <id> # Delete a system
|
||||
~/bin/beszel alerts # List alerts
|
||||
```
|
||||
|
||||
## Adding a New System
|
||||
|
||||
### 1. Install Agent
|
||||
|
||||
```bash
|
||||
# Download binary
|
||||
curl -sL "https://github.com/henrygd/beszel/releases/latest/download/beszel-agent_linux_amd64.tar.gz" | tar -xzf - -C /usr/local/bin beszel-agent
|
||||
chmod +x /usr/local/bin/beszel-agent
|
||||
|
||||
# Create systemd service
|
||||
cat > /etc/systemd/system/beszel-agent.service << 'EOF'
|
||||
[Unit]
|
||||
Description=Beszel Agent
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
Environment="KEY=<SSH_KEY_FROM_CREDENTIALS>"
|
||||
Environment="PORT=45876"
|
||||
ExecStart=/usr/local/bin/beszel-agent
|
||||
Restart=always
|
||||
RestartSec=5
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
|
||||
# Enable and start
|
||||
systemctl daemon-reload
|
||||
systemctl enable beszel-agent
|
||||
systemctl start beszel-agent
|
||||
```
|
||||
|
||||
### 2. Add to Hub
|
||||
|
||||
```bash
|
||||
~/bin/beszel add <name> <host>
|
||||
```
|
||||
|
||||
## Monitoring Extra Filesystems
|
||||
|
||||
To monitor additional mounts (e.g., NFS, CIFS):
|
||||
|
||||
```bash
|
||||
# Add to systemd service
|
||||
Environment="EXTRA_FILESYSTEMS=/mnt/synology,/mnt/other"
|
||||
```
|
||||
|
||||
## API Access
|
||||
|
||||
Beszel uses PocketBase. Python SDK:
|
||||
|
||||
```python
|
||||
from pocketbase import PocketBase
|
||||
|
||||
pb = PocketBase('http://10.5.0.10:8090')
|
||||
pb.admins.auth_with_password(email, password)
|
||||
|
||||
# List systems
|
||||
systems = pb.collection('systems').get_full_list()
|
||||
|
||||
# Add system
|
||||
pb.collection('systems').create({
|
||||
'name': 'hostname',
|
||||
'host': '10.5.0.x',
|
||||
'port': 45876,
|
||||
'users': [user_id]
|
||||
})
|
||||
```
|
||||
|
||||
## References
|
||||
|
||||
- [Beszel GitHub](https://github.com/henrygd/beszel)
|
||||
- [Beszel Docs](https://beszel.dev/)
|
||||
- [PocketBase API](https://pocketbase.io/docs/api-records/)
|
||||
6
beszel/credentials
Normal file
6
beszel/credentials
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
BESZEL_HOST=10.5.0.10
|
||||
BESZEL_PORT=8090
|
||||
BESZEL_USER=msgeorgsen@gmail.com
|
||||
BESZEL_PASS='&vtncQzmH^JI83lYi3Eo'
|
||||
BESZEL_TOKEN=d1e-75b0375149-3117-6dc288f878
|
||||
BESZEL_AGENT_KEY='ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBG7SVFiCYNYBjFUK0cARP+dVmZHXkzeG4CUHbZUWaT8'
|
||||
4
dockge/credentials
Normal file
4
dockge/credentials
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
DOCKGE_HOST=10.5.0.10
|
||||
DOCKGE_PORT=5001
|
||||
DOCKGE_USER=mikkel
|
||||
DOCKGE_PASS='Pq=y]@i5uhJ4Far'
|
||||
|
|
@ -183,6 +183,7 @@ cd /opt/npm && docker compose pull && docker compose up -d
|
|||
| pbs.georgsen.dk | https://10.5.0.6:8007 | Let's Encrypt |
|
||||
| status.georgsen.dk | http://10.5.0.10:3001 | Let's Encrypt |
|
||||
| webmail.georgsen.dk | http://10.5.0.10:8888 | Let's Encrypt |
|
||||
| dashboard.georgsen.dk | http://10.5.0.10:8090 | Let's Encrypt |
|
||||
|
||||
#### 101: Dockge
|
||||
|
||||
|
|
@ -213,6 +214,17 @@ services:
|
|||
- 3001:3001
|
||||
volumes:
|
||||
- ./data:/app/data
|
||||
|
||||
# Beszel (server monitoring dashboard)
|
||||
services:
|
||||
beszel:
|
||||
image: henrygd/beszel:latest
|
||||
container_name: beszel
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- 8090:8090
|
||||
volumes:
|
||||
- ./data:/beszel_data
|
||||
```
|
||||
|
||||
#### 105: Sentry (Defense Intelligence)
|
||||
|
|
@ -573,6 +585,7 @@ Personal company website
|
|||
| Status | https://status.georgsen.dk |
|
||||
| Webmail | https://webmail.georgsen.dk |
|
||||
| JukeBox | https://jukebox.georgsen.dk |
|
||||
| Dashboard | https://dashboard.georgsen.dk or http://10.5.0.10:8090 |
|
||||
|
||||
### Important IPs
|
||||
|
||||
|
|
@ -602,6 +615,16 @@ Personal company website
|
|||
- **Helper:** ~/bin/kuma (list, info, add-http, add-port, add-ping, delete, pause, resume)
|
||||
- **Library:** uptime-kuma-api (Python, installed in ~/venv)
|
||||
|
||||
### Beszel Dashboard API (from mgmt container)
|
||||
|
||||
- **Host:** 10.5.0.10:8090 (Docker in Dockge)
|
||||
- **URL:** https://dashboard.georgsen.dk
|
||||
- **Config:** ~/homelab/beszel/credentials (symlinked to ~/.config/beszel)
|
||||
- **Helper:** ~/bin/beszel (list, status, add, delete, alerts)
|
||||
- **Library:** pocketbase (Python, installed in ~/venv)
|
||||
- **Retention:** 30 days (automatic)
|
||||
- **Agents:** core (10.5.0.254), pbs (10.5.0.6)
|
||||
|
||||
### PVE API (from mgmt container)
|
||||
|
||||
- **Token:** root@pam!mgmt
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue