如何解决将 NewRelic 警报条件转换为 yaml 代码?
正如我的标题所说,有没有什么方法可以将 NewRelic 警报条件转换为 YAML 代码而无需自己编写代码?
我已经看到这个 YAML 代码看起来像一个警报条件:
---
name: High duration
details: |+
This alert is triggered when the total duration of the web transaction is longer than 10 seconds during 5 minutes
type: STATIC
nrql:
query: "FROM Transaction select average(duration) where transactionType = 'Web'"
# Function used to aggregate the NRQL query value(s) for comparison to the terms.threshold (Default: SINGLE_VALUE)
valueFunction: SINGLE_VALUE
# List of Critical and Warning thresholds for the condition
terms:
- priority: CRITICAL
# Operator used to compare against the threshold.
operator: ABOVE
# Value that triggers a violation
threshold: 10
# Time in seconds; 120 - 3600
thresholdDuration: 300
# How many data points must be in violation for the duration
thresholdOccurrences: ALL
# Duration after which a violation automatically closes
# Time in seconds; 300 - 2592000 (Default: 86400 [1 day])
violationTimeLimitSeconds: 86400
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。