You've already forked postgres_exporter
mirror of
https://github.com/prometheus-community/postgres_exporter.git
synced 2025-08-09 15:42:47 +03:00
Fixed "Scrape Duration" if psql down (#426)
Co-authored-by: Will Rouesnel <wrouesnel@wrouesnel.com>
This commit is contained in:
committed by
GitHub
parent
8c27e97b77
commit
bfd0707e37
@@ -1046,7 +1046,7 @@ func (s *Servers) GetServer(dsn string) (*Server, error) {
|
||||
var err error
|
||||
var ok bool
|
||||
errCount := 0 // start at zero because we increment before doing work
|
||||
retries := 3
|
||||
retries := 1
|
||||
var server *Server
|
||||
for {
|
||||
if errCount++; errCount > retries {
|
||||
|
Reference in New Issue
Block a user