Quantcast
Channel: Questions in topic: "splunk-enterprise"
Viewing all articles
Browse latest Browse all 47296

Extracting JSON/XML from string entry and dispalying in table

$
0
0
Hi I am trying to extract various fields from below entry in splunk. I executed the below splunk query : index=test_index source="testlogs.log" "InteractionId=test_interaction_id1" | search("||url") | table service,operation,status,status_code,exception,duration,url,request, response The below is splunk log entry: 2019-02-28 22:21:34.248 [UUID=d791aecb-c320-453a-9207-bf96e01beaaf|InteractionId=test_interaction_id1] INFO com.test.MyLogger - service="TestService"||operation="testOperation"||url="http://localhost:8080/testservice/v4/testOperation"||request="{\"customer\":{\"id\":\"80\",\"name\":\"John\"}}"||request_headers="{Content-Type=application/json,cache-control=no-cache,Accept=application/json}"||response="{\"customerType\":\FIXED\"}"||response_headers="{Set-Cookie=;secure;HttpOnly}"||status="SUCCESS"||status_code="200"||duration="95ms" request and response fields which are XML or JSON are not displayed properly in the table. XML is displayed as

Viewing all articles
Browse latest Browse all 47296

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>