frontail hat als Bedingung NodeJS. Ansonsten ist es halt so, dass openHABian einige Anpassungen des Layouts vornimmt und natürlich die zu überwachenden log-Dateien setzt.
frontail.service sieht so aus:
Code: Alles auswählen
[Unit]
Description=Frontail openHAB instance, reachable at http://%H:9001
Documentation=https://github.com/mthenw/frontail
After=openhab.service
PartOf=openhab.service
[Service]
Type=simple
ExecStart=/usr/lib/node_modules/frontail/bin/frontail --disable-usage-stats --ui-highlight --ui-highlight-preset /usr/lib/node_modules/frontail/preset/openhab_AEM.json --theme openhab_AEM --lines 2000 --number 200 /var/log/openhab/openhab.log /var/log/openhab/events.log
Restart=always
User=frontail
Group=openhab
Environment=PATH=/usr/local/bin:/usr/bin/
Environment=NODE_ENV=production
WorkingDirectory=/usr/bin/
[Install]
WantedBy=multi-user.target
und die openhab_AEM.json hat diesen Inhalt:
Code: Alles auswählen
{
"wordsRegExClass": {
"\\[GroupItemStateChangedEvent\\]": "itemChangedEvent",
"\\[ItemStateChangedEvent \\]": "itemChangedEvent",
"\\[vent.ItemStateChangedEvent\\]": "itemChangedEvent",
"\\[hingStatusInfoChangedEvent\\]": "thingChangedEvent",
"\\[ItemCommandEvent \\]": "commandEvent",
"\\[ome.event.ItemCommandEvent\\]": "commandEvent",
"\\(COMMUNICATION_ERROR\\)": "highlight commError",
"\\(HANDLER_MISSING_ERROR\\)": "highlight commError",
"\\(CONFIGURATION_PENDING\\)": "highlight commError",
"\\(DISABLED\\)": "highlight commError",
"\\(BRIDGE_OFFLINE\\)": "highlight commError",
"Null": "highlight null",
"Undef": "highlight undef",
"\\[ERROR\\]": "type error",
"\\[FATAL\\]": "type error",
"\\[WARN \\]": "type warn",
"\\[DEBUG\\]": "type debug",
"\\[INFO \\]": "type info",
"\\[TRACE\\]": "type trace",
"\\sfrom\\s(\\S*)": "afterFrom marked",
"\\sto\\s(\\S*)": "afterTo marked",
"\\s°C": "degrees marked",
"\\s°": "degrees marked",
"\\s%": "percent marked",
"\\sON\\b": "keyword green on",
"\\sONLINE\\b": "keyword green online",
"\\sOPEN\\b": "keyword green open",
"\\sPLAY\\b": "keyword green play",
"\\sOFF\\b": "keyword red off",
"\\sOFFLINE\\b": "keyword red offline",
"\\sCLOSED\\b": "keyword red closed",
"\\sPAUSE\\b": "keyword red pause",
"\\sSTOP\\b": "keyword red stop",
"Node is DEAD": "keyword red nodeDead",
"\\sthrough": "noKeyword through",
"\\sbecome": "noKeyword become",
"\\sfrom": "noKeyword from",
"\\sto": "noKeyword to",
"\\d{4}-\\d\\d-\\d\\d \\d\\d:\\d\\d:\\d\\d.\\d{3}": "date",
"\\[openhab(.*?)\\]": "origin",
"\\[penhab(.*?)\\]": "origin",
"\\[nal(.*?)\\]": "origin",
"\\[(\\S*?).model.(.*?)\\]": "origin",
"\\[(\\S*?).core.(.*?)\\]": "origin",
"\\[(\\S*?).communication.(.*?)\\]": "origin",
"\\[(\\S*?).event.(.*?)\\]": "origin",
"\\[(\\S*?).internal.(.*?)\\]": "origin",
"\\[(\\S*?).loader.(.*?)\\]": "origin",
"\\[(\\S*?).util.(.*?)\\]": "origin",
"\\[(\\S*?).thing.(.*?)\\]": "origin",
"\\[(\\S*?).action.(.*?)\\]": "origin",
"\\[(\\S*?).impl.(.*?)\\]": "origin",
"\\[(\\S*?).apache.(.*?)\\]": "origin",
"\\[(\\S*?).activator.(.*?)\\]": "origin",
"\\[(\\S*?).ops4j.(.*?)\\]": "origin",
"\\[(\\S*?).jetty.(.*?)\\]": "origin",
"\\[(\\S*?).kar.(.*?)\\]": "origin",
"\\[(\\S*?).NamespaceHandlerRegisterer(.*?)\\]": "origin",
"SKIPPED: (\\d*)": "skippedCount"
},
"wordsRegExMatchClass": {
"Item '(.*?)'": "highlight",
"model '(.*?)'": "highlightModel",
"through (.*)": "highlight",
"through</span> (.*)": "highlight",
"Thing '(.*?)'": "highlightThing",
"rule '(.*?)'": "highlightRule",
"script '(.*?)'": "highlightScript",
"file (.*)": "highlightScript"
},
"lines": {
".log": "line logLine",
"model.script": "line evid modelLine",
"ModelRepositoryImpl": "line evid modelLine",
"ERROR": "line evid errorLine",
"FATAL": "line evid errorLine",
"WARN": "line evid warnLine",
"DEBUG": "line debugLine",
"TRACE": "line traceLine",
"SKIPPED": "line skippedCountLine",
"INFO": "line"
}
}
Nutzt Mint ebenfalls systemd? Ansonsten siehst Du ja den ExecStart, anhand dessen Du nachvollziehen kannst, wie frontail gestartet wird.
Falls man frontail auf einem anderen Port laufen lassen will, so geht das mit dem Parameter -p, der im Aufruf in frontail.service nicht verwendet wird, weshalb der Default Port 9001 verwendet wird.