Files
urutau/docs/interface.md
T
Lucas RayanandClaude Opus 5.5 b4a2c2c9ec
Release / Plan (reuse the published image?) (push) Successful in 4s
CI / Docker image (build and smoke test) (push) Skipped
CI / Format and vet (push) Successful in 1m29s
CI / Tests (Linux, race detector) (push) Failing after 1m48s
CI / Dependency audit (push) Successful in 21s
Release / ci (push) Failing after 1m50s
Release / Build image (amd64) (push) Skipped
Release / Build image (arm64) (push) Skipped
Release / Publish tags (push) Skipped
Release / Gitea release (push) Skipped
feat: Urutau 1.0.0, lightweight threat intelligence and web analytics
Always-on Go service (stdlib only) that follows the Traefik JSON access
log, the sshd log and the fail2ban log of a host, classifies attacks,
scores sources, keeps bounded aggregates with snapshots, and serves an
embedded dashboard with live updates, offline geolocation (DB-IP Lite),
privacy-friendly traffic analytics, an exportable blocklist and
token-authenticated federation between instances.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 16:13:34 -03:00

5.4 KiB

◂ Back to README

Interface

The dashboard is embedded in the binary: plain HTML, CSS and JavaScript, no build step and no external request (fonts, scripts and styles are all served by Urutau, which the Content-Security-Policy enforces). It follows the system light or dark theme, can be switched by hand, and speaks English or Portuguese (button in the header; the choice is remembered in the browser).

Login

Open the address of the instance. Without a session you are sent to /login: paste URUTAU_TOKEN. The session lasts 12 hours (urutau_session cookie, HttpOnly, SameSite=Strict) and is revocable: it holds a random id kept in memory, Log out revokes it (and closes its live stream), and a restart of the daemon invalidates every session. Login and logout reject cross-site requests. After 5 failures from the same address (IPv6 counted per /64) in 10 minutes the login answers 429, and a correct token is still accepted but after a 1 second delay, so the limiter cannot lock the owner out. Wrong bearer tokens on the API count as failures too. The address is the real client behind the proxies listed in --trusted-proxy.

Header

  • A live indicator showing whether the event stream (SSE) is connected (an instance serves at most 20 stream clients at once).
  • The host selector: all, this instance and every peer of a hub.
  • The range selector: 1h, 24h or 7d.
  • Language, theme and logout buttons.

Threats tab

  • KPIs: requests, malicious events, hostile IPs, suspicious IPs, bans and the "monitoring" counter (benign requests from monitor User-Agents, kept out of the traffic numbers).
  • Timeline: stacked counters per category over the selected range.
  • IPs: a table with score, level (hostile, suspicious, low), categories, hosts, reverse DNS, country, city and ASN, last seen and ban state. It has a search box (IP or reverse DNS), a level filter, a "banned only" filter, sorting by IP, score or last seen, and paging. Click a row for the detail drawer: first and last seen, per-category counts, sample paths, User-Agents (parsed into browser, OS, device, bot or attack tool), domains, users and jails.
  • Live feed: the latest events as they arrive. Fields from the logs are shown as text, never as markup.
  • Top lists: attacked paths, domains, User-Agents and targeted users.
  • Blocklist: pick a minimum score (default 50), copy the list or download it. It only lists hostile, globally routable addresses (never --ignore or --trusted ranges, never an IP with a successful SSH login); IPv6 appears as its /64, written x:x:x:x::/64.
  • Map: a world map of the origin countries of hostile activity.
  • Hosts and sources: every instance with its state (online, latency, version) and every log source with its state (following, waiting, backfill, error), lines read, malformed lines and last event. The file paths are not shown.

Traffic tab

Privacy-friendly web analytics for legitimate traffic, built from the same Traefik log and replacing the analytics of the proxy: unique visitors, pages, referrers, countries, browsers, operating systems and devices, response latency (p50 and p95), bytes sent, and a world map of visitor countries. Unique visitors are counted by a hash with a daily salt; the IP of a legitimate visitor is never stored. See SECURITY.md.

Attribution

IP geolocation data by DB-IP, licensed under CC BY 4.0. The credit also appears in the footer of the dashboard.

HTTP routes

Route Auth Purpose
GET /api/health none {"status":"ok"}
GET /login, POST /login, POST /logout none session
GET / and the static files session the dashboard
GET /api/v1/summary session or bearer everything the dashboard shows. Query: range (1h, 24h, 7d), host (all, a name)
GET /api/v1/traffic session or bearer web analytics of legitimate traffic. Query: range, domain (all or one domain), host. Returns visitors, pages, requests, bots, bytes, status classes, p50_ms, p95_ms, a timeline, top pages, referrers, countries, cities, browsers, operating systems, devices and bot names
GET /api/v1/peer/export peer token only federation: {"v":1,"summary":...,"traffic":{...}} with the top 500 IPs and their detail. Query: range (1h, 24h, 7d). Cached for 5 s. 404 when no peer token is set, 401 for URUTAU_TOKEN, 403 from a source outside --peer-allow
GET /api/v1/ips session or bearer IP table. Query: range, host, min_score, level, q, banned=1, sort (score, last, first, events, ip), order=asc, per (1 to 200, default 50), page
GET /api/v1/ip/{ip} session or bearer detail of one IP, merged with the peers' exports
GET /api/v1/events/stream session or bearer Server-Sent Events, event ev, a ping every 20 s
GET /api/v1/blocklist.txt session or bearer one IP per line. Query: min_score (default 50), range (default 7d), host, family (4, 6; default both; 4 suits ipset hash:ip), download=1
GET /api/v1/blocklist.json session or bearer {"generated","min_score","count","ips":[{"ip","score","last","hosts"}]}; the ip of an IPv6 entry is a /64 prefix

API clients send Authorization: Bearer <URUTAU_TOKEN>. The peer token is accepted only by /api/v1/peer/export; every other route answers 403 to it.