<?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: Email Alert in Alerting</title>
    <link>https://community.splunk.com/t5/Alerting/Email-Alert/m-p/369831#M10929</link>
    <description>&lt;P&gt;Hi @zacksoft,&lt;BR /&gt;
Can you please try this&lt;BR /&gt;
1. Host has some corresponding 'error' value .(Don't trigger when 'error' is NULL)&lt;/P&gt;

&lt;P&gt;Can we add filter in your search?&lt;BR /&gt;
like &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;YOUR_SEARCH | search error!=NULL  | table host,error
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;OL&gt;
&lt;LI&gt;&lt;P&gt;The email header should contain Host name and the corresponding 'error' message.&lt;BR /&gt;
add below line your alert in savedsearch.conf file: &lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;[my_alert]&lt;BR /&gt;
action.email.subject.alert = $result.host$ - $result.error$&lt;/CODE&gt;&lt;/P&gt;&lt;/LI&gt;
&lt;/OL&gt;

&lt;P&gt;Thanks&lt;/P&gt;</description>
    <pubDate>Thu, 08 Feb 2018 13:42:37 GMT</pubDate>
    <dc:creator>kamlesh_vaghela</dc:creator>
    <dc:date>2018-02-08T13:42:37Z</dc:date>
    <item>
      <title>Email Alert</title>
      <link>https://community.splunk.com/t5/Alerting/Email-Alert/m-p/369830#M10928</link>
      <description>&lt;P&gt;I am setting up an alert for the first time.&lt;BR /&gt;
My query ends with, &lt;BR /&gt;
&lt;STRONG&gt;| table  host,error&lt;/STRONG&gt;&lt;BR /&gt;
where "host" is host1, host2, host3 etc..  AND "error" is severe, critical, minor ..etc and blank rows as well.&lt;BR /&gt;
Help is needed in the following two things.&lt;BR /&gt;
I want my alert email to trigger only when,&lt;/P&gt;

&lt;H1&gt;1. Host has some corresponding 'error' value .(Don't trigger when  'error' is NULL)&lt;/H1&gt;

&lt;H1&gt;2. The email header should contain Host name and the corresponding 'error' message.&lt;/H1&gt;

&lt;PRE&gt;&lt;CODE&gt;   example-  "Host2 -Minor"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 08 Feb 2018 13:31:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Email-Alert/m-p/369830#M10928</guid>
      <dc:creator>zacksoft</dc:creator>
      <dc:date>2018-02-08T13:31:26Z</dc:date>
    </item>
    <item>
      <title>Re: Email Alert</title>
      <link>https://community.splunk.com/t5/Alerting/Email-Alert/m-p/369831#M10929</link>
      <description>&lt;P&gt;Hi @zacksoft,&lt;BR /&gt;
Can you please try this&lt;BR /&gt;
1. Host has some corresponding 'error' value .(Don't trigger when 'error' is NULL)&lt;/P&gt;

&lt;P&gt;Can we add filter in your search?&lt;BR /&gt;
like &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;YOUR_SEARCH | search error!=NULL  | table host,error
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;OL&gt;
&lt;LI&gt;&lt;P&gt;The email header should contain Host name and the corresponding 'error' message.&lt;BR /&gt;
add below line your alert in savedsearch.conf file: &lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;[my_alert]&lt;BR /&gt;
action.email.subject.alert = $result.host$ - $result.error$&lt;/CODE&gt;&lt;/P&gt;&lt;/LI&gt;
&lt;/OL&gt;

&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Thu, 08 Feb 2018 13:42:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Email-Alert/m-p/369831#M10929</guid>
      <dc:creator>kamlesh_vaghela</dc:creator>
      <dc:date>2018-02-08T13:42:37Z</dc:date>
    </item>
    <item>
      <title>Re: Email Alert</title>
      <link>https://community.splunk.com/t5/Alerting/Email-Alert/m-p/369832#M10930</link>
      <description>&lt;P&gt;where can I find savedsearch.conf  file ? I usually click on 'edit alert' option and set things in there !!!&lt;/P&gt;</description>
      <pubDate>Thu, 08 Feb 2018 13:47:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Email-Alert/m-p/369832#M10930</guid>
      <dc:creator>zacksoft</dc:creator>
      <dc:date>2018-02-08T13:47:43Z</dc:date>
    </item>
    <item>
      <title>Re: Email Alert</title>
      <link>https://community.splunk.com/t5/Alerting/Email-Alert/m-p/369833#M10931</link>
      <description>&lt;P&gt;Please check below path.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;SPLUNK_HOME/etc/apps/My_APP/local/savedsearches.conf

SPLUNK_HOME/etc/users/USER_NAME/My_APP/local/savedsearches.conf
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 08 Feb 2018 13:50:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Email-Alert/m-p/369833#M10931</guid>
      <dc:creator>kamlesh_vaghela</dc:creator>
      <dc:date>2018-02-08T13:50:57Z</dc:date>
    </item>
    <item>
      <title>Re: Email Alert</title>
      <link>https://community.splunk.com/t5/Alerting/Email-Alert/m-p/369834#M10932</link>
      <description>&lt;P&gt;in &lt;CODE&gt;Settings&amp;gt;&amp;gt;Searches, reports, and alerts&lt;/CODE&gt; you can create alert&lt;/P&gt;</description>
      <pubDate>Thu, 08 Feb 2018 13:51:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Email-Alert/m-p/369834#M10932</guid>
      <dc:creator>493669</dc:creator>
      <dc:date>2018-02-08T13:51:32Z</dc:date>
    </item>
    <item>
      <title>Re: Email Alert</title>
      <link>https://community.splunk.com/t5/Alerting/Email-Alert/m-p/369835#M10933</link>
      <description>&lt;P&gt;Hi @zacksoft,&lt;BR /&gt;
you can try to search for error containing value instead of !=null value&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;base_search&amp;gt;|search error=*|table host,error
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;set alert if result count&amp;gt;0&lt;BR /&gt;
and you can set alert message as suggested by @kamlesh_vaghela&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[my_alert] action.email.subject.alert = $result.host$ - $result.error$
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;it can be done via UI in Settings&amp;gt;&amp;gt;Searches, reports, and alerts and its stanza will get  stored in &lt;CODE&gt;...&amp;lt;app_name&amp;gt;/local/savedsearches.conf&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 08 Feb 2018 13:58:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Email-Alert/m-p/369835#M10933</guid>
      <dc:creator>493669</dc:creator>
      <dc:date>2018-02-08T13:58:03Z</dc:date>
    </item>
    <item>
      <title>Re: Email Alert</title>
      <link>https://community.splunk.com/t5/Alerting/Email-Alert/m-p/369836#M10934</link>
      <description>&lt;P&gt;The Query's output sort of gives result like &lt;BR /&gt;
Host1 - minor&lt;BR /&gt;
Host1-   minor&lt;BR /&gt;
Host1 - minor&lt;BR /&gt;
Host1 - critical&lt;/P&gt;

&lt;P&gt;I am getting multiple alerts for 'minor' type. I cannot reduce the cron frequency becasue I don't wanna miss the 'critical' errros. Can we may be only select the 'distinct values' of error or suppress if the same error is repeating ....&lt;/P&gt;</description>
      <pubDate>Thu, 08 Feb 2018 14:16:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Email-Alert/m-p/369836#M10934</guid>
      <dc:creator>zacksoft</dc:creator>
      <dc:date>2018-02-08T14:16:48Z</dc:date>
    </item>
    <item>
      <title>Re: Email Alert</title>
      <link>https://community.splunk.com/t5/Alerting/Email-Alert/m-p/369837#M10935</link>
      <description>&lt;P&gt;Use &lt;CODE&gt;|dedup error&lt;/CODE&gt; &lt;/P&gt;</description>
      <pubDate>Thu, 08 Feb 2018 14:23:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Email-Alert/m-p/369837#M10935</guid>
      <dc:creator>493669</dc:creator>
      <dc:date>2018-02-08T14:23:47Z</dc:date>
    </item>
  </channel>
</rss>

