<?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 data when log entries have multiple entries? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-to-extract-data-when-log-entries-have-multiple-entries/m-p/373420#M93173</link>
    <description>&lt;P&gt;Try this run anywhere search&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| makeresults 
| eval _raw="[22/Mar/2018:17:06:23 -0700] id 100 “GET /URL1” 200 276
[22/Mar/2018:17:06:23 -0700] id 101 “GET /URL2” 200 276 
[22/Mar/2018:17:06:23 -0700] id 102 “GET /URL3” 200 276" 
| rex max_match=0 "id\s+(?&amp;lt;id&amp;gt;\d+)\s+\“\w+\s+\/(?&amp;lt;url&amp;gt;\w+)" 
| eval c=mvzip(id,url) 
| mvexpand c 
| rex field=c "(?&amp;lt;id&amp;gt;[^\,]+)\,(?&amp;lt;url&amp;gt;.*)" 
| table id url
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;In your environment, try&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;your base search&amp;gt; 
| rex max_match=0 "id\s+(?&amp;lt;id&amp;gt;\d+)\s+\“\w+\s+\/(?&amp;lt;url&amp;gt;\w+)" 
| eval c=mvzip(id,url) 
| mvexpand c 
| rex field=c "(?&amp;lt;id&amp;gt;[^\,]+)\,(?&amp;lt;url&amp;gt;.*)" 
| table id url
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;let me know if this helps!&lt;/P&gt;</description>
    <pubDate>Fri, 23 Mar 2018 02:40:32 GMT</pubDate>
    <dc:creator>mayurr98</dc:creator>
    <dc:date>2018-03-23T02:40:32Z</dc:date>
    <item>
      <title>How to extract data when log entries have multiple entries?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-extract-data-when-log-entries-have-multiple-entries/m-p/373418#M93171</link>
      <description>&lt;P&gt;I have a log entry which has multiple entries within it. i would like to be able to extract each row and have a table with rows for each entry&lt;BR /&gt;
for example&lt;BR /&gt;
this is the log &lt;BR /&gt;
[22/Mar/2018:17:06:23 -0700] id 100 “GET /URL1” 200 276&lt;BR /&gt;
[22/Mar/2018:17:06:23 -0700] id 101 “GET /URL2” 200 276 &lt;BR /&gt;
[22/Mar/2018:17:06:23 -0700] id 102 “GET /URL3” 200 276 &lt;/P&gt;

&lt;P&gt;Table&lt;BR /&gt;
100 URL1&lt;BR /&gt;
101 URL2&lt;BR /&gt;
102 URL3&lt;/P&gt;</description>
      <pubDate>Fri, 23 Mar 2018 00:21:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-extract-data-when-log-entries-have-multiple-entries/m-p/373418#M93171</guid>
      <dc:creator>nottheboss</dc:creator>
      <dc:date>2018-03-23T00:21:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract data when log entries have multiple entries?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-extract-data-when-log-entries-have-multiple-entries/m-p/373419#M93172</link>
      <description>&lt;P&gt;Hmm. I’m curious to understand. Each event in Splunk has multiple lines of a log event?  I can’t say I know your data or how it’s coming into Splunk, but it would be good if each of these was an individual event with linebreaking. If this can’t be done and you have multiple lines in each event, there are ways of handeling this, but it would be better to understand how events are coming in first before explaining how you can split multivalue or multi line events if that is not the case. &lt;/P&gt;</description>
      <pubDate>Fri, 23 Mar 2018 02:27:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-extract-data-when-log-entries-have-multiple-entries/m-p/373419#M93172</guid>
      <dc:creator>damiensurat</dc:creator>
      <dc:date>2018-03-23T02:27:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract data when log entries have multiple entries?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-extract-data-when-log-entries-have-multiple-entries/m-p/373420#M93173</link>
      <description>&lt;P&gt;Try this run anywhere search&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| makeresults 
| eval _raw="[22/Mar/2018:17:06:23 -0700] id 100 “GET /URL1” 200 276
[22/Mar/2018:17:06:23 -0700] id 101 “GET /URL2” 200 276 
[22/Mar/2018:17:06:23 -0700] id 102 “GET /URL3” 200 276" 
| rex max_match=0 "id\s+(?&amp;lt;id&amp;gt;\d+)\s+\“\w+\s+\/(?&amp;lt;url&amp;gt;\w+)" 
| eval c=mvzip(id,url) 
| mvexpand c 
| rex field=c "(?&amp;lt;id&amp;gt;[^\,]+)\,(?&amp;lt;url&amp;gt;.*)" 
| table id url
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;In your environment, try&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;your base search&amp;gt; 
| rex max_match=0 "id\s+(?&amp;lt;id&amp;gt;\d+)\s+\“\w+\s+\/(?&amp;lt;url&amp;gt;\w+)" 
| eval c=mvzip(id,url) 
| mvexpand c 
| rex field=c "(?&amp;lt;id&amp;gt;[^\,]+)\,(?&amp;lt;url&amp;gt;.*)" 
| table id url
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;let me know if this helps!&lt;/P&gt;</description>
      <pubDate>Fri, 23 Mar 2018 02:40:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-extract-data-when-log-entries-have-multiple-entries/m-p/373420#M93173</guid>
      <dc:creator>mayurr98</dc:creator>
      <dc:date>2018-03-23T02:40:32Z</dc:date>
    </item>
  </channel>
</rss>

