mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2026-11-17 17:25:27 +00:00
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>
This commit is contained in:
@@ -102,6 +102,7 @@
|
||||
#include "master/ServerTraffic.h"
|
||||
#include "master/Profiling.h"
|
||||
#include "Performance.h"
|
||||
#include "DatabaseUsage.h"
|
||||
#include "Background.h"
|
||||
#include "master/DashboardMessages.h"
|
||||
#include "master/DataChanged.h"
|
||||
@@ -543,6 +544,7 @@ int main(int argc, char** argv) {
|
||||
UpdateChecker::Initialize();
|
||||
Background::Initialize();
|
||||
RegisterEconomyTasks();
|
||||
DatabaseUsage::RegisterTask();
|
||||
RegisterMaintenanceTasks();
|
||||
RegisterBackupTask();
|
||||
RegisterReportViewTask();
|
||||
@@ -607,6 +609,7 @@ int main(int argc, char** argv) {
|
||||
PrometheusMetrics::RegisterRoutes();
|
||||
Traffic::RegisterRoutes();
|
||||
Performance::RegisterRoutes();
|
||||
DatabaseUsage::RegisterRoutes();
|
||||
RegisterPublicRoutes();
|
||||
RegisterShowcaseRoutes();
|
||||
FeaturedProperties::RegisterRoutes();
|
||||
|
||||
Reference in New Issue
Block a user