diff --git a/crates/modules/file-system-monitor/README.md b/crates/modules/file-system-monitor/README.md index 7e5ed20d..f329b81f 100644 --- a/crates/modules/file-system-monitor/README.md +++ b/crates/modules/file-system-monitor/README.md @@ -17,7 +17,7 @@ in its first bytes. |Config|Type|Description| |------|----|-----------| -|`elf_check_enabled`|boolean|Enable ELF check| +|`elf_check`|boolean|Enable ELF check| |`elf_check_whitelist`|path list|Paths ignored by ELF check| Default configuration: @@ -25,7 +25,7 @@ Default configuration: ```ini [file-system-monitor] enabled=true -elf_check_enabled=true +elf_check=true elf_check_whitelist=/proc,/sys,/dev ``` @@ -33,7 +33,7 @@ You disable this module or the ELF check with: ```sh pulsar config --set file-system-monitor.enabled=false -pulsar config --set file-system-monitor.elf_check_enabled=false +pulsar config --set file-system-monitor.elf_check=false ``` ## Testing diff --git a/crates/modules/file-system-monitor/src/lib.rs b/crates/modules/file-system-monitor/src/lib.rs index ee6efc96..29ef25d4 100644 --- a/crates/modules/file-system-monitor/src/lib.rs +++ b/crates/modules/file-system-monitor/src/lib.rs @@ -114,7 +114,7 @@ pub mod pulsar { _state: &mut Self::State, ctx: &ModuleContext, ) -> Result<(), ModuleError> { - if config.elf_check_enabled { + if config.elf_check { check_elf(ctx, &config.elf_check_whitelist, event).await; } Ok(()) @@ -171,7 +171,7 @@ pub mod pulsar { #[derive(Clone, Debug, Default)] pub struct Config { - elf_check_enabled: bool, + elf_check: bool, elf_check_whitelist: Vec, } @@ -180,7 +180,7 @@ pub mod pulsar { fn try_from(config: &ModuleConfig) -> Result { Ok(Config { - elf_check_enabled: config.with_default("elf_check_enabled", true)?, + elf_check: config.with_default("elf_check", true)?, elf_check_whitelist: config.get_list_with_default( "elf_check_whitelist", vec![