Skip to content
mishankovPublic

About

📖 Web based log monitoring tool

Topics

Resources

Stars

22 stars

Watchers

1 watching

Forks

Latest commit

 

History

134 Commits

Folders and files

Repository files navigation

Web tail

CI

Web application to view lines from file on local system or on remote server built with Svelte.

Installation

Download executable for your platform from latest release.

Docker image is also available here.

Configuration

Configuaration is done with web-tail.config.toml file. Following keys are available:

  • port - port that Web tail will run on. Default value is 4444
  • allowedOrigins - list of allowed origins for WebSocket connections. Default value is ["*"]
  • servers - reusable servers configuration
    • name - name of server to use in sources configs
    • host - host of remote server. Mandatory field for source types ssh:*
    • port - port of remote server. Mandatory field for source types ssh:*
    • username - username for ssh connection to remote server. Mandatory for source types ssh:*
    • password - password to authenticate on remote server. Either this or privateKeyPath is mandatory for source types ssh:*
    • privateKeyPath - path to file with private key to authenticate on remote server. Either this or password is mandatory for source types ssh:*
  • sources - list of sources to tail lines from
    • name - name of source. Mandatory field
    • type - type of source. Possible values: local:file, local:docker, local:openclaw, ssh:file, ssh:docker, ssh:openclaw. Mandatory field
    • path - path to file. Mandatory field for source types *:file
    • serverName - name of a server from servers list
    • containerId - Docker container ID. Mandatory field for source types *:docker
    • host - host of remote server. Mandatory field for source types ssh:*
    • port - port of remote server. Mandatory field for source types ssh:*
    • username - username for ssh connection to remote server. Mandatory for source types ssh:*
    • password - password to authenticate on remote server. Either this or privateKeyPath is mandatory for source types ssh:*
    • privateKeyPath - path to file with private key to authenticate on remote server. Either this or password is mandatory for source types ssh:*

String fields support environment placeholders in the exact form ${VAR_NAME}. If a placeholder is used and the environment variable is not set, web-tail fails to start with a config error. Only exact placeholders are expanded, so values like prefix-${VAR_NAME} stay unchanged.

Example:

[[servers]]
name = "production"
host = "${SSH_HOST}"
port = 22
username = "${SSH_USER}"
password = "${SSH_PASSWORD}"
privateKeyPath = "${SSH_PRIVATE_KEY_PATH}"

[[sources]]
name = "app-log"
type = "ssh:file"
path = "/var/log/app.log"
serverName = "production"

Usage

Options from left to right:

  • Dropdown to select one of sources from web-tail.config.toml
  • Search field. Matching results will be selected. Search is case insensitive by default
  • Filter toggle. If enabled only lines with matching results are shown
  • .* toggle. If enabled treats text in search field as regular expression
  • Aa toggle. If enabled makes search case sensitive
  • Reverse toggle. If enabled latest lines shown on top
  • Max lines field. How much lines will be shown
  • Theme selector: System (default), Light, or Dark. System follows your device's appearance and updates when it changes. Your choice is saved in this browser alongside the other preferences. Use Tab to focus the selector and arrow keys to choose a theme.

Development

Use Go 1.27 and Bun 1.4.4. The frontend app lives in /client and uses Vite.

  1. Install frontend dependencies:
    • cd client && bun install --frozen-lockfile
  2. Check frontend types:
    • cd client && bun run check
  3. Build frontend assets for Go embed:
    • cd client && bun run build
  4. Run backend:
    • go run ./server

Type checks use TypeScript 7 through the @typescript/native alias. TypeScript 6 is also installed because Svelte Check requires its JavaScript API. CI, releases, and Docker run the same type checks before building.

The frontend overrides glob and minimatch to their patched versions while Workbox and the asset generator still request older major versions.

For frontend HMR in development, run both services:

  • go run ./server
  • cd client && bun run dev

Vite dev server proxies /sources and /logstream to http://localhost:4444.

To check the frontend, run cd client && bun run check. Browser tests use a production build with sample sources and log streams, so no backend is needed:

cd client
bunx playwright install chromium
bun run test:e2e

About

📖 Web based log monitoring tool

Topics

Resources

Stars

22 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages