Azure Предупреждение монитора отправляет ложное уведомление об ошибке по электронной почте с количеством ошибок 1 для приложения функций - PullRequest
0 голосов
/ 09 июля 2020

У меня есть приложение Functions, в котором я настроил logi c сигналов, чтобы отправлять мне оповещения, когда в моем приложении произошел сбой, превышающий или равный единице. Каждый день я получаю электронные письма, в которых говорится, что сработало мое предупреждение Azure Monitor, за которым позже следует электронное письмо, в котором говорится, что сбой был устранен. Я знаю, что мое приложение не отказало, потому что я зарегистрировался в Application Insights. Например, у меня сегодня не было сбоев, но были отказы за предыдущие 2 дня: Azure Function Failures

However, I did receive a failure email today. If I go to configure the signal logic where I set a static threshold of failure count greater than or equal to 1 it shows this: failure count

Why is it showing a failure for today, when I know that isn't true from the Application Insights logs? Also, if I change the signal logic to look at total failures instead of count of failures, it looks correct:
enter image description here

I've decided to use the total failures metric instead, but it seems that the count functionality is broken.

Edit: Additional screenshot: Настроить сигнал logi c

1 Ответ

1 голос
/ 16 июля 2020

Я предлагаю вам использовать Custom log search в качестве signal, если вы уже подключили свое приложение-функцию к Application Insights (я бы хотел использовать этот вид сигнала и не вижу такого поведения, как ваше).

Шаги, указанные ниже:

Шаг 1: Для сигнала выберите Custom log search. Снимок экрана выглядит следующим образом:

enter image description here

Step 2: When the azure function times out, it will throw an error and the error type is Microsoft.Azure.WebJobs.Host.FunctionTimeoutException, so you can use the query below to check if it times out or not:

exceptions 
| where type == "Microsoft.Azure.WebJobs.Host.FunctionTimeoutException"

Put the above query in the "Search query" field, and configure other settings as per your need. The screenshot is as below:

enter image description here

Then configure other settings like action group etc. Please let me know if you still have such issue.

One thing should be noted: Some kinds of triggers support retry logi c, как blogtrigger. Поэтому, если он снова появится, вы также можете получить уведомление по электронной почте. Но вы можете отключить лог повторных попыток c согласно это сделать c.

...