| Age | Commit message (Collapse) | Author |
|
Switch the default log config to directory-watch mode, which handles
TF2's per-map log rotation automatically. Keep the old logs: symlink
approach as a commented alternative.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
|
Each unit can specify log_filter: <path> pointing to any executable
that reads stdin and writes filtered output to stdout. The daemon
spawns it once at startup (and on SIGHUP), pipes raw log data through
it before ring-buffering and broadcasting to attached clients.
filter.c handles spawn (fork/exec with pipes), per-chunk apply
(write + poll with 250ms timeout, pass-through on silence/timeout),
and stop (SIGTERM + fd cleanup). Filters are stopped and restarted
cleanly on SIGHUP alongside log_tail.
Bundled filters in filters/:
source.py — TF2, GMod: strips server_cvar/stuck/path_goal spam,
strips the L MM/DD/YYYY - HH:MM:SS: prefix
minecraft.py — vanilla/Paper/Spigot: strips keepAlive, autosave,
internal class logs, strips [HH:MM:SS] [thread] prefix
terraria.py — vanilla/tModLoader: strips blank lines and mod
loading noise during startup
Any executable reading stdin/writing stdout works as a custom filter.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
|
State detection:
- Add STATE_STOPPING to ProcessState enum
- Replace system("systemctl is-active") with libsystemd sd-bus API for
accurate starting/stopping/crashed state reporting; works for any unit
type (RCON or STDIN) that declares a service: field
- Implement real A2S_INFO UDP queries (src/console/a2s.c) for units
with health.type = a2s (Valve games: TF2, GMod); differentiates
running / hibernating (0 players) / changing_map (A2S down, RCON up)
/ unreachable; includes player count and map name in responses
- Refactor probe_rcon_state() into probe_unit_state() returning a
ProbeResult struct with state, players, max_players, map fields
- status and list responses now include players/max_players/map fields
New daemon commands:
- tail <unit>: return ring buffer snapshot as a single response
- broadcast <message>: send broadcast_cmd-formatted message to all
running units; works for both RCON and STDIN console types
New YAML field:
- broadcast_cmd: command template (e.g. "say {msg}") — opt-in per
unit; units without it are skipped by broadcast
CLI (umbrella-cli):
- Add tail subcommand (non-interactive output snapshot)
- Add broadcast subcommand
- status shows Players and Map when available
- list adds PLAYERS and MAP columns
Bot (umbrella-bot):
- Replace !attach / !detach with !tail (shows last 30 lines, no streaming)
- Add !broadcast command
- Write per-!cmd audit entries to /var/log/umbrella/bot-audit.log
- !units and !status responses include player counts when available
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
|
|