<?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 to detect  and alert abnormal spikes of web api  requests in Alerting</title>
    <link>https://community.splunk.com/t5/Alerting/How-to-detect-and-alert-abnormal-spikes-of-web-api-requests/m-p/446960#M11524</link>
    <description>&lt;P&gt;@bestSplunker you can refer to &lt;A href="https://docs.splunk.com/Documentation/MLApp/latest/User/DNOExperiment"&gt;Detect Numerical Outlier&lt;/A&gt; examples in &lt;A href="https://splunkbase.splunk.com/app/2890/"&gt;Splunk Machine Learning Toolkit&lt;/A&gt; to check out methods to find outliers and choose the best one as per your data needs. Refer to recent answer: &lt;A href="https://answers.splunk.com/answers/754085/calculating-median-of-count-over-time.html"&gt;https://answers.splunk.com/answers/754085/calculating-median-of-count-over-time.html&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Even if you do not install MLTK in your production system you can use the SPL directly (generated by MLTK in non-prod system) along with Splunk's built in visualization to depict the outliers. Refer to an older answer of mine: &lt;A href="https://answers.splunk.com/answers/747177/how-to-add-a-reference-line-to-an-outlier-chart-cr.html"&gt;https://answers.splunk.com/answers/747177/how-to-add-a-reference-line-to-an-outlier-chart-cr.html&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 03 Jul 2019 01:58:13 GMT</pubDate>
    <dc:creator>niketn</dc:creator>
    <dc:date>2019-07-03T01:58:13Z</dc:date>
    <item>
      <title>How to detect  and alert abnormal spikes of web api  requests</title>
      <link>https://community.splunk.com/t5/Alerting/How-to-detect-and-alert-abnormal-spikes-of-web-api-requests/m-p/446958#M11522</link>
      <description>&lt;P&gt;hi. everyone .&lt;/P&gt;

&lt;P&gt;My website has some API interfaces. Sometimes malicious attacks will  request these api continuously. It is clear on the time chart that the peak has been reached. How do I detect and alert?&lt;/P&gt;

&lt;P&gt;for example:&lt;/P&gt;

&lt;P&gt;I have a search like this now, I  can see the number of requests per hour for these URIs.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index = web   sourcetype=nginx_access   uri=/api/getuserInfo   OR uri=/api/featchData OR uri=/login  OR uri=/home
|timechart span=1h count by uri
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;under normal conditions the request per hour of &lt;CODE&gt;/api/getuserInfo&lt;/CODE&gt; is about 1000~5000 times, if a certain time period encounters a malicious attack, the interface requests 50,000 times. I think this is an anomaly. How should I use a smarter method to detect abnormal peaks and issue alarms?&lt;/P&gt;

&lt;P&gt;I think of a stupid way, i can write the number of api interface requests per hour to csv or kvstore, and then use today's and yesterday's comparisons to see the magnitude of the rise. If the rise is too high, I think this is abnormal peaks&lt;/P&gt;

&lt;P&gt;But I think there are more efficient methods, such as machine learning? Can someone help me and share a use case with me, thank you&lt;/P&gt;

&lt;P&gt;Note: I have a lot of API interfaces, about 20, I want to monitor the abnormal peak of each API interface,&lt;/P&gt;</description>
      <pubDate>Tue, 02 Jul 2019 08:05:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/How-to-detect-and-alert-abnormal-spikes-of-web-api-requests/m-p/446958#M11522</guid>
      <dc:creator>bestSplunker</dc:creator>
      <dc:date>2019-07-02T08:05:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to detect  and alert abnormal spikes of web api  requests</title>
      <link>https://community.splunk.com/t5/Alerting/How-to-detect-and-alert-abnormal-spikes-of-web-api-requests/m-p/446959#M11523</link>
      <description>&lt;P&gt;Check this out:&lt;BR /&gt;
&lt;A href="https://answers.splunk.com/answers/511894/how-to-use-the-timewrap-command-and-set-an-alert-f.html"&gt;https://answers.splunk.com/answers/511894/how-to-use-the-timewrap-command-and-set-an-alert-f.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 02 Jul 2019 14:23:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/How-to-detect-and-alert-abnormal-spikes-of-web-api-requests/m-p/446959#M11523</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2019-07-02T14:23:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to detect  and alert abnormal spikes of web api  requests</title>
      <link>https://community.splunk.com/t5/Alerting/How-to-detect-and-alert-abnormal-spikes-of-web-api-requests/m-p/446960#M11524</link>
      <description>&lt;P&gt;@bestSplunker you can refer to &lt;A href="https://docs.splunk.com/Documentation/MLApp/latest/User/DNOExperiment"&gt;Detect Numerical Outlier&lt;/A&gt; examples in &lt;A href="https://splunkbase.splunk.com/app/2890/"&gt;Splunk Machine Learning Toolkit&lt;/A&gt; to check out methods to find outliers and choose the best one as per your data needs. Refer to recent answer: &lt;A href="https://answers.splunk.com/answers/754085/calculating-median-of-count-over-time.html"&gt;https://answers.splunk.com/answers/754085/calculating-median-of-count-over-time.html&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Even if you do not install MLTK in your production system you can use the SPL directly (generated by MLTK in non-prod system) along with Splunk's built in visualization to depict the outliers. Refer to an older answer of mine: &lt;A href="https://answers.splunk.com/answers/747177/how-to-add-a-reference-line-to-an-outlier-chart-cr.html"&gt;https://answers.splunk.com/answers/747177/how-to-add-a-reference-line-to-an-outlier-chart-cr.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Jul 2019 01:58:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/How-to-detect-and-alert-abnormal-spikes-of-web-api-requests/m-p/446960#M11524</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2019-07-03T01:58:13Z</dc:date>
    </item>
  </channel>
</rss>

