Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Telegraf with windows performance counters crashes after long run #1425

Closed
splatch opened this issue Jun 29, 2016 · 2 comments
Closed

Telegraf with windows performance counters crashes after long run #1425

splatch opened this issue Jun 29, 2016 · 2 comments
Labels
bug unexpected problem or unintended behavior platform/windows

Comments

@splatch
Copy link

splatch commented Jun 29, 2016

I run telegraf on windows machine and I am interested in it's network traffic statistics. I found interesting performance counters and simply put them into telegraf configuration to grab these statistics. Everything works fine, however after a while telegraf crashes with following message:

2016/06/27 20:26:16 Output [influxdb] buffer fullness: 86 / 1000 metrics. Total gathered metrics: 4669640. Total dropped metrics: 0.
2016/06/27 20:26:16 Output [influxdb] wrote batch of 86 metrics in 0
2016/06/27 20:26:26 Input [net] gathered metrics, (10s interval) in 0
2016/06/27 20:26:26 Input [win_perf_counters] gathered metrics, (10s interval) in 0
2016/06/27 20:26:26 Output [influxdb] buffer fullness: 86 / 1000 metrics. Total gathered metrics: 4669726. Total dropped metrics: 0.
2016/06/27 20:26:26 Output [influxdb] wrote batch of 86 metrics in 0
2016/06/27 20:26:36 Input [net] gathered metrics, (10s interval) in 0
panic: runtime error: index out of range

goroutine 217140 [running]:
panic(0x10256e0, 0xc08200c020)
        /usr/local/go/src/runtime/panic.go:481 +0x3f4
github.com/influxdata/telegraf/plugins/inputs/win_perf_counters.(*Win_PerfCounters).Gather(0xc08217a700, 0x2d3ab8, 0xc08267fce0, 0x0, 0x0)
        /home/ubuntu/telegraf-build/src/github.com/influxdata/telegraf/plugins/inputs/win_perf_counters/win_perf_counters.go:275 +0x81a
github.com/influxdata/telegraf/agent.gatherWithTimeout.func1(0xc082468a20, 0xc082006780, 0xc08267fce0)
        /home/ubuntu/telegraf-build/src/github.com/influxdata/telegraf/agent/agent.go:174 +0x7a
created by github.com/influxdata/telegraf/agent.gatherWithTimeout
        /home/ubuntu/telegraf-build/src/github.com/influxdata/telegraf/agent/agent.go:175 +0xe7

Relevant telegraf.conf:

https://gist.github.com/splatch/d162f7916c662bc9145f8b8afd68064b

System info:

Windows Server 2012 R2
Telegraf 0.13.1 (amd64)

Steps to reproduce:

  1. Launch telegraf with attached configuration
  2. Wait

Additional info:

No other symptoms which could cause this issue. Telegraf runs with no problems and then crashes.

@sparrc sparrc added bug unexpected problem or unintended behavior platform/windows labels Jun 30, 2016
@superzadeh
Copy link

I can also reproduce this issue.

@steverweber
Copy link

steverweber commented Aug 9, 2016

looks like the service option got merged...
#1543

so could hack around this issue using windows service set to auto restart.

https://technet.microsoft.com/en-us/library/cc742019(v=ws.11).aspx

sc failure telegraf reset= 60000  actions= restart/30000/restart/300000

not a good solution but might be helpful.

edit: untested

sparrc added a commit that referenced this issue Aug 9, 2016
sparrc added a commit that referenced this issue Aug 9, 2016
sparrc added a commit that referenced this issue Aug 9, 2016
@sparrc sparrc closed this as completed in abcd194 Aug 9, 2016
aurrelhebert pushed a commit to aurrelhebert/telegraf that referenced this issue Aug 9, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug unexpected problem or unintended behavior platform/windows
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants