Minimal HTTP dashboard for botica check results.
Serves a tiny plain-HTML page (no external deps) with the last state
of every check, plus a Prometheus /metrics endpoint reusing
Botica.Report.
The dashboard is a zero-dependency :gen_tcp listener so it works in
any OTP release without adding a web framework.
Usage
The dashboard is not started by default (botica is a library, not a service). Start it explicitly:
Botica.Dashboard.start_link(port: 8080, provider: fn -> results end)The :provider fun returns the list of check results to display; it
defaults to the last scheduler history or an empty list.
Routes
GET /— HTML status pageGET /health—200 OK/503withok|degraded|failbodyGET /metrics— Prometheus text format viaBotica.Report
Summary
Functions
Returns a specification to start this module under a supervisor.
Current listen port (useful in tests to learn the ephemeral port).
Starts the dashboard HTTP server.
Stops the dashboard.
Types
@type result_provider() :: (-> [map()])
Functions
Returns a specification to start this module under a supervisor.
See Supervisor.
@spec port(atom() | pid()) :: :inet.port_number()
Current listen port (useful in tests to learn the ephemeral port).
@spec start_link(keyword()) :: GenServer.on_start()
Starts the dashboard HTTP server.
Options
:port— listen port (default 8080):provider— zero-arity fun returning[result_map](default: empty):interface— bind address (default{127, 0, 0, 1}):name— registered name (default__MODULE__; pass a unique name to run several dashboards in the same VM, e.g. in tests)
Stops the dashboard.
Pass :name when the dashboard was started with a custom name.