Projektdokumentation – MayIT Enterprise Monitoring Platform

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.
Autor: MayIT Netdata + NOC Dashboard Security Monitoring Web Stack Health Operations Dokumentation

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
LayerKomponenteFunktion
InfrastructureNetcup VPS / Debian / YunoHostBasisplattform
ApplicationNextcloudDatei- und Collaboration-Plattform
Web Stacknginx, PHP-FPM, MariaDBWebserver, Runtime, Datenbank
SecurityFail2Ban, SSH LogsAngriffs- und Bann-Telemetrie
MonitoringNetdataRealtime Infrastruktur-Metriken
Monitoring APImayit-monitor (NodeJS)Aggregierter enterprise-report
VisualizationNOC DashboardEnterprise 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
WertBedeutungQuelle
LoadSystemlastuptime
CPU_Usageaktuelle CPU Auslastung/proc/stat
RAMbelegter vs. gesamter RAMfree -m
Diskbelegter vs. gesamter Speicherplatzdf -h /
Backup*Status, Alter, letzter LaufBackup-Verzeichnis
Fail2ban_*Jails, Bans, Failed, Total Bannedfail2ban-client
SSH_Attacks*24h, 60m und Attacks/minjournalctl / sshd
Top_Attacker*häufigste Angreifer-IPjournalctl / sshd
GeoIP_CountriesAngriffsländergeoiplookup
Attack_Trend_24h / 7dAngriffsverlaufjournalctl / Aggregation
nginx_StatusServicezustandsystemctl
MariaDB_StatusServicezustandsystemctl
PHP_FPM_StatusServicezustandsystemctl
Nextcloud_StatusApp-/OCC-Zustandphp occ status
Servicesglobaler Fehlerservice-Indikatorsystemctl –failed

Dashboard-Kacheln

System & Infrastruktur
KachelInhalt
CPU LoadLoad Average
CPU UsageMomentane CPU Auslastung
Disk UsageBelegter Speicher / Prozentwert
RAM UsageGenutzter Arbeitsspeicher / Prozentwert
UptimeSystemlaufzeit
Backup StatusBackup erfolgreich / fehlgeschlagen
Backup AgeTage seit letztem Backup
Last BackupZeitpunkt des letzten Backups
Health ScoreGesamtsystembewertung
ServicesFehlerfreie / fehlerhafte Systemdienste
Web Stack & Security
KachelInhalt
Nextcloud Statusinstalled / version / maintenance / needsDbUpgrade
Nextcloud HealthHealth Score für Nextcloud
MariaDB StatusServicezustand
MariaDB HealthHealth Score für MariaDB
PHP-FPM StatusServicezustand
PHP-FPM HealthHealth Score für PHP-FPM
nginx StatusServicezustand
nginx HealthHealth Score für nginx
Web Stack HealthGesamtscore aus nginx, PHP-FPM, MariaDB, Nextcloud
Security RiskRisikobewertung aus Angriffs- und Systemwerten
Fail2Ban & SSH
KachelInhalt
Fail2Ban JailsAnzahl aktiver Jails
Fail2Ban BannedAktuell gebannte IPs
Fail2Ban FailedAktuell fehlgeschlagene Logins
Fail2Ban Total BannedHistorisch 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 / MinSSH Angriffsrate pro Minute
Attack Intelligence
ElementInhalt
Top 10 AttackersRangliste der häufigsten Angreifer-IP-Adressen
Attack CountriesGeoIP Länder, Codes, Attack Count und Share
Attack MapWeltkarte der Angriffsherkunft
Attack Trend 24hLiniendiagramm der Angriffe pro Stunde
Attack Trend 7dBalkendiagramm der Angriffe pro Tag
Enterprise ReportStrukturierte Betriebsübersicht
Security ReportSecurity-Fokus mit SSH/Fail2Ban/Backup
System AlertsAktive Warnungen und kritische Ereignisse

Health-Scores & Bewertungslogik

Health Score

Globaler Infrastruktur-Score, berechnet aus CPU, RAM, Disk, Backup, Services, Bans und SSH-Angriffen.

EinflussBewertung
CPU UsageAbzug bei hoher Last
RAM UsageAbzug ab erhöhtem Verbrauch
Disk Usagestarker Abzug ab hoher Auslastung
Backup != OKkritischer Abzug
Services != OKkritischer Abzug
Fail2Ban Bannedmoderater Abzug bei erhöhtem Wert
SSH Attacks 24hmoderater Abzug bei hoher Angriffszahl
Security Risk

Eigenständige Risikokachel, fokussiert auf Angriffe, Fail2Ban, Backup und kritische Systemgrenzen.

EinflussBewertung
SSH Attacks 24hmehr Angriffe = höheres Risiko
SSH Attacks 60mAttack-Rate erhöht Risiko
Fail2Ban Bannedhohe Bann-Aktivität erhöht Risiko
Backup != OKkritischer Risikosprung
RAM > 90%kritischer Abzug
Disk > 90%kritischer Abzug
Services != OKkritischer Abzug
Nextcloud Health
Startwert 100.
Abzug, wenn:
  • installed != true
  • maintenance != false
  • needsDbUpgrade != false
MariaDB Health
Startwert 100.
Aktuell einfache Bewertung:
  • Service active = 100
  • Service != active = 0
PHP-FPM / nginx Health
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
AlertTriggerLevel
Backup failedBackup != OKCritical
Backup older than 7 daysBackup_Age_Days > 7Critical
Backup older than 3 daysBackup_Age_Days > 3Warning
RAM usage above 90%RAM > 90%Critical
Disk usage above 90%Disk > 90%Critical
Failed system servicesServices != OKCritical
High SSH attack volumeSSH 60m > 200Warning
SSH attack spikeAttacks/min > 5 oder > 10Warning / 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

ElementPfad / Zweck
NOC Frontend/opt/mayit-monitor/index.html
Monitoring Backend/opt/mayit-monitor/server.js
Monitoring Servicemayit-monitor.service
API Endpoint lokalhttp://127.0.0.1:3000/enterprise-report
Dashboard URLhttps://mitmonitor.mayit.eu/noc
Netdata URLhttps://mitmonitor.mayit.eu
nginx NOC Config/etc/nginx/conf.d/mitmonitor.mayit.eu.d/noc.conf