我按照步骤在Windows 7机器上安装Logstash,Elastic Search和Kibana,一切似乎都运行正常 . 我可以将日志发送到LogStash,然后它们会转发到Elastic Search . 我按this中的描述加载了前两个数据集 . 我也可以查看索引
yellow open accounts 5 1 1000 0 417kb 417kb
yellow open logstash-2015.10.25 5 1 377 0 1005kb 1005kb
yellow open .kibana 1 1 1 0 2.4kb 2.4kb
yellow open logstash-2015.10.14 5 1 0 0 575b 575b
yellow open shakespeare 5 1 111396 0 17.9mb 17.9mb
然而,Kibana陷入了第一步,无论我使用什么索引模式,它总是会显示出来
Unable to fetch mapping. Do you have indices matching the pattern?
Chrome和Firefox中的开发者控制台显示相同的错误消息
Failed to load resource: the server responded with a status of 400 (Bad Request)
http://mylocalhostname.com/elasticsearch/*/_mapping/field/*?ignore_unavailable=false&allow_no_indices=false&include_defaults=true&_=1445811221725
IndexPattern's configured pattern does not match any indices
我已经尝试删除所有索引,因为看到“.kibana”索引是在我刷新Kibana网址后创建的 . 这表明Kibana可以进入弹性搜索 . 一切都在本地安装 .
版本:
kibana-4.1.2-windows
elasticsearch-1.7.3
logstash-1.5.4
1 回答
即使我遇到同样的问题,我也可以将消息记录到Logstash,但无法将其发送到Kibana UI . 因此,在做了一些研究并与我的朋友聊天后,发现在从我们的应用程序索引日志时,我们需要在ELK标准中格式化日期 . 我将这些日期格式化,同时将消息索引到Logstash . 只需将其添加到索引json数组: $message['timestamp'] = date(\DateTime::ISO8601); 这将解决问题...
所以这是我索引的最终数据:
快乐编码:)