<?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: Extract list of event ids in shorter time range and search for all correlated events in larger time range in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-list-of-event-ids-in-shorter-time-range-and/m-p/590953#M205733</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/244087"&gt;@fredv44&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;good for you, see next time!&lt;/P&gt;&lt;P&gt;Ciao and happy splunking&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;&lt;P&gt;P.S.: Karma Points are appreciated by all the Contributors;-)&lt;/P&gt;</description>
    <pubDate>Sat, 26 Mar 2022 07:06:57 GMT</pubDate>
    <dc:creator>gcusello</dc:creator>
    <dc:date>2022-03-26T07:06:57Z</dc:date>
    <item>
      <title>How to extract list of event ids in shorter time range and search for all correlated events in larger time range?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-list-of-event-ids-in-shorter-time-range-and/m-p/590143#M205453</link>
      <description>&lt;P&gt;&lt;FONT size="4"&gt;Hello.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="4"&gt;Given these logs:&lt;/FONT&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;FONT size="3"&gt;2022-03-16 16:08:43.991 traceId="7890" svc="Service1" duration=132&lt;BR /&gt;2022-03-16 16:10:43.279 traceId="1234" svc="Service1" duration=132&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="3"&gt;2022-03-16 16:38:43.281 traceId="5678" svc="Service3" duration=219&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="3"&gt;2022-03-16 16:43:43.284 traceId="1234" svc="Service2" duration=320&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="3"&gt;2022-03-16 17:03:44.010 traceId="1234" svc="Service2" duration=1023&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="3"&gt;2022-03-16 17:04:44.299 traceId="5678" svc="Service3" duration=822&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="3"&gt;2022-03-16 17:19:44.579 traceId="5678" svc="Service2" duration=340&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="3"&gt;2022-03-16 17:32:44.928 traceId="1234" svc="Service1" duration=543&lt;/FONT&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;FONT size="4"&gt;I would like in a single search to:&lt;/FONT&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;FONT size="4"&gt;extract all traceIds that happened between 17:00 and 17:05&lt;/FONT&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;FONT size="4"&gt;search for the captured traceIds in larger range (say between 16:00 and 18:00)&lt;/FONT&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&lt;FONT size="4"&gt;Is that possible? Thank you!&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Mar 2022 21:23:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-list-of-event-ids-in-shorter-time-range-and/m-p/590143#M205453</guid>
      <dc:creator>fredv44</dc:creator>
      <dc:date>2022-03-28T21:23:53Z</dc:date>
    </item>
    <item>
      <title>Re: Extract list of event ids in shorter time range and search for all correlated events in larger time range</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-list-of-event-ids-in-shorter-time-range-and/m-p/590146#M205455</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/244087"&gt;@fredv44&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;let me understand, you want to find the TraceID present between 17.00 and 17.05 and see if they are also present between 16.00 and 18.00?&lt;/P&gt;&lt;P&gt;If this is your need you could try something like this:&lt;/P&gt;&lt;P&gt;I suppose to run your seach at 18.00:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=your_index traceId=* earliest=-120m@m latest=@m
| eval 
     little_period_start=relative_time(now(),"-60m@m"),
     little_period_end=relative_time(now(),"-55m@m")
| eval period=if(_time&amp;gt;little_period_start AND _time&amp;lt;=little_period_end,"inside","outside")
| stats dc(period) AS dc_period values(period) AS period BY traceId&lt;/LI-CODE&gt;&lt;P&gt;In this way you can configure all the conditions you want: only inside, only outside, in both periods using a search command at the end of the search.&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Tue, 22 Mar 2022 07:59:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-list-of-event-ids-in-shorter-time-range-and/m-p/590146#M205455</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2022-03-22T07:59:47Z</dc:date>
    </item>
    <item>
      <title>Re: Extract list of event ids in shorter time range and search for all correlated events in larger time range</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-list-of-event-ids-in-shorter-time-range-and/m-p/590151#M205458</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/161352"&gt;@gcusello&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In fact the reason why I want to extract in a small range first is to narrow down my search (a sort of event sampling). There are millions of traceIds in this 2-hour range and search with traceId=* doesn't go through (timeout). I am looking to extract a subset of traceIds in this small range first so that I can look for all events that happened for those in this 2-hour range (hoping that Splunk will be able to efficiently use those traceIds to filter out millions of rows and not time out).&lt;/P&gt;&lt;P&gt;Of course, a traceId can span over multiple minutes, hence a 5-minute range will be too short to capture what happened with those captured traceIds.&lt;/P&gt;&lt;P&gt;I am intending to run this query at different dates/times in the past.&lt;/P&gt;&lt;P&gt;I hope it makes sense &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 22 Mar 2022 08:21:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-list-of-event-ids-in-shorter-time-range-and/m-p/590151#M205458</guid>
      <dc:creator>fredv44</dc:creator>
      <dc:date>2022-03-22T08:21:59Z</dc:date>
    </item>
    <item>
      <title>Re: Extract list of event ids in shorter time range and search for all correlated events in larger time range</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-list-of-event-ids-in-shorter-time-range-and/m-p/590153#M205460</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/244087"&gt;@fredv44&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;surely, my answer isn't a final solution, but an approach that you have to customize for your present and future needs.&lt;/P&gt;&lt;P&gt;If this solution answers to your request, please accept it for the other people of Community, otherwise, please, tell me how can I help you more.&lt;/P&gt;&lt;P&gt;Ciao and happy splunking.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;&lt;P&gt;P.S.: Karma Points are appreciated &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 22 Mar 2022 08:23:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-list-of-event-ids-in-shorter-time-range-and/m-p/590153#M205460</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2022-03-22T08:23:42Z</dc:date>
    </item>
    <item>
      <title>Re: Extract list of event ids in shorter time range and search for all correlated events in larger time range</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-list-of-event-ids-in-shorter-time-range-and/m-p/590953#M205733</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/244087"&gt;@fredv44&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;good for you, see next time!&lt;/P&gt;&lt;P&gt;Ciao and happy splunking&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;&lt;P&gt;P.S.: Karma Points are appreciated by all the Contributors;-)&lt;/P&gt;</description>
      <pubDate>Sat, 26 Mar 2022 07:06:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-list-of-event-ids-in-shorter-time-range-and/m-p/590953#M205733</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2022-03-26T07:06:57Z</dc:date>
    </item>
  </channel>
</rss>

