0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

[解決方法考え中] Datadog のアラートが Resolve 直後に再発してしまう

Last updated at Posted at 2024-02-28

前提

Datadogで以下のようにMonitorを定義したとする。

「Lambdaの実行でエラーが発生した場合アラートを発する」

alertの条件は以下のように定義した。

Query: sum(last_1h):aws.lambda.errors{functionname:my-function}.as_count() > 0
つまり、

  • Alert threshold: > 0
  • Evaluation Details: Evaluate the sum of the query over the last 1 hour

発生する問題

  • 1:00pm: Lambda実行失敗。エラー発生
  • 1:01pm: Datadogがevaluateする(evaluation window=12:01-1:01) -> アラートが発生する。
  • 1:15pm: Lambdaのバグ修正、Lambdaをリトライして実行が成功。
  • 1:20pm: DatadogのUIでモニターをResolveする。
  • 1:21pm: Datadogがevaluateする(evaluation window=12:21-1:21) -> アラートが再び発生する。

つまり、アラートをResolveした直後に、その直前のエラーが理由でアラートが再び発されてしまう。

解決方法

1:20pmの時点で、Resovleではなく、1時間 Mute とかにすべきなんだろうか。

あるいは、sum(last_1h)sum(last_5m)にすれば、この場合に限っては解決しそう。

あるいは、1:21pmの時点でのevaluation window1:15-1:21にできたらいいのだが。

あるいは、evaluation frequency を1時間に1回にすれば良い。

Ref.

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?