Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

根据 命名空间+应用 实现不同的索引 #1000

Open
junlintianxiazhifulinzhongguo opened this issue Nov 23, 2023 · 2 comments
Open
Labels
enhancement New feature or request

Comments

@junlintianxiazhifulinzhongguo

Is your feature request related to a problem? Please describe.

在小企业中,如果资源不足,很多人都会在同一个k8s集群中,部署 业务的生产和测试环境,为了区分不同环境中的同一种服务日志,成了运维比较关注的问题,而 fluent-operator 目前默认是将所有日志都放到了一个 索引中,这样不利于日志分类管理

Describe the solution you'd like

我想要的功能是,fluent-operator 可以提供3中不同的日志索引生成功能

  1. 默认的所有的日志都放到一个索引中,这个可以用来给新人学习
  2. 根据不同的命名空间生成单独的索引,这个可以用在不是很大的项目,日志要求不是高的环境中
  3. 根据不同的命名空间,不同的服务,生产单独的 命名空间+服务名 的索引,这种在在日志要求高,日志量大的环境中,可以根据生产和测试环境的不同,对运维人员管理es 索引生命周期有很大的影响
  4. 第2点和第3点最好能通过 tag 标签动态的生成,这样利于导入到 kafka中时,能够通过 变量 tag 生成动态的 kafka 主题
  5. 3中模式最好能通过 配置开关打开,不用在去手动修改很多配置文件,比如在安装的时候,可以通过指定一个参数:
    indexType: allInOne [ 默认全放到一个索引中,namespace: 根据命名空间建立索引,app: 根据 命名空间+应用名(pods的 label app: 应用名) ], 这个模式可以动态更改,安装好后,如果后期有需要,可以更换模式,之前的索引数据不动,重新生成新的索引

Additional context

No response

@benjaminhuo benjaminhuo added the enhancement New feature or request label Dec 5, 2023
@buxiaomo
Copy link

@onecer
Copy link
Contributor

onecer commented Apr 17, 2024

或者参考我这个 用 lua filter 来实现 https://uublog.com/article/20230510/kubernetes-fluent-operator-dynamic-index-name/ 改改应该能实现你说的

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants