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.
This commit is contained in:
+11
-1
@@ -88,7 +88,17 @@
|
||||
"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",
|
||||
|
||||
Reference in New Issue
Block a user