Files
Tola Leng 933e70a3f6 feat: Implement comprehensive multi-channel notification system with templating and SSL monitoring
- Add robust notification system supporting 7+ communication channels with intelligent message templating, resource monitoring, and SSL certificate alerts. Notification Channels: (Telegram, Discord, Slack, Signal, Email, Google Chat, Webhooks).

- This notification system provides enterprise-grade alerting capabilities with extensive customization options and multi-channel redundancy for critical service monitoring.
2025-08-14 20:50:31 +07:00

40 lines
1.0 KiB
Go

package servermonitoring
import (
"service-operation/pocketbase"
)
// ServerMonitoringService provides an easy interface for server monitoring
type ServerMonitoringService struct {
monitor *ServerMonitor
}
// NewServerMonitoringService creates a new server monitoring service
func NewServerMonitoringService(pbClient *pocketbase.PocketBaseClient) *ServerMonitoringService {
return &ServerMonitoringService{
monitor: NewServerMonitor(pbClient),
}
}
// Start starts the server monitoring service
func (sms *ServerMonitoringService) Start() {
sms.monitor.Start()
}
// Stop stops the server monitoring service
func (sms *ServerMonitoringService) Stop() {
sms.monitor.Stop()
}
// GetMonitor returns the underlying monitor for advanced usage
func (sms *ServerMonitoringService) GetMonitor() *ServerMonitor {
return sms.monitor
}
// IsRunning returns whether the monitoring service is currently running
func (sms *ServerMonitoringService) IsRunning() bool {
sms.monitor.mu.RLock()
defer sms.monitor.mu.RUnlock()
return sms.monitor.isRunning
}