Getting Data In

Nested logs are not parsed correctly

TKelly
Explorer

I have nested events that look like this in Splunk:

container_id: 13243d84e63d8d5b56c5
container_name: /ecs-stg-compute-instances-226-ur-2-c499f4ac
log: {"module": "ur.uhg", "functions": ["unlock_user_processing"], "session-id": "XUHWnDAAkR3AwrsXxtL339z9rEf-l", "email": "xxx@gmail.com", "user-id": 3, "user-account-id": 3, "start-time": "2021-11-08T19:59:36.711483", "end-time": null, "callback-function": "calculate_metrics", "emails-processed": 316, "emails-left-to-process": 0, "images-processed": 316, "iterations": 5, "iteration-times": [56.61728, 162.878587, 43.512794, 24.918005, 0.954233], "event": "chained_functions() called.", "level": "debug", "timestamp": "2021-11-08T20:04:25.905376Z"}
 source: stdout

and a 'log' value is seen like a string even so it's a JSON object. How can I  parse "log" value into key/value pairs?? 

Labels (1)
0 Karma
1 Solution

ITWhisperer
SplunkTrust
SplunkTrust
| spath input=log

View solution in original post

ITWhisperer
SplunkTrust
SplunkTrust
| spath input=log
Get Updates on the Splunk Community!

Combine Multiline Logs into a Single Event with SOCK - a Guide for Advanced Users

This article is the continuation of the “Combine multiline logs into a single event with SOCK - a step-by-step ...

Everything Community at .conf24!

You may have seen mention of the .conf Community Zone 'round these parts and found yourself wondering what ...

Index This | I’m short for "configuration file.” What am I?

May 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with a Special ...