loghouse
loghouse copied to clipboard
hierarchical JSON in log
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.
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"
Any news about the issue?