loggie icon indicating copy to clipboard operation
loggie copied to clipboard

[Critical] HOW TO PARSE JSON LOGS USING LOGGIE

Open Praveen2099 opened this issue 1 year ago • 2 comments

Praveen2099 avatar Jan 11 '24 08:01 Praveen2099

Source logs is

{"log":"{"myfield1": "hello world", "myfield2": "ok", "app": "my-app" }\n","stream":"stdout","time":"2024-01-11T06:58:56.042165722Z"}

I want all fields extracted in key value to store in opensearch

Praveen2099 avatar Jan 11 '24 08:01 Praveen2099

Source logs is

{"log":"{"myfield1": "hello world", "myfield2": "ok", "app": "my-app" }\n","stream":"stdout","time":"2024-01-11T06:58:56.042165722Z"}

I want all fields extracted in key value to store in opensearch

Hi, you need use Interceptors transformer jsonDecode - https://loggie-io.github.io/docs-en/reference/pipelines/interceptor/transformer/#jsondecodekey

sentoz avatar Jan 15 '24 12:01 sentoz