ethfoo
ethfoo
预计在q2支持。 当前可以通过kafka中转到ck。
> 请问一下,什么时候可以支持sink到ClickHouse呢 排期在下半年,可以考虑发到Kafka然后转到CK
这里有一个PR: https://github.com/loggie-io/loggie/pull/523 但是不确定是否稳定,暂时还没合入,毕竟openObserve也是在快速的开发迭代种,你可以试一下提供一下反馈。
Do you calling the /api/v1/help/log API? > github.com/loggie-io/loggie/pkg/ops/helper.(*Helper).helperLogCollectionHandler(0xc000c2a0d8, {0x3118fa0, 0xc01071c620}, 0xc00d8d6b00) Have you ever calling the `/api/v1/help/log` API?
> So the func `ExportWatchMetric` is called when the `/api/v1/help/log` API is invoked ? This should be the cause of the exception.
请参考一下排障文档:https://loggie-io.github.io/docs/user-guide/troubleshot/log-collection/ 我猜是你的挂载路径/app没有挂载到loggie volume里导致的。
> 使用[无需挂载volume的容器日志采集](https://loggie-io.github.io/docs/user-guide/use-in-kubernetes/collect-container-logs/#volume) 也需要挂载么? 一般不需要。除非部署docker的时候修改了默认docker rootfs的路径。
> > > 使用[无需挂载volume的容器日志采集](https://loggie-io.github.io/docs/user-guide/use-in-kubernetes/collect-container-logs/#volume) 也需要挂载么? > > > > > > 一般不需要。除非部署docker的时候修改了默认docker rootfs的路径。 > > 如果是 containerd 呢?还需要设置 rootfs 吗? containerd 配置的无挂载的方式,好像没发直接采集。 排查一下Loggie容器里能否访问到 /proc//root,参考:https://github.com/loggie-io/loggie/issues/208
问题原因: file sink是写buffer,当达到一定大小或者超时时间后,才会flush真正写入到磁盘中。
可优化点: 1. 将https://github.com/loggie-io/loggie/blob/main/pkg/sink/file/writer.go#L28 中的默认参数暴露,可通过调整小buffer大小或者超时时间,可以减少这种异常场景的日志丢失 2. 由于当前file sink考虑到性能原因,是异步写入后,即commit,此时是否可以优化成flush后,才会commit写入offset(预计需要优化当前核心代码框架逻辑,支持异步的方式)