监控 lambda 在 NewRelic 中执行

Monitor that lambda executes in NewRelic

我正在尝试监控我的 Lambda 是否在过去 25 小时内在 New Relic 中执行过。如果还没有,我想提醒。

我有以下 NRQL,它提供了我想要查看的图表:

SELECT sum(`provider.invocations.Sum`) FROM ServerlessSample WHERE provider.resource = 'my_lambda_name'

然后我只想说,如果它在 1500 分钟(25 小时)内低于 1,则发出警报,但 NR 只允许我设置 120 分钟的警报。关于如何解决这个问题的任何提示?

有趣的问题,正如我在 New Relic 讨论页面或 Explorers Hub 中看到的那样,可能有适合您任务的解决方案。

你能评论一下吗link:

If you think about this for a moment, you might see how NRQL queries using percentile or stddev are a lot less useful than they seem, when used in an alert condition. After all, if you calculate the standard deviation over an hour (or 24 hours), that can be meaningful. But stddev(duration), or percentile(duration,95) calculated over only 60 seconds is less meaningful.

我认为限制是 24 小时,但我还没有测试过。 希望这会对你有所帮助,我也会尝试一下,看看它是否有效。