Azure 日志查询显示空值

标签 azure logging null zero azure-data-explorer

目前,我正在 Azure 中构建一个监控,并在图表中进行日志查询。 到目前为止,这工作正常,但我有一个问题。如果我想在图表中显示零值,我就会遇到问题。 当我查询 Count 时,我只得到包含数据的值。

我尝试了以下方法来输出零值:

    customEvents
| where name == "GlobalHostHandleMessageError" and tolower(customDimensions.MessageType) in ("listmanager")
| where customDimensions.DeliveryCount == "10"
| project MessageType = customDimensions.MessageType, timestamp 
| summarize SumMessages=count() by tostring(MessageType), timestamp
| make-series count() default=0 on timestamp in range(ago(1d), now(), 1h) by MessageType
| mvexpand timestamp, count_

不幸的是,我无法在“make-series”命令之后显示图表。显示以下错误:

FAILED TO CREATE VISUALIZATION
The Pie can't be created as you are missing a column of one of the following types: int, long, decimal or real

谁能帮我解决这个问题吗?

提前致以问候和感谢

最佳答案

mvexpand 的输出始终是动态类型列。尝试将最后一行更改为:
mvexpand 时间戳,tolong(count_)

关于Azure 日志查询显示空值,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60398189/

相关文章:

java 文件 readline 返回 null

Java DOM 解析器返回空文档

sql - 查找 SQL 2000 数据库中所有可为 Null 的列

azure - Service Fabric Log etl 文件目标

asp.net - 使用 Identity 通过 React 发布 ASP.NET Core 时出现问题

asp.net-mvc - Knockout MVC - ServerAction 调用未执行

azure - 如何在 Azure 虚拟机上设置 TFS 和测试 Controller ?

gwt - 如何在 GWT 日志记录中配置特定于类的日志级别?

java - tomcat 中的 Jersey 日志记录请求正文

logging - 将 docker-compose 与 GELF 日志驱动程序一起使用