File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -112,7 +112,6 @@ func (r *Reaper) Reap(ctx context.Context) {
112
112
} else {
113
113
metricsConfig = monitoredSource .Metrics
114
114
}
115
- hostLastKnownStatusInRecovery [monitoredSource .Name ] = monitoredSource .IsInRecovery
116
115
117
116
r .CreateSourceHelpers (ctx , srcL , monitoredSource )
118
117
@@ -133,15 +132,14 @@ func (r *Reaper) Reap(ctx context.Context) {
133
132
if monitoredSource .IsInRecovery && len (monitoredSource .MetricsStandby ) > 0 {
134
133
srcL .Warning ("Switching metrics collection to standby config..." )
135
134
metricsConfig = monitoredSource .MetricsStandby
136
- hostLastKnownStatusInRecovery [monitoredSource .Name ] = true
137
- } else {
135
+ } else if ! monitoredSource .IsInRecovery {
138
136
srcL .Warning ("Switching metrics collection to primary config..." )
139
137
metricsConfig = monitoredSource .Metrics
140
- hostLastKnownStatusInRecovery [monitoredSource .Name ] = false
141
138
}
139
+ // else: it already has primary config do nothing + no warn
142
140
}
143
-
144
141
}
142
+ hostLastKnownStatusInRecovery [monitoredSource .Name ] = monitoredSource .IsInRecovery
145
143
146
144
for metricName , interval := range metricsConfig {
147
145
metric := metricName
You can’t perform that action at this time.
0 commit comments