<?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 create a single alert for multiple error codes in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-single-alert-for-multiple-error-codes/m-p/633947#M220176</link>
    <description>&lt;P&gt;I can't recreate your issue.&lt;/P&gt;&lt;P&gt;Using this run anywhere example:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| makeresults count=100
| eval e = substr(tostring(random()), -1)
| eval errors = case(e &amp;lt;= 2, "Error1", e &amp;lt;= 5, "Error2", e &amp;lt;= 8, "Erro3" , 1=1, "Error4")
| stats count by errors&lt;/LI-CODE&gt;&lt;P&gt;I set up an alert with a send email action and set the alert to be "For each result". I subsequently received four emails.&lt;/P&gt;&lt;P&gt;Make sure you're not throttling the alert, and make sure "For each result" is definitely set.&lt;/P&gt;&lt;P&gt;If you still have no luck then I suspect you could be hitting a bug? Can you share your Splunk version and a screenshot of the alert and I'll see if I can recreate it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 09 Mar 2023 21:14:21 GMT</pubDate>
    <dc:creator>Tom_Lundie</dc:creator>
    <dc:date>2023-03-09T21:14:21Z</dc:date>
    <item>
      <title>How to create a single alert for multiple error codes</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-single-alert-for-multiple-error-codes/m-p/633881#M220155</link>
      <description>&lt;P&gt;Following is my query:&lt;/P&gt;&lt;P&gt;index=backup | stats count by errors&lt;/P&gt;&lt;P&gt;I have thousands of error codes in logs and I need to trigger a unique alert for each error code. Is it possible to create a single alert? I have saved the above query with "for each result" option but still get only one trigger with all the error codes.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 09 Mar 2023 13:37:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-single-alert-for-multiple-error-codes/m-p/633881#M220155</guid>
      <dc:creator>shady6</dc:creator>
      <dc:date>2023-03-09T13:37:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a single alert for multiple error codes</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-single-alert-for-multiple-error-codes/m-p/633947#M220176</link>
      <description>&lt;P&gt;I can't recreate your issue.&lt;/P&gt;&lt;P&gt;Using this run anywhere example:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| makeresults count=100
| eval e = substr(tostring(random()), -1)
| eval errors = case(e &amp;lt;= 2, "Error1", e &amp;lt;= 5, "Error2", e &amp;lt;= 8, "Erro3" , 1=1, "Error4")
| stats count by errors&lt;/LI-CODE&gt;&lt;P&gt;I set up an alert with a send email action and set the alert to be "For each result". I subsequently received four emails.&lt;/P&gt;&lt;P&gt;Make sure you're not throttling the alert, and make sure "For each result" is definitely set.&lt;/P&gt;&lt;P&gt;If you still have no luck then I suspect you could be hitting a bug? Can you share your Splunk version and a screenshot of the alert and I'll see if I can recreate it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 09 Mar 2023 21:14:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-single-alert-for-multiple-error-codes/m-p/633947#M220176</guid>
      <dc:creator>Tom_Lundie</dc:creator>
      <dc:date>2023-03-09T21:14:21Z</dc:date>
    </item>
  </channel>
</rss>

