<?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: Help building a search in Splunk Enterprise</title>
    <link>https://community.splunk.com/t5/Splunk-Enterprise/Help-building-a-search/m-p/757131#M23685</link>
    <description>&lt;P&gt;Thanks a lot ! I used it for the solution&lt;/P&gt;</description>
    <pubDate>Fri, 09 Jan 2026 16:08:24 GMT</pubDate>
    <dc:creator>robertoClaros</dc:creator>
    <dc:date>2026-01-09T16:08:24Z</dc:date>
    <item>
      <title>Help building a search</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/Help-building-a-search/m-p/757030#M23662</link>
      <description>&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;I am currently trying to do a search in which I verify if :&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;=&amp;gt; "testA" syslog has been received before any of "test", "test2" or "test3" syslog OR if &lt;SPAN&gt;"testA" syslog has not been received but we have one of the other syslogs&amp;nbsp;"test", "test2" or "test3"&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;The main goal is to verify if an event A happened before other ones making it a notable event.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;I tried things with transactions and eval commands in order to know which syslog was received and which was last but without big success.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;Thank you all.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Jan 2026 14:56:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/Help-building-a-search/m-p/757030#M23662</guid>
      <dc:creator>robertoClaros</dc:creator>
      <dc:date>2026-01-07T14:56:20Z</dc:date>
    </item>
    <item>
      <title>Re: Help building a search</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/Help-building-a-search/m-p/757031#M23663</link>
      <description>&lt;P&gt;I tried the following example but it seems not really efficient and working :&amp;nbsp;&lt;/P&gt;&lt;P&gt;index=* Data IN ("testA",&amp;nbsp;"test", "test2", "test3")&lt;BR /&gt;| transaction Data&lt;BR /&gt;| sort _time&lt;BR /&gt;| eval testA_present=if(match(Data, "testA"), "true", "false")&lt;BR /&gt;| eval test_present=if(match(Data, "(test|test2|test3)"), "true", "false")&lt;BR /&gt;| eval testA_last=if(testA_present="true" AND test_present="true", mvindex(split(Data, "|"), -1) == "testA", "false")&lt;BR /&gt;| where (testA_present="true" AND test_present="true" AND testA_last="false") OR (testA_present="false" AND test_present="true")&lt;/P&gt;</description>
      <pubDate>Wed, 07 Jan 2026 15:01:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/Help-building-a-search/m-p/757031#M23663</guid>
      <dc:creator>robertoClaros</dc:creator>
      <dc:date>2026-01-07T15:01:41Z</dc:date>
    </item>
    <item>
      <title>Re: Help building a search</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/Help-building-a-search/m-p/757032#M23664</link>
      <description>&lt;P&gt;It is a bit difficult to advise without knowledge of what your events look like but let us assume that you have a field called test_name, then you can do something like this&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;``` Ensure event are in chronological order ```
| sort 0 _time
``` Find the previous time that "testA" was received ```
| streamstats last(eval(if(test_name=="testA",_time,null()))) as last_testA
| where isnull(last_testA) and test_name IN ("test", "test2", "test3")&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 07 Jan 2026 15:11:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/Help-building-a-search/m-p/757032#M23664</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2026-01-07T15:11:31Z</dc:date>
    </item>
    <item>
      <title>Re: Help building a search</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/Help-building-a-search/m-p/757124#M23684</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/315031"&gt;@robertoClaros&lt;/a&gt;&amp;nbsp;,&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So the full solution for your original problem - detecting if "test" / "test2" / "test3" syslog happens before any "testA" (or no testA at all) - is this search:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| makeresults count=20
| streamstats count as event_num
| eval _time=_time - (20-event_num)*60
| eval Data=case(
    event_num % 5 == 0, "testA",
    event_num % 5 == 1, "test",
    event_num % 5 == 2, "test2",
    event_num % 5 == 3, "test3",
    true(), "testA"
  )
| eval host="test-host", source="syslog"
| sort 0 _time
| streamstats last(eval(if(Data=="testA",_time,null()))) as last_testA_time
| where isnull(last_testA_time) AND Data IN ("test", "test2", "test3")
| table _time Data host source last_testA_time&lt;/LI-CODE&gt;&lt;P&gt;&lt;SPAN&gt;This test data creates the exact scenario u want - test events before testA gets flagged perfectly see the screenshot as well.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;STRONG&gt;What it does (super simple):&lt;/STRONG&gt;&lt;/P&gt;&lt;UL class=""&gt;&lt;LI&gt;&lt;P class=""&gt;Grabs only your relevant events&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P class=""&gt;Sorts oldest first&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P class=""&gt;streamstats&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;tracks when testA was last seen (null if never)&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P class=""&gt;where&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;finds test/test2/test3 events where testA hasnt happened yet = your notable events!&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jan 2026 14:07:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/Help-building-a-search/m-p/757124#M23684</guid>
      <dc:creator>asimit</dc:creator>
      <dc:date>2026-01-09T14:07:11Z</dc:date>
    </item>
    <item>
      <title>Re: Help building a search</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/Help-building-a-search/m-p/757131#M23685</link>
      <description>&lt;P&gt;Thanks a lot ! I used it for the solution&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jan 2026 16:08:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/Help-building-a-search/m-p/757131#M23685</guid>
      <dc:creator>robertoClaros</dc:creator>
      <dc:date>2026-01-09T16:08:24Z</dc:date>
    </item>
    <item>
      <title>Re: Help building a search</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/Help-building-a-search/m-p/757132#M23686</link>
      <description>&lt;P&gt;Thank you so much for the help !&lt;/P&gt;&lt;P&gt;I used latest in order not to need to sort events but it works really well on my side.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jan 2026 16:09:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/Help-building-a-search/m-p/757132#M23686</guid>
      <dc:creator>robertoClaros</dc:creator>
      <dc:date>2026-01-09T16:09:29Z</dc:date>
    </item>
  </channel>
</rss>

