Fix on module name

This commit is contained in:
felix.suarez 2023-10-23 11:47:58 -06:00
parent 13eb1e92f7
commit e81aadc812
3 changed files with 7 additions and 5 deletions

View File

@ -320,7 +320,7 @@ module_plugin autodiscover --default
# Logs extraction
#module_begin
#module_name Syslog
#module_description Logs extaction module
#module_description Logs extraction module
#module_type log
#module_regexp /var/log/logfile.log
#module_pattern .*

View File

@ -3975,7 +3975,7 @@ sub grep_logs {
return if load_idx(\$idx_pos, \$idx_ino, \$idx_file, \$idx_size) == 1;
my @data = parse_log(\$idx_pos, \$idx_ino, \$idx_file, \$log_file, \$module_name, \$reg_exp, \$idx_size);
my $output = create_log(@data, $module_name);
my $output = create_log($module_name, @data);
return $output;
}
@ -4089,8 +4089,10 @@ sub grep_logs {
return @data;
}
sub create_log (@) {
my (@data, $module_name) = @_;
sub create_log($$){
my ($module_name, @data) = @_;
log_message("Debug", $module_name);
log_message("Debug", join('', @data));
# No data
if ($#data < 0) {

View File

@ -533,7 +533,7 @@ module_plugin "%PROGRAMFILES%\Pandora_Agent\util\autodiscover.exe" --default
# Logs extraction
#module_begin
#module_name X_Server_log
#module_description Logs extaction module
#module_description Logs extraction module
#module_type log
#module_regexp C:\server\logs\xserver.log
#module_pattern .*