NRQL 查询可获取最高错误率和最慢平均响应时间

问题描述 投票:0回答:1

附上错误率最高且平均响应时间最慢的两张图片。我需要一个 NRQL 查询来查找“最慢平均响应时间”中的每笔交易,如果其中任何一笔交易超过 3 分钟,我需要收到一封电子邮件警报以及导致警报的交易名称详细信息。

需要再进行一次 NRQL 查询以获得“最高错误率”,如果任何一笔交易高于 80%,我需要收到一封电子邮件警报以及导致警报的交易名称详细信息

newrelic newrelic-platform nrql
1个回答
0
投票

I need an NRQL query to find each transaction in the "slowest average response time" and if any one of the transaction is above 3 minutes I need to get an email alert along with transaction name details which is causing the alert.

FROM Transaction SELECT count(*) where duration >= 120 facet name 

上面将为您提供持续时间 > 120 秒的交易计数,按交易名称分组。如果将此设置为警报,则可以将阈值设置为 >0,以便在任何发生这种情况时生成事件。

Required one more NRQL query for "Highest error rate" and if any one of the transaction is above 80% I need to get an email alert along with transaction name details which is causing the alert

FROM Transaction SELECT percentage(count(*), where error is true or httpResponseCode like '5%' or httpResponseCode like '4%') facet name

上面将给出每笔交易的错误百分比 - 也可以对其进行调整以删除特定错误或响应代码。

© www.soinside.com 2019 - 2024. All rights reserved.