<?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: Need to extract required fields using rex command in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Need-to-extract-required-fields-using-rex-command/m-p/433824#M123849</link>
    <description>&lt;P&gt;Good!&lt;BR /&gt;
if you're satisfied of this answer, please accept and/or upvote it.&lt;BR /&gt;
At the next time.&lt;BR /&gt;
Bye.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
    <pubDate>Thu, 09 May 2019 15:01:22 GMT</pubDate>
    <dc:creator>gcusello</dc:creator>
    <dc:date>2019-05-09T15:01:22Z</dc:date>
    <item>
      <title>Need to extract required fields using rex command</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Need-to-extract-required-fields-using-rex-command/m-p/433818#M123843</link>
      <description>&lt;P&gt;Hi Friends&lt;/P&gt;

&lt;P&gt;I am trying to extract required field from events using rex command. Can someone please help me, logs are given in attached doc.&lt;/P&gt;

&lt;P&gt;I am new to rex command , Once i get below rex command then easy to understand&lt;/P&gt;

&lt;P&gt;Below are fields need to extract&lt;/P&gt;

&lt;P&gt;Kernel Audit Begin, Kernel Begin,pam_unix Begin,Postfix Begin,-SSHD Begin,Sudo (secure-log) Begin,Disk Space Begin&lt;/P&gt;</description>
      <pubDate>Mon, 29 Apr 2019 09:58:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Need-to-extract-required-fields-using-rex-command/m-p/433818#M123843</guid>
      <dc:creator>rakesh44</dc:creator>
      <dc:date>2019-04-29T09:58:32Z</dc:date>
    </item>
    <item>
      <title>Re: Need to extract required fields using rex command</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Need-to-extract-required-fields-using-rex-command/m-p/433819#M123844</link>
      <description>&lt;P&gt;can you give me the sample value of extraction required for Kernel Audit Begin?&lt;/P&gt;</description>
      <pubDate>Mon, 29 Apr 2019 10:39:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Need-to-extract-required-fields-using-rex-command/m-p/433819#M123844</guid>
      <dc:creator>vishaltaneja070</dc:creator>
      <dc:date>2019-04-29T10:39:53Z</dc:date>
    </item>
    <item>
      <title>Re: Need to extract required fields using rex command</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Need-to-extract-required-fields-using-rex-command/m-p/433820#M123845</link>
      <description>&lt;P&gt;I have to prepare dashboard for each field as mentioned, hence need all values of fields.&lt;BR /&gt;
Kernel Audit Begin : Nee all values of field&lt;/P&gt;</description>
      <pubDate>Mon, 29 Apr 2019 10:47:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Need-to-extract-required-fields-using-rex-command/m-p/433820#M123845</guid>
      <dc:creator>rakesh44</dc:creator>
      <dc:date>2019-04-29T10:47:03Z</dc:date>
    </item>
    <item>
      <title>Re: Need to extract required fields using rex command</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Need-to-extract-required-fields-using-rex-command/m-p/433821#M123846</link>
      <description>&lt;P&gt;&lt;STRONG&gt;Unmatched Entries&lt;/STRONG&gt; (Only first 100 out of 127 are printed)&lt;BR /&gt;
dispatch err (pipe full) event lost&lt;BR /&gt;
dispatch error reporting limit reached - ending report notification.&lt;/P&gt;</description>
      <pubDate>Mon, 29 Apr 2019 10:48:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Need-to-extract-required-fields-using-rex-command/m-p/433821#M123846</guid>
      <dc:creator>rakesh44</dc:creator>
      <dc:date>2019-04-29T10:48:01Z</dc:date>
    </item>
    <item>
      <title>Re: Need to extract required fields using rex command</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Need-to-extract-required-fields-using-rex-command/m-p/433822#M123847</link>
      <description>&lt;P&gt;Hi rakesh44,&lt;BR /&gt;
let mi know: do you want to extract the following fields?&lt;/P&gt;

&lt;UL&gt;
&lt;LI&gt;TimeStamp&lt;/LI&gt;
&lt;LI&gt;Date Range Processed&lt;/LI&gt;
&lt;LI&gt;Detail Level of Output&lt;/LI&gt;
&lt;LI&gt;Type of Output/Format&lt;/LI&gt;
&lt;LI&gt;Logfiles for Host&lt;/LI&gt;
&lt;/UL&gt;

&lt;P&gt;If these are the fields to extract from the example you shared, try to use the following regex&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Processing Initiated: (?&amp;lt;TimeStamp&amp;gt;\w+\s+\w+\s+\d+\s+\d+:\d+:\d+\s+\d+)\s+.*Date Range Processed:\s+yesterday\s+\(\s+(?&amp;lt;Date_Range&amp;gt;[^ ]*)\s+.*\s+.*\s+Detail Level of Output:(?&amp;lt;Level_of_input&amp;gt;[^ ]*)\s+Type of Output\/Format:\s+(?&amp;lt;Type&amp;gt;.*)\s*Logfiles for Host: (?&amp;lt;Logfile&amp;gt;[^ ]*)\s+\#
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;You can test it at &lt;A href="https://regex101.com/r/JNMRCz/1"&gt;https://regex101.com/r/JNMRCz/1&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Bye.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
      <pubDate>Mon, 29 Apr 2019 14:05:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Need-to-extract-required-fields-using-rex-command/m-p/433822#M123847</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2019-04-29T14:05:25Z</dc:date>
    </item>
    <item>
      <title>Re: Need to extract required fields using rex command</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Need-to-extract-required-fields-using-rex-command/m-p/433823#M123848</link>
      <description>&lt;P&gt;Thanks Gcusello , it worked for me rest I would create it &lt;/P&gt;

&lt;P&gt;Processing Initiated: (?\w+\s+\w+\s+\d+\s+\d+:\d+:\d+\s+\d+)\s+.&lt;EM&gt;Date Range Processed:\s+yesterday\s+(\s+(?[^ ]&lt;/EM&gt;)\s+.&lt;EM&gt;\s+.&lt;/EM&gt;\s+Detail Level of Output:(?[^ ]&lt;EM&gt;)\s+Type of Output\/Format:\s+(?.&lt;/EM&gt;)\s*Logfiles for Host: (?[^ ]*)\s+#&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 00:28:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Need-to-extract-required-fields-using-rex-command/m-p/433823#M123848</guid>
      <dc:creator>rakesh44</dc:creator>
      <dc:date>2020-09-30T00:28:43Z</dc:date>
    </item>
    <item>
      <title>Re: Need to extract required fields using rex command</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Need-to-extract-required-fields-using-rex-command/m-p/433824#M123849</link>
      <description>&lt;P&gt;Good!&lt;BR /&gt;
if you're satisfied of this answer, please accept and/or upvote it.&lt;BR /&gt;
At the next time.&lt;BR /&gt;
Bye.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
      <pubDate>Thu, 09 May 2019 15:01:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Need-to-extract-required-fields-using-rex-command/m-p/433824#M123849</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2019-05-09T15:01:22Z</dc:date>
    </item>
  </channel>
</rss>

