azure - KQL 时间表可视化显示特定资源随时间的总数
问题描述
我正在尝试在 Azure 资源图中随时间推移可视化特定资源的总数。
例如,2018 年应用洞察总数为 10 个,2019 年总数为 20 个,依此类推。
这是查询,但它有问题: 1- 它不聚合资源的总数 2- 它不接受渲染时间表
resources
| where type == "microsoft.insights/components"
| extend CreationDate = todatetime(properties.CreationDate)
| summarize count() by bin(CreationDate, 365d)
解决方案
您需要将资源添加到 by 子句,例如,如果您有一个名为“资源”的列,请使用:
resources
| where type == "microsoft.insights/components"
| extend CreationDate = todatetime(properties.CreationDate)
| summarize count() by bin(CreationDate, 365d), Resource
关于渲染时间表不起作用,您是否检查过您有超过 1 年的数据?如果是这样,您能否提供您正在试用的应用程序的更多详细信息?那是应用程序洞察力吗?
推荐阅读
- python - 如何通过使用熊猫添加列将多行组合成单行?
- python - 在匹配中获得无限数量的重复匹配?
- tensorflow - 在keras tensorflow中找到可变长度的损失掩码
- c++ - 是否有用于将单精度 IBM 浮点数转换为 IEEE-754 浮点数的 C++ 函数?
- sparql - DBpedia:使用 SPARQL 查询有关特定资源的所有信息
- jquery - 如何运行 Angular 6 html 页面任何其他 html / 任何语言网站?
- javascript - 为什么我的 javascript 测验无法正确加载?
- windows - Terraform - Azure Windows VM winrm 连接问题
- matlab - 箭袋情节与轨迹不符
- htc-vive - How to manage HTC Vive controllers power programmatically?