Kibana 全路径可视化
Kibana visualization by full path
我正在尝试将请求的页面作为 x 轴进行可视化(例如垂直条形图)。但是,如果我创建 x 轴的桶类型,将聚合设置为 Terms 和 "page",它会按文件夹、文件名和扩展名拆分路径。
例如,如果路径是 /images/icons/up.png,我的可视化创建一个条形图,其中包含 "images"、"icons"、"up" 和 "png"。我希望图表使用条形图的完整路径 (/images/icons/up.png)。
这些来自 IIS 日志,我不想包含查询字符串。
grok {
match => ["message", "%{TIMESTAMP_ISO8601:log_timestamp} %{WORD:serviceName} %{WORD:serverName} %{IP:serverIP} %{WORD:method} %{URIPATH:page} %{NOTSPACE:uriQuery} %{NUMBER:port} %{NOTSPACE:username} %{IPORHOST:clientIP} %{NOTSPACE:protocolVersion} %{NOTSPACE:userAgent} %{NOTSPACE:cookie} %{NOTSPACE:referer} %{NOTSPACE:requestHost} %{NUMBER:response} %{NUMBER:subresponse} %{NUMBER:win32response} %{NUMBER:bytesSent} %{NUMBER:bytesReceived} %{NUMBER:timetaken}"]
}
谢谢!
对于这种类型的聚合,您的字符串字段应在 elasticsearch 中定义为“未分析”。否则 elasticsearch 自动标记您的字符串字段。
在 kibana 中,当您在分析字段上使用术语聚合时会收到警告,您看到了吗?
如果那不能解决你的问题,你能post你的elasticsearch索引映射吗?
我正在尝试将请求的页面作为 x 轴进行可视化(例如垂直条形图)。但是,如果我创建 x 轴的桶类型,将聚合设置为 Terms 和 "page",它会按文件夹、文件名和扩展名拆分路径。
例如,如果路径是 /images/icons/up.png,我的可视化创建一个条形图,其中包含 "images"、"icons"、"up" 和 "png"。我希望图表使用条形图的完整路径 (/images/icons/up.png)。
这些来自 IIS 日志,我不想包含查询字符串。
grok {
match => ["message", "%{TIMESTAMP_ISO8601:log_timestamp} %{WORD:serviceName} %{WORD:serverName} %{IP:serverIP} %{WORD:method} %{URIPATH:page} %{NOTSPACE:uriQuery} %{NUMBER:port} %{NOTSPACE:username} %{IPORHOST:clientIP} %{NOTSPACE:protocolVersion} %{NOTSPACE:userAgent} %{NOTSPACE:cookie} %{NOTSPACE:referer} %{NOTSPACE:requestHost} %{NUMBER:response} %{NUMBER:subresponse} %{NUMBER:win32response} %{NUMBER:bytesSent} %{NUMBER:bytesReceived} %{NUMBER:timetaken}"]
}
谢谢!
对于这种类型的聚合,您的字符串字段应在 elasticsearch 中定义为“未分析”。否则 elasticsearch 自动标记您的字符串字段。 在 kibana 中,当您在分析字段上使用术语聚合时会收到警告,您看到了吗?
如果那不能解决你的问题,你能post你的elasticsearch索引映射吗?