feat(PROJ-40,PROJ-41): Prometheus Metriken + Dashboard Zeitreihe
- PROJ-40: /api/health mit Version+Uptime, /metrics Prometheus-Format (mails_last_60min/24h/7d/30d, mails_total, storage_bytes, tenants_total, users_total, uptime_seconds) — Token-Schutz optional konfigurierbar - PROJ-41: GET /api/admin/stats/timeseries (30-Tage tagesgenau, Tenant-scoped) + SVG-Balkendiagramm im Dashboard (Mail-Eingang letzte 30 Tage) - storage.DBQueryRow() Helper für Metrics-Queries ohne Pool-Exposition - config.MetricsConfig (enabled, token) in config.go Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
4f366a3634
commit
9298216ce0
@@ -110,6 +110,11 @@ export interface SystemStats {
|
||||
estimate: SystemStatsEstimate;
|
||||
}
|
||||
|
||||
export interface TimeseriesPoint {
|
||||
day: string; // "2026-04-05"
|
||||
count: number;
|
||||
}
|
||||
|
||||
export interface SecurityCheck {
|
||||
name: string;
|
||||
status: "ok" | "warning" | "error";
|
||||
@@ -164,6 +169,10 @@ export async function getSystemStats(): Promise<SystemStats> {
|
||||
return request<SystemStats>("/api/admin/system/stats");
|
||||
}
|
||||
|
||||
export async function getMailTimeseries(days = 30): Promise<{ days: number; points: TimeseriesPoint[] }> {
|
||||
return request<{ days: number; points: TimeseriesPoint[] }>(`/api/admin/stats/timeseries?days=${days}`);
|
||||
}
|
||||
|
||||
// ── Services ──────────────────────────────────────────────────────────────────
|
||||
|
||||
export async function getServices(): Promise<ServiceStatus[]> {
|
||||
|
||||
Reference in New Issue
Block a user