跳转到内容
View in the app

A better way to browse. Learn more.

彼岸论坛

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.
欢迎抵达彼岸 彼岸花开 此处谁在 -彼岸论坛

[科技] [日志] 关于日志查询系统选项的几个疑问, ES 系 与 Loki 系。

发表于

最近要给公司搭建日志查询系统。几点疑问请教各位。

  1. 日志查询系统里的数据一般存放多久的日志?我们的日志有原始备份在 s3 上,查询系统上的数据是不是就可以定期删除掉了?

  2. Loki 动态标签问题。Loki 不推荐动态标签,其理由是影响性能、增加索引体积。但是我怎么感觉少了动态标签,查询就很鸡肋。下面是我的想法,不知道符不符合实践经验,望指正!想法:

    a. 分布式系统,少不了要用 reqeustId 去链接起一个请求经过不同服务产生的日志。

    b. 不同的子业务,会有不同重要的数据 ID 。比如,一个订单系统的请求,打印出来的每一条日志,至少都要带上订单 ID 吧?这类数据 ID 也是动态标签。

    c. 如果这些动态数据都不用 labels ,而是用正则匹配 log 内容查询。个人直觉告诉我,这个有点鸡肋。

  3. 如果用 Loki 索引动态标签。数据量大的时候,性能会不会比 ES 拉跨?

两个种服务都在本地实验性的搭建起来过。

Kibana 确实感觉有点吃性能,web 页面还偶尔会有点卡卡的,功能很多眼花缭乱(不过这个可以选择使用,逐步深入),但是查询的功能确实更强大。

Loki 真的很轻量就是不知道这动态标签用起来之后,会不会卡。不过查询真的差点意思。

相关文章:

V2: 最近我安装了 Loki + Promtail + Grafana ,感觉这一组合可以取代 Elasticsearch + Logstash

V2: Grafana Loki 开源日志聚合系统代替 ELK 或 EFK

掘金:Loki 最佳实践(译)

Featured Replies

No posts to show

创建帐户或登录来提出意见

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.