Skip to content
Snippets Groups Projects
Unverified Commit b1945c04 authored by Cosmo Petrich's avatar Cosmo Petrich Committed by Cameron Sparr
Browse files

Increment gather_errors for all input errors

closes #2339
parent 1c4673e9
No related branches found
No related tags found
No related merge requests found
...@@ -40,6 +40,7 @@ It is highly recommended that all users migrate to the new riemann output plugin ...@@ -40,6 +40,7 @@ It is highly recommended that all users migrate to the new riemann output plugin
- [#2277](https://github.com/influxdata/telegraf/pull/2277): add integer metrics for Consul check health state. - [#2277](https://github.com/influxdata/telegraf/pull/2277): add integer metrics for Consul check health state.
- [#2201](https://github.com/influxdata/telegraf/pull/2201): Add lock option to the IPtables input plugin. - [#2201](https://github.com/influxdata/telegraf/pull/2201): Add lock option to the IPtables input plugin.
- [#2244](https://github.com/influxdata/telegraf/pull/2244): Support ipmi_sensor plugin querying local ipmi sensors. - [#2244](https://github.com/influxdata/telegraf/pull/2244): Support ipmi_sensor plugin querying local ipmi sensors.
- [#2339](https://github.com/influxdata/telegraf/pull/2339): Increment gather_errors for all errors emitted by inputs.
### Bugfixes ### Bugfixes
......
...@@ -157,13 +157,13 @@ func gatherWithTimeout( ...@@ -157,13 +157,13 @@ func gatherWithTimeout(
select { select {
case err := <-done: case err := <-done:
if err != nil { if err != nil {
log.Printf("E! ERROR in input [%s]: %s", input.Name(), err) acc.AddError(err)
} }
return return
case <-ticker.C: case <-ticker.C:
log.Printf("E! ERROR: input [%s] took longer to collect than "+ err := fmt.Errorf("took longer to collect than collection interval (%s)",
"collection interval (%s)", timeout)
input.Name(), timeout) acc.AddError(err)
continue continue
case <-shutdown: case <-shutdown:
return return
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment