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

hierarchical JSON in log #111

Open
r-moiseev opened this issue Nov 15, 2018 · 2 comments
Open

hierarchical JSON in log #111

r-moiseev opened this issue Nov 15, 2018 · 2 comments

Comments

@r-moiseev
Copy link

Hi,

Our log message looks like

{
  "message": "som message"
  "context": {some json}
}

Problem is, with current fluentd configuration, context goes to clickhouse as a plain text (with => symbol in place of :), and there is no way to filter logs against fields in context.

Is there way to fix it?
Thanks.

@diafour diafour mentioned this issue Dec 6, 2018
@diafour
Copy link
Contributor

diafour commented Dec 6, 2018

PR #115 contains a workaround for hierarchical JSON problem. It is applicable if json log contains a specific key.

I think we need a more generalized approach to this problem. For example implement mapping with like this:

original:
{
  "message": "som message"
  "context": {
    "path":"/",
    "username":"admin"
  }
  "params": ["green", "red", "blue" ]
}


resulting string_fields:

message = "som message"
context.path = "/"
context.username="admin"
params.0 = "green"
params.1 = "red"
params.2 = "blue"

@kiaplayer
Copy link

Any news about the issue?

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