frontail – stream your log in browser

Recently one of my server keeps shutting down randomly for no reason, I have to check the log file frequently, so the idea came up: how about I can check the system log file in browser. I googled, and frontail shows up.

Frontail is a Node.js application for streaming logs to the browser. It’s a tail -F with UI.

This article will show you how to setup frontail.

Environment

  • Ubuntu 18.04

References

Steps

Frontail provides both docker image and binary release, the following steps use binary. If you prefer to use docker, just execute

# replace the mapping directory and the log file on your own
docker run -d -P -v /var/log:/log mthenw/frontail /log/syslog
  1. Get the release
    • You can get the latest release file at mthenw / frontail
    • wget https://github.com/mthenw/frontail/releases/download/v4.9.1/frontail-linux
    • Give binary file the privilege
    • sudo chmod +x ./frountail-linux
  2. Start frontail service
    • Execute
    • ./frontail -t dark [your log path]
    • -t param determines whether the Web UI is in dark or light mode.
  3. Frontail will listening on port 9001 by default, open your browser and visit [IP]:9001
    • If you want to stream more than one log file, you can also start multiple frontail services by setting different ports, add -p param and specify a different port, like
    • ./frontail -t dark [your log path]
    • ./frontail -t dark -p 9002 [your another log path]

Screenshots

发表评论

电子邮件地址不会被公开。 必填项已用*标注

此站点使用Akismet来减少垃圾评论。了解我们如何处理您的评论数据