diff --git a/pandora_console/include/functions_events.php b/pandora_console/include/functions_events.php index 7a337fbdab..6996157cbb 100644 --- a/pandora_console/include/functions_events.php +++ b/pandora_console/include/functions_events.php @@ -3811,7 +3811,7 @@ function events_get_response_target( if (strpos($target, '_alert_id_') !== false) { $target = str_replace( '_alert_id_', - empty($event['is_alert_am']) ? __('N/A') : $event['is_alert_am'], + empty($event['id_alert_am']) ? __('N/A') : $event['id_alert_am'], $target ); } @@ -3893,6 +3893,15 @@ function events_get_response_target( $target = str_replace('_current_user_', $config['id_user'], $target); } + // This will replace the macro with the command timeout value. + if (strpos($target, '_command_timeout_') !== false) { + $target = str_replace( + '_command_timeout_', + $event_response['command_timeout'], + $target + ); + } + return $target; } @@ -6973,7 +6982,7 @@ function events_get_field_value_by_event_id( if (strpos($value, '_group_name_') !== false) { $value = str_replace( '_group_name_', - groups_get_name($event['id_grupo'], true), + io_safe_output(groups_get_name($event['id_grupo'], true)), $value ); }