<?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: Using search count  with Apache logs in Alerting</title>
    <link>https://community.splunk.com/t5/Alerting/Using-search-count-with-Apache-logs/m-p/95034#M1362</link>
    <description>&lt;P&gt;Yep I gave that a try but it seems the logs are set up a bit different &lt;/P&gt;

&lt;P&gt;[09/Jul/2012:18:42:10 -0400] "GET/manual/ru/ja/mod/mod_status.html HTTP/1.1" 404 321 "-" "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0)"&lt;/P&gt;

&lt;P&gt;As you can see there is no "status" so 40* returns a lot of false positives.&lt;/P&gt;

&lt;P&gt;Any other recommendations ?&lt;/P&gt;</description>
    <pubDate>Tue, 10 Jul 2012 20:17:58 GMT</pubDate>
    <dc:creator>tevgey23</dc:creator>
    <dc:date>2012-07-10T20:17:58Z</dc:date>
    <item>
      <title>Using search count  with Apache logs</title>
      <link>https://community.splunk.com/t5/Alerting/Using-search-count-with-Apache-logs/m-p/95031#M1359</link>
      <description>&lt;P&gt;Im trying to use Splunk to detect a network scan using http logs. Ive been playing with the syntax &lt;BR /&gt;
for some time but cant get it quite right. &lt;/P&gt;

&lt;P&gt;What would the syntax be to alert on 20 server errors (i.e 503 or 404) if logged with in a 3 min window&lt;/P&gt;

&lt;P&gt;I rather not use real time alerting as it may require more resources but im open to suggestions &lt;/P&gt;

&lt;P&gt;Using search count  with Apache logs &lt;BR /&gt;
Thank you, &lt;/P&gt;</description>
      <pubDate>Tue, 10 Jul 2012 19:38:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Using-search-count-with-Apache-logs/m-p/95031#M1359</guid>
      <dc:creator>tevgey23</dc:creator>
      <dc:date>2012-07-10T19:38:40Z</dc:date>
    </item>
    <item>
      <title>Re: Using search count  with Apache logs</title>
      <link>https://community.splunk.com/t5/Alerting/Using-search-count-with-Apache-logs/m-p/95032#M1360</link>
      <description>&lt;P&gt;Actually the real-time search option usually has less practical impact on system resources than a scheduled normal search.    In short the realtime search systems are dealing with events that are already moving through the system uncompressed, whereas with the normal scheduled historical search kind,  the events have to be pulled off disk, gunzipped and then put together. &lt;/P&gt;

&lt;P&gt;But I would just run the search,  ie&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;status=50* OR status=40*&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;and then in the 'create alert' screens you'll be able to set a 3-minute realtime window as well as the conditions under which you'd like to get alerted. &lt;/P&gt;

&lt;P&gt;If you do want to set it up as a historical search you still rely on the create alert workflow. &lt;BR /&gt;
However you might want it to scan over a longer time period, and then use the search language itself to only look at 3 minute windows.  One simple way is to bin the _time values to nearest minute and then just get the rolling count with streamstats. &lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;status=50* OR status=40* | bin _time span=1min | stats count by _time | streamstats sum(count) as count window=3&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 10 Jul 2012 20:04:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Using-search-count-with-Apache-logs/m-p/95032#M1360</guid>
      <dc:creator>sideview</dc:creator>
      <dc:date>2012-07-10T20:04:55Z</dc:date>
    </item>
    <item>
      <title>Re: Using search count  with Apache logs</title>
      <link>https://community.splunk.com/t5/Alerting/Using-search-count-with-Apache-logs/m-p/95033#M1361</link>
      <description>&lt;P&gt;It really makes sense to do this in a real time search.  The example in the docs should be helpful for you to set this up.&lt;/P&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/User/Alertusecases#Alerting_when_a_set_of_IDS_solutions_report_a_network_attack_more_than_20_times_within_a_10_minute_period"&gt;http://docs.splunk.com/Documentation/Splunk/latest/User/Alertusecases#Alerting_when_a_set_of_IDS_solutions_report_a_network_attack_more_than_20_times_within_a_10_minute_period&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 10 Jul 2012 20:05:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Using-search-count-with-Apache-logs/m-p/95033#M1361</guid>
      <dc:creator>sdaniels</dc:creator>
      <dc:date>2012-07-10T20:05:35Z</dc:date>
    </item>
    <item>
      <title>Re: Using search count  with Apache logs</title>
      <link>https://community.splunk.com/t5/Alerting/Using-search-count-with-Apache-logs/m-p/95034#M1362</link>
      <description>&lt;P&gt;Yep I gave that a try but it seems the logs are set up a bit different &lt;/P&gt;

&lt;P&gt;[09/Jul/2012:18:42:10 -0400] "GET/manual/ru/ja/mod/mod_status.html HTTP/1.1" 404 321 "-" "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0)"&lt;/P&gt;

&lt;P&gt;As you can see there is no "status" so 40* returns a lot of false positives.&lt;/P&gt;

&lt;P&gt;Any other recommendations ?&lt;/P&gt;</description>
      <pubDate>Tue, 10 Jul 2012 20:17:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Using-search-count-with-Apache-logs/m-p/95034#M1362</guid>
      <dc:creator>tevgey23</dc:creator>
      <dc:date>2012-07-10T20:17:58Z</dc:date>
    </item>
    <item>
      <title>Re: Using search count  with Apache logs</title>
      <link>https://community.splunk.com/t5/Alerting/Using-search-count-with-Apache-logs/m-p/95035#M1363</link>
      <description>&lt;P&gt;Sorry - you will want to first extract the values as a field called 'status'.  &lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/Knowledge/Addfieldsatsearchtime"&gt;http://docs.splunk.com/Documentation/Splunk/latest/Knowledge/Addfieldsatsearchtime&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 10 Jul 2012 20:20:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Using-search-count-with-Apache-logs/m-p/95035#M1363</guid>
      <dc:creator>sideview</dc:creator>
      <dc:date>2012-07-10T20:20:20Z</dc:date>
    </item>
  </channel>
</rss>

