Files
ResourceUsageAPI/appsettings.json
T
Phoenix d6efa9163b Add Telegram bot integration for real-time alert notifications
- Implemented ITelegramNotificationService and TelegramNotificationService for sending alerts via Telegram.
- Updated MonitoringSettings to include Telegram configuration options.
- Enhanced AlertService to send alerts and resolutions through Telegram.
- Added API endpoints for checking Telegram status and sending test alerts.
- Updated README and TELEGRAM_SETUP.md with setup instructions and features.
- Included example configuration in appsettings.telegram.example.json.
2025-08-07 17:30:02 +08:00

113 lines
2.9 KiB
JSON

{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.Hosting.Lifetime": "Information",
"ResourceMonitorService.Services.ResourceMonitorService": "Error",
"ResourceMonitorService.Services.GameDetectionService": "Error",
"System": "Warning"
}
},
"RunAsWindowsService": true,
"Kestrel": {
"Endpoints": {
"Http": {
"Url": "http://*:5000"
}
}
},
"ApiSettings": {
"ApiKey": "b7f3e8a1-4c2d-4d9f-9a6e-2a1c5d7f8e9a",
"RequireApiKey": false,
"AllowedOrigins": [
"http://localhost:4200",
"http://192.168.50.52:4200",
"http://vmwin11:4200",
"http://unraid:4200"
],
"EnableSwagger": false,
"BasePath": "/api"
},
"MonitoringSettings": {
"UpdateIntervalMs": 5000,
"DataRetentionDays": 7,
"EnableGpuMonitoring": true,
"EnableDiskMonitoring": true,
"EnableNetworkMonitoring": true,
"EnableTemperatureMonitoring": true,
"EnableProcessMonitoring": true,
"EnableGameDetection": true,
"EnableAlerts": true,
"MaxProcessesToTrack": 10,
"MaxHistoryPoints": 1000,
"GamePlatformPaths": [
"\\steamapps\\common\\",
"\\Epic Games\\",
"\\GOG Galaxy\\Games\\",
"\\Origin Games\\",
"\\Ubisoft Game Launcher\\games\\"
],
"GameRootFolders": [
"C:\\Games",
"D:\\Games",
"E:\\Games"
],
"AlertThresholds": [
{
"Component": "CPU",
"WarningThreshold": 80,
"CriticalThreshold": 95,
"DurationSeconds": 30,
"IsEnabled": true
},
{
"Component": "Memory",
"WarningThreshold": 85,
"CriticalThreshold": 95,
"DurationSeconds": 30,
"IsEnabled": true
},
{
"Component": "GPU",
"WarningThreshold": 85,
"CriticalThreshold": 95,
"DurationSeconds": 30,
"IsEnabled": true
},
{
"Component": "CPUTemp",
"WarningThreshold": 75,
"CriticalThreshold": 85,
"DurationSeconds": 60,
"IsEnabled": true
},
{
"Component": "GPUTemp",
"WarningThreshold": 80,
"CriticalThreshold": 90,
"DurationSeconds": 60,
"IsEnabled": true
}
],
"Telegram": {
"IsEnabled": true,
"BotToken": "7705627522:AAHDTVMF1uPJW7qm-Di0g_BmefAVWdOrS2U",
"ChatIds": [398126624],
"SendWarningAlerts": true,
"SendCriticalAlerts": true,
"SendResolutionNotifications": true,
"MessageTemplate": "🚨 *{Level} Alert*\n\n📊 *{Component}*\n💬 {Message}\n⏰ {Timestamp}",
"ResolutionTemplate": "✅ *Alert Resolved*\n\n📊 *{Component}*\n💬 {Message}\n⏰ Resolved at {ResolvedAt}"
}
},
"LoggingSettings": {
"LogLevel": "Information",
"LogPath": "logs",
"MaxLogFiles": 30,
"MaxLogFileSizeMB": 10,
"EnableFileLogging": true,
"EnableConsoleLogging": true,
"EnablePerformanceLogging": false
}
}