问题原文
原帖链接 · Rhangaun · CC BY-SA 4.0
On a GCP Compute Engine instance, OS is Ubuntu 18.04, Stackdriver logging agent is installed.
Any idea why Stackdriver doesn't ingest auth.log by default? What would be the best way to do it?
已采纳解答
原帖链接 · Rhangaun · CC BY-SA 4.0
Ended up simply adding an additional entry in /etc/google-fluentd/config.d/syslog.conf
<source>
@type tail
# Parse the timestamp, but still collect the entire line as 'message'
format /^(?<message>(?<time>[^ ]*\s*[^ ]* [^ ]*) .*)$/
path /var/log/auth.log
pos_file /var/lib/google-fluentd/pos/auth.log.pos
read_from_head true
tag auth
</source>
摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。
