<?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 split a single line event into multiple events at search time? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-to-split-a-single-line-event-into-multiple-events-at-search/m-p/246569#M47596</link>
    <description>&lt;P&gt;Just find a way myself, actually.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; index=main sourcetype=queues host=web01
| eval fields=mvappend("retrieve:".retrievePending,"merge:".mergePending,"send:".sendPending,"resend:".resendPending)
| mvexpand fields
| makemv delim=":" fields
| eval queue=mvindex(fields,0)
| eval count=mvindex(fields,1)
| eval ratio=round((count/500)*100, 2)
| timechart avg(ratio) by queue
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Any way to make that a bit more efficient, though?&lt;/P&gt;</description>
    <pubDate>Thu, 26 Nov 2015 18:11:24 GMT</pubDate>
    <dc:creator>romaindelmotte</dc:creator>
    <dc:date>2015-11-26T18:11:24Z</dc:date>
    <item>
      <title>How to split a single line event into multiple events at search time?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-split-a-single-line-event-into-multiple-events-at-search/m-p/246568#M47595</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I have those kind of events indexed:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;11/26/15 15:05:11.000 retrievePending=0 mergePending=1823 sendPending=43 resendPending=2
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The numbers above are the count of pending tasks in different queues of an application.&lt;BR /&gt;
Unfortunately, I cannot change the way the logs are written down in the log files, and wished it was something like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;11/26/15 15:05:11.000 queue=retrieve pending=0
11/26/15 15:05:11.000 queue=merge pending=1823
11/26/15 15:05:11.000 queue=send pending=43
11/26/15 15:05:11.000 queue=resend pending=2
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;So, is there a way - at search time - to split my data into multiple events so I can use a &lt;EM&gt;by&lt;/EM&gt; clause like below?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=main sourcetype=queues host=web01 | timechart avg(pending) by queue
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I've been looking for some time now, even playing with multi-value commands like mvzip, mkexpand, etc., but can't crack this one.&lt;/P&gt;

&lt;P&gt;Any help would be appreciated.&lt;/P&gt;

&lt;P&gt;Thanks,&lt;/P&gt;

&lt;P&gt;Romain&lt;/P&gt;</description>
      <pubDate>Thu, 26 Nov 2015 17:27:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-split-a-single-line-event-into-multiple-events-at-search/m-p/246568#M47595</guid>
      <dc:creator>romaindelmotte</dc:creator>
      <dc:date>2015-11-26T17:27:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to split a single line event into multiple events at search time?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-split-a-single-line-event-into-multiple-events-at-search/m-p/246569#M47596</link>
      <description>&lt;P&gt;Just find a way myself, actually.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; index=main sourcetype=queues host=web01
| eval fields=mvappend("retrieve:".retrievePending,"merge:".mergePending,"send:".sendPending,"resend:".resendPending)
| mvexpand fields
| makemv delim=":" fields
| eval queue=mvindex(fields,0)
| eval count=mvindex(fields,1)
| eval ratio=round((count/500)*100, 2)
| timechart avg(ratio) by queue
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Any way to make that a bit more efficient, though?&lt;/P&gt;</description>
      <pubDate>Thu, 26 Nov 2015 18:11:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-split-a-single-line-event-into-multiple-events-at-search/m-p/246569#M47596</guid>
      <dc:creator>romaindelmotte</dc:creator>
      <dc:date>2015-11-26T18:11:24Z</dc:date>
    </item>
    <item>
      <title>Re: How to split a single line event into multiple events at search time?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-split-a-single-line-event-into-multiple-events-at-search/m-p/246570#M47597</link>
      <description>&lt;P&gt;It helped me as well, thank you for sharing!&lt;/P&gt;</description>
      <pubDate>Sun, 25 Feb 2018 06:37:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-split-a-single-line-event-into-multiple-events-at-search/m-p/246570#M47597</guid>
      <dc:creator>fpavlovi</dc:creator>
      <dc:date>2018-02-25T06:37:19Z</dc:date>
    </item>
  </channel>
</rss>

