我设置了elasticsearch和Kibana来索引我们的应用程序(错误)日志。问题是Kibana不会在"Discover“标签中显示任何数据。
当前状况
http://elasticserver.com:9200/applogs/_search?q=* )直接在Elasticsearch上执行查询会返回大量结果(请参见下面有关单个找到的记录的外观的信息)applogs索引也会显示applogs Elasticsearch选项卡的正确属性和数据类型在将时间段设置为几年时不显示任何results...even ...<代码>H215<代码>F216有什么想法吗??
以下是Kibana如何看待 applogs

Elastic search查询结果对象如下:
{
_index: "applogs",
_type: "1",
_id: "AUxv8uxX6xaLDVAP5Zud",
_score: 1,
_source: {
appUid: "esb.Idman_v4.getPerson",
level: "trace",
message: "WS stopwatch is at 111ms.",
detail: "",
url: "",
user: "bla bla bla",
additionalInfo: "some more info",
timestamp: "2015-03-31T15:08:49"
}
},..and 我在发现选项卡中看到的内容

发布于 2015-06-11 20:45:17
对于像这样有问题的人:
更改右上角的时间范围。
默认情况下,它只显示最近15分钟的数据。
发布于 2015-07-16 02:29:31
我想把这作为一个评论,但不幸的是,我不能给我的不足的回购这样做。因此,正如@Ngeunpo所建议的,这是如何在创建索引时将时间字段添加到索引中:

。如果您在创建索引时没有这样做,我建议您删除该索引并重新创建它。gif中的索引名logstash-*类似于索引applogs。在本例中,添加了字段@timestamp作为时间字段。如果有效,请让我知道。
编辑:图片礼貌:此wonderful ELK setup guide
发布于 2015-12-07 16:18:24
Kibana不理解时间戳字段,如果它的格式是incorrect.Timestamp,您在配置索引模式时点击时间字段名称选择,则需要如下所示:
"timestamp":"2015-08-05 07:40:20.123"然后,您应该像这样更新索引映射:
curl -XPUT 'http://localhost:9200/applogs/1/_mapping' -d'
{
"1": {
"timestamp": {
"enabled": true,
"type": "date",
"format": "yyyy-MM-dd HH:mm:ss.SSS",
"store": true
}
}
}'更新
如果您使用的是ES 2.X,可以像这样将"format"设置为"epoch_millis":
curl -XPUT 'http://localhost:9200/applogs/1/_mapping' -d'
{
"1": {
"timestamp": {
"type": "date",
"format": "epoch_millis",
"store": true,
"doc_values": true
}
}
}'https://stackoverflow.com/questions/29371953
复制相似问题