<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Extract jSON formated data in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Extract-jSON-formated-data/m-p/666932#M228775</link>
    <description>&lt;P&gt;below is the sample json log content the main filelds are default extracts but the nested aren't. Please help to extract the nested space separated data as fields&lt;BR /&gt;&lt;BR /&gt;The one I want to extract as a separate field is the line&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;tag: service=z2-qa1-local-z2-api-endpoint APPID=1234 cluster=z2-qa1-local application=z2 full-imagename=0123456789.dkr.10cal/10.20/xyz container-id=asdfgh503 full-container-id=1234567890&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;U&gt;Whole log event&lt;/U&gt;&lt;BR /&gt;{ [-]&lt;BR /&gt;line: { [-]&lt;BR /&gt;@timestamp: 2023-10-31T20:36:57.092Z&lt;BR /&gt;class: x.x.x.x.x.Logging&lt;BR /&gt;exception:&lt;BR /&gt;line: 54&lt;BR /&gt;marker:&lt;BR /&gt;message: GET &lt;A href="https://00.00.000.000:123456/management/health" target="_blank"&gt;https://00.00.000.000:123456/management/health&lt;/A&gt; forwarded from [] by [] for unknown returned 200 in 1ms&lt;BR /&gt;pid: 7&lt;BR /&gt;severity: INFO&lt;BR /&gt;span: b60d05680b3cbfa7&lt;BR /&gt;thread: boundedElastic-9&lt;BR /&gt;trace: b60d05680b3cbfa7&lt;BR /&gt;}&lt;BR /&gt;source: stdout&lt;BR /&gt;tag: service=z2-qa1-local-z2-api-endpoint APPID=1234 cluster=z2-qa1-local application=z2 full-imagename=0123456789.dkr.10cal/10.20/xyz container-id=asdfgh503 full-container-id=1234567890&lt;BR /&gt;}&lt;/P&gt;</description>
    <pubDate>Tue, 31 Oct 2023 20:47:36 GMT</pubDate>
    <dc:creator>sathiyasun</dc:creator>
    <dc:date>2023-10-31T20:47:36Z</dc:date>
    <item>
      <title>Extract jSON formated data</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Extract-jSON-formated-data/m-p/666932#M228775</link>
      <description>&lt;P&gt;below is the sample json log content the main filelds are default extracts but the nested aren't. Please help to extract the nested space separated data as fields&lt;BR /&gt;&lt;BR /&gt;The one I want to extract as a separate field is the line&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;tag: service=z2-qa1-local-z2-api-endpoint APPID=1234 cluster=z2-qa1-local application=z2 full-imagename=0123456789.dkr.10cal/10.20/xyz container-id=asdfgh503 full-container-id=1234567890&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;U&gt;Whole log event&lt;/U&gt;&lt;BR /&gt;{ [-]&lt;BR /&gt;line: { [-]&lt;BR /&gt;@timestamp: 2023-10-31T20:36:57.092Z&lt;BR /&gt;class: x.x.x.x.x.Logging&lt;BR /&gt;exception:&lt;BR /&gt;line: 54&lt;BR /&gt;marker:&lt;BR /&gt;message: GET &lt;A href="https://00.00.000.000:123456/management/health" target="_blank"&gt;https://00.00.000.000:123456/management/health&lt;/A&gt; forwarded from [] by [] for unknown returned 200 in 1ms&lt;BR /&gt;pid: 7&lt;BR /&gt;severity: INFO&lt;BR /&gt;span: b60d05680b3cbfa7&lt;BR /&gt;thread: boundedElastic-9&lt;BR /&gt;trace: b60d05680b3cbfa7&lt;BR /&gt;}&lt;BR /&gt;source: stdout&lt;BR /&gt;tag: service=z2-qa1-local-z2-api-endpoint APPID=1234 cluster=z2-qa1-local application=z2 full-imagename=0123456789.dkr.10cal/10.20/xyz container-id=asdfgh503 full-container-id=1234567890&lt;BR /&gt;}&lt;/P&gt;</description>
      <pubDate>Tue, 31 Oct 2023 20:47:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Extract-jSON-formated-data/m-p/666932#M228775</guid>
      <dc:creator>sathiyasun</dc:creator>
      <dc:date>2023-10-31T20:47:36Z</dc:date>
    </item>
    <item>
      <title>Re: Extract jSON formated data</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Extract-jSON-formated-data/m-p/666943#M228781</link>
      <description>&lt;P&gt;Please share the raw, unformatted event in a code block &amp;lt;/&amp;gt; to preserve raw formatting.&lt;/P&gt;</description>
      <pubDate>Tue, 31 Oct 2023 23:16:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Extract-jSON-formated-data/m-p/666943#M228781</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2023-10-31T23:16:44Z</dc:date>
    </item>
    <item>
      <title>Re: Extract jSON formated data</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Extract-jSON-formated-data/m-p/666948#M228782</link>
      <description>&lt;P&gt;As&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225168"&gt;@ITWhisperer&lt;/a&gt;&amp;nbsp;said, illustrate structured data in raw format, not with Splunk's condensation.&lt;/P&gt;&lt;P&gt;If you already have a top level key "tag", I suspect that you actually want the key-value pairs in that value ("&lt;STRONG&gt;service=z2-qa1-local-z2-api-endpoint APPID=1234 cluster=z2-qa1-local application=z2 full-imagename=0123456789.dkr.10cal/10.20/xyz container-id=asdfgh503 full-container-id=1234567890&lt;/STRONG&gt;") extracted, &lt;STRONG&gt;not&lt;/STRONG&gt; to extract that &lt;EM&gt;line&lt;/EM&gt; again. &amp;nbsp;Maybe the key "tag" is not top level. &amp;nbsp;In that case, you will need to tell us what is the path leading to tag. &amp;nbsp;In all cases, raw format will help volunteers diagnose.&lt;/P&gt;&lt;P&gt;If "tag" is top level, you can use &lt;A href="https://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Extract" target="_blank" rel="noopener"&gt;kv&lt;/A&gt; (aka extract) to extract fields like service, APPID, etc., like&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| rename _raw AS temp, tag AS _raw
| kv
| rename _raw AS tag, temp as _raw&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Your sample should give&lt;/P&gt;&lt;TABLE width="778px"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="56.421875px"&gt;APPID&lt;/TD&gt;&lt;TD width="91.421875px"&gt;application&lt;/TD&gt;&lt;TD width="60.890625px"&gt;cluster&lt;/TD&gt;&lt;TD width="102.515625px"&gt;container_id&lt;/TD&gt;&lt;TD width="133.5px"&gt;full_container_id&lt;/TD&gt;&lt;TD width="257.46875px"&gt;full_imagename&lt;/TD&gt;&lt;TD width="75.859375px"&gt;service&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="56.421875px"&gt;1234&lt;/TD&gt;&lt;TD width="91.421875px"&gt;z2&lt;/TD&gt;&lt;TD width="60.890625px"&gt;z2-qa1-local&lt;/TD&gt;&lt;TD width="102.515625px"&gt;asdfgh503&lt;/TD&gt;&lt;TD width="133.5px"&gt;1234567890&lt;/TD&gt;&lt;TD width="257.46875px"&gt;0123456789.dkr.10cal/10.20/xyz&lt;/TD&gt;&lt;TD width="75.859375px"&gt;z2-qa1-local-z2-api-endpoint&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;Is this something you are looking for?&lt;/P&gt;</description>
      <pubDate>Wed, 01 Nov 2023 00:35:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Extract-jSON-formated-data/m-p/666948#M228782</guid>
      <dc:creator>yuanliu</dc:creator>
      <dc:date>2023-11-01T00:35:03Z</dc:date>
    </item>
  </channel>
</rss>

