Skip to content

Starter KPI views and a provisioned Grafana dashboard #304

Description

@Minipada

What to build

DC produces Records but nothing that turns them into the numbers an operations team reports on. This slice establishes the whole path — Records already in PostgreSQL, a set of SQL views over them, and a Grafana dashboard provisioned from those views in the demo stack — using only data that existing Measurements already emit.

Start with availability and uptime, which the uptime Measurement already supports. The point of this slice is not the metric but the conventions: where view definitions live, how the dashboard is provisioned alongside the demo, and how a view is tested. Every later KPI slice adds panels and views to what this one creates.

Metrics are computed in SQL, never on the robot. The time window is a query parameter, so changing a definition is a view change rather than a fleet redeploy.

Acceptance criteria

  • SQL view definitions live in the repository and are applied by the demo stack
  • A view reports availability and uptime over an arbitrary time window
  • A Grafana dashboard is provisioned automatically when the demo stack comes up — no manual import
  • Bringing up the demo and opening Grafana shows a populated chart without further configuration
  • A fixture test seeds PostgreSQL with a known Record sequence and asserts the view's output
  • The docs describe how to point the views at a real deployment rather than the demo

Blocked by

None - can start immediately

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationenhancementNew feature or requestready-for-agentPRD ready for agent implementation

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions