17.6.1. 将文件存储v1配置更新为V2¶
给定的文件存储配置如下:
- file-store:
enabled: yes # set to yes to enable
log-dir: files # directory to store the files
force-magic: no # force logging magic on all stored files
force-hash: [md5] # force logging of md5 checksums
force-filestore: no # force storing of all files
stream-depth: 1mb # reassemble 1mb into a stream, set to no to disable
waldo: file.waldo # waldo file to store the file_id across runs
max-open-files: 0 # how many files to keep open (O means none)
write-meta: yes # write a .meta file if set to yes
include-pid: yes # include the pid in filenames if set to yes.
要转换为v2样式配置,需要进行以下更改:
这个
version
字段必须设置为2。这个
log-dir
字段应重命名为dir
. 建议使用新目录而不是现有的v1目录。移除
waldo
选项。它不再使用。移除
write-meta
选择权。可选设置
write-fileinfo
允许沿着提取的文件写入元数据文件。并不是说默认情况下此选项作为fileinfo
事件可以写入Eve日志文件。移除
include-pid
选项。在file store v2中没有与此选项等效的选项。
转换配置示例:
- file-store:
version: 2
enabled: yes
dir: filestore
force-hash: [md5]
file-filestore: no
stream-depth: 1mb
max-open-files: 0
write-fileinfo: yes
参考 文件提取 手册的一节,以获取有关文件存储v2的文件存储目录格式的信息。