Skip to content

Commit

Permalink
Chnaged gatherers for all mode
Browse files Browse the repository at this point in the history
  • Loading branch information
kochetovd committed Apr 16, 2024
1 parent d005f24 commit 8bef112
Showing 1 changed file with 6 additions and 13 deletions.
19 changes: 6 additions & 13 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -196,19 +196,12 @@ func (service *Service) Manage(logger logging.Logger, configFile string, command
repeaters["Task"] = m.MetricsRepeater(t.NewReleemTaskSetRepeater(configuration, Mode))

//Init gatherers
if (Mode.Name == "Configurations" && Mode.ModeType == "get") || Mode.Name == "Events" || Mode.Name == "Task" {
gatherers = append(gatherers,
m.NewDbConfGatherer(nil, db, configuration),
m.NewDbInfoGatherer(nil, db, configuration),
m.NewAgentMetricsGatherer(nil, configuration))
} else {
gatherers = append(gatherers,
m.NewDbConfGatherer(nil, db, configuration),
m.NewDbInfoGatherer(nil, db, configuration),
m.NewDbMetricsBaseGatherer(nil, db, configuration),
m.NewAgentMetricsGatherer(nil, configuration))
gatherers_configuration = append(gatherers_configuration, m.NewDbMetricsGatherer(nil, db, configuration))
}
gatherers = append(gatherers,
m.NewDbConfGatherer(nil, db, configuration),
m.NewDbInfoGatherer(nil, db, configuration),
m.NewDbMetricsBaseGatherer(nil, db, configuration),
m.NewAgentMetricsGatherer(nil, configuration))
gatherers_configuration = append(gatherers_configuration, m.NewDbMetricsGatherer(nil, db, configuration))
if Mode.Name == "Task" && Mode.ModeType == "collect_queries" {
gatherers = append(gatherers, m.NewDbCollectQueries(nil, db, configuration))
}
Expand Down

0 comments on commit 8bef112

Please sign in to comment.