<?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 do you create an alert in Splunk that checks a file for one code and then must see another code within 4 hours or a ticket is cut? in Alerting</title>
    <link>https://community.splunk.com/t5/Alerting/How-do-you-create-an-alert-in-Splunk-that-checks-a-file-for-one/m-p/403156#M7104</link>
    <description>&lt;P&gt;So I'm assuming that after that part of the code I would put in the if count not zero, send alert?&lt;/P&gt;</description>
    <pubDate>Fri, 11 Jan 2019 15:52:50 GMT</pubDate>
    <dc:creator>nls7010</dc:creator>
    <dc:date>2019-01-11T15:52:50Z</dc:date>
    <item>
      <title>How do you create an alert in Splunk that checks a file for one code and then must see another code within 4 hours or a ticket is cut?</title>
      <link>https://community.splunk.com/t5/Alerting/How-do-you-create-an-alert-in-Splunk-that-checks-a-file-for-one/m-p/403154#M7102</link>
      <description>&lt;P&gt;I need to create an alert that checks for a particular code number, and when it comes in, then if another code doesn't come in within 4 hours, a ticket is cut.  I know how to check for the first code, but I'm not certain how to do the span and search for the 2nd code number.&lt;/P&gt;</description>
      <pubDate>Fri, 11 Jan 2019 13:51:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/How-do-you-create-an-alert-in-Splunk-that-checks-a-file-for-one/m-p/403154#M7102</guid>
      <dc:creator>nls7010</dc:creator>
      <dc:date>2019-01-11T13:51:26Z</dc:date>
    </item>
    <item>
      <title>Re: How do you create an alert in Splunk that checks a file for one code and then must see another code within 4 hours or a ticket is cut?</title>
      <link>https://community.splunk.com/t5/Alerting/How-do-you-create-an-alert-in-Splunk-that-checks-a-file-for-one/m-p/403155#M7103</link>
      <description>&lt;P&gt;This may get you started.  &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;your search for the code number&amp;gt; earliest=-4h | stats count | where count&amp;lt;2
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 11 Jan 2019 15:32:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/How-do-you-create-an-alert-in-Splunk-that-checks-a-file-for-one/m-p/403155#M7103</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2019-01-11T15:32:46Z</dc:date>
    </item>
    <item>
      <title>Re: How do you create an alert in Splunk that checks a file for one code and then must see another code within 4 hours or a ticket is cut?</title>
      <link>https://community.splunk.com/t5/Alerting/How-do-you-create-an-alert-in-Splunk-that-checks-a-file-for-one/m-p/403156#M7104</link>
      <description>&lt;P&gt;So I'm assuming that after that part of the code I would put in the if count not zero, send alert?&lt;/P&gt;</description>
      <pubDate>Fri, 11 Jan 2019 15:52:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/How-do-you-create-an-alert-in-Splunk-that-checks-a-file-for-one/m-p/403156#M7104</guid>
      <dc:creator>nls7010</dc:creator>
      <dc:date>2019-01-11T15:52:50Z</dc:date>
    </item>
    <item>
      <title>Re: How do you create an alert in Splunk that checks a file for one code and then must see another code within 4 hours or a ticket is cut?</title>
      <link>https://community.splunk.com/t5/Alerting/How-do-you-create-an-alert-in-Splunk-that-checks-a-file-for-one/m-p/403157#M7105</link>
      <description>&lt;P&gt;Not quite.  Leave the query as it is and set your alert to trigger if the number of results is not zero.&lt;/P&gt;</description>
      <pubDate>Sun, 13 Jan 2019 02:59:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/How-do-you-create-an-alert-in-Splunk-that-checks-a-file-for-one/m-p/403157#M7105</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2019-01-13T02:59:07Z</dc:date>
    </item>
    <item>
      <title>Re: How do you create an alert in Splunk that checks a file for one code and then must see another code within 4 hours or a ticket is cut?</title>
      <link>https://community.splunk.com/t5/Alerting/How-do-you-create-an-alert-in-Splunk-that-checks-a-file-for-one/m-p/403158#M7106</link>
      <description>&lt;P&gt;Assuming that you have a field like &lt;CODE&gt;account&lt;/CODE&gt; that you need to group by, run something like this every hour with the timepicker set to "Last 5 Hours" (set your alert trigger to &lt;CODE&gt;when&lt;/CODE&gt; = &lt;CODE&gt;number of results&lt;/CODE&gt; and &lt;CODE&gt;is greater than 0&lt;/CODE&gt;)&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| makeresults 
| eval account="foo bar bat"
| makemv account
| mvexpand account
| eval code=case(account=="foo", "start middle middle stop", account=="bar", "stop", true(), "start")
| makemv code
| mvexpand code
| stats max(_time) AS _time first(code) AS code BY account
| where code=="start" AND _time &amp;lt;= relative_time(now(), "-240min")
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 13 Jan 2019 22:43:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/How-do-you-create-an-alert-in-Splunk-that-checks-a-file-for-one/m-p/403158#M7106</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2019-01-13T22:43:05Z</dc:date>
    </item>
    <item>
      <title>Re: How do you create an alert in Splunk that checks a file for one code and then must see another code within 4 hours or a ticket is cut?</title>
      <link>https://community.splunk.com/t5/Alerting/How-do-you-create-an-alert-in-Splunk-that-checks-a-file-for-one/m-p/403159#M7107</link>
      <description>&lt;P&gt;I will give this a try.&lt;/P&gt;</description>
      <pubDate>Mon, 14 Jan 2019 11:53:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/How-do-you-create-an-alert-in-Splunk-that-checks-a-file-for-one/m-p/403159#M7107</guid>
      <dc:creator>nls7010</dc:creator>
      <dc:date>2019-01-14T11:53:35Z</dc:date>
    </item>
  </channel>
</rss>

