# Alerting config always failed

**URL:** <https://community.grafana.com/t/alerting-config-always-failed/125442>\
**Category:** Alerting\
**Tags:** api, alerting\
**Created:** [July 4, 2024, 8:03am UTC](https://community.grafana.com/t/alerting-config-always-failed/125442 "2024-07-04T08:03:42Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![samzhou688](https://avatars.discourse-cdn.com/v4/letter/s/b5ac83/32.png) [@samzhou688](https://community.grafana.com/u/samzhou688)\
**Post date:** [July 4, 2024, 8:03am UTC](https://community.grafana.com/t/alerting-config-always-failed/125442/1 "2024-07-04T08:03:42Z")

</div>

I using grafana version is enterprise, operating system is linux.

This is my query A,  
**sum(rate(emqx\_messages\_received{instance=~“._“,job=“emqx”}[$\_\_rate\_interval]) or irate(emqx\_messages\_received{instance=~”._”,job=“emqx”}[$\_\_rate\_interval]))**

 ![image](https://us1.discourse-cdn.com/grafana/original/3X/c/8/c80f102b2555c906ff943b320cdfeb989730ccaf.png)

I want to create alert to test send email.

 ![image](https://us1.discourse-cdn.com/grafana/original/3X/1/0/106ef76529184fa3fc42cde0c7d7644d4e6a9394.png)

I test many times condition , likes sum(), ave(), test rule is failed. I expect it rule test success.

 ![image](https://us1.discourse-cdn.com/grafana/original/3X/5/4/5489eacfbe4225b67a1ac8b036852a4ffce1be0a.png)

I do not know this confition how to write. I just want to config successful to send email.  
Please help me , guiding how config alerting rule. Thanks.

---

<div class="post-metadata">

**Author:** ![jangaraj](https://sea2.discourse-cdn.com/grafana/user_avatar/community.grafana.com/jangaraj/32/39197_2.png) [@jangaraj](https://community.grafana.com/u/jangaraj)\
**Post date:** [July 4, 2024, 8:19am UTC](https://community.grafana.com/t/alerting-config-always-failed/125442/2 "2024-07-04T08:19:19Z")

</div>

You are using deprecated legacy alerting. IMHO it’s not worth to debug this problem, when you have to migrate to unified alerting at some point in the future.

---

<div class="post-metadata">

**Author:** ![samzhou688](https://avatars.discourse-cdn.com/v4/letter/s/b5ac83/32.png) [@samzhou688](https://community.grafana.com/u/samzhou688)\
**Post date:** [July 5, 2024, 3:04am UTC](https://community.grafana.com/t/alerting-config-always-failed/125442/3 "2024-07-05T03:04:23Z")

</div>

Hi , May I know have some alert configuration example to study ? Thanks.

---

<div class="post-metadata">

**Author:** ![jangaraj](https://sea2.discourse-cdn.com/grafana/user_avatar/community.grafana.com/jangaraj/32/39197_2.png) [@jangaraj](https://community.grafana.com/u/jangaraj)\
**Post date:** [July 5, 2024, 6:23am UTC](https://community.grafana.com/t/alerting-config-always-failed/125442/4 "2024-07-05T06:23:34Z")

</div>

I would recommended for unified alerting (not old legacy):

[![](https://img.youtube.com/vi/qA6RSB4Uxto/maxresdefault.jpg "Alerting in Grafana 9") ](https://www.youtube.com/watch?v=qA6RSB4Uxto)

> **[Get started with Grafana Alerting - Part 1 | Grafana Labs](https://grafana.com/tutorials/alerting-get-started/)**
>
> Get started with Grafana Alerting by creating your first alert in just a few minutes. Learn how to set up an alert, send alert notifications to a public webhook, and generate sample data to observe your alert in action.
