Getting Data In

Splunk Parsing - How to do it

deepak312
Explorer

I have below json that is printed in logs,

{
  "timestamp": "2019-08-15T07:30:10,472Z",
  "level": "INFO",
  "thread": "xyz.default-dispatcher-27",
  "message": "Some message",
  "logger": "com.abc.xyz",
  "run_number": 1,
  "id": "123",
  "type_id": "Test",
  "roll_number": "12889",
  "status": "Fail",
  "comments": "Result failed",
  "new_map": {
    "8890": {
      "number": "null"
    }
  },
  "old_map": {
    "8890": {
      "number": "86"
    }
  },
  "condition_id": "65",
  "created_date": "2019-07-24",
  "modified_date": "2019-07-25"
}

I need to create a table to print id, roll_number, new_map and old_map. Tried using spath but no luck. Any help would be appreciated.

0 Karma

apcsplunk
Explorer

It auto-extracted for me and i just had to type "| table id, roll_number, new_map.8890.number, old_map.8890.number"
May be you can clarify more on what should be the expected result

0 Karma
Get Updates on the Splunk Community!

Splunk + ThousandEyes: Correlate frontend, app, and network data to troubleshoot ...

 Are you tired of troubleshooting delays caused by siloed frontend, application, and network data? We've got a ...

Splunk Observability for AI

Don’t miss out on an exciting Tech Talk on Splunk Observability for AI!Discover how Splunk’s agentic AI ...

🔐 Trust at Every Hop: How mTLS in Splunk Enterprise 10.0 Makes Security Simpler

From Idea to Implementation: Why Splunk Built mTLS into Splunk Enterprise 10.0  mTLS wasn’t just a checkbox ...