<?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 to extract these fields? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-these-fields/m-p/497525#M138580</link>
    <description>&lt;P&gt;Hi @HeinzWaescher &lt;/P&gt;

&lt;P&gt;You can use props &amp;amp; transforms to do this:&lt;/P&gt;

&lt;P&gt;transforms.conf&lt;BR /&gt;
    [fields-values]&lt;BR /&gt;
    FORMAT = $1::$2&lt;BR /&gt;
    REGEX = &amp;gt;\w+\,\w+\,(\w+)\,(\w+)&lt;/P&gt;

&lt;P&gt;props.conf&lt;BR /&gt;
    [yourSourcetype]&lt;BR /&gt;
    REPORT-fields-values = fields-values&lt;/P&gt;

&lt;P&gt;Let me know how you get on.&lt;/P&gt;</description>
    <pubDate>Wed, 29 Jan 2020 09:50:29 GMT</pubDate>
    <dc:creator>nickhills</dc:creator>
    <dc:date>2020-01-29T09:50:29Z</dc:date>
    <item>
      <title>How to extract these fields?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-these-fields/m-p/497524#M138579</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;let's say we have events with _raw data like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;XY&amp;gt;aaa,bbbb,priority,high&amp;lt;XY&amp;gt;aaa,bbb,login,failed&amp;lt;XY&amp;gt;aaa,bbb,user,johndoe&amp;lt;XZ&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The events can include a random amount of this pattern.&lt;BR /&gt;
Is it possible to create an automatic field extraction to get:&lt;/P&gt;

&lt;P&gt;priority = high&lt;BR /&gt;
login = failed&lt;BR /&gt;
user = johndoe&lt;/P&gt;

&lt;P&gt;So position 3 of the pattern should set the fieldname while position 4 sets the value.&lt;/P&gt;

&lt;P&gt;Thankd in advance&lt;/P&gt;</description>
      <pubDate>Wed, 29 Jan 2020 09:19:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-these-fields/m-p/497524#M138579</guid>
      <dc:creator>HeinzWaescher</dc:creator>
      <dc:date>2020-01-29T09:19:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract these fields?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-these-fields/m-p/497525#M138580</link>
      <description>&lt;P&gt;Hi @HeinzWaescher &lt;/P&gt;

&lt;P&gt;You can use props &amp;amp; transforms to do this:&lt;/P&gt;

&lt;P&gt;transforms.conf&lt;BR /&gt;
    [fields-values]&lt;BR /&gt;
    FORMAT = $1::$2&lt;BR /&gt;
    REGEX = &amp;gt;\w+\,\w+\,(\w+)\,(\w+)&lt;/P&gt;

&lt;P&gt;props.conf&lt;BR /&gt;
    [yourSourcetype]&lt;BR /&gt;
    REPORT-fields-values = fields-values&lt;/P&gt;

&lt;P&gt;Let me know how you get on.&lt;/P&gt;</description>
      <pubDate>Wed, 29 Jan 2020 09:50:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-these-fields/m-p/497525#M138580</guid>
      <dc:creator>nickhills</dc:creator>
      <dc:date>2020-01-29T09:50:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract these fields?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-these-fields/m-p/497526#M138581</link>
      <description>&lt;P&gt;Awesome! Thanks works fine, thanks a lot&lt;/P&gt;</description>
      <pubDate>Wed, 29 Jan 2020 10:09:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-these-fields/m-p/497526#M138581</guid>
      <dc:creator>HeinzWaescher</dc:creator>
      <dc:date>2020-01-29T10:09:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract these fields?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-these-fields/m-p/497527#M138582</link>
      <description>&lt;P&gt;you are welcome! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 29 Jan 2020 12:36:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-these-fields/m-p/497527#M138582</guid>
      <dc:creator>nickhills</dc:creator>
      <dc:date>2020-01-29T12:36:53Z</dc:date>
    </item>
  </channel>
</rss>

