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

JSON in message field is no parsed #11

Closed
michael-aldridge opened this issue Feb 18, 2019 · 7 comments
Closed

JSON in message field is no parsed #11

michael-aldridge opened this issue Feb 18, 2019 · 7 comments

Comments

@michael-aldridge
Copy link

Kibana just shows the message fields as a JSON blob instead of pulling out each of the fields. Think this is an issue related to this.

See fluent/fluentd#2021

@idohalevi
Copy link
Contributor

@michael-aldridge
Can you please share a sample of the log the is not parsed?

@michael-aldridge
Copy link
Author

In my (node.js) app if I run

console.log(JSON.stringify({event: 'starting request', thing: 'other'}));

I get this as part of my kibana log (viewing the log using the JSON tab)

 "message": "{\"event\":\"starting request\",\"thing\":\"other\"}\n",

@idohalevi
Copy link
Contributor

@michael-aldridge
I'll take a look.

@bdashrad
Copy link
Contributor

We had the same issue. One problem we ran into is that some of the docker logs are in json format and some are not, and trying to deal with this conditionally in fluentd was problematic. We ended up not parsing the json on the fluentd side and having logz.io parse it conditionally after shipping.

@bdashrad
Copy link
Contributor

It's because of this change made to fluent-plugin-kubernetes_metadata_filter, where they stopped parsing nested json.

@idohalevi
Copy link
Contributor

@bdashrad @michael-aldridge
I read the thread you both mentioned. For now, we will keep parsing it on our (Logz.io) side - contact support.
If you feel in any way you prefer otherwise let me know or send a PR here with the solution.

@bahtou
Copy link

bahtou commented Jun 10, 2019

@michael-aldridge what was the solution for you?

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

4 participants