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

Panic on agent.interval = "0s" #2554

Closed
danielnelson opened this issue Mar 20, 2017 · 1 comment
Closed

Panic on agent.interval = "0s" #2554

danielnelson opened this issue Mar 20, 2017 · 1 comment
Labels
bug unexpected problem or unintended behavior
Milestone

Comments

@danielnelson
Copy link
Contributor

Bug report

When setting the agent.interval to "0s", telegraf panics.

Relevant telegraf.conf:

[agent]
  interval = "0s"

System info:

Telegraf vdev-87-g8514acdc (git: master 8514acd)

Steps to reproduce:

  1. Set agent.interval to "0s"
  2. Start telegraf

Expected behavior:

Telegraf should report an error and exit.

Actual behavior:

2017/03/20 16:26:27 I! Using config file: /home/dbn/.telegraf/telegraf.conf
2017-03-20T23:26:27Z I! Starting Telegraf (version dev-88-ga962e958)
2017-03-20T23:26:27Z I! Loaded outputs: file
2017-03-20T23:26:27Z I! Loaded inputs: inputs.logparser
2017-03-20T23:26:27Z I! Tags enabled: host=loaner
2017-03-20T23:26:27Z I! Agent Config: Interval:0s, Quiet:false, Hostname:"loaner", Flush Interval:5s 
2017/03/20 16:26:27 Seeked 2484.log - &{Offset:0 Whence:0}
panic: runtime error: integer divide by zero

goroutine 1 [running]:
github.com/influxdata/telegraf/agent.(*Agent).Run(0xc42000e038, 0xc420430180, 0x0, 0x0)
        /home/dbn/src/influx/src/github.com/influxdata/telegraf/agent/agent.go:364 +0x569
main.reloadLoop(0xc420286060, 0x19d47f8, 0x0, 0x0, 0x19d47f8, 0x0, 0x0, 0x19d47f8, 0x0, 0x0, ...)
        /home/dbn/src/influx/src/github.com/influxdata/telegraf/cmd/telegraf/telegraf.go:214 +0xa01
main.main()
        /home/dbn/src/influx/src/github.com/influxdata/telegraf/cmd/telegraf/telegraf.go:367 +0x647

Additional info:

#2546

@danielnelson danielnelson added the bug unexpected problem or unintended behavior label Mar 20, 2017
@danielnelson danielnelson added this to the 1.3.0 milestone Mar 20, 2017
@danielnelson danielnelson modified the milestones: 1.4.0, 1.3.0 May 2, 2017
dsalbert pushed a commit to dsalbert/telegraf that referenced this issue Jul 17, 2017
@danielnelson
Copy link
Contributor Author

Fixed in 1.4

dsalbert pushed a commit to dsalbert/telegraf that referenced this issue Jul 18, 2017
@danielnelson danielnelson modified the milestones: 1.3.5, 1.4.0 Jul 25, 2017
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
Projects
None yet
Development

No branches or pull requests

1 participant