diff --git a/collector/mssql.go b/collector/mssql.go index 4f746146..17bf8c4e 100644 --- a/collector/mssql.go +++ b/collector/mssql.go @@ -1808,6 +1808,8 @@ func NewMSSQLCollector() (Collector, error) { type mssqlCollectorFunc func(ctx *ScrapeContext, ch chan<- prometheus.Metric, sqlInstance string) (*prometheus.Desc, error) func (c *MSSQLCollector) execute(ctx *ScrapeContext, name string, fn mssqlCollectorFunc, ch chan<- prometheus.Metric, sqlInstance string, wg *sync.WaitGroup) { + // Reset failure counter on each scrape + c.mssqlChildCollectorFailure = 0 defer wg.Done() begin := time.Now()