我正在使用温斯顿js将我的nodejs日志写入一个文件,并将它们存储在GKE上我的主机节点的/tmp/logs卷上。现在,我试图添加EFK堆栈来存储它们并将它们可视化,但我的问题是,我对整个日志记录过程并不熟悉,而且我在理解them的配置方面也面临困难。我尝试在本教程的帮助下在本地集群上配置堆栈,并可视化了容器的stdout和stderr日志,但是我的温斯顿文件的日志没有显示出来。
为此:
*.log文件下的/tmp/logs文件?注: GCP过去有弹性gke登录在市场上,我想尝试,但它已经不在那里了。
发布于 2022-02-10 12:33:50
可以在ConfigMap中输入fluentd,例如:
apiVersion: v1
kind: ConfigMap
metadata:
name: fluentd-config
data:
fluentd.conf: |
<source>
type tail
format none
path /tmp/logs/1.log
pos_file /tmp/logs/1.log.pos
tag count.format1
</source>
<source>
type tail
format none
path /tmp/logs/2.log
pos_file /tmp/logs/2.log.pos
tag count.format2
</source>
<match **>
type google_cloud
</match> https://stackoverflow.com/questions/71062656
复制相似问题