Directories
¶
| Path | Synopsis |
|---|---|
|
cmd
|
|
|
beacon
command
Command beacon is Beacon's service: monitoring with alert delivery on Feishu and phones, the SSH channel through which agents reach machines, a REST API and an MCP server.
|
Command beacon is Beacon's service: monitoring with alert delivery on Feishu and phones, the SSH channel through which agents reach machines, 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.
|
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. |
|
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 loads the service configuration (YAML) and the secrets it names.
|
Package config loads the service configuration (YAML) and the secrets it names. |
|
configdb
Package configdb keeps what Beacon monitors in its database: the catalogue (probe locations, heartbeats, expiring resources), the probe targets in named sets that keep the meaning of the file names they came from (all-, overseas-, mainland-, <location>-), and the probe module file.
|
Package configdb keeps what Beacon monitors in its database: the catalogue (probe locations, heartbeats, expiring resources), the probe targets in named sets that keep the meaning of the file names they came from (all-, overseas-, mainland-, <location>-), and the probe module file. |
|
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. |
|
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. |
|
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). |
|
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. |
|
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. |
|
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), 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), and healthchecks.io pings. |
|
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. |
|
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 status page.
|
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 status page. |
|
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. |
|
store
Package store keeps the service's state in one bbolt file: alert groups (card, acknowledgement, silence, escalation progress), API tokens (only their SHA-256), the machines the SSH channel reaches, the index of SSH sessions, the audit log and small counters.
|
Package store keeps the service's state in one bbolt file: alert groups (card, acknowledgement, silence, escalation progress), API tokens (only their SHA-256), the machines the SSH channel reaches, the index of SSH sessions, the audit log and small counters. |
|
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. |
|
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 what people look at: the console, Beacon's own workbench, and the pages people open from the chat (an alert's page, with its timeline and the sessions on its machines, and a session's page, with its replay).
|
Package web serves what people look at: the console, Beacon's own workbench, and the pages people open from the chat (an alert's page, with its timeline and the sessions on its machines, and a session's page, with its replay). |
|
web/link
Package link signs the links to the pages people open from the chat, and checks them.
|
Package link signs the links to the pages people open from the chat, and checks them. |
Click to show internal directories.
Click to hide internal directories.