<?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: Split logs with split in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Split-logs-with-split/m-p/69383#M14065</link>
    <description>&lt;P&gt;Hello&lt;/P&gt;

&lt;P&gt;What you have to do is change the way of doing the transaction.&lt;/P&gt;

&lt;P&gt;Use this: transaction startswith="Session Open" endswith="Session disconnected"&lt;/P&gt;</description>
    <pubDate>Sat, 21 Sep 2013 08:15:53 GMT</pubDate>
    <dc:creator>gfuente</dc:creator>
    <dc:date>2013-09-21T08:15:53Z</dc:date>
    <item>
      <title>Split logs with split</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Split-logs-with-split/m-p/69375#M14057</link>
      <description>&lt;P&gt;Hello everyone&lt;BR /&gt;
Someone did this?, I'm trying to split the logs with a split, usually I get the following log:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Sep 20 00:37:19 192.168.10.30: Username = jrodiguez, IP = 190.43.138.114, Session Open; Sep 20 00:57:26 Username = jrodiguez, IP = 190.43.138.114, Session disconnected
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;But I wish I had this log divided as follows:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Sep 20 00:37:19 192.168.10.30: Username = jrodiguez, IP = 190.43.138.114, Session Open

Sep 20 00:57:26 Username = jrodiguez, IP = 190.43.138.114, Session disconnected
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Someone who has achieved?&lt;BR /&gt;
I tried:  search ... | eval _raw=split(_raw,"Open;")&lt;BR /&gt;
But I did not get  &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 14:49:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Split-logs-with-split/m-p/69375#M14057</guid>
      <dc:creator>jrodriguezap</dc:creator>
      <dc:date>2020-09-28T14:49:21Z</dc:date>
    </item>
    <item>
      <title>Re: Split logs with split</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Split-logs-with-split/m-p/69376#M14058</link>
      <description>&lt;P&gt;Hello&lt;/P&gt;

&lt;P&gt;It seems that you are not indexing logs properly, as it should break events by timestamp, and then you already will get the events splited by time.&lt;/P&gt;

&lt;P&gt;So, post your props.conf configuration for this sourcetype, so we can propose you the best way to index those events&lt;/P&gt;

&lt;P&gt;Regards&lt;/P&gt;</description>
      <pubDate>Fri, 20 Sep 2013 15:16:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Split-logs-with-split/m-p/69376#M14058</guid>
      <dc:creator>gfuente</dc:creator>
      <dc:date>2013-09-20T15:16:59Z</dc:date>
    </item>
    <item>
      <title>Re: Split logs with split</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Split-logs-with-split/m-p/69377#M14059</link>
      <description>&lt;P&gt;Hello gfuente&lt;BR /&gt;
This I want in a SEARCH&lt;/P&gt;</description>
      <pubDate>Fri, 20 Sep 2013 15:24:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Split-logs-with-split/m-p/69377#M14059</guid>
      <dc:creator>jrodriguezap</dc:creator>
      <dc:date>2013-09-20T15:24:56Z</dc:date>
    </item>
    <item>
      <title>Re: Split logs with split</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Split-logs-with-split/m-p/69378#M14060</link>
      <description>&lt;P&gt;Hi jrodriguezap,&lt;/P&gt;

&lt;P&gt;I think the issue here is with the configuration of your event breaking rather than using the &lt;CODE&gt;split&lt;/CODE&gt; command. SHould the logs really be put together like that? If not, then you're going to need to play around with your props.conf to split them accordingly.&lt;/P&gt;

&lt;P&gt;Using your example:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[your_sourcetype]
LINE_BREAKER=([;\r\n]+\s?)
NO_BINARY_CHECK=1
SHOULD_LINEMERGE=false
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This may not be the ideal way to do it (I'm a bit tired right now), but it gives me the following results:&lt;/P&gt;

&lt;P&gt;&lt;IMG src="http://splunk-base.splunk.com//storage/Screen_Shot_2013-09-21_at_1.26.40_AM.png" alt="alt text" /&gt;&lt;/P&gt;

&lt;P&gt;References:&lt;/P&gt;

&lt;UL&gt;
&lt;LI&gt;Splunk Docs: &lt;A href="http://docs.splunk.com/Documentation/Splunk/5.0.4/Data/Indexmulti-lineevents"&gt;http://docs.splunk.com/Documentation/Splunk/5.0.4/Data/Indexmulti-lineevents&lt;/A&gt;&lt;/LI&gt;
&lt;/UL&gt;</description>
      <pubDate>Fri, 20 Sep 2013 15:27:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Split-logs-with-split/m-p/69378#M14060</guid>
      <dc:creator>rturk</dc:creator>
      <dc:date>2013-09-20T15:27:31Z</dc:date>
    </item>
    <item>
      <title>Re: Split logs with split</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Split-logs-with-split/m-p/69379#M14061</link>
      <description>&lt;P&gt;Thank you very much R.Turk.&lt;BR /&gt;
Tell me, and instead of separating by props.conf, that way you could do it in the SEARCH?&lt;/P&gt;</description>
      <pubDate>Fri, 20 Sep 2013 15:38:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Split-logs-with-split/m-p/69379#M14061</guid>
      <dc:creator>jrodriguezap</dc:creator>
      <dc:date>2013-09-20T15:38:42Z</dc:date>
    </item>
    <item>
      <title>Re: Split logs with split</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Split-logs-with-split/m-p/69380#M14062</link>
      <description>&lt;P&gt;Hello.&lt;BR /&gt;
You could do this with a SEARCH? It really, this log is the product of a TRANSACTION. Log is a more complex, but for simplicity I consult understanding this.&lt;BR /&gt;
I hope I understand.&lt;/P&gt;

&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Sat, 21 Sep 2013 01:45:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Split-logs-with-split/m-p/69380#M14062</guid>
      <dc:creator>jrodriguezap</dc:creator>
      <dc:date>2013-09-21T01:45:51Z</dc:date>
    </item>
    <item>
      <title>Re: Split logs with split</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Split-logs-with-split/m-p/69381#M14063</link>
      <description>&lt;P&gt;It's not really clear what you're trying to do here I'm sorry. If the event that you provided is as you've posted, then data is not being brought into Splunk correctly and should be fixed.&lt;/P&gt;

&lt;P&gt;If you're trying to process a merged event after a &lt;CODE&gt;| transaction&lt;/CODE&gt; command has been applied, then I think you might be walking down the wrong path.&lt;/P&gt;

&lt;P&gt;Ultimately it depends on:&lt;BR /&gt;
 - The nature of your raw event logs (they may need to be sanitised)&lt;BR /&gt;
 - What exactly you're trying to do.&lt;/P&gt;</description>
      <pubDate>Sat, 21 Sep 2013 02:08:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Split-logs-with-split/m-p/69381#M14063</guid>
      <dc:creator>rturk</dc:creator>
      <dc:date>2013-09-21T02:08:59Z</dc:date>
    </item>
    <item>
      <title>Re: Split logs with split</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Split-logs-with-split/m-p/69382#M14064</link>
      <description>&lt;P&gt;Sorry, I tried to be a little more clear up an image, but requires more "Karma".&lt;BR /&gt;
What happens is that I make a transaction ( SEARCH ... | transaction maxspan=24h Username IP), but I _raw bundles more than you'd like, staying well:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;gt;_raw 1
Sep 20 00:37:19 192.168.10.30: Username = jrodiguez, IP = 190.43.138.114, Session Open; Sep 20 00:57:26 Username = jrodiguez, IP = 190.43.138.114, Session disconnected  
Sep 20 03:22:31 192.168.10.30: Username = jrodiguez, IP = 190.43.138.114, Session Open; Sep 20 03:34:16 Username = jrodiguez, IP = 190.43.138.114, Session disconnected
Sep 20 08:15:42 192.168.10.30: Username = jrodiguez, IP = 190.43.138.114, Session Open; Sep 20 09:21:54 Username = jrodiguez, IP = 190.43.138.114, Session disconnected
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;And would separate the _raw to look like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;gt;_raw 1
Sep 20 00:37:19 192.168.10.30: Username = jrodiguez, IP = 190.43.138.114, Session Open; Sep 20 00:57:26 Username = jrodiguez, IP = 190.43.138.114, Session disconnected  
&amp;gt;_raw 2
Sep 20 03:22:31 192.168.10.30: Username = jrodiguez, IP = 190.43.138.114, Session Open; Sep 20 03:34:16 Username = jrodiguez, IP = 190.43.138.114, Session disconnected
&amp;gt;_raw 3
Sep 20 08:15:42 192.168.10.30: Username = jrodiguez, IP = 190.43.138.114, Session Open; Sep 20 09:21:54 Username = jrodiguez, IP = 190.43.138.114, Session disconnected
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I tried to do with this: SEARCH ... | transaction maxspan=24h Username IP &lt;CODE&gt;| eval _raw=split(_raw,"disconnected")&lt;/CODE&gt;, but it did not work&lt;/P&gt;</description>
      <pubDate>Sat, 21 Sep 2013 02:56:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Split-logs-with-split/m-p/69382#M14064</guid>
      <dc:creator>jrodriguezap</dc:creator>
      <dc:date>2013-09-21T02:56:02Z</dc:date>
    </item>
    <item>
      <title>Re: Split logs with split</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Split-logs-with-split/m-p/69383#M14065</link>
      <description>&lt;P&gt;Hello&lt;/P&gt;

&lt;P&gt;What you have to do is change the way of doing the transaction.&lt;/P&gt;

&lt;P&gt;Use this: transaction startswith="Session Open" endswith="Session disconnected"&lt;/P&gt;</description>
      <pubDate>Sat, 21 Sep 2013 08:15:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Split-logs-with-split/m-p/69383#M14065</guid>
      <dc:creator>gfuente</dc:creator>
      <dc:date>2013-09-21T08:15:53Z</dc:date>
    </item>
    <item>
      <title>Re: Split logs with split</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Split-logs-with-split/m-p/69384#M14066</link>
      <description>&lt;P&gt;Give this a try.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;search ...|makemv delim=";" _raw |mvexpand _raw
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 22 Sep 2013 15:11:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Split-logs-with-split/m-p/69384#M14066</guid>
      <dc:creator>adrianathome</dc:creator>
      <dc:date>2013-09-22T15:11:56Z</dc:date>
    </item>
    <item>
      <title>Re: Split logs with split</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Split-logs-with-split/m-p/69385#M14067</link>
      <description>&lt;P&gt;Yep this will work, but be aware that both events will have an identical timestamp according to Splunk (Sep 20 00:37:19)&lt;/P&gt;</description>
      <pubDate>Sun, 22 Sep 2013 23:54:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Split-logs-with-split/m-p/69385#M14067</guid>
      <dc:creator>rturk</dc:creator>
      <dc:date>2013-09-22T23:54:34Z</dc:date>
    </item>
    <item>
      <title>Re: Split logs with split</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Split-logs-with-split/m-p/69386#M14068</link>
      <description>&lt;P&gt;Thanks gfuente!&lt;BR /&gt;
This helped me! Thank you all! &lt;BR /&gt;
:)&lt;/P&gt;</description>
      <pubDate>Mon, 23 Sep 2013 00:18:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Split-logs-with-split/m-p/69386#M14068</guid>
      <dc:creator>jrodriguezap</dc:creator>
      <dc:date>2013-09-23T00:18:12Z</dc:date>
    </item>
  </channel>
</rss>

