我使用运行时检测工具Falco分析容器行为至少40秒,使用检测新生成和执行的进程的过滤器存储包含检测到的事件的事件文件art /opt/falco-incluent.txt。我尝试将输出结果格式化为timestamp,uid,user-name,processName,每行一个
我创建了yaml文件audit.yaml
apiVersion: audit.k8s.io/v1
kind: Policy
rules:
- level: Metadata
namespace: ""
verb: ""
resources:
- group: ""
resource: ""
- name: audit
hostPath:
path: /etc/kubernetes/audit.yaml
type: File
- name: audit-log
hostPath:
path: /var/log/all-resources.log
type: FileOrCreate
- mountPath: /etc/kubernetes/audit.yaml
name: audit
readOnly: true
- mountPath: /var/log/all-resources.log
name: audit-log
readOnly: false我编辑了kube-apiserver,添加了以下3行
- --audit-policy-file=/etc/kubernetes/audit.yaml
- --audit-log-path=/var/log/all-resources.log
- --audit-log-maxage=1 主要的问题是:如何以及在哪里定义期望的输出,应该是这样的?
时间戳、uid、用户名、processName
时间戳、uid、用户名、processName
……
发布于 2021-07-04 12:11:11
自定义规则应该在文件etc/falco/falco_rules_local.yaml中定义。请检查etc/falco/falco_rules.yaml中已存在的规则,并使用相同的格式定义新规则。
https://stackoverflow.com/questions/67395704
复制相似问题