<?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: How do you extract fields from JSON logs? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-do-you-extract-fields-from-JSON-logs/m-p/439050#M76552</link>
    <description>&lt;P&gt;try this regex to extract linkerd version-&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;   ... |rex "linkerd\s(?&amp;lt;linkerd_version&amp;gt;[^\s]+)" 
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Fri, 19 Oct 2018 17:35:51 GMT</pubDate>
    <dc:creator>493669</dc:creator>
    <dc:date>2018-10-19T17:35:51Z</dc:date>
    <item>
      <title>How do you extract fields from JSON logs?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-do-you-extract-fields-from-JSON-logs/m-p/439049#M76551</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;I have the following JSON log event:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;{   [-] 
     line:   I 1019 15:40:22.873 UTC THREAD1: **linkerd 1.4.5** (rev=0280009ca71e0673108a3752763938017bda588f) built at 20180713-154546 
     source:     stderr 
     tag:    linkerd/e03c11099322   
}
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I want to extract the version of Linkerd given in this log. i.e., I want the following result: Field name: Linkerd version; value: 1.4.5&lt;/P&gt;

&lt;P&gt;Pls help!!&lt;/P&gt;</description>
      <pubDate>Fri, 19 Oct 2018 17:00:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-do-you-extract-fields-from-JSON-logs/m-p/439049#M76551</guid>
      <dc:creator>moizmmz</dc:creator>
      <dc:date>2018-10-19T17:00:27Z</dc:date>
    </item>
    <item>
      <title>Re: How do you extract fields from JSON logs?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-do-you-extract-fields-from-JSON-logs/m-p/439050#M76552</link>
      <description>&lt;P&gt;try this regex to extract linkerd version-&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;   ... |rex "linkerd\s(?&amp;lt;linkerd_version&amp;gt;[^\s]+)" 
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 19 Oct 2018 17:35:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-do-you-extract-fields-from-JSON-logs/m-p/439050#M76552</guid>
      <dc:creator>493669</dc:creator>
      <dc:date>2018-10-19T17:35:51Z</dc:date>
    </item>
    <item>
      <title>Re: How do you extract fields from JSON logs?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-do-you-extract-fields-from-JSON-logs/m-p/439051#M76553</link>
      <description>&lt;P&gt;Excellent! It gives me exactly what i want! Thank you so so much!!&lt;/P&gt;

&lt;P&gt;Can you please tell me how you wrote this?&lt;/P&gt;</description>
      <pubDate>Fri, 19 Oct 2018 17:39:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-do-you-extract-fields-from-JSON-logs/m-p/439051#M76553</guid>
      <dc:creator>moizmmz</dc:creator>
      <dc:date>2018-10-19T17:39:41Z</dc:date>
    </item>
    <item>
      <title>Re: How do you extract fields from JSON logs?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-do-you-extract-fields-from-JSON-logs/m-p/439052#M76554</link>
      <description>&lt;P&gt;Here rex command is used to extract field values&lt;BR /&gt;
&lt;STRONG&gt;Explanation&lt;/STRONG&gt;:&lt;BR /&gt;
&lt;CODE&gt;linkerd\s&lt;/CODE&gt; here \s indicates space so it will find word-linkerd in raw events&lt;BR /&gt;
&lt;CODE&gt;[^\s]+&lt;/CODE&gt; It will check  after linkerd\s until it will find any space&lt;BR /&gt;
&lt;CODE&gt;(?&amp;lt;linkerd_version&amp;gt;&lt;/CODE&gt; then it will store extracted value in field name linkerd_version&lt;/P&gt;</description>
      <pubDate>Fri, 19 Oct 2018 18:24:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-do-you-extract-fields-from-JSON-logs/m-p/439052#M76554</guid>
      <dc:creator>493669</dc:creator>
      <dc:date>2018-10-19T18:24:56Z</dc:date>
    </item>
    <item>
      <title>Re: How do you extract fields from JSON logs?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-do-you-extract-fields-from-JSON-logs/m-p/439053#M76555</link>
      <description>&lt;P&gt;Thank you thank you thank you!!!!!!&lt;/P&gt;</description>
      <pubDate>Fri, 19 Oct 2018 19:03:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-do-you-extract-fields-from-JSON-logs/m-p/439053#M76555</guid>
      <dc:creator>moizmmz</dc:creator>
      <dc:date>2018-10-19T19:03:42Z</dc:date>
    </item>
  </channel>
</rss>

