coroot 玩法简单说明
coroot 与一般基于ebpf 进行系统监控的工具不一样,coroot 将log 也放到了prometheus 中
玩法参考图
对于metrics 以及log 都是通过prometheus exporter push 到中央的prometheus 中,同时coroot 的server 做为一个prometheus 的client 直接查询metrics 数据
为了提升性能以及处理coroot 包含了cache
agent 集成
当前coroot 已经提供了几个自己开发的exporter (就是上图的agent)node-agent 是基于了ebpf 开发的(kernel 需要4.16)提供了不少功能,比如log,还有
对于主机以及应用层网络的处理,pg agent 是coroot 对于现有pg exporer 的扩展,解决了不少现有监控工具的问题
node agent 日志处理
上边也提到了对于日志的处理,node-agent 提起之后会按照日常的级别,做为一个metrics 暴露,数据为label 为Sample,之后对于dashboard 的widge 显示会使用到
参加node-agent 的metrics
coroot server 简单的处理
具体处理代码 constructor/queries.go
以及constructor/containers.go
以上存储是container_log_messages_total 但是在coroot server 中处理的是container_log_messages
对于日志解析部分,coroot 使用了logpattern 自己开发的解析包,会在agent 以及server 中集成使用
说明
coroot 对于日志也是存放在prometheus 中,prometheus 对于label 的值大小是可以限制的(默认不限制),尽管这个不是一个很好的实现,但是目前coroot 的agent
对于日志并不是都存储,而且存储的是分级之后的,并不是很多,也是一个不错的选择,至少从架构上比较简单,对于大量查询的问题,coroot 基于cache 解决此问题
参考资料
https://github.com/coroot/coroot-node-agent
https://github.com/coroot/coroot
https://github.com/prometheus/prometheus/issues/8291
https://prometheus.io/docs/prometheus/latest/configuration/configuration/
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 全程不用写代码,我用AI程序员写了一个飞机大战
· DeepSeek 开源周回顾「GitHub 热点速览」
· 记一次.NET内存居高不下排查解决与启示
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· .NET10 - 预览版1新功能体验(一)
2019-09-19 Traefik 2.0 tcp 路由试用
2018-09-19 stardog graphql 简单操作
2014-09-19 规则引擎
2014-09-19 RBAC (基于角色的访问控制)
2014-09-19 访问控制