<?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 would I create a search for event that happens but exclude the first 45 minutes? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-would-I-create-a-search-for-event-that-happens-but-exclude/m-p/489723#M136780</link>
    <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/161352"&gt;@gcusello&lt;/a&gt; Thanks Giuseppe.&lt;/P&gt;

&lt;P&gt;So the time frame will be at the first point the whid comes in to prevent whid coming twice seconds or minutes apart. &lt;/P&gt;

&lt;P&gt;Basically after the first event comes in  KICKOFF_FIRST_HALF I dont want this message to come up on the search for at least 45 minutes&lt;/P&gt;</description>
    <pubDate>Wed, 30 Sep 2020 03:04:27 GMT</pubDate>
    <dc:creator>mrkala</dc:creator>
    <dc:date>2020-09-30T03:04:27Z</dc:date>
    <item>
      <title>How would I create a search for event that happens but exclude the first 45 minutes?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-would-I-create-a-search-for-event-that-happens-but-exclude/m-p/489721#M136778</link>
      <description>&lt;P&gt;I am new to Splunk and trying to create an alert for a message however I keep getting false positives on the message been sent seconds apart. &lt;/P&gt;

&lt;P&gt;I would like the search to find event with the message been sent over 45 minutes.&lt;/P&gt;

&lt;P&gt;Anyone have any ideas or is the search too complex?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=wh_trading_feeds KICKOFF_*_FIRST_HALF NOT KICKOFF_*_FIRST_HALF_ET "attrs.MARATHON_APP_ID"="/whc/tbc01/feeds-incident-notifier" | stats count by whId | where count = 2 | eval eventTitle = "INFO Event KO modified: &lt;A href="http://gtp-ui.trading-services.prod.williamhill.plc/#!/football/event/&amp;quot;+whId" target="test_blank"&gt;http://gtp-ui.trading-services.prod.williamhill.plc/#!/football/event/"+whId&lt;/A&gt; earliest=@now() latest=+45m | table eventTitle
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 25 Nov 2019 11:22:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-would-I-create-a-search-for-event-that-happens-but-exclude/m-p/489721#M136778</guid>
      <dc:creator>mrkala</dc:creator>
      <dc:date>2019-11-25T11:22:03Z</dc:date>
    </item>
    <item>
      <title>Re: How would I create a search for event that happens but exclude the first 45 minutes?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-would-I-create-a-search-for-event-that-happens-but-exclude/m-p/489722#M136779</link>
      <description>&lt;P&gt;Hi @mrkala,&lt;BR /&gt;
sorry but in your search there are some errors: after the stats command, you can use only the fields that you used in stats, in other words, in your search, only whld, so you haven't more eventTitle and _time, so you have to rebuild your search modifying the stats command.&lt;/P&gt;

&lt;P&gt;In addition I don't understand the time condition you want to eliminate false positives.&lt;/P&gt;

&lt;P&gt;Anyway to solve the first problem, see below:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=wh_trading_feeds KICKOFF_FIRST_HALF NOT KICKOFF_FIRST_HALF_ET "attrs.MARATHON_APP_ID"="/whc/tbc01/feeds-incident-notifier" 
| stats values(eventTitle) AS eventTitle earliest(_time) AS _time count by whId 
| where count = 2 
| eval eventTitle = "INFO Event KO modified: &lt;A href="http://gtp-ui.trading-services.prod.williamhill.plc/#!/football/event/&amp;quot;.whId" target="test_blank"&gt;http://gtp-ui.trading-services.prod.williamhill.plc/#!/football/event/".whId&lt;/A&gt; 
| table eventTitle
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;For the second, could you give more infos about the time frame?&lt;/P&gt;

&lt;P&gt;Ciao.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
      <pubDate>Mon, 25 Nov 2019 13:22:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-would-I-create-a-search-for-event-that-happens-but-exclude/m-p/489722#M136779</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2019-11-25T13:22:25Z</dc:date>
    </item>
    <item>
      <title>Re: How would I create a search for event that happens but exclude the first 45 minutes?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-would-I-create-a-search-for-event-that-happens-but-exclude/m-p/489723#M136780</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/161352"&gt;@gcusello&lt;/a&gt; Thanks Giuseppe.&lt;/P&gt;

&lt;P&gt;So the time frame will be at the first point the whid comes in to prevent whid coming twice seconds or minutes apart. &lt;/P&gt;

&lt;P&gt;Basically after the first event comes in  KICKOFF_FIRST_HALF I dont want this message to come up on the search for at least 45 minutes&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 03:04:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-would-I-create-a-search-for-event-that-happens-but-exclude/m-p/489723#M136780</guid>
      <dc:creator>mrkala</dc:creator>
      <dc:date>2020-09-30T03:04:27Z</dc:date>
    </item>
    <item>
      <title>Re: How would I create a search for event that happens but exclude the first 45 minutes?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-would-I-create-a-search-for-event-that-happens-but-exclude/m-p/489724#M136781</link>
      <description>&lt;P&gt;Let me understand: &lt;BR /&gt;
for each whId, after that Splunk found a message "KICKOFF_FIRST_HALF" you don't want to see again rows up to 45 minutes, is it correct?&lt;/P&gt;

&lt;P&gt;if this is your requirement, you could try something like this, running every 5 minutes:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; index=wh_trading_feeds KICKOFF_FIRST_HALF NOT KICKOFF_FIRST_HALF_ET earliest=-5m@m latest=now "attrs.MARATHON_APP_ID"="/whc/tbc01/feeds-incident-notifier" NOT [ search  index=wh_trading_feeds KICKOFF_FIRST_HALF NOT KICKOFF_FIRST_HALF_ET "attrs.MARATHON_APP_ID"="/whc/tbc01/feeds-incident-notifier" earliest=-50m@m latest=-5m@m | dedup whId | fields whId ]
 | stats values(eventTitle) AS eventTitle earliest(_time) AS _time count by whId 
 | where count = 2 
 | eval eventTitle = "INFO Event KO modified: http://gtp-ui.trading-services.prod.williamhill.plc/#!/football/event/".whId 
 | table eventTitle
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Ciao.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 03:08:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-would-I-create-a-search-for-event-that-happens-but-exclude/m-p/489724#M136781</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2020-09-30T03:08:07Z</dc:date>
    </item>
  </channel>
</rss>

