Thought you know how to use docker as you mentioned you are also running OH in a docker container.
The approach of setting up the frontail container should be similar and can be done via command line.
But again, it’s important that your OH log folder is mounted externally so that frontail can usw it.
I so not use a Synology anymore, but there seem to be a lot of guides out there that show the basics.
Maybe start there and then it should hopefully make more sense on volume mounting and yaml.
Chris
Hi Chris, thanks for the link, it has made me a little smarter… I’ve only been using Docker since the day before yesterday and only via the Synology GUI, i.e. without a command line so far.
What I can’t imagine yet: The .yml file only consists of these few lines (with an adjusted volume):
Based on my volume mount, I am basically mounting the full openhab log folder (in my case /var/log/openhab).
Take into account that you will need docker-compose though (which you need to install on top of docker). As mentioned, I never did run docker on Synology, but I would assume you can install docker-compose also via CLI (or even through packages?).
Once done and once you saved your docker-compose.yml you can then run sudo docker-compose up --force-recreate --build -d (this is my standard command, so that I do not have to change it every time I re-create a docker-compose, for you it could be shorter but makes no difference).
Let me know how it goes.
EDIT: If you want to log two different files, you will need to (1) mount the right directors and (2) edit the frontail command line to include those - i.e. /logs/yourlogname (as you can see from the volumes line, /logs:ro points at the moment to the openhab log folder; hence if you have different folders and want it all in one log window, you might need to adjust those paths accordingly)
Bit late to the party but I’m in the process of moving my OH install to v3 and also from pi to Syno Docker. All going well and I’ve got a container from welteki working for logging via frontail.
I’ve just come across this thread as I was wondering if I could make the logs a bit more user / read friendly…and you guys have pretty much read my mind and done it for me…THANKS!
However, I’ve found the image schnuecks/frontail-multi:latest on docker, downloaded and launched it. Added the logs volume to the settings and run the container…
but it just runs for a second and then throws this error:
I’m relatively new to docker and have been trawling the thread and docker docs to work out what I’ve done wrong but I’m hoping one of the clever people on this thread can tell me where I’ve gone wrong / point me in the right direction.
@AEM great work !! Thanks !!
Can I ask for some additional feature?
Could you provide possiblity to choose which file should be presented: openhab.log, events.log, both, or add to a log line an info about filename to filter it?
Hello @orzechszek
Unfortunally I have no idea how to do what you are asking, I think it is something to do on the Frontail side. I just implemented the theme / colouring feature, that basically changes the layout of the HTML output, using css.
I don’t know how to modify what happens “before” the HTML is rendered.
I guess even prerequisits are missed. Can someone guide me please as I also don’t get all the details in option 21, what’s doing this option 21. Seems really a hard job.
I would suggest to turn on DEBUG mode for openhabian-config. Then try to install frontail.
The output of the DEBUG mode should show more details about the error than just FAILED.
For more details about debug mode see openHABian | openHAB
Hello Wolfgang,
ok, that give the following details, which I don’t understand for now:
$ apt-get install --yes nodejs
+ apt-get install --yes nodejs
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages were automatically installed and are no longer required:
libc-ares2 libnode72
Use 'sudo apt autoremove' to remove them.
The following packages will be upgraded:
nodejs
1 upgraded, 0 newly installed, 0 to remove and 4 not upgraded.
Need to get 0 B/27.2 MB of archives.
After this operation, 127 MB of additional disk space will be used.
(Reading database ... 140451 files and directories currently installed.)
Preparing to unpack .../nodejs_16.19.1-deb-1nodesource1_amd64.deb ...
Unpacking nodejs (16.19.1-deb-1nodesource1) over (12.22.9~dfsg-1ubuntu3) ...
dpkg: error processing archive /var/cache/apt/archives/nodejs_16.19.1-deb-1nodesource1_amd64.deb (--unpack):
trying to overwrite '/usr/share/systemtap/tapset/node.stp', which is also in package libnode72:amd64 12.22.9~dfsg-1ubuntu3
Errors were encountered while processing:
/var/cache/apt/archives/nodejs_16.19.1-deb-1nodesource1_amd64.deb
Updating FireMotD available updates count ...
needrestart is being skipped since dpkg has failed
E: Sub-process /usr/bin/dpkg returned an error code (1)
+ return 100
+ echo FAILED
FAILED
I’m on a Lenovo M910q, which means x86 64bit, not amd64.
Any suggestions?
Thanks!
I’m not sure if you use openHABian, or your own linux server. In case you use your own distro the use of docker community edition might be an option to get it up and running without much problems.
I use a Ubuntu 22.04.2 LTS x86_64 server with docker-ce (don’t use docker desktop). If you install docker-ce the following configuration files should help you to setup things quickly:
On your system create the following two files in a directory (e.g. in $OPENHAB_CONF/docker/frontail).
Ajust the configuration to your needs (which files do you want to track); then create the image and start the container (execute those commands inside the directory with the two files):