diff --git a/pandora_server/lib/PandoraFMS/Core.pm b/pandora_server/lib/PandoraFMS/Core.pm index 1dbc67e46f..6c70fde7c4 100644 --- a/pandora_server/lib/PandoraFMS/Core.pm +++ b/pandora_server/lib/PandoraFMS/Core.pm @@ -4225,7 +4225,13 @@ sub pandora_evaluate_snmp_alerts ($$$$$$$$$) { my $trap_rcv_full = $trap_oid . " " . $trap_value. " ". $trap_type. " " . $trap_custom_oid; + # Additional execution information for the console. + my $custom_data = { + 'actions' => [], + }; + pandora_execute_action ($pa_config, $trap_rcv_full, \%agent, \%alert, 1, $action, undef, $dbh, $timestamp, \%macros) if (defined ($action)); + push(@{$custom_data->{'actions'}}, safe_output($action->{'name'})); # Generate an event, ONLY if our alert action is different from generate an event. if ($action->{'id_alert_command'} != 3 && $alert->{'disable_event'} == 0){ @@ -4287,11 +4293,30 @@ sub pandora_evaluate_snmp_alerts ($$$$$$$$$) { ); pandora_execute_action ($pa_config, $trap_rcv_full, \%agent, \%alert_action, 1, $other_action, undef, $dbh, $timestamp, \%macros) if (defined ($other_action)); + push(@{$custom_data->{'actions'}}, safe_output($other_action->{'name'})); # Generate an event, ONLY if our alert action is different from generate an event. if ($other_action->{'id_alert_command'} != 3 && $alert->{'disable_event'} == 0){ - pandora_event ($pa_config, "SNMP alert fired (" . safe_output($alert->{'description'}) . ")", - 0, 0, $alert->{'priority'}, 0, 0, 'alert_fired', 0, $dbh); + pandora_event ( + $pa_config, + "SNMP alert fired (" . safe_output($alert->{'description'}) . ")", + 0, + 0, + $alert->{'priority'}, + 0, + 0, + 'alert_fired', + 0, + $dbh, + undef, + undef, + undef, + undef, + undef, + undef, + undef,, + undef, + p_encode_json($pa_config, $custom_data)); } # Update alert status