Problem
Current server health status output is not optimized for compact status bars like Waybar.
Goal
Add a health status format that is trivial to consume from Waybar custom modules.
Proposal
Expose one stable, machine-readable endpoint/command output (JSON preferred), plus optional plain text.
Option A (preferred)
- Add endpoint:
GET /health/waybar
- Return compact JSON object with fixed keys:
text (short display string)
tooltip (expanded diagnostics string)
class (status class; e.g. ok, degraded, down)
percentage (0-100 overall health score)
Example:
{
"text": "Lifelog: OK",
"tooltip": "server=up db=up collector=laptop:connected ingest=flowing lag=3s",
"class": "ok",
"percentage": 98
}
Option B
- Add CLI mode:
lifelog-server-backend --health-waybar with identical JSON shape.
Requirements
- Output must be stable (no key churn) for script consumers.
- Response time should be fast (<200ms local path).
- Must include at least:
- server availability
- DB connectivity
- ingest flow status (recent chunks received window)
- collector connectivity summary
Acceptance Criteria
- Waybar custom module can parse and display status with no custom post-processing beyond
jq -r.
- During failure states,
class and text clearly indicate degraded/down.
- Document usage in
USAGE.md with a Waybar config snippet.
Problem
Current server health status output is not optimized for compact status bars like Waybar.
Goal
Add a health status format that is trivial to consume from Waybar custom modules.
Proposal
Expose one stable, machine-readable endpoint/command output (JSON preferred), plus optional plain text.
Option A (preferred)
GET /health/waybartext(short display string)tooltip(expanded diagnostics string)class(status class; e.g.ok,degraded,down)percentage(0-100 overall health score)Example:
{ "text": "Lifelog: OK", "tooltip": "server=up db=up collector=laptop:connected ingest=flowing lag=3s", "class": "ok", "percentage": 98 }Option B
lifelog-server-backend --health-waybarwith identical JSON shape.Requirements
Acceptance Criteria
jq -r.classandtextclearly indicate degraded/down.USAGE.mdwith a Waybar config snippet.