-
-
Notifications
You must be signed in to change notification settings - Fork 109
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
.json file output format #369
Comments
if anyone needs it i did a bash script in order to reformat in a valid json format :
|
Hello, I've been using scaphandre json exporter for more than a year since V0.5.0 and had no issues. I'm also facing the same issue as soon as I installed the new version v1.0. My environment is windows 11 which means it's a platform independent issue appeared with the latest release. Looking forward to hearing from you soon. |
Hi ! Thank you for raising this issue, I tried a PR here. Let me know if you can try this branch before it makes it to dev, I'd love to hear feedbacks. |
Hi, |
Hi, Did you build scaphandre on the branch '369-json-file-output-format' ? |
Hello, just tried it, works fine for me. Thanks for your work ! 👍 |
Hi @bpetit Yes that's what I did. |
Hi ! Thanks @ErwinBoltz for the feedback. @joegharbi this has been merged to dev. Could you confirm, you still have the issue with the latest dev and provide an output please ? |
@bpetit Good news it is now giving the correct format from the json exporter. |
This is another issue. It might be because the driver is not properly set up. Did you install it as an administrator (this is still needed, but might not be needed in the future) ? Could you open a dedicated issue if it remains as it is ? thanks |
Lets follow up on #376 @joegharbi then :) |
Hello !
To begin, just wanted to say thanks 🥇
i'm not quite sure this is an unexpected behavior so please tell me if i'm missing something or doing something wrong !
Bug description
The .json file when using json exporter is incorrectly outputed.
To Reproduce
My goal was to use scaphandre in order to monitor the consumption of a docker container.
So for example i did this :
./scaphandre json --containers -t 15 -s 5 -f report.json
you will get a report.json file formated like this :
{"host": { ... } }{"host": { ... } }{"host": { ... } }
The problem is that if you want to use this json file ( i'm using Python in order to get the data i'm interessed in ) it contains multiple JSON objects concatenated together without proper separation.
This format causes the JSON parser to encounter an error because it expects only one JSON object per file.
Expected behavior
Each JSON object should be separated by a comma , or be placed in an array [...].
[
{"host": { ... } },
{"host": { ... } },
{"host": { ... } }
]
or
{"host": { ... } },
{"host": { ... } },
{"host": { ... } }
Environment
The text was updated successfully, but these errors were encountered: