xtop-agent

command
v0.49.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 27, 2026 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

xtop-agent is the headless fleet-agent binary. It runs the engine in Lean mode and pushes heartbeats + incidents to a hub, with NO TUI code linked in (no Bubbletea, no lipgloss, no app deep-metric modules loaded — the TUI carries those dependencies indirectly).

The intent: deploy on every host you want to observe; let the operator keep the full xtop binary on their workstation for interactive use.

Why a separate binary instead of a build tag in the existing main:

  • Linker actually drops unused packages, but only if NO transitive import chain reaches them. The TUI lives in ui/, which cmd/ uses unconditionally, which main.go imports. A separate main with a narrower import graph guarantees the agent binary stays small.
  • Operator clarity: `xtop-agent` on a server is unambiguous about what's running there, vs `xtop --daemon --fleet-hub` where it's not obvious from `ps` whether a TUI is also linked.

Build:

CGO_ENABLED=0 go build -ldflags="-s -w \
  -X main.Version=$VER" \
  -o xtop-agent ./cmd/xtop-agent

Run:

sudo xtop-agent --hub=http://hub:9898 --token=$TOKEN

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL