Directories
¶
| Path | Synopsis |
|---|---|
|
cmd
|
|
|
beacon
command
Command beacon is Beacon's service: monitoring with alert delivery, the SSH channel through which people and agents reach machines, credential custody, a REST API and an MCP server.
|
Command beacon is Beacon's service: monitoring with alert delivery, the SSH channel through which people and agents reach machines, credential custody, a REST API and an MCP server. |
|
beacon-oncall
command
Command beacon-oncall is the reference harness that runs an agent when Beacon wakes it.
|
Command beacon-oncall is the reference harness that runs an agent when Beacon wakes it. |
|
beacon-probe
command
Command beacon-probe is the probe agent: it checks targets for the status service (like the Blackbox Exporter, with the same metric names, plus a failure reason and multi-step checks) and reports a few host metrics (like a small Node Exporter).
|
Command beacon-probe is the probe agent: it checks targets for the status service (like the Blackbox Exporter, with the same metric names, plus a failure reason and multi-step checks) and reports a few host metrics (like a small Node Exporter). |
|
internal
|
|
|
agent
Package agent is beacon-probe's push mode, the whole probe agent in one process: every interval it fetches what to check from the gateway (its targets and the module file, cached on disk for when the gateway cannot be reached), probes every target, reads the host's metrics and heartbeats, and pushes it all to the gateway in the Prometheus text format with timestamps.
|
Package agent is beacon-probe's push mode, the whole probe agent in one process: every interval it fetches what to check from the gateway (its targets and the module file, cached on disk for when the gateway cannot be reached), probes every target, reads the host's metrics and heartbeats, and pushes it all to the gateway in the Prometheus text format with timestamps. |
|
alertmanager
Package alertmanager holds alerts, alert groups and silences in Alertmanager's formats.
|
Package alertmanager holds alerts, alert groups and silences in Alertmanager's formats. |
|
api
Package api is the REST API under /api/v1.
|
Package api is the REST API under /api/v1. |
|
bridge
Package bridge closes the loop between the alerts and the people on call.
|
Package bridge closes the loop between the alerts and the people on call. |
|
catalog
Package catalog is what is monitored and where from: the probe locations, the heartbeats that jobs must send, and the resources (servers, domains, certificates, tokens) whose expiry dates are watched; and what the public status pages show of it (status.go).
|
Package catalog is what is monitored and where from: the probe locations, the heartbeats that jobs must send, and the resources (servers, domains, certificates, tokens) whose expiry dates are watched; and what the public status pages show of it (status.go). |
|
channels
Package channels is where alerts are told besides the on-call people: notification channels of fourteen kinds (a signed JSON webhook, Slack, Discord, Telegram, Microsoft Teams, email, a Feishu or DingTalk or WeCom group bot, Pushover, Bark, ntfy, Gotify, Matrix).
|
Package channels is where alerts are told besides the on-call people: notification channels of fourteen kinds (a signed JSON webhook, Slack, Discord, Telegram, Microsoft Teams, email, a Feishu or DingTalk or WeCom group bot, Pushover, Bark, ntfy, Gotify, Matrix). |
|
clientip
Package clientip extracts the client's real IP from a request.
|
Package clientip extracts the client's real IP from a request. |
|
config
Package config manages Beacon's runtime settings and encrypted secrets in the database.
|
Package config manages Beacon's runtime settings and encrypted secrets in the database. |
|
configdb
Package configdb keeps what Beacon monitors in its database: the catalogue (probe locations, expiring resources, public status pages), the monitors and their tags.
|
Package configdb keeps what Beacon monitors in its database: the catalogue (probe locations, expiring resources, public status pages), the monitors and their tags. |
|
ctl
Package ctl is the local admin socket: a small HTTP API on a Unix socket in the data directory, so that `beacon token …`, `machine …`, `ssh …`, `config …` and `drill …` work against the running service, which holds the database lock.
|
Package ctl is the local admin socket: a small HTTP API on a Unix socket in the data directory, so that `beacon token …`, `machine …`, `ssh …`, `config …` and `drill …` work against the running service, which holds the database lock. |
|
events
Package events is the append-only half of the store: the audit log and the record of secret uses, in tables with indexes on time, actor and object, chained by hash so that a change or a deletion among them can be seen (the plan's §14): each record's hash is SHA-256 over the hash of the record before it and a canonical encoding of itself.
|
Package events is the append-only half of the store: the audit log and the record of secret uses, in tables with indexes on time, actor and object, chained by hash so that a change or a deletion among them can be seen (the plan's §14): each record's hash is SHA-256 over the hash of the record before it and a canonical encoding of itself. |
|
exercise
Package exercise verifies observations of Beacon's deliberately failing drill endpoint.
|
Package exercise verifies observations of Beacon's deliberately failing drill endpoint. |
|
feishu
Package feishu is the Feishu (Lark) self-built app: it sends interactive cards to the alert group, updates them in place, buzzes people, and receives button clicks, either over Feishu's long connection (no public callback URL needed) or as HTTP callbacks.
|
Package feishu is the Feishu (Lark) self-built app: it sends interactive cards to the alert group, updates them in place, buzzes people, and receives button clicks, either over Feishu's long connection (no public callback URL needed) or as HTTP callbacks. |
|
filecapture
Package filecapture keeps evidence private until its local write is durably sealed.
|
Package filecapture keeps evidence private until its local write is durably sealed. |
|
gateway
Package gateway is the one door for machines (metrics.<domain>): probes and hosts write their samples (Prometheus remote write) and fetch the targets they check, job hosts push heartbeats, agents query metrics, the rule engine and Flux post alerts (Alertmanager's API v2, taken by the router), and CI and Flux post change events (deployments, reconciliations).
|
Package gateway is the one door for machines (metrics.<domain>): probes and hosts write their samples (Prometheus remote write) and fetch the targets they check, job hosts push heartbeats, agents query metrics, the rule engine and Flux post alerts (Alertmanager's API v2, taken by the router), and CI and Flux post change events (deployments, reconciliations). |
|
ha
Package ha is the primary/standby pair over the PostgreSQL database (the plan's §10.3): one lease row in a leader table decides which instance is active.
|
Package ha is the primary/standby pair over the PostgreSQL database (the plan's §10.3): one lease row in a leader table decides which instance is active. |
|
hostmetrics
Package hostmetrics reads a few host metrics from /proc, with the Prometheus Node Exporter's names, so that a probe machine needs no node_exporter: CPU time, memory, load, filesystems, network and disk traffic, pressure, time sync, and the heartbeat files of a textfile directory.
|
Package hostmetrics reads a few host metrics from /proc, with the Prometheus Node Exporter's names, so that a probe machine needs no node_exporter: CPU time, memory, load, filesystems, network and disk traffic, pressure, time sync, and the heartbeat files of a textfile directory. |
|
i18n
Package i18n localises what people read: status pages, alert cards and API errors.
|
Package i18n localises what people read: status pages, alert cards and API errors. |
|
inventory
Package inventory checks that every CDN node is serving: a probe location that runs on a CDN node names the node's address and the DNS name of its cluster (the rotation), and every minute both are resolved.
|
Package inventory checks that every CDN node is serving: a probe location that runs on a CDN node names the node's address and the DNS name of its cluster (the rotation), and every minute both are resolved. |
|
kv
Package kv is the key-value layer under the store: everything the store kept in one bbolt file (buckets of JSON values, ordered keys, per-bucket sequences, counters) over a SQL database instead.
|
Package kv is the key-value layer under the store: everything the store kept in one bbolt file (buckets of JSON values, ordered keys, per-bucket sequences, counters) over a SQL database instead. |
|
mcpserver
Package mcpserver is the built-in MCP server at /mcp (streamable HTTP, stateless).
|
Package mcpserver is the built-in MCP server at /mcp (streamable HTTP, stateless). |
|
metrics
Package metrics exposes metrics in the Prometheus text format.
|
Package metrics exposes metrics in the Prometheus text format. |
|
monitor
Package monitor is what a person adds and edits to watch a service: a monitor of one type (HTTP, TCP, ping, DNS, push, a database, a message broker or a mail server, gRPC health, a Docker container, registry, git, RDAP, or a group of other monitors), how often it is checked and from which probe locations, when it counts as down, and which notification channels hear of it.
|
Package monitor is what a person adds and edits to watch a service: a monitor of one type (HTTP, TCP, ping, DNS, push, a database, a message broker or a mail server, gRPC health, a Docker container, registry, git, RDAP, or a group of other monitors), how often it is checked and from which probe locations, when it counts as down, and which notification channels hear of it. |
|
monitors
Package monitors is what REST and MCP do with monitors, in one place: list them with their states, read one with its checks, figures, locations and events, add, change, pause, clone and remove them, and keep their tags.
|
Package monitors is what REST and MCP do with monitors, in one place: list them with their states, read one with its checks, figures, locations and events, add, change, pause, clone and remove them, and keep their tags. |
|
notify
Package notify sends through the channels that are not the Feishu app: Pushover (iOS emergency alerts that repeat until acknowledged), Bark (an iOS push that rings), the Feishu group's custom bot (plain messages that need no app and spend no API quota), signed team webhooks, and healthchecks.io pings.
|
Package notify sends through the channels that are not the Feishu app: Pushover (iOS emergency alerts that repeat until acknowledged), Bark (an iOS push that rings), the Feishu group's custom bot (plain messages that need no app and spend no API quota), signed team webhooks, and healthchecks.io pings. |
|
oauth
Package oauth is Beacon's own authorization server for its MCP endpoint, as the MCP authorization specification asks: an agent's client (Claude Code, Codex) adds Beacon's /mcp, gets a 401 that names the protected resource metadata (RFC 9728), finds the authorization server's metadata (RFC 8414), registers itself (RFC 7591) or names its client ID metadata document, and sends the person to /oauth/authorize, where they sign in to the console and allow it (package web, which uses Parse and Code here).
|
Package oauth is Beacon's own authorization server for its MCP endpoint, as the MCP authorization specification asks: an agent's client (Claude Code, Codex) adds Beacon's /mcp, gets a 401 that names the protected resource metadata (RFC 9728), finds the authorization server's metadata (RFC 8414), registers itself (RFC 7591) or names its client ID metadata document, and sends the person to /oauth/authorize, where they sign in to the console and allow it (package web, which uses Parse and Code here). |
|
oncall
Package oncall is the reference harness that runs an agent program when Beacon wakes it.
|
Package oncall is the reference harness that runs an agent program when Beacon wakes it. |
|
probe
Package probe checks targets from a probe location, the way the Prometheus Blackbox Exporter does and with the same metric names (probe_success, probe_duration_seconds, probe_http_status_code, probe_ssl_earliest_cert_expiry), so that alert rules work with either.
|
Package probe checks targets from a probe location, the way the Prometheus Blackbox Exporter does and with the same metric names (probe_success, probe_duration_seconds, probe_http_status_code, probe_ssl_earliest_cert_expiry), so that alert rules work with either. |
|
probenow
Package probenow is probing on demand: an agent asks the centre to have a target probed again at once, every probe location that has the target assigned is woken through the gateway's long-poll route, probes it with its usual modules and settings and posts what it found, and the agent sees each location's answer within a minute instead of waiting for the next cycle and the rule engine.
|
Package probenow is probing on demand: an agent asks the centre to have a target probed again at once, every probe location that has the target assigned is woken through the gateway's long-poll route, probes it with its usual modules and settings and posts what it found, and the agent sees each location's answer within a minute instead of waiting for the next cycle and the rule engine. |
|
router
Package router does what Alertmanager did, inside the service: it takes alerts from the rule engine (vmalert or Prometheus, Alertmanager's API v2: POST /api/v2/alerts), groups them, mutes alerts that a firing alert inhibits or that a silence matches, and hands each group to the bridge the way Alertmanager's webhook did.
|
Package router does what Alertmanager did, inside the service: it takes alerts from the rule engine (vmalert or Prometheus, Alertmanager's API v2: POST /api/v2/alerts), groups them, mutes alerts that a firing alert inhibits or that a silence matches, and hands each group to the bridge the way Alertmanager's webhook did. |
|
s3
Package s3 is a small client for the S3-compatible storage Beacon writes to (MinIO, R2, S3): put, get, head and delete, signed the way every one of them understands, AWS Signature Version 4.
|
Package s3 is a small client for the S3-compatible storage Beacon writes to (MinIO, R2, S3): put, get, head and delete, signed the way every one of them understands, AWS Signature Version 4. |
|
secrets
Package secrets holds Beacon's master key (master.key in the data directory) and the sealing that the settings and the vault (package vault) build on: AES-256-GCM under keys derived with HKDF, each bound to its context.
|
Package secrets holds Beacon's master key (master.key in the data directory) and the sealing that the settings and the vault (package vault) build on: AES-256-GCM under keys derived with HKDF, each bound to its context. |
|
server
Package server routes the service's HTTP requests: health and readiness, metrics (direct connections only), Feishu's HTTP callbacks, the drill check, the REST API, the MCP endpoint and the pages (the public ones at the root, the console under /console).
|
Package server routes the service's HTTP requests: health and readiness, metrics (direct connections only), Feishu's HTTP callbacks, the drill check, the REST API, the MCP endpoint and the pages (the public ones at the root, the console under /console). |
|
signedhead
Package signedhead is the signed snapshot of a table's live rows: a name, a monotonic epoch, and the SHA-256 of each stored row.
|
Package signedhead is the signed snapshot of a table's live rows: a name, a monotonic epoch, and the SHA-256 of each stored row. |
|
sshgate
Package sshgate is the SSH channel: agents reach the machines Beacon knows with the tools they already use (ssh, scp, sftp, rsync, port forwarding) or with the MCP and REST tools, and never hold a key.
|
Package sshgate is the SSH channel: agents reach the machines Beacon knows with the tools they already use (ssh, scp, sftp, rsync, port forwarding) or with the MCP and REST tools, and never hold a key. |
|
status
Package status computes the public status pages from what Beacon already has: the pages' definitions in the catalogue (catalog.StatusPage), the probes' results in VictoriaMetrics (history.go), the alert groups as incidents, and the maintenance windows.
|
Package status computes the public status pages from what Beacon already has: the pages' definitions in the catalogue (catalog.StatusPage), the probes' results in VictoriaMetrics (history.go), the alert groups as incidents, and the maintenance windows. |
|
store
Package store keeps the service's state in one SQL database (a single SQLite file by default): alert groups (card, acknowledgement, silence, escalation progress), people's accounts (an argon2id hash of each password) and their agents, tokens and OAuth grants (only their SHA-256), the machines the SSH channel reaches, the index of SSH sessions, small counters — all in a key-value space (internal/kv) with the buckets and keys they always had — and the audit log in event tables with a hash chain (internal/events).
|
Package store keeps the service's state in one SQL database (a single SQLite file by default): alert groups (card, acknowledgement, silence, escalation progress), people's accounts (an argon2id hash of each password) and their agents, tokens and OAuth grants (only their SHA-256), the machines the SSH channel reaches, the index of SSH sessions, small counters — all in a key-value space (internal/kv) with the buckets and keys they always had — and the audit log in event tables with a hash chain (internal/events). |
|
targets
Package targets is what the probes check: target groups in Prometheus file_sd form ({targets, labels}), in named files (sets, once they are in Beacon's database; see package configdb).
|
Package targets is what the probes check: target groups in Prometheus file_sd form ({targets, labels}), in named files (sets, once they are in Beacon's database; see package configdb). |
|
testutil
Package testutil builds a bridge with fake collaborators, for the tests of the packages above it.
|
Package testutil builds a bridge with fake collaborators, for the tests of the packages above it. |
|
totp
Package totp implements time-based one-time passwords (RFC 6238 over RFC 4226's HOTP) with the parameters authenticator apps take by default: HMAC-SHA1, six digits, a 30-second step.
|
Package totp implements time-based one-time passwords (RFC 6238 over RFC 4226's HOTP) with the parameters authenticator apps take by default: HMAC-SHA1, six digits, a 30-second step. |
|
vault
Package vault is Beacon's password vault: logins, notes, cards, identities, SSH keys and API credentials in personal vaults and shared collections, with folders, favourites, a trash, a generator, TOTP codes, Send links encrypted in the browser, import, export and health reports.
|
Package vault is Beacon's password vault: logins, notes, cards, identities, SSH keys and API credentials in personal vaults and shared collections, with folders, favourites, a trash, a generator, TOTP codes, Send links encrypted in the browser, import, export and health reports. |
|
version
Package version holds the build information, set by the release pipeline with -ldflags -X.
|
Package version holds the build information, set by the release pipeline with -ldflags -X. |
|
vm
Package vm queries VictoriaMetrics (or any Prometheus-compatible API) for instant vectors.
|
Package vm queries VictoriaMetrics (or any Prometheus-compatible API) for instant vectors. |
|
web
Package web serves the browser: the console (a React application under /workspace, which calls the REST API with its session, workspacefiles.go), and the pages that must work without it.
|
Package web serves the browser: the console (a React application under /workspace, which calls the REST API with its session, workspacefiles.go), and the pages that must work without it. |
|
web/link
Package link signs requests for the alert and session pages people open from chat.
|
Package link signs requests for the alert and session pages people open from chat. |
|
wsconn
Package wsconn is the small part of RFC 6455 WebSockets Beacon needs, server side: the console's browser terminal and the live watch of a session.
|
Package wsconn is the small part of RFC 6455 WebSockets Beacon needs, server side: the console's browser terminal and the live watch of a session. |
Click to show internal directories.
Click to hide internal directories.