AWS Cloudwatch数学表达式:删除不足的数据:是否存在“合并"?像SQL一样的功能? [英] AWS Cloudwatch Math Expressions: removing Insufficient Data: is there a "coalesce" function like SQL?

查看:73
本文介绍了AWS Cloudwatch数学表达式:删除不足的数据:是否存在“合并"?像SQL一样的功能?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我可以在Cloudwatch Math Expression中将无/不足的数据点替换为值吗(常数可以)?

Can I replace a None/Insufficient data point as a value (constant is fine) in a Cloudwatch Math Expression?

我正在使用几个指标的数学表达式:if,算术等.

I am using a math expression of several metrics: if's, arithmetic, etc.

问题是您现在受到具有足够数据的所有变量的束缚.如果缺少一个数据点,那就WHAM!该数学表达式的数据不足.

The problem is that you are now bound by all of the variables having sufficient data. If one is missing a datapoint, WHAM! Insufficient data for that math expression.

理想情况下,我想基于标准的SQL coalesce 函数执行以下操作:

Ideally, I'd like to do something like the following based on the standard SQL coalesce function:

coalsece(m1,m2,15)+合并(m3,25)/合并(m4,8)

请注意: Cloudwatch处理不足数据的机制仅涵盖最终值(数学表达式的结果).我希望以不同的方式涵盖每个单独的值,而不只是违反/确定/最后一个值/数据不足.因此,此处链接的问题是答案不足

PLEASE NOTE: Cloudwatch's mechanism for handling Insufficient Data only covers the final value (the result of the math expression). I am looking to cover each individual value differently, allowing more than just is breaching/is ok/last value/insufficient data. Thus, the question linked here is an insufficient answer

推荐答案

两件事:

  1. 通常,您可以对> 1个变量执行数学函数,并且它们显然会自动用0填补数据中的所有空白.但是,如果数据中同时存在间隙,则您的输出会稀疏的.
  2. 更好的答案是 FILL()函数.在这个例子中上面,每个变量都需要多次多次调用 FILL ,因为 FILL 仅采用两个参数:一个度量标准和一个时间序列以OR或一个标量填充值:
  1. In general, you can perform math functions on > 1 variable, and they will apparently automatically fill in all gaps in the data with 0. However, if there is a simultaneous gap in the data, your output will be sparse.
  2. The better answer is the FILL() function. In the example above, every variable would need to make a specific call to FILL multiple times, as FILL only takes two arguments: a metric and either a time series to fill with OR a scalar value:

FILL(FILL(m1, m2), 15) + FILL(m3, 25) / FILL(m4, 8)

参考: Cloudwatch功能说明.搜索 FILL 函数.

Ref: Cloudwatch function discription. Search for the FILL function.

这篇关于AWS Cloudwatch数学表达式:删除不足的数据:是否存在“合并"?像SQL一样的功能?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆