Skip to content

WIP: add admin monitor snapshot endpoint for Admin UI#893

Draft
nicepopo86-lang wants to merge 1 commit intocashubtc:mainfrom
nicepopo86-lang:feat/admin-ui-observability-endpoints
Draft

WIP: add admin monitor snapshot endpoint for Admin UI#893
nicepopo86-lang wants to merge 1 commit intocashubtc:mainfrom
nicepopo86-lang:feat/admin-ui-observability-endpoints

Conversation

@nicepopo86-lang
Copy link

@nicepopo86-lang nicepopo86-lang commented Feb 17, 2026

Summary

This is a small, scoped first deliverable toward #556 (Admin UI bounty): an admin-only monitoring API surface in Nutshell that a future UI can consume.

Added

  • GET /v1/admin/monitor (admin-only)
    • DB counts: promises, proofs_used, proofs_pending, mint_quotes, melt_quotes
    • 24h request volume: mint/melt quote counts
    • host metrics: disk total/free, load average, process CPU seconds
  • API key gating with MINT_ADMIN_API_KEY (X-Admin-Key header)
  • typed response models for admin monitor payload
  • unit tests for monitor snapshot builder + admin key validation
  • docs/env updates for enabling the endpoint

Why this slice

Issue #556 asks for monitoring (DB entries, recent requests, host stats). This PR provides that backend primitive in-core so an external or embedded Admin UI can display it.

Checks

  • python3 -m compileall cashu/mint/admin.py cashu/mint/router.py cashu/core/models.py cashu/core/settings.py tests/mint/test_admin_monitor.py

(Full pytest was not runnable in this environment because pytest is not installed.)

Refs #556

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

Labels

None yet

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

1 participant

Comments