Fix some error about fluentd config file (#9528)
1.Fix error about source path is not equal to autdit-log-path 2.Fix error about filter type set Signed-off-by: pengdake <19921207pq@gmail.com>
This commit is contained in:
@@ -215,7 +215,7 @@ In this example, we will use fluentd to split audit events by different namespac
|
|||||||
<source>
|
<source>
|
||||||
@type tail
|
@type tail
|
||||||
# audit log path of kube-apiserver
|
# audit log path of kube-apiserver
|
||||||
path /var/log/audit
|
path /var/log/kube-audit
|
||||||
pos_file /var/log/audit.pos
|
pos_file /var/log/audit.pos
|
||||||
format json
|
format json
|
||||||
time_key time
|
time_key time
|
||||||
@@ -225,10 +225,10 @@ In this example, we will use fluentd to split audit events by different namespac
|
|||||||
|
|
||||||
<filter audit>
|
<filter audit>
|
||||||
#https://github.com/fluent/fluent-plugin-rewrite-tag-filter/issues/13
|
#https://github.com/fluent/fluent-plugin-rewrite-tag-filter/issues/13
|
||||||
type record_transformer
|
@type record_transformer
|
||||||
enable_ruby
|
enable_ruby
|
||||||
<record>
|
<record>
|
||||||
namespace ${record["objectRef"].nil? ? "none":(record["objectRef"]["namespace"].nil? ? "none":record["objectRef"]["namespace"])}
|
namespace ${record["objectRef"].nil? ? "none":(record["objectRef"]["namespace"].nil? ? "none":record["objectRef"]["namespace"])}
|
||||||
</record>
|
</record>
|
||||||
</filter>
|
</filter>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user