Files
DarkflameServer/dDashboardServer/routes/DatabaseUsage.h
Aaron Kimbrell f8134ac418 feat(dashboard): Database usage task, API and settings
The database_usage task (hourly) measures on the background connection,
checks the free space on the database's disk (database_disk_path, else the
SQLite file or a local MySQL data directory) and alerts once when it drops
under database_disk_warn_percent. Log pruning keeps database_usage_days.
GET /api/database/usage?range=day|week|month. The settings are on the
Settings page.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-02 17:57:55 -05:00

15 lines
597 B
C++

#pragma once
/**
* Database usage (docs/Dashboard.md, "Database usage"): a scheduled task (database_usage, hourly by default) measures
* the game database (whole size, each table's data, indexes and rows) and the free space on its disk on the
* background connection, keeps the samples for database_usage_days, and alerts when the disk's free space drops under
* database_disk_warn_percent. The page shows the totals, the growth chart, the fastest-growing tables and every table.
*/
namespace DatabaseUsage {
// Before Scheduler::Initialize
void RegisterTask();
void RegisterRoutes();
}