# add email alert

**URL:** <https://forums.percona.com/t/add-email-alert/5674>\
**Category:** PMM 1.x\
**Created:** [June 12, 2017, 8:13pm UTC](https://forums.percona.com/t/add-email-alert/5674 "2017-06-12T20:13:31Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![liuqian](https://avatars.discourse-cdn.com/v4/letter/l/3da27b/32.png) [@liuqian](https://forums.percona.com/u/liuqian)\
**Post date:** [June 12, 2017, 8:13pm UTC](https://forums.percona.com/t/add-email-alert/5674/1 "2017-06-12T20:13:31Z")

</div>

For the first time to add an alarm, follow-up without newspaper police

---

<div class="post-metadata">

**Author:** ![Mykola](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/mykola/32/30_2.png) [@Mykola](https://forums.percona.com/u/Mykola)\
**Post date:** [June 13, 2017, 3:57am UTC](https://forums.percona.com/t/add-email-alert/5674/2 "2017-06-13T03:57:26Z")

</div>

we have two articles about email alerting in Grafana on our blog, feel free to use them  
[url][https://www.percona.com/blog/2017/01/23/mysql-and-mongodb-alerting-with-pmm-and-grafana/[/url]](https://www.percona.com/blog/2017/01/23/mysql-and-mongodb-alerting-with-pmm-and-grafana/%5B/url%5D)  
[url][https://www.percona.com/blog/2017/02/02/pmm-alerting-with-grafana-working-with-templated-dashboards/[/url]](https://www.percona.com/blog/2017/02/02/pmm-alerting-with-grafana-working-with-templated-dashboards/%5B/url%5D)

you can follow instructions from the first link.  
is “Send Test” button working fine for you?

---

<div class="post-metadata">

**Author:** ![liuqian](https://avatars.discourse-cdn.com/v4/letter/l/3da27b/32.png) [@liuqian](https://forums.percona.com/u/liuqian)\
**Post date:** [June 13, 2017, 9:19pm UTC](https://forums.percona.com/t/add-email-alert/5674/3 "2017-06-13T21:19:45Z")

</div>

Send Test [normal](https://www.percona.com/forums/?keyword=normal),but only for the first time

---

<div class="post-metadata">

**Author:** ![Mykola](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/mykola/32/30_2.png) [@Mykola](https://forums.percona.com/u/Mykola)\
**Post date:** [June 14, 2017, 1:39am UTC](https://forums.percona.com/t/add-email-alert/5674/4 "2017-06-14T01:39:37Z")

</div>

Am I understand correctly that “Send Test” button become broken after some time?

Do you see any errors in grafana log file when button don’t send email?  
you can open log file with the following command:

```auto
docker exec -it pmm-server less /var/log/grafana/grafana.log

```

---

<div class="post-metadata">

**Author:** ![liuqian](https://avatars.discourse-cdn.com/v4/letter/l/3da27b/32.png) [@liuqian](https://forums.percona.com/u/liuqian)\
**Post date:** [June 14, 2017, 2:01am UTC](https://forums.percona.com/t/add-email-alert/5674/5 "2017-06-14T02:01:47Z")

</div>

t=2017-06-14T00:02:40+0000 lvl=eror msg=“Alert Rule Result Error” logger=alerting.evalHandler ruleId=5 name=“CPU Usage alert” error=“tsdb.HandleRequest() error bad\_response: bad response code 400” changing state to=alerting  
t=2017-06-14T00:03:01+0000 lvl=eror msg=“Alert Rule Result Error” logger=alerting.evalHandler ruleId=1 name=“MySQL Active Threads alert” error=“tsdb.HandleRequest() error bad\_response: bad response code 400” changing state to=alerting  
t=2017-06-14T00:03:20+0000 lvl=eror msg=“Alert Rule Result Error” logger=alerting.evalHandler ruleId=2 name=“Connections alert” error=“tsdb.HandleRequest() error time: invalid duration $interval” changing state to=alerting  
t=2017-06-14T00:03:20+0000 lvl=eror msg=“Alert Rule Result Error” logger=alerting.evalHandler ruleId=5 name=“CPU Usage alert” error=“tsdb.HandleRequest() error bad\_response: bad response code 400” changing state to=alerting  
t=2017-06-14T00:04:01+0000 lvl=eror msg=“Alert Rule Result Error” logger=alerting.evalHandler ruleId=1 name=“MySQL Active Threads alert” error=“tsdb.HandleRequest() error bad\_response: bad response code 400” changing state to=alerting  
t=2017-06-14T00:04:20+0000 lvl=eror msg=“Alert Rule Result Error” logger=alerting.evalHandler ruleId=2 name=“Connections alert” error=“tsdb.HandleRequest() error time: invalid duration $interval” changing state to=alerting  
t=2017-06-14T00:04:40+0000 lvl=eror msg=“Alert Rule Result Error” logger=alerting.evalHandler ruleId=5 name=“CPU Usage alert” error=“tsdb.HandleRequest() error bad\_response: bad response code 400” changing state to=alerting  
t=2017-06-14T00:05:01+0000 lvl=eror msg=“Alert Rule Result Error” logger=alerting.evalHandler ruleId=1 name=“MySQL Active Threads alert” error=“tsdb.HandleRequest() error bad\_response: bad response code 400” changing state to=alerting  
t=2017-06-14T00:05:20+0000 lvl=eror msg=“Alert Rule Result Error” logger=alerting.evalHandler ruleId=2 name=“Connections alert” error=“tsdb.HandleRequest() error time: invalid duration $interval” changing state to=alerting  
t=2017-06-14T00:05:20+0000 lvl=eror msg=“Alert Rule Result Error” logger=alerting.evalHandler ruleId=5 name=“CPU Usage alert” error=“tsdb.HandleRequest() error bad\_response: bad response code 400” changing state to=alerting  
t=2017-06-14T00:06:01+0000 lvl=eror msg=“Alert Rule Result Error” logger=alerting.evalHandler ruleId=1 name=“MySQL Active Threads alert” error=“tsdb.HandleRequest() error bad\_response: bad response code 400” changing state to=alerting  
t=2017-06-14T00:06:20+0000 lvl=eror msg=“Alert Rule Result Error” logger=alerting.evalHandler ruleId=2 name=“Connections alert” error=“tsdb.HandleRequest() error time: invalid duration $interval” changing state to=alerting  
t=2017-06-14T00:06:40+0000 lvl=eror msg=“Alert Rule Result Error” logger=alerting.evalHandler ruleId=5 name=“CPU Usage alert” error=“tsdb.HandleRequest() error bad\_response: bad response code 400” changing state to=alerting  
t=2017-06-14T00:07:02+0000 lvl=eror msg=“Alert Rule Result Error” logger=alerting.evalHandler ruleId=1 name=“MySQL Active Threads alert” error=“tsdb.HandleRequest() error bad\_response: bad response code 400” changing state to=alerting  
t=2017-06-14T00:07:20+0000 lvl=eror msg=“Alert Rule Result Error” logger=alerting.evalHandler ruleId=2 name=“Connections alert” error=“tsdb.HandleRequest() error time: invalid duration $interval” changing state to=alerting

---

<div class="post-metadata">

**Author:** ![Mykola](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/mykola/32/30_2.png) [@Mykola](https://forums.percona.com/u/Mykola)\
**Post date:** [June 14, 2017, 2:12am UTC](https://forums.percona.com/t/add-email-alert/5674/6 "2017-06-14T02:12:23Z")

</div>

I see “” issue in the logs  
It looks like internal grafana issue, see [https://github.com/grafana/grafana/issues/8353](https://github.com/grafana/grafana/issues/8353)  
the latest message from grafana developers on github

> [@](#):
>
> Try upgrading to 4.3 and resave edit the alert query (just make a minor change then change back, or if that does not work remove the query and re add it ) then save dashboard.

so it is needed to update grafana and resave alert. With grafana update we have two options:

1. wait a long time for PMM 1.2.0 release.
2. update grafana manually (i can prepare instructions for you)  
what do you think? do you want to wait for 1.2.0 or run some update commands manually?
