在汇总到dataDog上的数字之前的过滤值“ query_value”可视化
我在Datadog中有一个计数指标,该指标具有正数和负数。当使用“时间剧”可视化仅显示正计数时,我只需应用clamp_min(query1,0)
,它可以正常工作。
本质上,当我尝试做同样的事情时,JSON看起来像“时间”
{
"viz": "timeseries",
"requests": [
{
"style": {
"palette": "dog_classic",
"type": "solid",
"width": "normal"
},
"type": "line",
"formulas": [
{
"formula": "clamp_min(query1, 0)"
}
],
"response_format": "timeseries",
"queries": [
{
"query": "sum:my_counting_metric.as_count()",
"data_source": "metrics",
"name": "query1"
}
]
}
]
}
,并汇总了我在“ query_value”上过滤的所有这些正数,即我找不到一种方法任何类似的事物,因为它将所有计数总结到一个数字之前,然后才能将过滤器应用于上面的clamp_min
。理想情况下,如果可能的话,我想在下面做类似的事情。
{
"viz": "query_value",
"requests": [
{
"response_format": "scalar",
"formulas": [
{
"formula": "query1"
}
],
"queries": [
{
"query": "sum:clamp_min(my_counting_metric.as_count(), 0)",
"data_source": "metrics",
"name": "query1",
"aggregator": "avg"
}
]
}
],
"precision": 2,
"autoscale": true
}
有什么办法做到这一点吗?我感到非常困惑,非常感谢任何帮助!
I have a counting metric in DataDog, that has positive and negative counts. When using a "timeseries" visualization to show only the positive counts, I simply just apply a clamp_min(query1, 0)
, and it works.
Essentially, the JSON looks like below for the "timeseries"
{
"viz": "timeseries",
"requests": [
{
"style": {
"palette": "dog_classic",
"type": "solid",
"width": "normal"
},
"type": "line",
"formulas": [
{
"formula": "clamp_min(query1, 0)"
}
],
"response_format": "timeseries",
"queries": [
{
"query": "sum:my_counting_metric.as_count()",
"data_source": "metrics",
"name": "query1"
}
]
}
]
}
When I try to do this same thing, and aggregate all these positive numbers that I've filtered for on a "query_value" viz, I can't find a single way to do anything similar because it sums all the counts to a number before making it possible to apply filters like clamp_min
above. Ideally, I would like to do something like below if possible.
{
"viz": "query_value",
"requests": [
{
"response_format": "scalar",
"formulas": [
{
"formula": "query1"
}
],
"queries": [
{
"query": "sum:clamp_min(my_counting_metric.as_count(), 0)",
"data_source": "metrics",
"name": "query1",
"aggregator": "avg"
}
]
}
],
"precision": 2,
"autoscale": true
}
Is there any way to do this? I'm feeling pretty stuck and would greatly appreciate any help! ????????
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在这个问题上,我能够与Datadog联系。
他们基本上告诉我我的帖子中提到的这种行为是可以预期的,因为“ query_value”正在运行一个称为点减少的过程。这就是为什么
clamp_min
函数没有效果的原因。简而言之,在执行“ query_value”初始聚合函数之前,没有办法过滤/映射。I was able to get in contact with DataDog on this question.
They basically told me this behavior mentioned in my post is expected because the "query_value" viz runs a procedure called point reduction. This is why the
clamp_min
function had no effect. To put it short, there's not a way to filter/map before the execution of the initial aggregating function on a "query_value" viz.