1
0
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:
alexey-gavrilov-flant
2020-12-24 18:39:07 +03:00
committed by GitHub
parent 8c27e97b77
commit bfd0707e37

View File

@@ -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 {