elasticsearch - Elasticsearch 以实体为中心的索引
问题描述
有没有人通过使用 python 和 groovy 脚本将事件中心索引重新索引为每个日志消息都有自己的索引的以实体为中心的索引,来使用 elasticsearch 进行以实体为中心的索引?
我收到了很多以下消息:
Jul 23 09:24:16 msda msda-core[5147]: 1563866656876839.mt
Jul 23 09:24:18 msda msda-core[5210]: 1563866656876839.0.dn
我有很多带有 .mt 后缀和 .dn 后缀的相同 ID 号。
如果一小时内出现带有 .dn 后缀的消息,我总是需要找到具有相同 ID 号和适当 dn 后缀的消息。
任何想法将不胜感激!
解决方案
如果您运行的是 v7.2 或更高版本,我建议使用 Elasticsearch 数据帧转换来创建按 id 编号分组的以事件为中心的索引。https://www.elastic.co/guide/en/elastic-stack-overview /current/ml-dataframes.html
在最小和最大时间戳上使用脚本化指标来计算持续时间。Elastic 文档中有一个很好的示例 - https://www.elastic.co/guide/en/elastic-stack-overview/7.3/example-clientips.html
推荐阅读
- vue.js - 如何在设置和测试阶段传递道具,而不覆盖东西?
- accessibility - 正确处理新添加区域的 WCAG
- java - 如果在百里香中选中复选框,如何更改布尔值?
- javascript - 数据表 gettng 警告无法重新初始化
- linux - Netsed透明代理和服务器在同一个系统
- kubernetes - GPU节点的Kubernetes自动缩放
- python - Pandas 使用日期列创建带有 .shift 的天数列
- python - 在python中将一定数量的元素从一个列表复制到另一个列表
- compiler-errors - AutoHotKey throwing Error: Unexpected "}" 尽管括号看起来是正确的
- cics - 如何使用询问时间获得毫秒值?