<?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 aggregate Splunk events with different key value pairs based on event time? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-aggregate-Splunk-events-with-different-key-value-pairs/m-p/239915#M71297</link>
    <description>&lt;P&gt;Can you share some sample events?&lt;/P&gt;</description>
    <pubDate>Thu, 05 May 2016 18:42:55 GMT</pubDate>
    <dc:creator>richgalloway</dc:creator>
    <dc:date>2016-05-05T18:42:55Z</dc:date>
    <item>
      <title>How to aggregate Splunk events with different key value pairs based on event time?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-aggregate-Splunk-events-with-different-key-value-pairs/m-p/239914#M71296</link>
      <description>&lt;P&gt;I have logs that contain different Key/value in different logs, but with same transaction.&lt;BR /&gt;
I would like to summarize all this key/value pairs with time in events as below.&lt;BR /&gt;
time1:key1:value1:time2:key2:value2:....&lt;/P&gt;

&lt;P&gt;Is there is any way to achieve that?&lt;/P&gt;

&lt;P&gt;thanks in advance &lt;/P&gt;</description>
      <pubDate>Thu, 05 May 2016 17:27:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-aggregate-Splunk-events-with-different-key-value-pairs/m-p/239914#M71296</guid>
      <dc:creator>ahmedhassanean</dc:creator>
      <dc:date>2016-05-05T17:27:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to aggregate Splunk events with different key value pairs based on event time?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-aggregate-Splunk-events-with-different-key-value-pairs/m-p/239915#M71297</link>
      <description>&lt;P&gt;Can you share some sample events?&lt;/P&gt;</description>
      <pubDate>Thu, 05 May 2016 18:42:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-aggregate-Splunk-events-with-different-key-value-pairs/m-p/239915#M71297</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2016-05-05T18:42:55Z</dc:date>
    </item>
    <item>
      <title>Re: How to aggregate Splunk events with different key value pairs based on event time?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-aggregate-Splunk-events-with-different-key-value-pairs/m-p/239916#M71298</link>
      <description>&lt;P&gt;events1: time1   field1=value1  field2=value2 &lt;BR /&gt;
events2: time2  field1=value2   field3=value3 &lt;BR /&gt;
event3: time3  field4=value4&lt;BR /&gt;
event4: time4 &lt;BR /&gt;
event5: time5 event1=value1  field6=value6&lt;/P&gt;</description>
      <pubDate>Thu, 05 May 2016 19:07:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-aggregate-Splunk-events-with-different-key-value-pairs/m-p/239916#M71298</guid>
      <dc:creator>ahmedhassanean</dc:creator>
      <dc:date>2016-05-05T19:07:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to aggregate Splunk events with different key value pairs based on event time?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-aggregate-Splunk-events-with-different-key-value-pairs/m-p/239917#M71299</link>
      <description>&lt;P&gt;given these events, what would you like the output to be?&lt;/P&gt;</description>
      <pubDate>Thu, 05 May 2016 19:45:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-aggregate-Splunk-events-with-different-key-value-pairs/m-p/239917#M71299</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2016-05-05T19:45:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to aggregate Splunk events with different key value pairs based on event time?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-aggregate-Splunk-events-with-different-key-value-pairs/m-p/239918#M71300</link>
      <description>&lt;P&gt;new events as below:&lt;BR /&gt;
time1,field1=value1:time1: field2=value2:time2 ,field1=value2,time2:field3=value3 and so on&lt;/P&gt;

&lt;P&gt;to summarize it i want to collect each field/value with time for all same filed/value of same transactionID to new one event&lt;/P&gt;</description>
      <pubDate>Thu, 05 May 2016 19:49:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-aggregate-Splunk-events-with-different-key-value-pairs/m-p/239918#M71300</guid>
      <dc:creator>ahmedhassanean</dc:creator>
      <dc:date>2016-05-05T19:49:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to aggregate Splunk events with different key value pairs based on event time?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-aggregate-Splunk-events-with-different-key-value-pairs/m-p/239919#M71301</link>
      <description>&lt;P&gt;May be like this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;your base search | fields _time transactionID fieldlist here | stats list(*) as * by transactionID
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 05 May 2016 20:01:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-aggregate-Splunk-events-with-different-key-value-pairs/m-p/239919#M71301</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2016-05-05T20:01:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to aggregate Splunk events with different key value pairs based on event time?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-aggregate-Splunk-events-with-different-key-value-pairs/m-p/239920#M71302</link>
      <description>&lt;P&gt;not it's tabular format i would like it be raw event time field value .....etc&lt;/P&gt;</description>
      <pubDate>Thu, 05 May 2016 20:06:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-aggregate-Splunk-events-with-different-key-value-pairs/m-p/239920#M71302</guid>
      <dc:creator>ahmedhassanean</dc:creator>
      <dc:date>2016-05-05T20:06:23Z</dc:date>
    </item>
    <item>
      <title>Re: How to aggregate Splunk events with different key value pairs based on event time?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-aggregate-Splunk-events-with-different-key-value-pairs/m-p/239921#M71303</link>
      <description>&lt;P&gt;Have a look at transaction command.&lt;/P&gt;</description>
      <pubDate>Thu, 05 May 2016 22:33:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-aggregate-Splunk-events-with-different-key-value-pairs/m-p/239921#M71303</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2016-05-05T22:33:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to aggregate Splunk events with different key value pairs based on event time?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-aggregate-Splunk-events-with-different-key-value-pairs/m-p/239922#M71304</link>
      <description>&lt;P&gt;transaction command collect events at one big multi values event instead i want to have single value event in row &lt;/P&gt;</description>
      <pubDate>Thu, 05 May 2016 22:36:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-aggregate-Splunk-events-with-different-key-value-pairs/m-p/239922#M71304</guid>
      <dc:creator>ahmedhassanean</dc:creator>
      <dc:date>2016-05-05T22:36:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to aggregate Splunk events with different key value pairs based on event time?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-aggregate-Splunk-events-with-different-key-value-pairs/m-p/239923#M71305</link>
      <description>&lt;P&gt;ahmedhassanean, could you please supply some actual sample events, and for those events please create some sort of a mock-up of the output you'd like?  This will do WONDERS for the quality of responses you get.  Right now I think we're all guessing as to how to rearrange your inputs into your desired outputs.&lt;/P&gt;</description>
      <pubDate>Thu, 05 May 2016 23:48:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-aggregate-Splunk-events-with-different-key-value-pairs/m-p/239923#M71305</guid>
      <dc:creator>Richfez</dc:creator>
      <dc:date>2016-05-05T23:48:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to aggregate Splunk events with different key value pairs based on event time?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-aggregate-Splunk-events-with-different-key-value-pairs/m-p/239924#M71306</link>
      <description>&lt;P&gt;if i run below spl:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=default | table TransactionID "Customer number" agentID viewduration "number of requests" "Server URL"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;i will get below output:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;    time  TransactionID    Customer number    agentID    viewduration    number of requests    Server URL
10:01:01          15647                 51
10:01:02          15647                            13               2
10:01:03          15647                                                                   7
10:01:03          18333                                                                       google.com
10:01:04          15647
10:01:05          15647                                                                       google.com
10:01:06          15647
10:01:07          15647                 69
10:01:08          15647
10:01:09          15647                            74
10:01:10          15647                                           10
10:01:11          15647                                                                13
10:01:12          15647
10:01:13          15647                                           14                           yahoo.com
10:01:14          15647                 
10:01:15          15647                 
10:01:16          15647                                                                14   
10:01:17          15647                 
10:01:18          15647                            10                                          yahoo.com
11:01:18          18333                                                                17
12:01:18          18333                 13
13:01:18          18333
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 06 May 2016 00:00:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-aggregate-Splunk-events-with-different-key-value-pairs/m-p/239924#M71306</guid>
      <dc:creator>ahmedhassanean</dc:creator>
      <dc:date>2016-05-06T00:00:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to aggregate Splunk events with different key value pairs based on event time?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-aggregate-Splunk-events-with-different-key-value-pairs/m-p/239925#M71307</link>
      <description>&lt;P&gt;Thanks, that helps!  Now, what would you like the output of the above events look like?&lt;/P&gt;</description>
      <pubDate>Fri, 06 May 2016 00:04:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-aggregate-Splunk-events-with-different-key-value-pairs/m-p/239925#M71307</guid>
      <dc:creator>Richfez</dc:creator>
      <dc:date>2016-05-06T00:04:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to aggregate Splunk events with different key value pairs based on event time?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-aggregate-Splunk-events-with-different-key-value-pairs/m-p/239926#M71308</link>
      <description>&lt;P&gt;sample example:&lt;BR /&gt;
TransactionID=15647|10:01:01|Customernumber=51|10:01:02|agentID=13|10:01:02|agentID=13&lt;/P&gt;

&lt;P&gt;one line for each transaction&lt;/P&gt;</description>
      <pubDate>Fri, 06 May 2016 00:08:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-aggregate-Splunk-events-with-different-key-value-pairs/m-p/239926#M71308</guid>
      <dc:creator>ahmedhassanean</dc:creator>
      <dc:date>2016-05-06T00:08:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to aggregate Splunk events with different key value pairs based on event time?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-aggregate-Splunk-events-with-different-key-value-pairs/m-p/239927#M71309</link>
      <description>&lt;P&gt;&lt;CODE&gt;... stats latest(_time) as StartTime, Customernumber, first(_time) as EndTime, list(agentID), ...&lt;/CODE&gt; wait, what?  You want to normalize the first half of the stuff, but explicitly not normalize the last half of the stuff?  That's difficult. How many "agentid" are there?  &lt;/P&gt;

&lt;P&gt;Hmm, I'll have to think on that some more. Unless...&lt;BR /&gt;
... stats latest(_time) as StartTime, Customernumber, first(_time) as EndTime, list(agentID), list(_time) by customernumber,TransactionID&lt;/P&gt;

&lt;P&gt;If that's not close enough, to what use would you or someone else actually put this data, as formatted in the way you suggested, to use?  Would another format be useful too?&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 09:39:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-aggregate-Splunk-events-with-different-key-value-pairs/m-p/239927#M71309</guid>
      <dc:creator>Richfez</dc:creator>
      <dc:date>2020-09-29T09:39:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to aggregate Splunk events with different key value pairs based on event time?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-aggregate-Splunk-events-with-different-key-value-pairs/m-p/239928#M71310</link>
      <description>&lt;P&gt;no it's not what i want &lt;BR /&gt;
i would like to normalize all fireld/value pair of each transaction but with time for each field/value in row &lt;/P&gt;

&lt;P&gt;i was thinking in command like mvzip but it will be hard to obtain because of large number of key/value pairs &lt;/P&gt;</description>
      <pubDate>Fri, 06 May 2016 00:23:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-aggregate-Splunk-events-with-different-key-value-pairs/m-p/239928#M71310</guid>
      <dc:creator>ahmedhassanean</dc:creator>
      <dc:date>2016-05-06T00:23:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to aggregate Splunk events with different key value pairs based on event time?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-aggregate-Splunk-events-with-different-key-value-pairs/m-p/239929#M71311</link>
      <description>&lt;P&gt;Like this;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=default | table TransactionID "Customer number" agentID viewduration "number of requests" "Server URL"
| stats values(*) AS * BY TransactionID
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Or maybe this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=default | table TransactionID "Customer number" agentID viewduration "number of requests" "Server URL"
| stats list(*) AS * BY TransactionID
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 12 May 2016 04:25:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-aggregate-Splunk-events-with-different-key-value-pairs/m-p/239929#M71311</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2016-05-12T04:25:04Z</dc:date>
    </item>
  </channel>
</rss>

