<?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 Multi Line Event Field Extraction in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Multi-Line-Event-Field-Extraction/m-p/32943#M6955</link>
    <description>&lt;P&gt;I have a SINGLE event in the following format (this is only part of the log):&lt;/P&gt;

&lt;HR /&gt;

&lt;PRE&gt;&lt;CODE&gt;/root/pegaruninit: Empty file
/root/eicar: Eicar-Test-Signature FOUND
/root/.bash_history: Empty file
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This is part of an Antivirus log which is a "dump" of all the locations it scanned, and any viruses or signatures that it found.&lt;/P&gt;

&lt;P&gt;What i want to do is create a REGEX and REPORT that extracts the "Eicar-Test_Signature" from the log, and place it in a field called "virus_found".&lt;/P&gt;

&lt;P&gt;props.conf:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;REPORT-extract_virus_clamav = extract_virus_clamav
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;transforms.conf:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[extract_virus_clamav]
REGEX = :\s(.+?)\sFOUND
FORMAT = virus_found::$1
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Problem is that it is taking the FIRST ":" and taking everything from " Empty file/root/eicar: Eicar-Test-Signature" and placing THIS in the new field.&lt;/P&gt;

&lt;P&gt;Is there a way to call a field extraction from ONE line at a time, from a multi line event?? &lt;BR /&gt;
EG: if the REGEX does not match the ":" AND the "FOUND" in one line, it continues to look through other lines??&lt;/P&gt;

&lt;P&gt;I hope this makes sense!&lt;/P&gt;

&lt;P&gt;Thanks!&lt;/P&gt;</description>
    <pubDate>Mon, 28 Sep 2020 09:41:54 GMT</pubDate>
    <dc:creator>johndunlea</dc:creator>
    <dc:date>2020-09-28T09:41:54Z</dc:date>
    <item>
      <title>Multi Line Event Field Extraction</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Multi-Line-Event-Field-Extraction/m-p/32943#M6955</link>
      <description>&lt;P&gt;I have a SINGLE event in the following format (this is only part of the log):&lt;/P&gt;

&lt;HR /&gt;

&lt;PRE&gt;&lt;CODE&gt;/root/pegaruninit: Empty file
/root/eicar: Eicar-Test-Signature FOUND
/root/.bash_history: Empty file
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This is part of an Antivirus log which is a "dump" of all the locations it scanned, and any viruses or signatures that it found.&lt;/P&gt;

&lt;P&gt;What i want to do is create a REGEX and REPORT that extracts the "Eicar-Test_Signature" from the log, and place it in a field called "virus_found".&lt;/P&gt;

&lt;P&gt;props.conf:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;REPORT-extract_virus_clamav = extract_virus_clamav
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;transforms.conf:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[extract_virus_clamav]
REGEX = :\s(.+?)\sFOUND
FORMAT = virus_found::$1
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Problem is that it is taking the FIRST ":" and taking everything from " Empty file/root/eicar: Eicar-Test-Signature" and placing THIS in the new field.&lt;/P&gt;

&lt;P&gt;Is there a way to call a field extraction from ONE line at a time, from a multi line event?? &lt;BR /&gt;
EG: if the REGEX does not match the ":" AND the "FOUND" in one line, it continues to look through other lines??&lt;/P&gt;

&lt;P&gt;I hope this makes sense!&lt;/P&gt;

&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 09:41:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Multi-Line-Event-Field-Extraction/m-p/32943#M6955</guid>
      <dc:creator>johndunlea</dc:creator>
      <dc:date>2020-09-28T09:41:54Z</dc:date>
    </item>
    <item>
      <title>Re: Multi Line Event Field Extraction</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Multi-Line-Event-Field-Extraction/m-p/32944#M6956</link>
      <description>&lt;P&gt;Don't let your capture group include newlines and you should be ok.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;REGEX = :\s([^\r\n]+)\sFOUND
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 22 Jun 2011 17:28:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Multi-Line-Event-Field-Extraction/m-p/32944#M6956</guid>
      <dc:creator>southeringtonp</dc:creator>
      <dc:date>2011-06-22T17:28:51Z</dc:date>
    </item>
    <item>
      <title>Re: Multi Line Event Field Extraction</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Multi-Line-Event-Field-Extraction/m-p/32945#M6957</link>
      <description>&lt;P&gt;Perfect solution. Thanks!&lt;/P&gt;</description>
      <pubDate>Wed, 22 Jun 2011 18:23:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Multi-Line-Event-Field-Extraction/m-p/32945#M6957</guid>
      <dc:creator>johndunlea</dc:creator>
      <dc:date>2011-06-22T18:23:29Z</dc:date>
    </item>
  </channel>
</rss>

