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

日志量分label统计及告警 #15

Open
hanyidreamer opened this issue Feb 7, 2021 · 8 comments
Open

日志量分label统计及告警 #15

hanyidreamer opened this issue Feb 7, 2021 · 8 comments
Labels
question Further information is requested

Comments

@hanyidreamer
Copy link

loki有按标签进行日志量(存储大小)统计接口,你们这边有实现吗?
另外基于日志使用量告警有没有什么方案?

@chenshunliang
Copy link
Contributor

  1. 日志量存储大小的统计目前还没有接入,目前dagger的功能侧重点是日志的快捷查询与告警。
  2. 日志使用量告警个人觉得可以用单独的指标通过prometheus去做告警,loki中的日志告警更倾向于对日志体的分析做告警。
    @hanyidreamer 如果有好的想法也可以一起交流

@chenshunliang chenshunliang added the question Further information is requested label Feb 7, 2021
@hanyidreamer
Copy link
Author

@chenshunliang 感谢解答,目前也是还在调研这块,有交流群吗,希望能一起交流交流。

@hanyidreamer
Copy link
Author

hanyidreamer commented Feb 7, 2021

@chenshunliang 我想按照某个标签区分租户,按租户统计日志使用存储容量,基于租户存储容量实现监控告警,以便监督和优化日志量大问题。

@chenshunliang
Copy link
Contributor

@chenshunliang 感谢解答,目前也是还在调研这块,有交流群吗,希望能一起交流交流。

项目说明底下有二维码入群

@chenshunliang
Copy link
Contributor

@chenshunliang 我想按照某个标签区分租户,按租户统计日志使用存储容量,基于租户存储容量实现监控告警,以便监督和优化日志量大问题。

loki 本身支持多租户,另外我昨天查看了一下loki api,并没有发现按标签进行日志量统计的接口,不知你指的是否是query_range中的store字段?

@hanyidreamer
Copy link
Author

@chenshunliang 那个store字段我昨天看了下,但是好像不太对,因为大范围查比小范围数据小,api好像说是这次查询处理的数据

@chenshunliang
Copy link
Contributor

@chenshunliang 那个store字段我昨天看了下,但是好像不太对,因为大范围查比小范围数据小,api好像说是这次查询处理的数据

而且日志存储保存时间也是可以设定的,所以个人觉得统计日志存储意义不大,应该规范日志采集,制定日志采集标准比较好

@LinkMaq
Copy link
Contributor

LinkMaq commented Feb 23, 2021

@chenshunliang 我想按照某个标签区分租户,按租户统计日志使用存储容量,基于租户存储容量实现监控告警,以便监督和优化日志量大问题。

Loki的metrics指标也许可以实现你的需求,我大概看了下这些指标是可以按照租户id来group的
loki_distributor_bytes_received_total
loki_distributor_lines_received_total
loki_ingester_chunk_stored_bytes_total

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants