fix(inputs.win_perf_counters): Check errors post-collection for skip (#14526)
This commit is contained in:
parent
f0156d4503
commit
9035355215
|
|
@ -457,7 +457,7 @@ func (m *WinPerfCounters) Gather(acc telegraf.Accumulator) error {
|
||||||
start := time.Now()
|
start := time.Now()
|
||||||
err := m.gatherComputerCounters(hostInfo, acc)
|
err := m.gatherComputerCounters(hostInfo, acc)
|
||||||
m.Log.Debugf("Gathering from %s finished in %v", hostInfo.computer, time.Since(start))
|
m.Log.Debugf("Gathering from %s finished in %v", hostInfo.computer, time.Since(start))
|
||||||
if err != nil {
|
if err != nil && m.checkError(err) != nil {
|
||||||
acc.AddError(fmt.Errorf("error during collecting data on host %q: %w", hostInfo.computer, err))
|
acc.AddError(fmt.Errorf("error during collecting data on host %q: %w", hostInfo.computer, err))
|
||||||
}
|
}
|
||||||
wg.Done()
|
wg.Done()
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue