-
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
FlattenJSON not working as expected with hashes/maps/objects (and sometimes with elements that doesn't have recursion) #729
Comments
you should use a supported version, I can't reproduce on HEAD of master. Building from source on any branch is basically not supported. If you want to build a specific version from source, use tags. |
Well, maybe I did not expressed myself very well.
So, your answer or closing the topic definetely didn't help me What do you suggest? Build from source code and try the same input file? Or building from HEAD will give me the same binary than from the package marked as latest on README.md? |
If you can give me steps to reproduce I can try to debug further, but from my testing it's working fine. Seems as if maybe the API you are querying might not be returning the data you think it is? |
The API is returning exactly what I have attached here (just change the values, of course) I am building from source to check if the problem persists EDIT: @sparrc Didn't work Here is my telegraf.conf (even with API key):
|
@barongello got it, I'm investigating now... |
@sparrc Thank you. I am not fluent in Go. I can understand most parts, but some things makes no sense to me yet Also, I don't know how to debug and such, otherwise I could trace it and maybe do a PR |
okay, I was able to reproduce, re-opening the issue |
@barongello it looks like this PR: #712 broke the httpjson GET parameters, unfortunately 👎 This will fix it: #746 In the meantime, you should use Telegraf 0.10.2 and set your api key as a parameter of the http request, like this:
|
@sparrc Thank you I don't even tryed passing the parameters outside the server URL Tested now as you said and it is working in 0.10.2 (just needed to remove flush_buffer_when_full from the telegraf.conf because it was giving:
Will keep on this version as long as I need an API like that for my tests Also I started studying Go too. Hope I can contribute to TICK soon, I really liked it |
closed by #746 |
I was searching for time series databases and found TICK. Started to play around and then I was in need of time series. I opened a LiteCoinPool account to mine LTC using just CPU to have a poor performance while I was using the computer to work, play games, etc.
The pool give me access to a JSON API, which I setted as the feeder
So I used httpjson as input and InfluxDB as output on Telegraf
I got results like the file response.json.txt
The pool, network and market keys were successfully parsed and stored into InfluxDB
But the user and workers keys were not parsed
Then I ran Telegraf in test and debug mode to see, which gave me the following results:
So I came to the source code (the same code was also present on branch 0.3.1 when I created this issue, but now the branch 0.3.1 is gone) of FlattenJSON to see if I can figure out what was happening
I am not fluent in Go, but, when a field value is a hash/map/object, it goes through it recursively (as did on keys pool, network and market)
Is it a problem/issue/bug or am I missing something here?
Thank you in advance
The text was updated successfully, but these errors were encountered: