Skip to content

Commit 303c934

Browse files
authored
Improve warning when collector is paused by duplicate process (#698)
1 parent 126d69d commit 303c934

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

runner/activity.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ func processActivityForServer(ctx context.Context, server *state.Server, opts st
2424
newState := server.ActivityPrevState
2525

2626
if server.Pause.Load() {
27-
logger.PrintVerbose("Snapshot processing disabled by pganalyze server")
27+
logger.PrintVerbose("Duplicate collector detected: Please ensure only one collector is monitoring this Postgres server")
2828
return newState, false, nil
2929
}
3030

runner/full.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ func processServer(ctx context.Context, server *state.Server, opts state.Collect
105105
newGrant.Config = pganalyze_collector.ServerMessage_Config{Features: &pganalyze_collector.ServerMessage_Features{}}
106106

107107
if server.Pause.Load() {
108-
logger.PrintWarning("Snapshot processing disabled by pganalyze server")
108+
logger.PrintWarning("Duplicate collector detected: Please ensure only one collector is monitoring this Postgres server")
109109
return newState, newGrant, collectionStatus, nil
110110
}
111111

selftest/summary.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ func summarizeDbChecks(status *state.SelfTestResult, aspect state.DbCollectionAs
139139
} else if len(checks) > 1 {
140140
summaryMsg = fmt.Sprintf("ok in %s and %d other monitored database(s)%s", firstDb, len(checks)-1, verboseHint)
141141
} else {
142-
summaryMsg = fmt.Sprintf("ok in %s (no other databases are configured to be monitored)", firstDb)
142+
summaryMsg = fmt.Sprintf("ok in %s (no other databases are monitored)", firstDb)
143143
}
144144

145145
return icon, summaryMsg

0 commit comments

Comments
 (0)