Add exitnode-bw.sh: Tailscale Exit-Node Bandbreiten-Monitor
- Zeigt Up/Download-Bandbreite ausgewählter Geräte - Balkendiagramm mit gum - Partial-Match für Gerätenamen (case-insensitive) - Mindest-Balkenlänge bei Aktivität - Online/Offline-Status Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
This commit is contained in:
73
README.md
73
README.md
@ -1,3 +1,74 @@
|
||||
# tailscale-tools
|
||||
|
||||
Scripts für Tailscale Exit-Node Monitoring und mehr
|
||||
Scripts für Tailscale Exit-Node Monitoring und mehr.
|
||||
|
||||
## exitnode-bw.sh
|
||||
|
||||
Zeigt die Up-/Download-Bandbreite ausgewählter Geräte an, die über einen Tailscale Exit-Node verbunden sind.
|
||||
|
||||
### Vorschau
|
||||
|
||||
```
|
||||
⇅ Exit-Node Traffic 12:45:30
|
||||
|
||||
● PC7-77 ↑ ████████████████████ 12.34 Mbit/s ↓ ██████ 3.21 Mbit/s
|
||||
● s22-von-alf ↑ ██ 0.45 Mbit/s ↓ █ 0.12 Mbit/s
|
||||
|
||||
Interval: 5s | Geräte: PC7-77 s22 | Strg+C zum Beenden
|
||||
```
|
||||
|
||||
### Voraussetzungen
|
||||
|
||||
```bash
|
||||
# Tailscale CLI
|
||||
curl -fsSL https://tailscale.com/install.sh | sh
|
||||
|
||||
# jq (JSON-Prozessor)
|
||||
sudo apt install jq # Debian/Ubuntu
|
||||
sudo pacman -S jq # Arch
|
||||
brew install jq # macOS
|
||||
|
||||
# gum (für hübsche Terminal-Ausgabe)
|
||||
# https://github.com/charmbracelet/gum
|
||||
```
|
||||
|
||||
### Installation
|
||||
|
||||
```bash
|
||||
git clone gitea:alf/tailscale-tools.git
|
||||
cd tailscale-tools
|
||||
chmod +x exitnode-bw.sh
|
||||
```
|
||||
|
||||
### Benutzung
|
||||
|
||||
```bash
|
||||
./exitnode-bw.sh
|
||||
```
|
||||
|
||||
### Konfiguration
|
||||
|
||||
Im Script anpassen:
|
||||
|
||||
```bash
|
||||
INTERVAL=5 # Aktualisierungsintervall in Sekunden
|
||||
BARWIDTH=40 # Breite der Balken in Zeichen
|
||||
MIN_BAR=1 # Mindest-Balkenlänge bei Aktivität
|
||||
DEVICES=("PC7-77" "s22") # Geräte (Partial-Match, case-insensitive)
|
||||
```
|
||||
|
||||
### Funktionsweise
|
||||
|
||||
1. Erfasst alle 5 Sekunden den Status von `tailscale status --json`
|
||||
2. Berechnet die Differenz der übertragenen Bytes (Tx/Rx) zwischen zwei Messungen
|
||||
3. Zeigt Upload (↑) und Download (↓) als Balkendiagramm an
|
||||
4. Skaliert die Balken relativ zum Gerät mit der höchsten Bandbreite
|
||||
|
||||
### Legende
|
||||
|
||||
| Symbol | Bedeutung |
|
||||
|--------|-----------|
|
||||
| ● | Gerät ist online im Tailnet |
|
||||
| ○ | Gerät ist offline |
|
||||
| ↑ | Upload (Tx) |
|
||||
| ↓ | Download (Rx) |
|
||||
|
||||
Reference in New Issue
Block a user