OpenHab Log Viewer
Live-Ansicht für die openHAB-Protokolle im Browser: Filter nach Quelle, Level und Text, Streaming per Server-Sent Events, jede Logzeile bleibt als eigene Zeile sichtbar.

Überblick
Der OpenHab Log Viewer macht die beiden wichtigsten openHAB-Protokolle im Browser lesbar, ohne sich per SSH auf den Rechner zu verbinden. Er verfolgt events.log und openhab.log gleichzeitig, lädt beim Öffnen die letzten Zeilen und hängt danach neue Zeilen live an.
Neue Zeilen erreichen den Browser über Server-Sent Events, nicht über wiederholtes Abfragen. Client und Server arbeiten mit begrenzten Ringpuffern, damit die Ansicht auch bei hohem Protokollaufkommen bedienbar bleibt. Der Server wird zu einer einzelnen Datei gebündelt, auf dem Zielrechner ist deshalb nur Node.js nötig, keine Paketinstallation.
Beim Darstellen bleibt jede physische Zeile der Datei eine eigene Zeile in der Oberfläche. Fortsetzungszeilen, etwa aus Stacktraces, stehen in eigenen Zeilen, gehören aber sichtbar zum Eintrag mit dem Zeitstempel. Der Zustand jeder überwachten Datei wird angezeigt, sodass eine fehlende Datei oder ein Rechteproblem sofort erkennbar ist statt als leere Ansicht zu erscheinen.
Die Anwendung bringt keine eigene Anmeldung mit und verlässt sich auf die Same-Origin-Politik des Browsers. Weil DNS-Rebinding diese umgehen kann, lässt sich über ALLOWED_HOSTS festlegen, unter welchen Hostnamen der Viewer erreichbar sein darf; alles andere wird mit 403 abgewiesen. Für echte Zugangskontrolle gehört ein authentifizierender Reverse Proxy davor.
Funktionen
Installation
npm install
npm run build
npm run startDanach läuft die Anwendung auf http://localhost:9001/. Für den Dauerbetrieb liegt eine systemd-Unit im Repository; auf dem Zielrechner genügt Node.js, da der Server gebündelt ist.
Releases
v2.5.1 · 06.09.2026
Abhängigkeiten aktualisiert
v2.5.0 · 16.08.2026
- build(deps): bump body-parser from 2.2.2 to 2.3.0
- build(deps): bump actions/checkout from 7.0.0 to 7.0.1 in the actions group
- perf(sseHub): batch live log lines into chunked SSE writes
- build(deps): bump express-rate-limit from 8.6.0 to 8.6.1
- build(deps-dev): bump jsdom from 29.1.1 to 30.0.1
- build(deps-dev): bump @types/node from 26.1.1 to 26.1.2 in the types group across 1 directory
- build(deps): bump ip-address from 10.2.0 to 10.4.0
- build(deps): bump express-rate-limit from 8.6.1 to 8.6.2
- build(deps-dev): bump tsx from 4.23.1 to 4.23.8
- build(deps-dev): bump tsx from 4.23.8 to 4.23.12
- build(deps-dev): bump esbuild from 0.28.1 to 0.28.2
- build(deps-dev): bump the types group across 1 directory with 2 updates
v2.4.1 · 19.07.2026
- build(deps): bump the actions group with 3 updates
- build(deps-dev): bump tsx from 4.23.0 to 4.23.1
- build(deps): bump express-rate-limit from 8.5.2 to 8.6.0
- Codex: add skills for issue fixing, PR publishing, and PR reviewing
- Build releases with Node.js 22 for broadest compatibility
v2.4.0 · 12.07.2026
- Add MIT license
- Document pull request guidelines for AI-generated content
- build(deps-dev): bump tsx from 4.22.4 to 4.23.0
- build(deps-dev): bump @types/node from 26.0.0 to 26.1.0 in the types group
- build(deps-dev): bump @types/node from 26.1.0 to 26.1.1 in the types group
- build(deps-dev): bump typescript from 6.0.3 to 7.0.2
- Handle I/O errors in LogTailer sync and startup paths (#129)
- Recover from server-restart line-id reset in /api/resync (#130)
- Handle async FSWatcher error events without crashing the process (#131)
- Time out the resync fetch and cap the live-line queue (#133)
- Add opt-in Host-header validation (ALLOWED_HOSTS) against DNS rebinding
- perf(routes): avoid materializing the buffer before applying the resync limit
v2.3.1 · 02.07.2026
- build(deps): bump the actions group with 3 updates
- build(deps-dev): bump @types/node from 25.9.3 to 26.0.0 in the types group
- Code review fixes: UTF-8 decoding, startup ordering, health endpoint hardening
![[ e-networld.de ]](/img/logo.png)