mirror of
https://github.com/prometheus-community/windows_exporter
synced 2025-02-08 23:58:58 +00:00
Reset mssql child failure counter on each scrape
Resolves issue where collector would always return a failure after an inital failure, as the counter was not reset. Signed-off-by: Ben Reedy <breed808@breed808.com>
This commit is contained in:
parent
769b15eb86
commit
a1a986f4d0
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user