예제 #1
0
func (s *Server) appendAlertaService() {
	c := s.config.Alerta
	l := s.LogService.NewLogger("[alerta] ", log.LstdFlags)
	srv := alerta.NewService(c, l)
	s.TaskMaster.AlertaService = srv

	s.SetDynamicService("alerta", srv)
	s.AppendService("alerta", srv)
}
예제 #2
0
func (s *Server) appendAlertaService(c alerta.Config) {
	if c.Enabled {
		l := s.LogService.NewLogger("[alerta] ", log.LstdFlags)
		srv := alerta.NewService(c, l)
		s.TaskMaster.AlertaService = srv

		s.Services = append(s.Services, srv)
	}
}