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

cannot parse Float type #44

Closed
1160300616 opened this issue Jan 28, 2021 · 1 comment
Closed

cannot parse Float type #44

1160300616 opened this issue Jan 28, 2021 · 1 comment

Comments

@1160300616
Copy link

Hello, I found a bug in the code.
Metrics in system.asynchronous_ values may not be of Int type, but may also be of Float type.
If the code is not modified, when a value of float type appears in metrics, the following problems will occur:

Error scraping clickhouse url http://xxx :8123/?query=select+metric%2C+value+from+ system.asynchronous_ metrics: strconv.Atoi : parsing "2199.998": invalid syntax file= exporter.go line=292

After the code in exporter.go is modified as follows, the problem is solved
q.Set("query", "select metric, value from system.asynchronous_ metrics") -> q.Set("query", "select metric, toInt64(value) from system.asynchronous_ metrics")

@f1yegor
Copy link
Contributor

f1yegor commented Jun 17, 2021

Fix in master. Thanks for reporting

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

3 participants