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

Sysstat plugin needs LANG=C or similar locale #1911

Closed
NerdyProjects opened this issue Oct 17, 2016 · 0 comments · Fixed by #2690
Closed

Sysstat plugin needs LANG=C or similar locale #1911

NerdyProjects opened this issue Oct 17, 2016 · 0 comments · Fixed by #2690
Assignees
Labels
bug unexpected problem or unintended behavior
Milestone

Comments

@NerdyProjects
Copy link

Bug report

When running on a system with default locale de_DE (e.g. one, where numbers are formatted differently), the sysstat plugin output can not be parsed:

2016/10/17 15:10:49 ERROR in input [sysstat]: strconv.ParseFloat: parsing "13,11": invalid syntax
strconv.ParseFloat: parsing "139,00": invalid syntax
strconv.ParseFloat: parsing "0,00": invalid syntax

(...)

Putting LANG=C in /etc/default/telegraf fixes the problem.

System info:

Debian GNU/Linux 8 (jessie)
Linux banana 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt25-1 (2016-03-06) x86_64 GNU/Linux
telegraf 0.1-1 amd64

Steps to reproduce:

  1. make sure, you have the de_DE.UTF-8 locale installed (`echo de_DE.UTF-8 UTF-8 >> /etc/locale.gen; locale-gen)
  2. LANG=de_DE.UTF-8 telegraf -debug

Expected behavior:

No errors appear

Actual behavior:

ParseFloat is not able to parse the sysstat output

Additional info:

Proposal:

Document this behaviour or better set a default compatible locale. I am not sure if this is the proper solution.

@danielnelson danielnelson added the bug unexpected problem or unintended behavior label Apr 18, 2017
@danielnelson danielnelson added this to the 1.3.0 milestone Apr 18, 2017
danielnelson added a commit that referenced this issue Apr 20, 2017
danielnelson added a commit that referenced this issue Apr 21, 2017
danielnelson added a commit that referenced this issue Apr 21, 2017
vlamug pushed a commit to vlamug/telegraf that referenced this issue May 30, 2017
maxunt pushed a commit that referenced this issue Jun 26, 2018
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

Successfully merging a pull request may close this issue.

3 participants