<?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: Is any way to include logs/events in Alert email? in Alerting</title>
    <link>https://community.splunk.com/t5/Alerting/Is-any-way-to-include-logs-events-in-Alert-email/m-p/498948#M8876</link>
    <description>&lt;P&gt;Put your threshold into the SPL like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="YouShouldAlwaysSpecifyAnIndex" AND sourcetype="blahblah" AND host="blahblah" AND c=upload
| eventstats count(or other aggregation function here) AS trigger BY host and/or maybe other fields here
| where trigger &amp;gt; YourThresholdHere
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Then set your alert for &lt;CODE&gt;Number of events&lt;/CODE&gt; and &lt;CODE&gt;Is greater than 0&lt;/CODE&gt; and click the boxes to include all events.&lt;/P&gt;</description>
    <pubDate>Tue, 03 Dec 2019 16:04:42 GMT</pubDate>
    <dc:creator>woodcock</dc:creator>
    <dc:date>2019-12-03T16:04:42Z</dc:date>
    <item>
      <title>Is any way to include logs/events in Alert email?</title>
      <link>https://community.splunk.com/t5/Alerting/Is-any-way-to-include-logs-events-in-Alert-email/m-p/498944#M8872</link>
      <description>&lt;P&gt;Hi Splunkers! &lt;/P&gt;

&lt;P&gt;i set the alert with "upload". which means someone upload something, i get email.&lt;BR /&gt;
The email is only included last event. But i want to get email with a few previous events. &lt;/P&gt;

&lt;P&gt;for example, if logs are like this&lt;/P&gt;

&lt;P&gt;[date:02.08.2019] [user:haha] [c:login]&lt;BR /&gt;
[date:02.08.2019] [user:haha] [c:download]&lt;BR /&gt;
[date:02.08.2019] [user:haha] [c:edit]&lt;BR /&gt;
[date:02.08.2019] [user:haha] [c:upload]&lt;/P&gt;

&lt;P&gt;i got email only with last line which is "[date:02.08.2019] [user:haha] [c:upload]".&lt;BR /&gt;
But i want to get alert email not only event but also previous events.&lt;BR /&gt;
which is &lt;STRONG&gt;"[date:02.08.2019] [user:haha] [c:edit], [date:02.08.2019] [user:haha] [c:upload] "&lt;/STRONG&gt; or even &lt;STRONG&gt;last 3 events&lt;/STRONG&gt;. &lt;/P&gt;

&lt;P&gt;is it possible? &lt;/P&gt;

&lt;P&gt;Thanks for reading&lt;/P&gt;</description>
      <pubDate>Thu, 28 Nov 2019 14:56:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Is-any-way-to-include-logs-events-in-Alert-email/m-p/498944#M8872</guid>
      <dc:creator>summerura</dc:creator>
      <dc:date>2019-11-28T14:56:19Z</dc:date>
    </item>
    <item>
      <title>Re: Is any way to include logs/events in Alert email?</title>
      <link>https://community.splunk.com/t5/Alerting/Is-any-way-to-include-logs-events-in-Alert-email/m-p/498945#M8873</link>
      <description>&lt;P&gt;You can setup the alert to send all events and then end your alerting search SPL with &lt;CODE&gt;... | head 5&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 29 Nov 2019 22:11:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Is-any-way-to-include-logs-events-in-Alert-email/m-p/498945#M8873</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2019-11-29T22:11:52Z</dc:date>
    </item>
    <item>
      <title>Re: Is any way to include logs/events in Alert email?</title>
      <link>https://community.splunk.com/t5/Alerting/Is-any-way-to-include-logs-events-in-Alert-email/m-p/498946#M8874</link>
      <description>&lt;P&gt;makes sense. Thanks,  but how can I call all events? &lt;/P&gt;</description>
      <pubDate>Tue, 03 Dec 2019 13:38:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Is-any-way-to-include-logs-events-in-Alert-email/m-p/498946#M8874</guid>
      <dc:creator>summerura</dc:creator>
      <dc:date>2019-12-03T13:38:40Z</dc:date>
    </item>
    <item>
      <title>Re: Is any way to include logs/events in Alert email?</title>
      <link>https://community.splunk.com/t5/Alerting/Is-any-way-to-include-logs-events-in-Alert-email/m-p/498947#M8875</link>
      <description>&lt;P&gt;I tried &lt;/P&gt;

&lt;P&gt;host="blahblah" AND c=upload AND sourcetype="blahblah"&lt;BR /&gt;&lt;BR /&gt;
| head 5&lt;/P&gt;

&lt;P&gt;but it's nor working &lt;/P&gt;</description>
      <pubDate>Tue, 03 Dec 2019 13:54:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Is-any-way-to-include-logs-events-in-Alert-email/m-p/498947#M8875</guid>
      <dc:creator>summerura</dc:creator>
      <dc:date>2019-12-03T13:54:55Z</dc:date>
    </item>
    <item>
      <title>Re: Is any way to include logs/events in Alert email?</title>
      <link>https://community.splunk.com/t5/Alerting/Is-any-way-to-include-logs-events-in-Alert-email/m-p/498948#M8876</link>
      <description>&lt;P&gt;Put your threshold into the SPL like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="YouShouldAlwaysSpecifyAnIndex" AND sourcetype="blahblah" AND host="blahblah" AND c=upload
| eventstats count(or other aggregation function here) AS trigger BY host and/or maybe other fields here
| where trigger &amp;gt; YourThresholdHere
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Then set your alert for &lt;CODE&gt;Number of events&lt;/CODE&gt; and &lt;CODE&gt;Is greater than 0&lt;/CODE&gt; and click the boxes to include all events.&lt;/P&gt;</description>
      <pubDate>Tue, 03 Dec 2019 16:04:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Is-any-way-to-include-logs-events-in-Alert-email/m-p/498948#M8876</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2019-12-03T16:04:42Z</dc:date>
    </item>
    <item>
      <title>Re: Is any way to include logs/events in Alert email?</title>
      <link>https://community.splunk.com/t5/Alerting/Is-any-way-to-include-logs-events-in-Alert-email/m-p/498949#M8877</link>
      <description>&lt;P&gt;Everybody is very confused at this point.  You should probably back ALL the way up and start over.  What do your events look like?  What is your search &lt;CODE&gt;SPL&lt;/CODE&gt;?  What are your &lt;CODE&gt;alert&lt;/CODE&gt; settings?&lt;/P&gt;</description>
      <pubDate>Fri, 13 Dec 2019 11:46:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Is-any-way-to-include-logs-events-in-Alert-email/m-p/498949#M8877</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2019-12-13T11:46:07Z</dc:date>
    </item>
    <item>
      <title>Re: Is any way to include logs/events in Alert email?</title>
      <link>https://community.splunk.com/t5/Alerting/Is-any-way-to-include-logs-events-in-Alert-email/m-p/498950#M8878</link>
      <description>&lt;P&gt;Hi, &lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/1406"&gt;@woodcock&lt;/a&gt; &lt;BR /&gt;
Thanks for help! &lt;/P&gt;

&lt;P&gt;i think we understood wrong eachother. i want to explain again...&lt;/P&gt;

&lt;P&gt;We have "audit_log" from our software in splunk and the data are updated every second. &lt;BR /&gt;
There are sometimes log-in error if somebody give wrong password or when the server has problem. &lt;BR /&gt;
and we set the email-alert when somebody have log-in error. &lt;BR /&gt;
BUT we want to also include the last audit_log line in email-alert.&lt;BR /&gt;
My question was whether it is possible or not... &lt;BR /&gt;
Do you have any idea? &lt;/P&gt;

&lt;P&gt;Thanks &lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 03:58:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Is-any-way-to-include-logs-events-in-Alert-email/m-p/498950#M8878</guid>
      <dc:creator>summerura</dc:creator>
      <dc:date>2020-09-30T03:58:05Z</dc:date>
    </item>
  </channel>
</rss>

