mirror of
https://github.com/prometheus-community/postgres_exporter
synced 2025-04-04 23:29:30 +00:00
Fixed "Scrape Duration" if psql down (#426)
Co-authored-by: Will Rouesnel <wrouesnel@wrouesnel.com>
This commit is contained in:
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 {
|
||||
|
Loading…
Reference in New Issue
Block a user