[英]Application log files to ELK
We have application deployed in K8S pod and all logs are being monitored in ELK stack.我们在 K8S pod 中部署了应用程序,并且所有日志都在 ELK 堆栈中进行监控。 Now we have one application which is using external *.jar which is writing logs in one file local to container path.
现在我们有一个使用外部 *.jar 的应用程序,它将日志写入容器路径本地的一个文件中。 How I can send this logs to kubernetes console so that it will come to elastic search monitoring.
如何将此日志发送到 kubernetes 控制台,以便将其用于弹性搜索监控。
Any help is much appreciated..任何帮助深表感谢..
Now we have one application which is using external *.jar which is writing logs in one file local to container path.
现在我们有一个使用外部 *.jar 的应用程序,它将日志写入容器路径本地的一个文件中。 How I can send this logs to kubernetes console so that it will come to elastic search monitoring.
如何将此日志发送到 kubernetes 控制台,以便将其用于弹性搜索监控。
There are three ways, in increasing order of complexity:有三种方式,按照复杂度递增的顺序:
/dev/stdout
(or /proc/1/fd/0
);/dev/stdout
(或/proc/1/fd/0
); sometimes it works and it's super cheap, but if the logging system tries to seek to the end of the file, or rotate it, or catches on that it's not actually a "file", then you'll have to try other tricks Without more specifics we can't offer more specific advice, but that's the gist of it没有更多细节,我们无法提供更具体的建议,但这就是要点
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.