我們正在Google雲Dataproc羣集上運行Spark任務(大量Spark流)。google-fluentd:更改雲日誌記錄中的嚴重性log_level
我們正在使用雲日誌記錄來收集spark工作生成的所有日誌。 目前它正在生成大量的「INFO」消息,導致整個日誌卷大小爲幾TB。
我想編輯google-fluentd配置,將日誌級別限制爲「錯誤」級別而不是「INFO」。
試圖將配置設置爲"log_level error"
,但沒有奏效。 也是其在/etc/google-fluentd/google-fluentd.conf
在評論部分提到# Currently severity is a seperate field from the Cloud Logging log_level.
# Fluentd config to tail the hadoop, hive, and spark message log.
# Currently severity is a seperate field from the Cloud Logging log_level.
<source>
type tail
format multi_format
<pattern>
format /^((?<time>[^ ]* [^ ]*) *(?<severity>[^ ]*) *(?<class>[^ ]*): (?<message>.*))/
/etc/google-fluentd/google-fluentd.conf/etc/google-fluentd/google-fluentd.conf/etc/google-fluentd/google-fluentd.conf time_format %Y-%m-%d %H:%M:%S,%L
</pattern>
<pattern>
format none
</pattern>
path /var/log/hadoop*/*.log,/var/log/hadoop-yarn/userlogs/**/stderr,/var/log/hive/*.log,/var/log/spark/*.log,
pos_file /var/tmp/fluentd.dataproc.hadoop.pos
refresh_interval 2s
read_from_head true
tag raw.tail.*
</source>