# Alert Email body unable to change

**URL:** <https://forums.percona.com/t/alert-email-body-unable-to-change/35638>\
**Category:** PostgreSQL\
**Tags:** grafana, pmm, percona, postgresql\
**Created:** [December 13, 2024, 8:31am UTC](https://forums.percona.com/t/alert-email-body-unable-to-change/35638 "2024-12-13T08:31:05Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Amol](https://avatars.discourse-cdn.com/v4/letter/a/a4c791/32.png) [@Amol](https://forums.percona.com/u/Amol)\
**Post date:** [December 13, 2024, 8:31am UTC](https://forums.percona.com/t/alert-email-body-unable-to-change/35638/1 "2024-12-13T08:31:05Z")

</div>

We have created template for postgresql database alert.like warnings errors now we received warnings errors but we haven’t recieved in our custom template (hostname) like database server details in email body.

 ![IMG20241211151640](https://us1.discourse-cdn.com/flex019/uploads/percona1/original/3X/1/2/12f58847c7d94d0086491304a956b47d7e1a4c96.jpeg)

---

<div class="post-metadata">

**Author:** ![matthewb](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/matthewb/32/34_2.png) [@matthewb](https://forums.percona.com/u/matthewb)\
**Post date:** [December 13, 2024, 5:11pm UTC](https://forums.percona.com/t/alert-email-body-unable-to-change/35638/2 "2024-12-13T17:11:16Z")

</div>

Can you please share the entire template? If you make your own template, then that is all the data shown. Nothing else will be added. If you want server names, you need to add those variables to the template.

---

<div class="post-metadata">

**Author:** ![Amol](https://avatars.discourse-cdn.com/v4/letter/a/a4c791/32.png) [@Amol](https://forums.percona.com/u/Amol)\
**Post date:** [December 16, 2024, 6:50pm UTC](https://forums.percona.com/t/alert-email-body-unable-to-change/35638/3 "2024-12-16T18:50:19Z")

</div>

When we are using default template all is good but when we are using custom template we need to show server name or other things there but we can’t show values there, Can you please give me some step by step guidance or query for this issue.

Please find attached template or mails.

 ![Screenshot_2024-12-17-00-17-19-91_92460851df6f172a4592fca41cc2d2e6](https://us1.discourse-cdn.com/flex019/uploads/percona1/original/3X/d/3/d3208f493e420695833f6eca82fc8fb98e6cfc54.jpeg)

 ![Screenshot_2024-12-17-00-16-51-67_92460851df6f172a4592fca41cc2d2e6](https://us1.discourse-cdn.com/flex019/uploads/percona1/original/3X/2/9/2994849a8b1154d9c7a1a7657cd2897b196e7772.jpeg)

 ![Screenshot_2024-12-17-00-17-04-16_92460851df6f172a4592fca41cc2d2e6](https://us1.discourse-cdn.com/flex019/uploads/percona1/original/3X/0/6/069da77e81cb7c71f8b0c2fbcaf550bb82c40c9e.jpeg)

 ![Screenshot_2024-12-17-00-16-57-59_92460851df6f172a4592fca41cc2d2e6](https://us1.discourse-cdn.com/flex019/uploads/percona1/original/3X/a/f/afb7b7f936933115382ce692879bfce10d9b84cb.jpeg)

---

<div class="post-metadata">

**Author:** ![matthewb](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/matthewb/32/34_2.png) [@matthewb](https://forums.percona.com/u/matthewb)\
**Post date:** [December 16, 2024, 7:04pm UTC](https://forums.percona.com/t/alert-email-body-unable-to-change/35638/4 "2024-12-16T19:04:18Z")

</div>

I don’t have an step-by-step guidance. I have an example that I used on another customer to output all keys and values. Perhaps you can edit this to suit your needs.

 ![Untitled](https://us1.discourse-cdn.com/flex019/uploads/percona1/original/3X/f/a/fa0d2700b1a112ebf873578952b73dc526178911.jpeg)

---

<div class="post-metadata">

**Author:** ![Amol](https://avatars.discourse-cdn.com/v4/letter/a/a4c791/32.png) [@Amol](https://forums.percona.com/u/Amol)\
**Post date:** [December 16, 2024, 7:16pm UTC](https://forums.percona.com/t/alert-email-body-unable-to-change/35638/5 "2024-12-16T19:16:22Z")

</div>

Okay thank you !! I had another question, how can I display the errors that appear in my postgresql database log file in these tools or how can I fire an email alert for that error?

---

<div class="post-metadata">

**Author:** ![matthewb](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/matthewb/32/34_2.png) [@matthewb](https://forums.percona.com/u/matthewb)\
**Post date:** [December 16, 2024, 8:27pm UTC](https://forums.percona.com/t/alert-email-body-unable-to-change/35638/6 "2024-12-16T20:27:02Z")

</div>

If you want logs from your DB in PMM, you need to setup Loki, a plugin and side companion to Grafana. Here’s a blog that gives some guidance:

> **[Turbocharging Percona Monitoring and Management With Loki’s Log-shipping...](https://www.percona.com/blog/turbocharging-percona-monitoring-and-management-with-lokis-log-shipping-functionality/)**
>
> How to integrate Percona Monitoring and Management with Loki to get metrics and queries from our database servers but also text-based information like logs.

Since this is not officially supported, you’ll have to troubleshoot things on your own. You might end up having to create some custom alarms in PMM to trigger events from the logs in Loki.
