<?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 edit my search to check for a valid order of events against a lookup? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-check-for-a-valid-order-of-events/m-p/284627#M86082</link>
    <description>&lt;P&gt;GIve this a try&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="touchtrack" Event.EventName="touched" host="touchtrack_file" |  lookup dbttloc.csv sensor AS Event.SensorNumber OUTPUT name longitude latitude | transaction maxspan=30s mvlist=t | head 1 | Table Time name | eval Time=mvdedup(Time) | eval name=mvdedup(name) | eval eventstart=mvindex(name, 0) | eval eventend=mvindex(name, 1) | lookup stationlist.csv From AS eventstart OUTPUT To | eval valid=if(eventend=To, "Yes", "No")
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 01 Jun 2016 03:46:21 GMT</pubDate>
    <dc:creator>sundareshr</dc:creator>
    <dc:date>2016-06-01T03:46:21Z</dc:date>
    <item>
      <title>How to edit my search to check for a valid order of events against a lookup?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-check-for-a-valid-order-of-events/m-p/284626#M86081</link>
      <description>&lt;P&gt;Hi there, &lt;/P&gt;

&lt;P&gt;i have a series of events wich contain time and location information and want to check if they are in a valid (actually defined in a lookup) order.  &lt;/P&gt;

&lt;P&gt;The search &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="touchtrack" Event.EventName="touched" host="touchtrack_file" |  lookup dbttloc.csv sensor AS Event.SensorNumber OUTPUT name longitude latitude | transaction maxspan=30s mvlist=t | head 1 | Table Time name | eval Time=mvdedup(Time) | eval name=mvdedup(name)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;has this result:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Time                         name
2016-05-31 20:32:42.851001   München
2016-05-31 20:32:43.956112   Berlin
2016-05-31 20:32:45.233240   Frankfurt
2016-05-31 20:32:47.176434   Hamburg
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I want to compare the oldest event (here München) against the next one (here Berlin) and so on against the order in a lookup.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;From      To
München   Hamburg
Hamburg   Berlin
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;and mark the transaction as valid (or not).&lt;/P&gt;

&lt;P&gt;In the given example, the transaction is not valid because München - Berlin is not in the lookup&lt;/P&gt;

&lt;P&gt;Any ideas are welcome as I do not have any left...  &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;thanks&lt;BR /&gt;
swe&lt;/P&gt;</description>
      <pubDate>Tue, 31 May 2016 20:44:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-check-for-a-valid-order-of-events/m-p/284626#M86081</guid>
      <dc:creator>swe</dc:creator>
      <dc:date>2016-05-31T20:44:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to edit my search to check for a valid order of events against a lookup?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-check-for-a-valid-order-of-events/m-p/284627#M86082</link>
      <description>&lt;P&gt;GIve this a try&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="touchtrack" Event.EventName="touched" host="touchtrack_file" |  lookup dbttloc.csv sensor AS Event.SensorNumber OUTPUT name longitude latitude | transaction maxspan=30s mvlist=t | head 1 | Table Time name | eval Time=mvdedup(Time) | eval name=mvdedup(name) | eval eventstart=mvindex(name, 0) | eval eventend=mvindex(name, 1) | lookup stationlist.csv From AS eventstart OUTPUT To | eval valid=if(eventend=To, "Yes", "No")
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 01 Jun 2016 03:46:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-check-for-a-valid-order-of-events/m-p/284627#M86082</guid>
      <dc:creator>sundareshr</dc:creator>
      <dc:date>2016-06-01T03:46:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to edit my search to check for a valid order of events against a lookup?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-check-for-a-valid-order-of-events/m-p/284628#M86083</link>
      <description>&lt;P&gt;thanks sundareshr, &lt;/P&gt;

&lt;P&gt;this lead me to a different approach, without having to loop within the multivalue:&lt;/P&gt;

&lt;UL&gt;
&lt;LI&gt;streamstats current=f global=f window=1 last(Nach) as Von *&lt;/LI&gt;
&lt;/UL&gt;</description>
      <pubDate>Wed, 01 Jun 2016 12:41:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-check-for-a-valid-order-of-events/m-p/284628#M86083</guid>
      <dc:creator>swe</dc:creator>
      <dc:date>2016-06-01T12:41:34Z</dc:date>
    </item>
  </channel>
</rss>

