<?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: Mail Alert with multiple informations in Alerting</title>
    <link>https://community.splunk.com/t5/Alerting/Mail-Alert-with-multiple-informations/m-p/536831#M10147</link>
    <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/129090"&gt;@manjunathmeti&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;Thanks for your answer.&lt;/P&gt;&lt;P&gt;I tried it and i received one mail for every different error. (50 different mails)&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to put ALL different errors in ONE mail.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;(sorry for my bad english)&lt;/P&gt;</description>
    <pubDate>Fri, 22 Jan 2021 13:52:07 GMT</pubDate>
    <dc:creator>CesarCrt</dc:creator>
    <dc:date>2021-01-22T13:52:07Z</dc:date>
    <item>
      <title>Mail Alert with multiple informations</title>
      <link>https://community.splunk.com/t5/Alerting/Mail-Alert-with-multiple-informations/m-p/536815#M10144</link>
      <description>&lt;P&gt;Hello everyone,&lt;/P&gt;&lt;P&gt;There is my search :&lt;/P&gt;&lt;P&gt;my_severity=error my_app="name" earliest=-48h latest=-24h&lt;BR /&gt;&amp;nbsp; | stats count as nb_yesterday by my_method limit=0&lt;BR /&gt;&amp;nbsp; | appendcols[search my_severity=error my_app="name" earliest=-24h latest=now | stats count as nb_today by my_method]&lt;BR /&gt;&amp;nbsp; | eval increase=round(nb_today*100/nb_yesterday)&lt;BR /&gt;&amp;nbsp; | eval status=if(increase&amp;gt;100 OR nb_today&amp;gt;10, "CRITICAL", "GOOD")&lt;BR /&gt;&amp;nbsp; | table my_method, nb_yesterday, increase, status, nb_today&lt;BR /&gt;&amp;nbsp; | sort nb_today desc&lt;/P&gt;&lt;P&gt;my_severity, my_app and my_method are fields that i created myself&lt;/P&gt;&lt;P&gt;with my search, i get multiple results (and multiple lines) and i want to send one mail with the list of CRITICAL status like :&lt;/P&gt;&lt;P&gt;"Hello, we notice some errors :&lt;/P&gt;&lt;P&gt;[name of the method(1)] [status] [increase] [nb_today]&lt;/P&gt;&lt;P&gt;[name of the method(2)] [status] [increase] [nb_today]&lt;/P&gt;&lt;P&gt;[name of the method(3)] [status] [increase] [nb_today]&lt;/P&gt;&lt;P&gt;... "&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How can i send a mail with all the "CRITICAL" status for exemple ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When i configure the mail alert with this body message :&amp;nbsp;&lt;/P&gt;&lt;P&gt;"The method "$result.my_method$" was $result.status$ with $result.nb_today$ errors in the last 24hours. (That's a $result.increase$% increase) "&lt;/P&gt;&lt;P&gt;I only send a mail with the informations of the first line.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 22 Jan 2021 11:01:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Mail-Alert-with-multiple-informations/m-p/536815#M10144</guid>
      <dc:creator>CesarCrt</dc:creator>
      <dc:date>2021-01-22T11:01:12Z</dc:date>
    </item>
    <item>
      <title>Re: Mail Alert with multiple informations</title>
      <link>https://community.splunk.com/t5/Alerting/Mail-Alert-with-multiple-informations/m-p/536826#M10146</link>
      <description>&lt;P&gt;hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/230700"&gt;@CesarCrt&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;You need to set &lt;STRONG&gt;Trigger&lt;/STRONG&gt; to&lt;STRONG&gt; For each result&lt;/STRONG&gt;. This will trigger alert action for each row.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="manjunathmeti_0-1611319139028.png" style="width: 465px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/12630i3D0856049465B23C/image-dimensions/465x107?v=v2" width="465" height="107" role="button" title="manjunathmeti_0-1611319139028.png" alt="manjunathmeti_0-1611319139028.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;If this reply helps you, an upvote/like would be appreciated.&lt;/P&gt;</description>
      <pubDate>Fri, 22 Jan 2021 12:41:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Mail-Alert-with-multiple-informations/m-p/536826#M10146</guid>
      <dc:creator>manjunathmeti</dc:creator>
      <dc:date>2021-01-22T12:41:22Z</dc:date>
    </item>
    <item>
      <title>Re: Mail Alert with multiple informations</title>
      <link>https://community.splunk.com/t5/Alerting/Mail-Alert-with-multiple-informations/m-p/536831#M10147</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/129090"&gt;@manjunathmeti&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;Thanks for your answer.&lt;/P&gt;&lt;P&gt;I tried it and i received one mail for every different error. (50 different mails)&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to put ALL different errors in ONE mail.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;(sorry for my bad english)&lt;/P&gt;</description>
      <pubDate>Fri, 22 Jan 2021 13:52:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Mail-Alert-with-multiple-informations/m-p/536831#M10147</guid>
      <dc:creator>CesarCrt</dc:creator>
      <dc:date>2021-01-22T13:52:07Z</dc:date>
    </item>
    <item>
      <title>Re: Mail Alert with multiple informations</title>
      <link>https://community.splunk.com/t5/Alerting/Mail-Alert-with-multiple-informations/m-p/536833#M10148</link>
      <description>&lt;P&gt;It is not a good idea to put all alert results in email body. You can enable attach CSV/PDF file to the email. This will send all the results in a CSV/PDF file attached to the email.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 22 Jan 2021 13:59:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Mail-Alert-with-multiple-informations/m-p/536833#M10148</guid>
      <dc:creator>manjunathmeti</dc:creator>
      <dc:date>2021-01-22T13:59:04Z</dc:date>
    </item>
    <item>
      <title>Re: Mail Alert with multiple informations</title>
      <link>https://community.splunk.com/t5/Alerting/Mail-Alert-with-multiple-informations/m-p/536834#M10149</link>
      <description>&lt;P&gt;That was my second option. I was thinking about an external python script who deals with all the results on a CSV file.&lt;/P&gt;&lt;P&gt;If you have the command to put all the alert in one mail, i would like to make some tests.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your swiftness&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/129090"&gt;@manjunathmeti&lt;/a&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 22 Jan 2021 14:07:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Mail-Alert-with-multiple-informations/m-p/536834#M10149</guid>
      <dc:creator>CesarCrt</dc:creator>
      <dc:date>2021-01-22T14:07:19Z</dc:date>
    </item>
    <item>
      <title>Re: Mail Alert with multiple informations</title>
      <link>https://community.splunk.com/t5/Alerting/Mail-Alert-with-multiple-informations/m-p/536846#M10152</link>
      <description>&lt;P&gt;There is an option to enable attach CSV file email option in the email alert action edit page.&lt;/P&gt;</description>
      <pubDate>Fri, 22 Jan 2021 15:08:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Mail-Alert-with-multiple-informations/m-p/536846#M10152</guid>
      <dc:creator>manjunathmeti</dc:creator>
      <dc:date>2021-01-22T15:08:57Z</dc:date>
    </item>
    <item>
      <title>Re: Mail Alert with multiple informations</title>
      <link>https://community.splunk.com/t5/Alerting/Mail-Alert-with-multiple-informations/m-p/536847#M10153</link>
      <description>&lt;P&gt;I may have expressed myself badly.&lt;/P&gt;&lt;P&gt;I know about the CSV attachment but i was asking about the command to see literally all the alert in the body mail and not in a side file.&lt;/P&gt;</description>
      <pubDate>Fri, 22 Jan 2021 15:16:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Mail-Alert-with-multiple-informations/m-p/536847#M10153</guid>
      <dc:creator>CesarCrt</dc:creator>
      <dc:date>2021-01-22T15:16:44Z</dc:date>
    </item>
    <item>
      <title>Re: Mail Alert with multiple informations</title>
      <link>https://community.splunk.com/t5/Alerting/Mail-Alert-with-multiple-informations/m-p/536911#M10156</link>
      <description>&lt;P&gt;hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/230700"&gt;@CesarCrt&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;You can use &lt;STRONG&gt;strcat&lt;/STRONG&gt; to create the message for each row and use &lt;STRONG&gt;mvcombine&lt;/STRONG&gt; to combine all the message field values into a single value.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| strcat "The method ",my_method," was ",status," with ",nb_today," errors in the last 24hours. (That's a ",increase,"% increase)" message 
| fields message 
| mvcombine message delim="; " 
| nomv message&lt;/LI-CODE&gt;&lt;P&gt;Sample query:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| makeresults 
| eval _raw="my_method status increase nb_today
method(1) status1 10 nb_today1
method(2) status2 20 nb_today2
method(3) status3 30 nb_today3" 
| multikv forceheader=1 
| strcat "The method ",my_method," was ",status," with ",nb_today," errors in the last 24hours. (That's a ",increase,"% increase)" message 
| fields message 
| mvcombine message delim="; " 
| nomv message&lt;/LI-CODE&gt;&lt;P&gt;----&lt;/P&gt;&lt;P&gt;If this reply helps you, a &lt;STRONG&gt;like&lt;/STRONG&gt; would be appreciated.&lt;/P&gt;</description>
      <pubDate>Sat, 23 Jan 2021 06:41:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Mail-Alert-with-multiple-informations/m-p/536911#M10156</guid>
      <dc:creator>manjunathmeti</dc:creator>
      <dc:date>2021-01-23T06:41:47Z</dc:date>
    </item>
  </channel>
</rss>

