[英]Is it possible to send logs from a ubuntu to Loki?
We are using Azure DevOps to run various pipelines, and I would like to send these logs to a Loki instance.我们正在使用 Azure DevOps 运行各种管道,我想将这些日志发送到 Loki 实例。 It is possible simply to send all STDOUT from an Ubuntu machine to Loki?是否可以简单地将所有 STDOUT 从 Ubuntu 机器发送到 Loki?
I found out that you can use the Azure DevOps REST API to download your pipeline logs.我发现您可以使用Azure DevOps REST API下载管道日志。 So we have just gone with writing a small kubernetes-cronjob that downloads the pipeline logs based on date filtering and writes them to the STD out of the container.因此,我们刚刚编写了一个小型 kubernetes-cronjob,它根据日期过滤下载管道日志并将它们从容器中写入 STD。 The logs are then picked up by promtail and passed on to loki.然后这些原木由 promtail 拾取并传递给 loki。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.