简体   繁体   English

单索引或多索引

[英]Single index or multiple index

My environment architecture is I have 15 server.我的环境架构是我有 15 个服务器。 The details as below详情如下

Group 1 (Standalone)第 1 组(独立)

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

Group 2 (master and slave)第 2 组(主从)

  • server 5 master (2 app)服务器 5 主机(2 个应用程序)
  • server 6 slave (2 app)服务器 6 从站(2 个应用程序)

Group 3 (master and 2 slave)第 3 组(主机和 2 个从机)

  • server 7 master (3 app)服务器 7 主机(3 个应用程序)
  • server 8 slave (3 app)服务器 8 从站(3 个应用程序)
  • server 9 slave (3 app)服务器 9 从站(3 个应用程序)

Group 4 (1 master 5 slave)第 4 组(1 主 5 从)

  • server 10 master (1 app)服务器 10 主控(1 个应用程序)
  • server 11 slave (1 app)服务器 11 从站(1 个应用程序)
  • server 12 slave (1 app)服务器 12 从站(1 个应用程序)
  • server 13 slave (1 app)服务器 13 从站(1 个应用程序)
  • server 14 slave (1 app)服务器 14 从站(1 个应用程序)
  • server 15 slave (1 app)服务器 15 从站(1 个应用程序)

Each application have 15 -20 logs每个应用程序有 15 -20 条日志

What is the best way in creating the index in logstash?在 logstash 中创建索引的最佳方法是什么?

Is below better for index pattern app_name-log_name-YYMMDD索引模式 app_name-log_name-YYMMDD 以下更好

Later i want to visual in Kibana in below form table panel form consist of time, message based on respective log name稍后我想在 Kibana 中以下面的表格面板形式可视化,其中包括时间、基于各自日志名称的消息

The below is data for a sinngle log.以下是单个日志的数据。 other log have simillar pattern but different data.其他日志具有相似的模式但数据不同。 i want to dispaly only for single log show single table我只想显示单个日志显示单个表

![图片|690x236](上传://12Xidsw81u6s4loDp5KDArIW7vl.jpeg)

https://www.elastic.co/guide/en/logstash/current/plugins-outputs-elasticsearch.html#_writing_to_different_indices_best_practices has a good starting point about creating custom index names. https://www.elastic.co/guide/en/logstash/current/plugins-outputs-elasticsearch.html#_writing_to_different_indices_best_practices有一个关于创建自定义索引名称的良好起点。 In general, I would think about combining into a single index what has both similar lifecycle (keep the data for 30 days for example) and similar structure (most of the same fields).一般来说,我会考虑将具有相似生命周期(例如将数据保留 30 天)和相似结构(大部分相同字段)的索引合并到一个索引中。 As long as you have a field for the app, you can filter on that and it will work just as well.只要您有一个应用程序字段,您就可以对其进行过滤,它也能正常工作。

Also, I'd strongly recommend to use ILM to get evenly sized indices rather than what happens with a daily index pattern.此外,我强烈建议使用 ILM来获取大小均匀的索引,而不是使用每日索引模式。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM