diff --git a/pandora_server/lib/PandoraFMS/Core.pm b/pandora_server/lib/PandoraFMS/Core.pm index ee005b0622..21a84956eb 100644 --- a/pandora_server/lib/PandoraFMS/Core.pm +++ b/pandora_server/lib/PandoraFMS/Core.pm @@ -3430,7 +3430,7 @@ sub pandora_event ($$$$$$$$$$;$$$$$$$$$$$) { $id_agentmodule = 0 unless defined ($id_agentmodule); if($comment ne '') { - my @comment_data = ({ comment => $comment, action => "Added comment", id_user => "an alert", utimestamp => $utimestamp}); + my @comment_data = ({ comment => $comment, action => "Added comment", id_user => $user_name, utimestamp => $utimestamp}); $comment = encode_json \@comment_data; } diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index 133f4da481..f641c64240 100755 --- a/pandora_server/util/pandora_manage.pl +++ b/pandora_server/util/pandora_manage.pl @@ -194,7 +194,7 @@ sub help_screen{ help_screen_line('--disable_double_auth', '', 'Disable the double authentication for the specified user'); help_screen_line('--meta_synch_user', " [ \n\t ]", 'Synchronize metaconsole users'); print "\nEVENTS:\n\n" unless $param ne ''; - help_screen_line('--create_event', " [ \n\t \n\t \n\t ]", 'Add event'); + help_screen_line('--create_event', " [ \n\t \n\t \n\t ]", 'Add event'); help_screen_line('--validate_event', " \n\t []", 'Validate events'); help_screen_line('--validate_event_id', '', 'Validate event given a event id'); help_screen_line('--get_event_info', '[]', 'Show info about a event given a event id'); @@ -4089,7 +4089,7 @@ sub cli_create_event() { print_log "[INFO] Adding event '$event' for agent '$agent_name' \n\n"; # Base64 encode custom data - $custom_data = encode_base64 ($custom_data); + $custom_data = encode_base64 ($custom_data, ''); pandora_event ($conf, $event, $id_group, $id_agent, $severity, $id_alert_agent_module, $id_agentmodule, $event_type, $event_status, $dbh, $source, $user_name, $comment, $id_extra, $tags, $c_instructions, $w_instructions, $u_instructions, $custom_data); @@ -4139,7 +4139,7 @@ sub cli_create_event() { print_log "[INFO] Adding event '$event' for agent '$agent_name' \n\n"; # Base64 encode custom data - $custom_data = encode_base64 ($custom_data); + $custom_data = encode_base64 ($custom_data, ''); pandora_event ($conf, $event, $id_group, $id_agent, $severity, $id_alert_agent_module, $id_agentmodule, $event_type, $event_status, $dbh, $source, $user_name, $comment, $id_extra, $tags, $c_instructions, $w_instructions, $u_instructions, $custom_data);