Kibana 没有显示来自 elasticsearch 的一些文档——即使它们存在

Kibana not showing some of the documents from elasticsearch - even though they exist

我有一个 elasticsearch 和 kibana 设置,我正在将文档发送到 elasticsearch 并返回一个创建的 201,当我直接查询文档的 id 时(curl 到 elasticsearch API)我得到返回结果:

# curl elasticsearch.metrics:9200/falco/_doc/1559716938212262231-1
{"_index":"falco","_type":"_doc","_id":"1559716938212262231-1","_version":1,"_seq_no":1096,"_primary_term":1,"found":true,"_source":{ "priority": "Info", "output": "test", "rule": "test", "output_fields": { "test": "test", "evt.time": "1559716938212262231" }}}

但是,此文档(以及许多其他文档)不会出现在 kibana 中。

这并不是说 kibana 中什么都没有出现,我确实在那里看到了一些文档,甚至出现了比我的测试更新的文档。

为什么会这样?

例如,为了在发现选项卡中显示文档,kibana 在时间选择器(右上角)中缩小到选定时间范围内的所有文档。您还选择了一个索引模式,其中定义了一个时间字段(在大多数情况下为@timestamp)。

因此 Kibana 在为当前选定的索引模式配置的时间字段中搜索具有选定时间范围内值的文档。

如果@timestamp 字段中缺少数据,您可以使用所有文档中存在的不同日期字段轻松创建不同的索引模式。如果有 none,请考虑用这样的文件丰富您的文档。