无法在Windows 7上的Kibana安装中获取映射

时间:2015-10-25 22:29:56

标签: elasticsearch logstash windows-7-x64 kibana

我按照步骤在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 个答案:

答案 0 :(得分:0)

即使我有同样的问题,我也可以将消息记录到Logstash,但无法将其发送到Kibana UI。经过一些研究和研究后与我的朋友聊天,发现在从我们的应用程序索引日志时,我们需要格式化ELK标准中的日期。我在将消息索引到Logstash时进行了这个日期格式化。只需将其添加到索引json数组中: $ message ['timestamp'] = date(\ DateTime :: ISO8601); 这将修复问题......

所以这是我正在索引的最终数据:

  

$ params = [                               'index'=> 'my_index_name',                               'type'=> 'log_messages',                               'body'=> $消息                           ];

快乐编码:)