<?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 do I separate each IP and corresponding time field into separate events to get an average and plot on a timechart? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-separate-each-IP-and-corresponding-time-field-into/m-p/249489#M74494</link>
    <description>&lt;P&gt;ofcourse, event multiplies, so i have events N to N,  IP to delay, not 1 to 1&lt;/P&gt;</description>
    <pubDate>Mon, 11 Jul 2016 15:29:21 GMT</pubDate>
    <dc:creator>Shark2112</dc:creator>
    <dc:date>2016-07-11T15:29:21Z</dc:date>
    <item>
      <title>How do I separate each IP and corresponding time field into separate events to get an average and plot on a timechart?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-separate-each-IP-and-corresponding-time-field-into/m-p/249481#M74486</link>
      <description>&lt;P&gt;Hey guys.&lt;/P&gt;

&lt;P&gt;I have events like this "ip delay|" every second:&lt;BR /&gt;
10.161.30.19 0.290|10.2.10.151 0.793|10.2.10.152 0.596|10.102.5.2 0.706|10.102.17.2 0.672|10.102.6.2 0.644|10.102.29.2 0.660|10.2.10.211 2.29|10.102.202.3 1.06|10.102.9.3 1.26|&lt;/P&gt;

&lt;P&gt;I tried:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="ping" | rex max_match=100 field=_raw "(?(\d{1,3}\.){3}\d{1,3})\s(?(\d+\.?\d+))" | table ip time _time
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;and see &lt;BR /&gt;
&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/1560i59B352D5177B0762/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;So I can't make right timechart like:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| timechart avg(time) by host
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;because average time in one event is the same for all IPs, I need to separate each one into separate events to find the average.&lt;/P&gt;</description>
      <pubDate>Fri, 08 Jul 2016 10:50:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-separate-each-IP-and-corresponding-time-field-into/m-p/249481#M74486</guid>
      <dc:creator>Shark2112</dc:creator>
      <dc:date>2016-07-08T10:50:15Z</dc:date>
    </item>
    <item>
      <title>Re: How do I separate each IP and corresponding time field into separate events to get an average and plot on a timechart?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-separate-each-IP-and-corresponding-time-field-into/m-p/249482#M74487</link>
      <description>&lt;P&gt;how about this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| rex max_match=100 field=_raw "(?&amp;lt;ip&amp;gt;(\d{1,3}.){3}\d{1,3})\s(?&amp;lt;time&amp;gt;(\d+.?\d+))" 
| mvexpand ip
| mvexpand time
| table ip time
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Which then works with timechart:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| rex max_match=100 field=_raw "(?&amp;lt;ip&amp;gt;(\d{1,3}.){3}\d{1,3})\s(?&amp;lt;time&amp;gt;(\d+.?\d+))" 
| mvexpand ip
| mvexpand time
| timechart avg(time) by ip
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/6.4.1/SearchReference/Mvexpand"&gt;http://docs.splunk.com/Documentation/Splunk/6.4.1/SearchReference/Mvexpand&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 08 Jul 2016 12:15:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-separate-each-IP-and-corresponding-time-field-into/m-p/249482#M74487</guid>
      <dc:creator>jkat54</dc:creator>
      <dc:date>2016-07-08T12:15:25Z</dc:date>
    </item>
    <item>
      <title>Re: How do I separate each IP and corresponding time field into separate events to get an average and plot on a timechart?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-separate-each-IP-and-corresponding-time-field-into/m-p/249483#M74488</link>
      <description>&lt;P&gt;something is wrong&lt;BR /&gt;
msg:&lt;BR /&gt;
t1467986795.01i10.2.10.215d4.64i10.102.33.2d0.686i10.102.16.2d0.702i10.102.4.2d24.8i10.102.34.2d0.789i10.102.54.2d0.727i10.2.10.210d6.42i10.102.101.2d0.702i10.2.10.203d0.710i10.2.10.142d0.734i10.102.109.2d0.649i10.2.10.219d2.11i10.102.104.2d0.707i10.102.103.2d0.749i10.102.108.2d0.883i10.2.10.148d0.697&lt;/P&gt;

&lt;P&gt;| rex max_match=100 field=_raw "i(?(\d{1,3}.){3}\d{1,3})d(?(\d+.?\d+))" &lt;BR /&gt;
| mvexpand ip &lt;BR /&gt;
| table ip time _time&lt;BR /&gt;
| where ip="10.2.10.207"&lt;BR /&gt;
&lt;IMG src="https://pp.vk.me/c633325/v633325045/36188/u5qklTAA1Us.jpg" alt="alt text" /&gt;&lt;BR /&gt;
so i have &lt;/P&gt;

&lt;P&gt;so this ip have all values from time and not just him own&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 10:10:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-separate-each-IP-and-corresponding-time-field-into/m-p/249483#M74488</guid>
      <dc:creator>Shark2112</dc:creator>
      <dc:date>2020-09-29T10:10:34Z</dc:date>
    </item>
    <item>
      <title>Re: How do I separate each IP and corresponding time field into separate events to get an average and plot on a timechart?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-separate-each-IP-and-corresponding-time-field-into/m-p/249484#M74489</link>
      <description>&lt;P&gt;This should do it&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="ping" | rex max_match=100 field=_raw "(?&amp;lt;temp&amp;gt;(\d{1,3}.){3}\d{1,3}\s\d+.?\d+)" | table _time temp | mvexpand temp
| rex field=temp "(?&amp;lt;ip&amp;gt;(\d{1,3}.){3}\d{1,3})\s(?&amp;lt;time&amp;gt;(\d+.?\d+))"  | timechart avg(time) by ip limit=0
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 08 Jul 2016 15:00:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-separate-each-IP-and-corresponding-time-field-into/m-p/249484#M74489</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2016-07-08T15:00:41Z</dc:date>
    </item>
    <item>
      <title>Re: How do I separate each IP and corresponding time field into separate events to get an average and plot on a timechart?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-separate-each-IP-and-corresponding-time-field-into/m-p/249485#M74490</link>
      <description>&lt;P&gt;Won't this give additional rows due to two mvexpand where ip and time should be related?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| gentimes start=-1 | eval _raw="10.161.30.19 0.290|10.2.10.151 0.793" | rex max_match=100 field=_raw "(?&amp;lt;ip&amp;gt;(\d{1,3}.){3}\d{1,3})\s(?&amp;lt;time&amp;gt;(\d+.?\d+))"  | mvexpand ip | mvexpand time | table ip time
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Output&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;ip↕   time↕ 
10.161.30.19  0.290  
10.161.30.19  0.793  
10.2.10.151  0.290  
10.2.10.151  0.793 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Getting 4 rows instead of 2&lt;/P&gt;</description>
      <pubDate>Fri, 08 Jul 2016 16:11:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-separate-each-IP-and-corresponding-time-field-into/m-p/249485#M74490</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2016-07-08T16:11:52Z</dc:date>
    </item>
    <item>
      <title>Re: How do I separate each IP and corresponding time field into separate events to get an average and plot on a timechart?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-separate-each-IP-and-corresponding-time-field-into/m-p/249486#M74491</link>
      <description>&lt;P&gt;if i have two events with three IPs in each so i want to have six values.&lt;BR /&gt;
Seems like in there no relations between IP and delay, because mvexpand make events with ALL values of delay.&lt;BR /&gt;
i need this:&lt;BR /&gt;
_time=1 ip=10.161.30.19 delay=0.290&lt;BR /&gt;
_time=1 ip=10.2.10.151 delay=0.793&lt;BR /&gt;
_time=2 ip=10.161.30.19 delay=0.320&lt;BR /&gt;
_time=2 ip=10.2.10.151 delay=0.913&lt;/P&gt;</description>
      <pubDate>Mon, 11 Jul 2016 13:12:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-separate-each-IP-and-corresponding-time-field-into/m-p/249486#M74491</guid>
      <dc:creator>Shark2112</dc:creator>
      <dc:date>2016-07-11T13:12:49Z</dc:date>
    </item>
    <item>
      <title>Re: How do I separate each IP and corresponding time field into separate events to get an average and plot on a timechart?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-separate-each-IP-and-corresponding-time-field-into/m-p/249487#M74492</link>
      <description>&lt;P&gt;i need just two different event in this case&lt;/P&gt;</description>
      <pubDate>Mon, 11 Jul 2016 14:27:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-separate-each-IP-and-corresponding-time-field-into/m-p/249487#M74492</guid>
      <dc:creator>Shark2112</dc:creator>
      <dc:date>2016-07-11T14:27:06Z</dc:date>
    </item>
    <item>
      <title>Re: How do I separate each IP and corresponding time field into separate events to get an average and plot on a timechart?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-separate-each-IP-and-corresponding-time-field-into/m-p/249488#M74493</link>
      <description>&lt;P&gt;Did you try the method in my answer?&lt;/P&gt;</description>
      <pubDate>Mon, 11 Jul 2016 14:43:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-separate-each-IP-and-corresponding-time-field-into/m-p/249488#M74493</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2016-07-11T14:43:15Z</dc:date>
    </item>
    <item>
      <title>Re: How do I separate each IP and corresponding time field into separate events to get an average and plot on a timechart?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-separate-each-IP-and-corresponding-time-field-into/m-p/249489#M74494</link>
      <description>&lt;P&gt;ofcourse, event multiplies, so i have events N to N,  IP to delay, not 1 to 1&lt;/P&gt;</description>
      <pubDate>Mon, 11 Jul 2016 15:29:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-separate-each-IP-and-corresponding-time-field-into/m-p/249489#M74494</guid>
      <dc:creator>Shark2112</dc:creator>
      <dc:date>2016-07-11T15:29:21Z</dc:date>
    </item>
    <item>
      <title>Re: How do I separate each IP and corresponding time field into separate events to get an average and plot on a timechart?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-separate-each-IP-and-corresponding-time-field-into/m-p/249490#M74495</link>
      <description>&lt;P&gt;This query?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; index="ping" | rex max_match=100 field=_raw "(?&amp;lt;temp&amp;gt;(\d{1,3}.){3}\d{1,3}\s\d+.?\d+)" | table _time temp | mvexpand temp
 | rex field=temp "(?&amp;lt;ip&amp;gt;(\d{1,3}.){3}\d{1,3})\s(?&amp;lt;time&amp;gt;(\d+.?\d+))"  | timechart avg(time) by ip limit=0
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 11 Jul 2016 15:32:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-separate-each-IP-and-corresponding-time-field-into/m-p/249490#M74495</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2016-07-11T15:32:23Z</dc:date>
    </item>
    <item>
      <title>Re: How do I separate each IP and corresponding time field into separate events to get an average and plot on a timechart?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-separate-each-IP-and-corresponding-time-field-into/m-p/249491#M74496</link>
      <description>&lt;P&gt;hmmm... i'm tried one more time and now all work fine, have't idea what changed.&lt;BR /&gt;
Thanks for patience!&lt;/P&gt;</description>
      <pubDate>Wed, 13 Jul 2016 08:19:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-separate-each-IP-and-corresponding-time-field-into/m-p/249491#M74496</guid>
      <dc:creator>Shark2112</dc:creator>
      <dc:date>2016-07-13T08:19:28Z</dc:date>
    </item>
    <item>
      <title>Re: How do I separate each IP and corresponding time field into separate events to get an average and plot on a timechart?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-separate-each-IP-and-corresponding-time-field-into/m-p/249492#M74497</link>
      <description>&lt;P&gt;index="ping" | rex max_match=100 field=_raw "(?(\d{1,3}.){3}\d{1,3}\s\d+.?\d+)" | table _time temp | mvexpand temp&lt;BR /&gt;
  | rex field=temp "(?(\d{1,3}.){3}\d{1,3})\s(?(\d+.?\d+))"  | timechart avg(time) by ip limit=0&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 10:12:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-separate-each-IP-and-corresponding-time-field-into/m-p/249492#M74497</guid>
      <dc:creator>Shark2112</dc:creator>
      <dc:date>2020-09-29T10:12:06Z</dc:date>
    </item>
  </channel>
</rss>

