<?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: Splunk single alert for multiple http status code in Alerting</title>
    <link>https://community.splunk.com/t5/Alerting/How-to-create-Splunk-single-alert-for-multiple-http-status-code/m-p/628138#M14675</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/241488"&gt;@vinothkumark&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;it should correctly run, please debug it using one by one the conditions.&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
    <pubDate>Tue, 24 Jan 2023 13:28:32 GMT</pubDate>
    <dc:creator>gcusello</dc:creator>
    <dc:date>2023-01-24T13:28:32Z</dc:date>
    <item>
      <title>How to create Splunk single alert for multiple http status code?</title>
      <link>https://community.splunk.com/t5/Alerting/How-to-create-Splunk-single-alert-for-multiple-http-status-code/m-p/628021#M14670</link>
      <description>&lt;P&gt;I have a field which contains http status code. I want to create a single alert query with multiple conditions.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Example:&lt;BR /&gt;condition1)&amp;nbsp;&lt;SPAN&gt;status code is 500 and greater than 10% alert should be triggered.&lt;BR /&gt;Condition 2) status code is 403 and greater than 20% alert should be triggered.&lt;/SPAN&gt;&amp;nbsp;&lt;BR /&gt;Condition 3)&amp;nbsp;&lt;SPAN&gt;status code is 503 and greater than 20% alert should be triggered.&lt;/SPAN&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Also, Is it possible to have different time range for the above condition? like condition 1 and condition 2 should search for last 15 minutes, whereas condition 3 should search for last 30 mins.&lt;BR /&gt;&lt;BR /&gt;How do I form the query?&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 23 Jan 2023 20:09:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/How-to-create-Splunk-single-alert-for-multiple-http-status-code/m-p/628021#M14670</guid>
      <dc:creator>vinothkumark</dc:creator>
      <dc:date>2023-01-23T20:09:18Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk single alert for multiple http status code</title>
      <link>https://community.splunk.com/t5/Alerting/How-to-create-Splunk-single-alert-for-multiple-http-status-code/m-p/628026#M14671</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/241488"&gt;@vinothkumark&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;the condition on status codes and percentages is easy:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;your_search&amp;gt; status_code IN("500","403","503")
| stats
   count(eval(if(status_code="500",1,0))) AS 500_count
   count(eval(if(status_code="403",1,0))) AS 403_count
   count(eval(if(status_code="503",1,0))) AS 503_count
   count
| where 500_count/count&amp;gt;=0.1 OR 403_count/count&amp;gt;=0.2 OR 503_count/count&amp;gt;=0.2&lt;/LI-CODE&gt;&lt;P&gt;the time condition can be easily added running two alerts or using a more complicated main search:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;your_search&amp;gt; ((status_code IN ("500","403") earliest=-15m) OR (status_code="503" earliest=-30m))
| stats
   count(eval(if(status_code="500",1,0))) AS 500_count
   count(eval(if(status_code="403",1,0))) AS 403_count
   count(eval(if(status_code="503",1,0))) AS 503_count
   count
| where 500_count/count&amp;gt;=0.1 OR 403_count/count&amp;gt;=0.2 OR 503_count/count&amp;gt;=0.2&lt;/LI-CODE&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Mon, 23 Jan 2023 18:44:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/How-to-create-Splunk-single-alert-for-multiple-http-status-code/m-p/628026#M14671</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2023-01-23T18:44:34Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk single alert for multiple http status code</title>
      <link>https://community.splunk.com/t5/Alerting/How-to-create-Splunk-single-alert-for-multiple-http-status-code/m-p/628135#M14674</link>
      <description>&lt;P&gt;It shows error in where command&lt;/P&gt;</description>
      <pubDate>Tue, 24 Jan 2023 13:22:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/How-to-create-Splunk-single-alert-for-multiple-http-status-code/m-p/628135#M14674</guid>
      <dc:creator>vinothkumark</dc:creator>
      <dc:date>2023-01-24T13:22:07Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk single alert for multiple http status code</title>
      <link>https://community.splunk.com/t5/Alerting/How-to-create-Splunk-single-alert-for-multiple-http-status-code/m-p/628138#M14675</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/241488"&gt;@vinothkumark&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;it should correctly run, please debug it using one by one the conditions.&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Tue, 24 Jan 2023 13:28:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/How-to-create-Splunk-single-alert-for-multiple-http-status-code/m-p/628138#M14675</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2023-01-24T13:28:32Z</dc:date>
    </item>
  </channel>
</rss>

