MayIT Enterprise Monitoring Platform – Projektdokumentation
Diese Projektdokumentation beschreibt das komplette Monitoring-System der MayIT Umgebung:
Netdata Dashboard, NOC Dashboard, NodeJS Monitoring API, Security Monitoring, Health Scores,
Alerts, Betrieb, Troubleshooting sowie Backup- und Recovery-Aspekte.
Scope & Zielbild
Zielbild: Eine zentrale Monitoring-Plattform für Infrastruktur, Webstack, Anwendung
und Security-Telemetrie mit schneller visueller Diagnosefähigkeit.
- Observability: CPU, RAM, Disk, Load, Uptime, Service States.
- Application Monitoring: Nextcloud Status und Web Stack Health.
- Security Monitoring: SSH Angriffe, Fail2Ban Kennzahlen, Attack Trends, GeoIP.
- Operations: Alerts, Health Scores, Troubleshooting und Wiederherstellbarkeit.
Projektziel: Das Monitoring soll nicht nur Zustände anzeigen, sondern operativ verwertbare
Informationen für Diagnose, Security und Betrieb liefern.
Leitprinzip: Kleine, stabile Änderungen – kein unkontrolliertes Umbauen funktionierender
Zustände. Vor jeder größeren Anpassung werden Backups von index.html und
server.js erstellt.
System- und Monitoring-Architektur
Architekturprinzip: Infrastruktur + Security + Dashboard + API
| Layer | Komponente | Funktion |
|---|---|---|
| Infrastructure | Netcup VPS / Debian / YunoHost | Basisplattform |
| Application | Nextcloud | Datei- und Collaboration-Plattform |
| Web Stack | nginx, PHP-FPM, MariaDB | Webserver, Runtime, Datenbank |
| Security | Fail2Ban, SSH Logs | Angriffs- und Bann-Telemetrie |
| Monitoring | Netdata | Realtime Infrastruktur-Metriken |
| Monitoring API | mayit-monitor (NodeJS) | Aggregierter enterprise-report |
| Visualization | NOC Dashboard | Enterprise Monitoring Oberfläche |
Kernidee: Netdata liefert die Infrastruktur-Metriken. Die NodeJS Monitoring API sammelt
zusätzliche Betriebs- und Security-Daten und stellt diese in einer einheitlichen Text-API bereit.
Das NOC Dashboard visualisiert diese Werte in Kacheln, Tabellen, Trends und Karten.
User / Operator
│
├── Netdata Dashboard (mitmonitor.mayit.eu)
└── NOC Dashboard (mitmonitor.mayit.eu/noc)
│
mayit-monitor (NodeJS / enterprise-report)
│
┌───────────────────┼────────────────────┐
│ │ │
nginx PHP-FPM MariaDB
│ │ │
Nextcloud Fail2Ban / SSH Logs
Dashboards & Zugriffe
Netdata Dashboard
https://mitmonitor.mayit.eu/#menu_system_submenu_cpu;after=-540;before=0;theme=slate;utc=Europe/Berlin
Zweck: Realtime Infrastrukturmonitoring für CPU, RAM, Load, Netzwerk, Prozesse und Systemperformance.
NOC Dashboard
https://mitmonitor.mayit.eu/noc
Zweck: Operatives Enterprise Dashboard mit Systemstatus, Security, Attack Intelligence, Alerts und Reports.
Zugriffsschutz: Der Bereich /noc ist per HTTP Basic Authentication abgesichert
und darf nicht öffentlich ungeschützt erreichbar sein.
Monitoring Backend / enterprise-report
Backend-Komponente
- Datei: /opt/mayit-monitor/server.js
- Service: mayit-monitor
- Runtime: NodeJS / Express
- Port: 3000
API Endpoint
curl http://127.0.0.1:3000/enterprise-report
| Wert | Bedeutung | Quelle |
|---|---|---|
| Load | Systemlast | uptime |
| CPU_Usage | aktuelle CPU Auslastung | /proc/stat |
| RAM | belegter vs. gesamter RAM | free -m |
| Disk | belegter vs. gesamter Speicherplatz | df -h / |
| Backup* | Status, Alter, letzter Lauf | Backup-Verzeichnis |
| Fail2ban_* | Jails, Bans, Failed, Total Banned | fail2ban-client |
| SSH_Attacks* | 24h, 60m und Attacks/min | journalctl / sshd |
| Top_Attacker* | häufigste Angreifer-IP | journalctl / sshd |
| GeoIP_Countries | Angriffsländer | geoiplookup |
| Attack_Trend_24h / 7d | Angriffsverlauf | journalctl / Aggregation |
| nginx_Status | Servicezustand | systemctl |
| MariaDB_Status | Servicezustand | systemctl |
| PHP_FPM_Status | Servicezustand | systemctl |
| Nextcloud_Status | App-/OCC-Zustand | php occ status |
| Services | globaler Fehlerservice-Indikator | systemctl –failed |
Dashboard-Kacheln
System & Infrastruktur
| Kachel | Inhalt |
|---|---|
| CPU Load | Load Average |
| CPU Usage | Momentane CPU Auslastung |
| Disk Usage | Belegter Speicher / Prozentwert |
| RAM Usage | Genutzter Arbeitsspeicher / Prozentwert |
| Uptime | Systemlaufzeit |
| Backup Status | Backup erfolgreich / fehlgeschlagen |
| Backup Age | Tage seit letztem Backup |
| Last Backup | Zeitpunkt des letzten Backups |
| Health Score | Gesamtsystembewertung |
| Services | Fehlerfreie / fehlerhafte Systemdienste |
Web Stack & Security
| Kachel | Inhalt |
|---|---|
| Nextcloud Status | installed / version / maintenance / needsDbUpgrade |
| Nextcloud Health | Health Score für Nextcloud |
| MariaDB Status | Servicezustand |
| MariaDB Health | Health Score für MariaDB |
| PHP-FPM Status | Servicezustand |
| PHP-FPM Health | Health Score für PHP-FPM |
| nginx Status | Servicezustand |
| nginx Health | Health Score für nginx |
| Web Stack Health | Gesamtscore aus nginx, PHP-FPM, MariaDB, Nextcloud |
| Security Risk | Risikobewertung aus Angriffs- und Systemwerten |
Fail2Ban & SSH
| Kachel | Inhalt |
|---|---|
| Fail2Ban Jails | Anzahl aktiver Jails |
| Fail2Ban Banned | Aktuell gebannte IPs |
| Fail2Ban Failed | Aktuell fehlgeschlagene Logins |
| Fail2Ban Total Banned | Historisch insgesamt gebannte IPs |
| SSH Attacks (24h) | Erkannte SSH Login-Angriffe der letzten 24h |
| SSH Attacks (60m) | Erkannte SSH Login-Angriffe der letzten 60 Minuten |
| Attacks / Min | SSH Angriffsrate pro Minute |
Attack Intelligence
| Element | Inhalt |
|---|---|
| Top 10 Attackers | Rangliste der häufigsten Angreifer-IP-Adressen |
| Attack Countries | GeoIP Länder, Codes, Attack Count und Share |
| Attack Map | Weltkarte der Angriffsherkunft |
| Attack Trend 24h | Liniendiagramm der Angriffe pro Stunde |
| Attack Trend 7d | Balkendiagramm der Angriffe pro Tag |
| Enterprise Report | Strukturierte Betriebsübersicht |
| Security Report | Security-Fokus mit SSH/Fail2Ban/Backup |
| System Alerts | Aktive Warnungen und kritische Ereignisse |
Health-Scores & Bewertungslogik
Health Score
Globaler Infrastruktur-Score, berechnet aus CPU, RAM, Disk, Backup, Services, Bans und SSH-Angriffen.
| Einfluss | Bewertung |
|---|---|
| CPU Usage | Abzug bei hoher Last |
| RAM Usage | Abzug ab erhöhtem Verbrauch |
| Disk Usage | starker Abzug ab hoher Auslastung |
| Backup != OK | kritischer Abzug |
| Services != OK | kritischer Abzug |
| Fail2Ban Banned | moderater Abzug bei erhöhtem Wert |
| SSH Attacks 24h | moderater Abzug bei hoher Angriffszahl |
Security Risk
Eigenständige Risikokachel, fokussiert auf Angriffe, Fail2Ban, Backup und kritische Systemgrenzen.
| Einfluss | Bewertung |
|---|---|
| SSH Attacks 24h | mehr Angriffe = höheres Risiko |
| SSH Attacks 60m | Attack-Rate erhöht Risiko |
| Fail2Ban Banned | hohe Bann-Aktivität erhöht Risiko |
| Backup != OK | kritischer Risikosprung |
| RAM > 90% | kritischer Abzug |
| Disk > 90% | kritischer Abzug |
| Services != OK | kritischer Abzug |
Nextcloud Health
Startwert 100.
Abzug, wenn:
Startwert 100.
Abzug, wenn:
- installed != true
- maintenance != false
- needsDbUpgrade != false
MariaDB Health
Startwert 100.
Aktuell einfache Bewertung:
Startwert 100.
Aktuell einfache Bewertung:
- Service active = 100
- Service != active = 0
PHP-FPM / nginx Health
Ebenfalls servicebasiert:
Ebenfalls servicebasiert:
- active = 100
- inactive / failed = 0
Web Stack Health: Kombinierter Score aus nginx, PHP-FPM, MariaDB und Nextcloud.
Ein Ausfall oder eine negative Bewertung eines Bestandteils reduziert den Gesamtscore.
Security Monitoring
SSH Monitoring
- Auswertung der SSH Login-Logs via journalctl
- Trennung in 24h und 60m Kennzahlen
- Berechnung einer Attack-Rate pro Minute
- Identifikation der häufigsten Angreifer-IP
- Aggregation zu Top 10 Attackers
Fail2Ban Monitoring
- Aktive Jails
- Aktuell gebannte IPs
- Aktuell fehlgeschlagene Logins
- Historische Gesamtzahl gebannter IPs
- Einbindung in Security Risk und Security Report
GeoIP Intelligence
- GeoIP Lookup der Top Angreifer
- Aggregation nach Ländern
- Anzeige im Attack Countries Table
- Visualisierung in der Attack Map
Trend Monitoring
- Attack Trend 24h: Stundenbasierte Aggregation
- Attack Trend 7d: Tagesbasierte Aggregation
- Früherkennung von Angriffsspitzen
- Grundlage für Spike Detection Alerts
Alerts & Eskalation
Aktive Alert-Logik
| Alert | Trigger | Level |
|---|---|---|
| Backup failed | Backup != OK | Critical |
| Backup older than 7 days | Backup_Age_Days > 7 | Critical |
| Backup older than 3 days | Backup_Age_Days > 3 | Warning |
| RAM usage above 90% | RAM > 90% | Critical |
| Disk usage above 90% | Disk > 90% | Critical |
| Failed system services | Services != OK | Critical |
| High SSH attack volume | SSH 60m > 200 | Warning |
| SSH attack spike | Attacks/min > 5 oder > 10 | Warning / Critical |
Alert Panel Verhalten
- Keine ausgelösten Bedingungen = No alerts
- Mehrere Bedingungen = Liste mehrerer Warnungen/Kritika
- Alert Panel dient als operativer Sofortindikator
- Priorisierung: Critical vor Warning
Beispiel: CRITICAL: Backup failed CRITICAL: RAM usage above 90% WARNING: Elevated SSH attack rate (>5 attacks/min)
Betrieb & Aufgabenmodell
Daily
- NOC Dashboard prüfen
- System Alerts prüfen
- Health- und Risk-Scores plausibilisieren
- Web Stack Status prüfen
Weekly
- Backup-Zustand prüfen
- Attack Trends prüfen
- Fail2Ban Kennzahlen prüfen
- Top Attackers / Countries bewerten
Monthly
- Restore-Test / Backup-Verifizierung
- Review der Alert-Schwellen
- Review der API- und Dashboard-Konfiguration
- Service- und Log-Pfade validieren
Troubleshooting
Monitoring Backend prüfen
sudo systemctl status mayit-monitor sudo systemctl restart mayit-monitor curl http://127.0.0.1:3000/enterprise-report | head -n 50
Web Stack prüfen
systemctl status nginx systemctl status mariadb systemctl status php8.3-fpm sudo -u nextcloud php8.3 /var/www/nextcloud/occ status
Security prüfen
sudo fail2ban-client status sudo fail2ban-client status sshd journalctl --since "24 hours ago" -t sshd | grep -Ei "Failed password|Invalid user" | wc -l
NOC Zugriff prüfen
curl -I https://mitmonitor.mayit.eu/noc/ curl -u USER:PASS -I https://mitmonitor.mayit.eu/noc/
Typische Fehlerbilder
- Dashboard lädt nicht: Fehler in index.html oder API nicht erreichbar.
- Werte bleiben auf loading: Parser in loadReport() oder fehlende API-Zeilen.
- Attack Trend zeigt falsche Daten: Zusätzliche Statuszeilen wurden vor Services: im API-Output ausgegeben.
- nginx/MariaDB/PHP-FPM unknown: API-Zeile fehlt oder Regex im Frontend falsch.
Backup & Recovery
Kritische Dateien
- /opt/mayit-monitor/index.html
- /opt/mayit-monitor/server.js
cp /opt/mayit-monitor/index.html /opt/mayit-monitor/index.html.backup_$(date +%Y%m%d_%H%M) cp /opt/mayit-monitor/server.js /opt/mayit-monitor/server.js.backup_$(date +%Y%m%d_%H%M)
Recovery
cp /opt/mayit-monitor/index.html.backup_YYYYMMDD_HHMM /opt/mayit-monitor/index.html cp /opt/mayit-monitor/server.js.backup_YYYYMMDD_HHMM /opt/mayit-monitor/server.js sudo systemctl restart mayit-monitor
Prinzip: Vor jeder Änderung Backup, bei Problemen sofort Rollback auf letzten stabilen Stand.
Anhang
| Element | Pfad / Zweck |
|---|---|
| NOC Frontend | /opt/mayit-monitor/index.html |
| Monitoring Backend | /opt/mayit-monitor/server.js |
| Monitoring Service | mayit-monitor.service |
| API Endpoint lokal | http://127.0.0.1:3000/enterprise-report |
| Dashboard URL | https://mitmonitor.mayit.eu/noc |
| Netdata URL | https://mitmonitor.mayit.eu |
| nginx NOC Config | /etc/nginx/conf.d/mitmonitor.mayit.eu.d/noc.conf |
Autor: MayIT – Projektdokumentation MayIT Enterprise Monitoring Platform
