【问题标题】:Index not showing in Kibana 6.2Kibana 6.2 中未显示索引
【发布时间】:2018-03-16 09:27:17
【问题描述】:

所以我使用 Elasticsearch 和 Kibana 来显示我的 Django 应用程序使用 elastic-py 发送的特定用户事件。我之前用的是5.5版本,效果很好,但是由于不同的原因,我不得不改变服务器本身,并决定利用这个机会升级到ELK 6.x。

因此,我在另一台装有 X-Pack 的服务器上安装了全新的 Elasticsearch 和 Kibana 6.2.2,并对我的旧代码进行了一些调整:

之前

. . . 
'mappings': {
   'example_local': {
      'properties': {
         'action': {'index': 'not_analyzed', 'type': 'string'},
         'date': {'index': 'not_analyzed', 'format': 'dd-MM-yyyy HH:mm:ss', 'type': 'date'},
         'user_type': {'index': 'not_analyzed', 'type': 'string'},
. . . 

之后

. . . 
  'mappings': {
    'example_local': {
       'properties': {
          'action': {'type': 'text'},
          'date': {'format': 'dd-MM-yyyy HH:mm:ss', 'type': 'date'},
          'user_type': {'type': 'text'},
. . . 

之后,我将用户名和密码添加到我的连接中,这在我的旧 ELK 中无法做到。

host_port = '{}:{}'.format(settings.ELASTICSEARCH['host'], settings.ELASTICSEARCH['port'])
Elasticsearch(host_port, http_auth=(settings.ELASTICSEARCH['username'],settings.ELASTICSEARCH['password']))

最后,我创建了我的索引并跑到 Kibana 看看我最后 4 小时的努力最终是如何得到回报的。

但在 Management -> Kibana -> Index Patterns 中只有 1 个索引,haystack-test (我不知道它为什么在那里)。

【问题讨论】:

    标签: python django elastic-stack elasticsearch-6 kibana-6


    【解决方案1】:

    我不知道发生了什么,但我很伤心,所以我从头开始学习 6.2 Elasticsearch 教程,并在每个命令行之后检查索引模式窗口,直到我看到索引在我执行插入/更新后出现在索引中。

    所以我从我的 Django 发送了一个事件,然后索引显示在 Kibana 窗口中。

    因此,如果有人遇到类似问题,这是我的解决方案。

    【讨论】:

      猜你喜欢
      • 2022-01-06
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-05-29
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多