-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
Panic error when telegraf starts #1322
Comments
could you provide your config file? Looks like you can workaround this for the time being by disabling the |
This is my config file. Now I've disabled the diskio plugin to gather the other metrics. Do you think is it possible to fix it? Thanks |
Should be able to fix the panic, but I'm not quite sure I understand how this is happening. Can you run the following commands on the system you are seeing this on?
and
|
diskstats: [root@cw-spmi-oas05 collectd]# cat /proc/diskstats uname Linux cw-spmi-oas05 2.6.18-92.el5 #1 SMP Tue Apr 29 13:16:15 EDT 2008 x86_64 x86_64 x86_64 GNU/Linux Thanks |
FWIW, your OS was released over 8 years ago, is there a reason you haven't updated to redhat 5.10? It's possible this is a bug in your kernel, specifically, do you know why these lines don't have 14 fields?:
|
looks like this is fixed in RHEL 5.3: https://bugzilla.redhat.com/show_bug.cgi?id=583285 I'm inclined to close this as "won't fix" unless you have a compelling reason not to upgrade |
Sadly I cannot upgrade but I understand that I could be the only one to have it :( Thanks |
I think it will actually be a fairly easy to fix, but requires a patch to a dependency of telegraf (gopsutil). I'll keep this issue open but I'm not sure I'll be able to get it into the next release. |
Old kernels have a bug in diskstats where lines can have less than 14 fields. This applies to the kernel present in RHEL 5.2 and earlier. It's a bit of a niche but probably best to patch to be safe from future bugs too. RHEL bug case: https://bugzilla.redhat.com/show_bug.cgi?id=583285 Encountered in Telegraf: influxdata/telegraf#1322
fixed was merged, so I will close this shortly |
Great, thanks |
Bug report
System info:
telegraf version: 0.13.1
system: red hat 5.2
Steps to reproduce:
Expected behavior:
Actual behavior:
The following error:
2016/06/03 11:04:43 Starting Telegraf (version 0.13.1)
2016/06/03 11:04:43 Loaded outputs: influxdb
2016/06/03 11:04:43 Loaded inputs: disk net kernel mem processes swap system cpu diskio
2016/06/03 11:04:43 Tags enabled: host=cw-spmi-oas05
2016/06/03 11:04:43 Agent Config: Interval:10s, Debug:false, Quiet:false, Hostname:"cw-spmi-oas05", Flush Interval:10s
panic: runtime error: index out of range
goroutine 69 [running]:
panic(0x107ebc0, 0xc82000e080)
/usr/local/go/src/runtime/panic.go:481 +0x3e6
github.com/shirou/gopsutil/disk.IOCounters(0x0, 0x0, 0x0)
/home/ubuntu/telegraf-build/src/github.com/shirou/gopsutil/disk/disk_linux.go:299 +0x823
github.com/influxdata/telegraf/plugins/inputs/system.(_systemPS).DiskIO(0x1c78550, 0x0, 0x0, 0x0)
/home/ubuntu/telegraf-build/src/github.com/influxdata/telegraf/plugins/inputs/system/ps.go:118 +0x28
github.com/influxdata/telegraf/plugins/inputs/system.(_DiskIOStats).Gather(0xc8200116e0, 0x2aaaaac8b638, 0xc820132330, 0x0, 0x0)
/home/ubuntu/telegraf-build/src/github.com/influxdata/telegraf/plugins/inputs/system/disk.go:104 +0x67
github.com/influxdata/telegraf/agent.gatherWithTimeout.func1(0xc8203be480, 0xc820011740, 0xc820132330)
/home/ubuntu/telegraf-build/src/github.com/influxdata/telegraf/agent/agent.go:174 +0x73
created by github.com/influxdata/telegraf/agent.gatherWithTimeout
/home/ubuntu/telegraf-build/src/github.com/influxdata/telegraf/agent/agent.go:175 +0xe0
The text was updated successfully, but these errors were encountered: