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

collector crashed on non-English server environments #275

Closed
zealot128 opened this issue Nov 21, 2012 · 2 comments
Closed

collector crashed on non-English server environments #275

zealot128 opened this issue Nov 21, 2012 · 2 comments

Comments

@zealot128
Copy link

Running latest stable releae on a Ubuntu 12.04 (German) server, crashes collector, due to decimal seperator:

Traceback (most recent call last):
  File "agent/agent.py", line 198, in <module>
    daemon.run()
  File "agent/agent.py", line 84, in run
    c.doChecks(True, systemStats, checksd)
  File "/profiles/swi/.datadog-agent/agent/checks/common.py", line 230, in doChecks
    cpuStats = sys_checks['cpu'].check(self.checksLogger, self.agentConfig)
  File "/profiles/swi/.datadog-agent/agent/checks/system/unix.py", line 590, in check
    cpu_usr = get_value(headers, data, "%usr")
  File "/profiles/swi/.datadog-agent/agent/checks/system/unix.py", line 554, in get_value
    return float(data[legend.index(name)])
ValueError: invalid literal for float(): 0,17

Traceback (most recent call last):
  File "agent/agent.py", line 198, in <module>
    daemon.run()
  File "agent/agent.py", line 84, in run
    c.doChecks(True, systemStats, checksd)
  File "/profiles/swi/.datadog-agent/agent/checks/common.py", line 230, in doChecks
    cpuStats = sys_checks['cpu'].check(self.checksLogger, self.agentConfig)
  File "/profiles/swi/.datadog-agent/agent/checks/system/unix.py", line 590, in check
    cpu_usr = get_value(headers, data, "%usr")
  File "/profiles/swi/.datadog-agent/agent/checks/system/unix.py", line 554, in get_value
    return float(data[legend.index(name)])
ValueError: invalid literal for float(): 0,21

Workaround:

export LC_ALL=en_US.UTF-8

(before was de_DE.UTF-8)

Output from mpstat 1 3 (which is run from unix.py:554)

$ mpstat 1 3
Linux 3.2.0-32-generic (hal)    21.11.2012      _x86_64_        (8 CPU)

23:58:14     CPU    %usr   %nice    %sys %iowait    %irq   %soft  %steal  %guest   %idle
23:58:15     all    0,25    0,00    0,62    0,00    0,00    0,12    0,00    0,00   99,00
23:58:16     all    0,25    0,00    0,25    0,00    0,00    0,00    0,00    0,00   99,50
23:58:17     all    0,13    0,00    0,25    0,00    0,00    0,00    0,00    0,00   99,62
Average:     all    0,21    0,00    0,38    0,00    0,00    0,04    0,00    0,00   99,37
@alq666
Copy link
Member

alq666 commented Nov 22, 2012

We fixed this in the packaged versions (#80) but must have left it out from the source install.

@alq666
Copy link
Member

alq666 commented Sep 22, 2013

#676 has a better fix, since LC_ALL overrides LANG and we were using LANG up until now.

@alq666 alq666 closed this as completed Dec 23, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants