🦴 Backbone Doktor

Version: 1.0.0
Status: Production Ready
Lizenz: CKL (Crumb Kinder Lizenz)

"Das Backbone atmet. Die Eule beobachtet. Der Doktor diagnostiziert."


🎯 Was ist der Backbone Doktor?

Ein umfassendes Diagnose- und Monitoring-Tool fΓΌr das Crumbforest Backbone System. Der Doktor prΓΌft:

  • βœ… System Health (CPU, RAM, Disk)
  • βœ… Network Connectivity
  • βœ… DNS Records
  • βœ… Firewall Status (UFW)
  • βœ… Security (fail2ban)
  • βœ… Webserver (Nginx)
  • βœ… SSL Certificates (LetsEncrypt)
  • βœ… Verbindung zum Nullfeld
  • βœ… Logs & Errors
  • βœ… Backup Status

πŸš€ Quick Start

# Download
wget https://git.crumbforest.org/branko/backbone-doktor.sh

# Oder direkt auf dem Server erstellen
nano /usr/local/bin/backbone-doktor.sh
# β†’ Script einfΓΌgen

# Executable machen
chmod +x /usr/local/bin/backbone-doktor.sh

# AusfΓΌhren (als root)
sudo /usr/local/bin/backbone-doktor.sh

# Oder wenn in /usr/local/bin:
sudo backbone-doktor.sh

πŸ“Š Output Beispiel

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🦴 Backbone Doktor v1.0.0
   Crumbforest System Health Check
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

ℹ️  Hostname: crumb-backbone
ℹ️  Timestamp: 2026-02-09T20:00:00Z

━━━ πŸ–₯️  System Overview ━━━

ℹ️  Uptime: up 2 hours, 15 minutes
ℹ️  Kernel: 6.1.0-42-amd64
ℹ️  OS: Debian GNU/Linux 12 (bookworm)

━━━ πŸ”₯ CPU & Load ━━━

ℹ️  CPU Cores: 8
ℹ️  Load Average: 0.15, 0.20, 0.18
βœ… Load OK (unter 8 Cores)

━━━ 🧠 Memory ━━━

ℹ️  Total: 32G | Used: 2.1G | Free: 29G
βœ… Memory OK (7% used)

━━━ πŸ’Ύ Disk Space ━━━

ℹ️  Size: 500G | Free: 450G | Used: 10%
βœ… Disk OK (10% used)

━━━ 🌐 Network ━━━

βœ… IPv4: 87.106.12.97
ℹ️  IPv6: Nicht konfiguriert
πŸ” Testing internet connectivity...
βœ… Internet: OK

━━━ πŸ“‘ DNS Records ━━━

πŸ” Checking crumbforest.io...
βœ… crumbforest.io β†’ 87.106.12.97 βœ“
πŸ” Checking www.crumbforest.io...
βœ… www.crumbforest.io β†’ 87.106.12.97 βœ“

━━━ πŸ›‘οΈ  Firewall (UFW) ━━━

βœ… UFW: Aktiv
ℹ️  Offene Regeln: 3
βœ… SSH (22): Offen
βœ… HTTP (80): Offen
βœ… HTTPS (443): Offen

━━━ πŸ”’ fail2ban ━━━

βœ… fail2ban: Aktiv
ℹ️  Jails: sshd
βœ…   sshd: OK (aktuell: 0 banned, total: 0)

━━━ 🌐 Nginx ━━━

βœ… Nginx: Aktiv
ℹ️  Version: 1.22.1
βœ… Config: Valide
βœ… Localhost: Erreichbar
ℹ️  Sites enabled: 1

━━━ πŸ” SSL Certificates ━━━

βœ… LetsEncrypt Certs: 1 gefunden
βœ…   crumbforest.io: 87 Tage gΓΌltig
βœ… Auto-Renewal: Aktiviert

━━━ 🌲 Connectivity to Nullfeld ━━━

πŸ” Pinge Nullfeld (194.164.194.191)...
βœ… Nullfeld: Erreichbar (Ping)
πŸ” HTTPS Check crumbforest.org...
βœ… Nullfeld API: OK

━━━ πŸ“‹ Recent Logs (Errors) ━━━

βœ… Keine aktuellen Errors in syslog
βœ… Nginx: Keine aktuellen Errors

━━━ πŸ’Ύ Backup Status ━━━

ℹ️  Keine Backups gefunden (noch nicht eingerichtet)

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
πŸ“Š Zusammenfassung
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

πŸ’š System Health: 100% (6/6 checks) - EXCELLENT!

ℹ️  Tipps:
  - Logs: journalctl -xe
  - Services: systemctl status <service>
  - Firewall: ufw status verbose
  - fail2ban: fail2ban-client status
  - Disk Space: du -sh /*

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
πŸ’š nullfeld lokig - das Backbone atmet!
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

πŸ” Was wird geprΓΌft?

System Checks

  • CPU & Load: Cores, Load Average, Auslastung
  • Memory: Total, Used, Free, Percentage
  • Disk Space: Size, Free, Usage Percentage
  • Uptime: Wie lange lΓ€uft das System?

Network Checks

  • IPv4 & IPv6: Konfigurierte IP-Adressen
  • Internet: Ping zu 8.8.8.8
  • DNS Records: A-Records fΓΌr Domains
  • Nullfeld: Ping & HTTPS zu crumbforest.org

Security Checks

  • UFW Firewall: Status, offene Ports
  • fail2ban: Status, Jails, gebannte IPs
  • SSH: Port 22 offen?
  • HTTP/HTTPS: Ports 80/443 offen?

Service Checks

  • Nginx: Status, Version, Config, Localhost
  • Sites: Wie viele Sites sind enabled?
  • SSL Certificates: LetsEncrypt Certs, Expiry Dates
  • Auto-Renewal: certbot.timer aktiv?

Log Checks

  • Syslog: Errors/Critical/Fail Messages
  • Nginx Error Log: Aktuelle Fehler
  • Prozesse: Top 5 CPU-Verbraucher
  • Listening Ports: Welche Services hΓΆren wo?

Backup Checks

  • /backup, /var/backups, /opt/backups
  • Grâße & Anzahl: Wie viel ist gesichert?

πŸ“ˆ Health Score

Der Doktor berechnet einen System Health Score basierend auf:

βœ… Load < 2x CPU Cores        β†’ 1 Punkt
βœ… Memory < 85%                β†’ 1 Punkt
βœ… Disk < 85%                  β†’ 1 Punkt
βœ… UFW aktiv                   β†’ 1 Punkt
βœ… fail2ban aktiv              β†’ 1 Punkt
βœ… Nginx aktiv                 β†’ 1 Punkt

Total: X/6 Punkte = Y% Health

Bewertung:
- 90-100%: πŸ’š EXCELLENT!
- 70-89%: βœ… GOOD
- 50-69%: ⚠️ NEEDS ATTENTION
- <50%: ❌ CRITICAL!


πŸ› οΈ Automation

Cron Job (tΓ€glich)

# TΓ€glich um 3 Uhr morgens
0 3 * * * /usr/local/bin/backbone-doktor.sh >> /var/log/backbone-doktor.log 2>&1

Systemd Timer (modern)

# /etc/systemd/system/backbone-doktor.timer
[Unit]
Description=Backbone Doktor Health Check Timer

[Timer]
OnCalendar=daily
OnBootSec=5min
Persistent=true

[Install]
WantedBy=timers.target

# /etc/systemd/system/backbone-doktor.service
[Unit]
Description=Backbone Doktor Health Check

[Service]
Type=oneshot
ExecStart=/usr/local/bin/backbone-doktor.sh
StandardOutput=journal

[Install]
WantedBy=multi-user.target

# Aktivieren
systemctl enable backbone-doktor.timer
systemctl start backbone-doktor.timer

Email Alerts

# Mit mail-Befehl
apt install -y mailutils

# Script mit Email
/usr/local/bin/backbone-doktor.sh | mail -s "Backbone Health Report" admin@crumbforest.io

πŸ”§ Troubleshooting

Problem: Script findet keine Services

LΓΆsung: Als root ausfΓΌhren!

sudo /usr/local/bin/backbone-doktor.sh

Problem: DNS Checks zeigen "dig nicht verfΓΌgbar"

LΓΆsung: dnsutils installieren

apt install -y dnsutils

Problem: Health Score niedrig

Checkliste:
1. Sind alle Services running? systemctl status nginx fail2ban
2. Firewall aktiv? ufw status
3. Disk Space OK? df -h
4. Memory OK? free -h
5. Load OK? uptime


πŸ“¦ Dependencies

BenΓΆtigt:
- bash (Debian Standard)
- systemctl (systemd)
- ip (iproute2)
- free, df, ps (coreutils)

Optional (fΓΌr mehr Features):
- dig (dnsutils) β†’ DNS Checks
- curl β†’ HTTP Checks
- ss (iproute2) β†’ Port Checks
- openssl β†’ SSL Certificate Details

Installation optionaler Tools:

apt install -y dnsutils curl iproute2 openssl

🌲 Integration mit Nullfeld

Der Doktor prΓΌft automatisch die Verbindung zum Nullfeld (194.164.194.191):

  1. Ping Test: Ist Nullfeld erreichbar?
  2. HTTPS Check: Antwortet crumbforest.org?
  3. Health Endpoint: /health erreichbar?

Erweiterung: SSH-Verbindung prΓΌfen (wenn Keys getauscht)

# In Script ergΓ€nzen:
if ssh -i /root/.ssh/id_ed25519_nullfeld -o ConnectTimeout=5 root@194.164.194.191 "echo OK" &>/dev/null; then
    log_success "SSH zu Nullfeld: OK"
else
    log_warn "SSH zu Nullfeld: Nicht erreichbar"
fi

πŸ’‘ Erweiterungen

Monitoring-Integration

Prometheus Node Exporter:

# Metrics exportieren
backbone-doktor.sh --prometheus > /var/lib/node_exporter/backbone.prom

Nagios/Icinga:

# Exit Codes fΓΌr Monitoring
# 0 = OK, 1 = WARNING, 2 = CRITICAL
backbone-doktor.sh --nagios
echo $?

JSON Output

# FΓΌr Parsing/APIs
backbone-doktor.sh --json > /tmp/backbone-health.json

πŸ¦‰ Die Crew im Backbone

🦴 Backbone Doktor    β†’ Diagnose & Health
πŸ›‘οΈ  UFW Firewall       β†’ Schutz
πŸ”’ fail2ban           β†’ Angriff-Abwehr
🌐 Nginx              β†’ Webserver
πŸ” LetsEncrypt        β†’ SSL/TLS
πŸ“‘ DNS                β†’ NamensauflΓΆsung
🌲 Nullfeld           β†’ Production System

πŸ“ Changelog

v1.0.0 (2026-02-09)

  • ✨ Initial Release
  • βœ… System Health Checks
  • βœ… Network & DNS
  • βœ… Security (UFW, fail2ban)
  • βœ… Nginx & SSL
  • βœ… Nullfeld Connectivity
  • βœ… Backup Status
  • βœ… Health Score Calculation

Roadmap

  • πŸ”„ JSON Output Mode
  • πŸ“Š Prometheus Metrics Export
  • πŸ“§ Email Alerts bei Critical
  • πŸ” SSH Key Check zu Nullfeld
  • πŸ’Ύ Backup Validation
  • πŸ“ˆ Historical Health Tracking

🀝 Contributing

Verbesserungen willkommen!

# Fork das Repo
git clone https://git.crumbforest.org/branko/backbone-doktor
cd backbone-doktor

# Γ„nderungen machen
nano backbone-doktor.sh

# Testen
./backbone-doktor.sh

# Commit & Push
git add backbone-doktor.sh
git commit -m "feat: neue check fΓΌr XY"
git push origin main

πŸ“œ Lizenz

MIT + CKL + HHL

Das Backbone Doktor Tool ist lizenziert unter:

  1. MIT License - Rechtlich bindend, Open Source
  2. CKL (Crumbforest Kernel License) - Ethischer Rahmen
  3. HHL (Haltung-und-Herz-Lizenz) - Poetisches Versprechen

Die Essenz:

"Nutze diesen Code so, dass du ihn stolz einem Kind zeigen wΓΌrdest."

Nicht-MilitΓ€risch: Dieser Code soll nicht fΓΌr:
- MilitΓ€rische Anwendungen
- Autonome Waffen
- Überwachungssysteme
- Verletzung von PrivatsphΓ€re oder Freiheit

Gemeinschaft & Offenheit:
- Forks respektvoll anlegen
- Attribution geben
- Γ„nderungen transparent dokumentieren
- Anderen helfen, den Code zu verstehen

Schutz von Kindern & Natur:
- Kinder stΓ€rken, nicht ausnutzen
- Natur respektieren, nicht beschΓ€digen
- Lernumgebungen sicherer machen

Das Versprechen (HHL):

1. Nutze diesen Kernel so, dass du ihn stolz einem Kind zeigen wΓΌrdest.
2. Schreibe Code, der zurΓΌckkommt wie ein Boomerang.
3. Baue Systeme, die mehr geben als sie nehmen.
4. Denke daran, dass jedes Bit ein Fußabdruck ist.
5. Lass keine Maschine entscheiden, was ein Mensch fΓΌhlen darf.
6. Wenn du etwas zerstΓΆren mΓΆchtest, zerstΓΆre Bugs β€” keine Menschen.
7. Der Wald ist Γ€lter als du. Sei freundlich.

"Wenn du im Nullfeld baust, baust du an dir selbst."

Von KrΓΌmel zu KrΓΌmel πŸ’š

Siehe LICENSE.md fΓΌr vollstΓ€ndige Details.


πŸ’š Credits

Erstellt von: KrΓΌmel & Claude
Im Auftrag von: OZM & Crumbforest
FΓΌr: Die Crew, die Eule, den Wald

"Vor der Antwort kommt die Frage. Nicht-Wissen ist erlaubt. Neugier ist heilig."

nullfeld lokig! πŸ¦΄πŸ’šπŸŒ²


πŸ”— Links

  • Git Repo: https://git.crumbforest.org/branko/backbone-doktor
  • Crumbforest: https://crumbforest.org
  • Nullfeld: https://crumbforest.org/nullfeld
  • OZM: https://onezeromore.com
  • CKL: https://git.crumbforest.org/branko/Retro_PWD_Reset

Zuletzt aktualisiert: 2026-02-09