diff --git a/integrations/batcher_test.go b/integrations/batcher_test.go index 0f455b00a..07252a6e4 100644 --- a/integrations/batcher_test.go +++ b/integrations/batcher_test.go @@ -2511,7 +2511,7 @@ func testBatcher(t *testing.T, name, script string) (clock.Setter, *kapacitor.Ex tm.HTTPDService = httpdService tm.TaskStore = taskStore{} tm.DeadmanService = deadman{} - as := alertservice.NewService(alertservice.NewConfig(), logService.NewLogger("[alert] ", log.LstdFlags)) + as := alertservice.NewService(logService.NewLogger("[alert] ", log.LstdFlags)) as.StorageService = storagetest.New() as.HTTPDService = httpdService if err := as.Open(); err != nil { diff --git a/integrations/streamer_test.go b/integrations/streamer_test.go index cbc3dbfa0..6080505c8 100644 --- a/integrations/streamer_test.go +++ b/integrations/streamer_test.go @@ -9523,7 +9523,7 @@ func testStreamer( tm.HTTPDService = httpdService tm.TaskStore = taskStore{} tm.DeadmanService = deadman{} - as := alertservice.NewService(alertservice.NewConfig(), logService.NewLogger("[alert] ", log.LstdFlags)) + as := alertservice.NewService(logService.NewLogger("[alert] ", log.LstdFlags)) as.StorageService = storagetest.New() as.HTTPDService = httpdService if err := as.Open(); err != nil { diff --git a/server/config.go b/server/config.go index 09ceb361b..175d4094b 100644 --- a/server/config.go +++ b/server/config.go @@ -12,7 +12,6 @@ import ( "time" "github.com/influxdata/kapacitor/command" - "github.com/influxdata/kapacitor/services/alert" "github.com/influxdata/kapacitor/services/alerta" "github.com/influxdata/kapacitor/services/config" "github.com/influxdata/kapacitor/services/deadman" @@ -53,7 +52,6 @@ type Config struct { InfluxDB []influxdb.Config `toml:"influxdb" override:"influxdb,element-key=name"` Logging logging.Config `toml:"logging"` ConfigOverride config.Config `toml:"config-override"` - Alert alert.Config `toml:"alert"` // Input services Graphites []graphite.Config `toml:"graphite"` @@ -106,7 +104,6 @@ func NewConfig() *Config { c.Logging = logging.NewConfig() c.Kubernetes = k8s.NewConfig() c.ConfigOverride = config.NewConfig() - c.Alert = alert.NewConfig() c.Collectd = collectd.NewConfig() c.OpenTSDB = opentsdb.NewConfig() diff --git a/server/server.go b/server/server.go index 24800cb94..805402c90 100644 --- a/server/server.go +++ b/server/server.go @@ -270,7 +270,7 @@ func (s *Server) appendConfigOverrideService() { func (s *Server) initAlertService() { l := s.LogService.NewLogger("[alert] ", log.LstdFlags) - srv := alert.NewService(s.config.Alert, l) + srv := alert.NewService(l) srv.Commander = s.Commander srv.HTTPDService = s.HTTPDService diff --git a/services/alert/config.go b/services/alert/config.go deleted file mode 100644 index 98a0de75f..000000000 --- a/services/alert/config.go +++ /dev/null @@ -1,8 +0,0 @@ -package alert - -type Config struct { -} - -func NewConfig() Config { - return Config{} -} diff --git a/services/alert/service.go b/services/alert/service.go index ff80117d9..34843b686 100644 --- a/services/alert/service.go +++ b/services/alert/service.go @@ -94,7 +94,7 @@ type Service struct { } } -func NewService(c Config, l *log.Logger) *Service { +func NewService(l *log.Logger) *Service { s := &Service{ handlers: make(map[string]map[string]handler), closedTopics: make(map[string]bool),