Skip to content

Commit

Permalink
start stop server decision based only on metrics.enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
michalpristas committed Oct 11, 2023
1 parent fd06296 commit 08378a4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion internal/pkg/agent/application/monitoring/reload/reload.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ func (sr *ServerReloader) Reload(rawConfig *aConfig.Config) error {

sr.config = newConfig.Settings.MonitoringConfig

shouldRunMetrics := sr.config.Enabled && sr.config.MonitorMetrics
shouldRunMetrics := sr.config.Enabled
if shouldRunMetrics && !sr.isServerRunning {
sr.start()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,18 +59,18 @@ agent.monitoring.enabled: false
false, false, true,
},
{
"stop when running, monitoring.metrics disabled",
"do not stop when running, monitoring.metrics disabled",
true, true, true,
`
agent.monitoring.metrics: false
`,
false, false, true,
true, false, false,
},
{
"stop stopped server",
false, false, false,
`
agent.monitoring.metrics: false
agent.monitoring.enabled: false
`,
false, false, false,
},
Expand Down

0 comments on commit 08378a4

Please sign in to comment.