【问题标题】:Single index or multiple index单索引或多索引
【发布时间】:2021-10-22 15:04:26
【问题描述】:

我的环境架构是我有 15 台服务器。详情如下

第 1 组(独立)

  • 服务器 1(2 个应用)
  • 服务器 2 3 应用程序)
  • 服务器 3(2 个应用程序)
  • 服务器 4(3 个应用)

第 2 组(主从)

  • 服务器 5 主服务器(2 个应用程序)
  • 服务器 6 从属(2 个应用)

第 3 组(主机和 2 从机)

  • 服务器 7 主服务器(3 个应用程序)
  • 服务器 8 从属(3 个应用)
  • 服务器 9 从属(3 个应用程序)

第 4 组(1 主 5 从)

  • 服务器 10 主服务器(1 个应用程序)
  • 服务器 11 从属(1 个应用)
  • 服务器 12 从属(1 个应用)
  • 服务器 13 从属(1 个应用)
  • 服务器 14 从属(1 个应用)
  • 服务器 15 从属(1 个应用)

每个应用程序有 15 -20 条日志

在logstash中创建索引的最佳方式是什么?

下面的索引模式更好 app_name-log_name-YYMMDD

稍后我想在 Kibana 中以下面的表格表格形式显示时间,基于相应日志名称的消息

以下是单个日志的数据。其他日志具有相似的模式但不同的数据。我只想显示单个日志显示单个表

【问题讨论】:

    标签: elasticsearch indexing logstash elastic-stack


    【解决方案1】:

    https://www.elastic.co/guide/en/logstash/current/plugins-outputs-elasticsearch.html#_writing_to_different_indices_best_practices 有一个很好的起点来创建自定义索引名称。一般来说,我会考虑将具有相似生命周期(例如将数据保留 30 天)和相似结构(大部分相同字段)的内容组合成一个索引。只要您有应用程序的字段,您就可以对其进行过滤,它也可以正常工作。

    另外,我强烈建议 use ILM 获得大小均匀的索引,而不是每日索引模式。

    【讨论】:

      猜你喜欢
      • 2011-04-13
      • 1970-01-01
      • 2013-11-05
      • 1970-01-01
      • 2016-10-19
      • 2011-02-28
      • 2018-07-27
      • 2023-01-31
      • 2019-09-11
      相关资源
      最近更新 更多