# Email Alert should include post & prior logs to quickly trace the issue

**URL:** <https://discuss.elastic.co/t/email-alert-should-include-post-prior-logs-to-quickly-trace-the-issue/359077>\
**Category:** Kibana\
**Tags:** elastic-stack-alerting\
**Created:** [May 8, 2024, 2:05pm UTC](https://discuss.elastic.co/t/email-alert-should-include-post-prior-logs-to-quickly-trace-the-issue/359077 "2024-05-08T14:05:53Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Roshan\_Joel](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/roshan_joel/32/134013_2.png) [@Roshan\_Joel](https://discuss.elastic.co/u/Roshan_Joel)\
**Post date:** [May 8, 2024, 2:05pm UTC](https://discuss.elastic.co/t/email-alert-should-include-post-prior-logs-to-quickly-trace-the-issue/359077/1 "2024-05-08T14:05:53Z")

</div>

Currently we are able to added a single line of the log to email alerts. However that is not of much value as we have to again navigate to log location, open the file and trace what caused the issue. It would be better if certain number (configurable +/- lines) of post & prior logs can be included in email alerts to quickly understand the cause of alert.

---

<div class="post-metadata">

**Author:** ![Roshan\_Joel](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/roshan_joel/32/134013_2.png) [@Roshan\_Joel](https://discuss.elastic.co/u/Roshan_Joel)\
**Post date:** [May 13, 2024, 6:29pm UTC](https://discuss.elastic.co/t/email-alert-should-include-post-prior-logs-to-quickly-trace-the-issue/359077/2 "2024-05-13T18:29:05Z")

</div>

@jessgarson do you have idea on this ???

---

<div class="post-metadata">

**Author:** ![ashishtiwari1993](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ashishtiwari1993/32/135241_2.png) [@ashishtiwari1993](https://discuss.elastic.co/u/ashishtiwari1993)\
**Post date:** [May 13, 2024, 7:27pm UTC](https://discuss.elastic.co/t/email-alert-should-include-post-prior-logs-to-quickly-trace-the-issue/359077/3 "2024-05-13T19:27:34Z")

</div>

Hi Roshan, I think you will get same context or log around the alert condition but not +/- log lines. You need to define the alert like this - `CPU on {{server}} is high` and it going to send alert for each conditions.

Just curious in which use case or condition you expecting +/- logs?

Like in Distributed architecture your logs can ingest in any order and you have to co-relate them with some common field. For this kibana panel is best place.
