<?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 Re: Few parts of JSON logs as separate fields and remaining as events in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Few-parts-of-JSON-logs-as-separate-fields-and-remaining-as/m-p/268174#M80678</link>
    <description>&lt;P&gt;Hi &lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/55663"&gt;@hardikJsheth&lt;/a&gt;,&lt;/P&gt;

&lt;P&gt;I did that but it didn't help &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;BR /&gt;
Is there a way to extract fields from the extracted field tag like below??&lt;BR /&gt;
&lt;STRONG&gt;container-image&lt;/STRONG&gt;=itec-artifactory.fmr.com:6555/com.fmr.pl000123.ezpaas.ezpaas-dynatrace-collector:6.3-11,&lt;STRONG&gt;container-service&lt;/STRONG&gt;=Dynatrace_Collector_DEV-WLP_WLP.7.3hvzd4e5b5zdby4blgu1v8rm8,&lt;STRONG&gt;container-id&lt;/STRONG&gt;=5125046f7489&lt;/P&gt;</description>
    <pubDate>Tue, 29 Sep 2020 11:33:29 GMT</pubDate>
    <dc:creator>sarnagar</dc:creator>
    <dc:date>2020-09-29T11:33:29Z</dc:date>
    <item>
      <title>Few parts of JSON logs as separate fields and remaining as events</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Few-parts-of-JSON-logs-as-separate-fields-and-remaining-as/m-p/268172#M80676</link>
      <description>&lt;P&gt;Hi All,&lt;BR /&gt;
I have JSON Logs like below:&lt;BR /&gt;
&lt;IMG src="https://community.splunk.com/storage/temp/165276-json.png" alt="alt text" /&gt;&lt;/P&gt;

&lt;P&gt;SAMPLE EVENT:&lt;BR /&gt;
{ [-] &lt;BR /&gt;
   line: 2016-10-21 19:16:00 INFO [CollectorAccess] Updating peer collector list: [172.17.0.6:9998, 172.18.0.3:9998|dynatrace_collector_dev-wlp_wlp.8.9of6d5ylz2g8yc22wioksjhek.ingress:9998|10.255.0.13:9998|10.255.0.15:9998, 10.255.0.20:9998|172.18.0.4:9998|dynatrace_collector_dev-wlp_wlp.5.04w8s09obp9pwe2mu1s9elq7i.ingress:9998|10.255.0.13:9998, 172.17.0.9:9998, 172.17.0.3:9998, 172.18.0.3:9998|dynatrace_collector_dev-wlp_wlp.1.0bs4sokp2fpkkz0nfh4mo4xsc.ingress:9998|10.255.0.13:9998|10.255.0.16:9998, 172.17.0.8:9998, dynatrace_collector_dev-wlp_wlp.7.3hvzd4e5b5zdby4blgu1v8rm8.ingress:9998|172.18.0.4:9998|10.255.0.13:9998|10.255.0.22:9998, dynatrace_collector_dev-wlp_wlp.6.5huzo8ot2fnzavm9ji5it4p9d.ingress:9998|172.18.0.4:9998|10.255.0.13:9998|10.255.0.21:9998, 172.17.0.5:9998, 172.17.0.7:9998, 172.18.0.3:9998|10.255.0.13:9998|10.255.0.17:9998|dynatrace_collector_dev-wlp_wlp.2.5a4bbjtne3hxm3i3f0a0xj7lv.ingress:9998, 10.255.0.18:9998|172.18.0.3:9998|dynatrace_collector_dev-wlp_wlp.3.4tr7zjjhgqqtn0fh9hd0l7qoo.ingress:9998|10.255.0.13:9998, 172.17.0.4:9998, 10.255.0.19:9998|172.18.0.3:9998|dynatrace_collector_dev-wlp_wlp.4.ep9fshp8i94rdz7p7cpwi9v77.ingress:9998|10.255.0.13:9998] &lt;BR /&gt;
   &lt;EM&gt;source: stdout &lt;BR /&gt;
   tag: itec-artifactory.fmr.com:6555/com.fmr.pl000123.ezpaas.ezpaas-dynatrace-collector:6.3-11/Dynatrace_Collector_DEV-WLP_WLP.7.3hvzd4e5b5zdby4blgu1v8rm8/5125046f7489&lt;/EM&gt; &lt;BR /&gt;
}&lt;/P&gt;

&lt;P&gt;I WANT TO MODIFY THE LAST ITALICISED LINE IN ABOVE EVENT TO SOMETHING LIKE BELOW : ( CHANGES HIGHLIGHTED AS BOLD)&lt;BR /&gt;
&lt;STRONG&gt;source&lt;/STRONG&gt;=stdout,&lt;BR /&gt;
&lt;STRONG&gt;container-image&lt;/STRONG&gt;=itec-artifactory.fmr.com:6555/com.fmr.pl000123.ezpaas.ezpaas-dynatrace-collector:6.3-11,&lt;STRONG&gt;container-service&lt;/STRONG&gt;=Dynatrace_Collector_DEV-WLP_WLP.7.3hvzd4e5b5zdby4blgu1v8rm8,&lt;STRONG&gt;container-id&lt;/STRONG&gt;=5125046f7489&lt;/P&gt;

&lt;P&gt;Basically I want to create field value pairs from the events and also modify its appearance in the UI.&lt;/P&gt;

&lt;P&gt;How can I achieve this??&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 11:31:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Few-parts-of-JSON-logs-as-separate-fields-and-remaining-as/m-p/268172#M80676</guid>
      <dc:creator>sarnagar</dc:creator>
      <dc:date>2020-09-29T11:31:31Z</dc:date>
    </item>
    <item>
      <title>Re: Few parts of JSON logs as separate fields and remaining as events</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Few-parts-of-JSON-logs-as-separate-fields-and-remaining-as/m-p/268173#M80677</link>
      <description>&lt;P&gt;If you are using heavyforwarder, keep all the settings on Forwarder only. Can you put your transforms on Heavyforwarder and try?&lt;/P&gt;</description>
      <pubDate>Mon, 24 Oct 2016 09:52:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Few-parts-of-JSON-logs-as-separate-fields-and-remaining-as/m-p/268173#M80677</guid>
      <dc:creator>hardikJsheth</dc:creator>
      <dc:date>2016-10-24T09:52:09Z</dc:date>
    </item>
    <item>
      <title>Re: Few parts of JSON logs as separate fields and remaining as events</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Few-parts-of-JSON-logs-as-separate-fields-and-remaining-as/m-p/268174#M80678</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/55663"&gt;@hardikJsheth&lt;/a&gt;,&lt;/P&gt;

&lt;P&gt;I did that but it didn't help &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;BR /&gt;
Is there a way to extract fields from the extracted field tag like below??&lt;BR /&gt;
&lt;STRONG&gt;container-image&lt;/STRONG&gt;=itec-artifactory.fmr.com:6555/com.fmr.pl000123.ezpaas.ezpaas-dynatrace-collector:6.3-11,&lt;STRONG&gt;container-service&lt;/STRONG&gt;=Dynatrace_Collector_DEV-WLP_WLP.7.3hvzd4e5b5zdby4blgu1v8rm8,&lt;STRONG&gt;container-id&lt;/STRONG&gt;=5125046f7489&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 11:33:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Few-parts-of-JSON-logs-as-separate-fields-and-remaining-as/m-p/268174#M80678</guid>
      <dc:creator>sarnagar</dc:creator>
      <dc:date>2020-09-29T11:33:29Z</dc:date>
    </item>
    <item>
      <title>Re: Few parts of JSON logs as separate fields and remaining as events</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Few-parts-of-JSON-logs-as-separate-fields-and-remaining-as/m-p/268175#M80679</link>
      <description>&lt;P&gt;Try this &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;base search | eval s=split(tag, "/") | eval container_image=mvindex(s, 0) | eval container_service=mvindex(s, 1) | eval container_id=mvindex(s, -1)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;*&lt;STRONG&gt;&lt;EM&gt;OR&lt;/EM&gt;&lt;/STRONG&gt;*&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;base search | rex field=tag "(?&amp;lt;container_image&amp;gt;[^\/]+)\/(?&amp;lt;container_service&amp;gt;[^\/]+)\/(?&amp;lt;container_id&amp;gt;.+)" | table container_*
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 26 Oct 2016 11:37:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Few-parts-of-JSON-logs-as-separate-fields-and-remaining-as/m-p/268175#M80679</guid>
      <dc:creator>sundareshr</dc:creator>
      <dc:date>2016-10-26T11:37:04Z</dc:date>
    </item>
  </channel>
</rss>

