diff --git a/pandora_console/include/help/en/help_alert_macros.php b/pandora_console/include/help/en/help_alert_macros.php index 9eda06fb2d..10654b163b 100644 --- a/pandora_console/include/help/en/help_alert_macros.php +++ b/pandora_console/include/help/en/help_alert_macros.php @@ -47,7 +47,8 @@ Besides the defined module macros, the following macros are available:
diff --git a/pandora_console/include/help/es/help_alert_macros.php b/pandora_console/include/help/es/help_alert_macros.php index 8b26d4479c..04cc8b52f5 100644 --- a/pandora_console/include/help/es/help_alert_macros.php +++ b/pandora_console/include/help/es/help_alert_macros.php @@ -41,15 +41,18 @@ Además de las macros de módulo definidas, las siguientes macros están disponi
Ejemplo: Error en el agente _agent_: _alert_description_
diff --git a/pandora_server/lib/PandoraFMS/PluginServer.pm b/pandora_server/lib/PandoraFMS/PluginServer.pm index b4f596b230..0982143635 100644 --- a/pandora_server/lib/PandoraFMS/PluginServer.pm +++ b/pandora_server/lib/PandoraFMS/PluginServer.pm @@ -208,24 +208,24 @@ sub data_consumer ($$) { # Agent and module macros my %macros = (_agent_ => (defined ($agent)) ? $agent->{'nombre'} : '', _agentdescription_ => (defined ($agent)) ? $agent->{'comentarios'} : '', - _agentstatus_ => (defined ($agent)) ? get_agent_status ($pa_config, $dbh, $agent->{'id_agente'}) : '', + _agentstatus_ => undef, _address_ => (defined ($agent)) ? $agent->{'direccion'} : '', _module_ => (defined ($module)) ? $module->{'nombre'} : '', - _modulegroup_ => (defined ($module)) ? (get_module_group_name ($dbh, $module->{'id_module_group'}) || '') : '', + _modulegroup_ => undef, _moduledescription_ => (defined ($module)) ? $module->{'descripcion'} : '', - _modulestatus_ => (defined ($module)) ? get_agentmodule_status($pa_config, $dbh, $module->{'id_agente_modulo'}) : '', - _moduletags_ => (defined ($module)) ? pandora_get_module_url_tags ($pa_config, $dbh, $module->{'id_agente_modulo'}) : '', + _modulestatus_ => undef, + _moduletags_ => undef, _id_agent_ => (defined ($module)) ? $module->{'id_agente'} : '', _interval_ => (defined ($module) && $module->{'module_interval'} != 0) ? $module->{'module_interval'} : (defined ($agent)) ? $agent->{'intervalo'} : '', _target_ip_ => (defined ($module)) ? $module->{'ip_target'} : '', _target_port_ => (defined ($module)) ? $module->{'tcp_port'} : '', - _policy_ => (defined ($module)) ? enterprise_hook('get_policy_name', [$dbh, $module->{'id_policy_module'}]) : '', + _policy_ => undef, _plugin_parameters_ => (defined ($module)) ? $module->{'plugin_parameter'} : '', - _email_tag_ => (defined ($module)) ? pandora_get_module_email_tags ($pa_config, $dbh, $module->{'id_agente_modulo'}) : '', - _phone_tag_ => (defined ($module)) ? pandora_get_module_phone_tags ($pa_config, $dbh, $module->{'id_agente_modulo'}) : '', - _name_tag_ => (defined ($module)) ? pandora_get_module_tags ($pa_config, $dbh, $module->{'id_agente_modulo'}) : '', + _email_tag_ => undef, + _phone_tag_ => undef, + _name_tag_ => undef, ); - $parameters = subst_alert_macros ($parameters, \%macros); + $parameters = subst_alert_macros ($parameters, \%macros, $pa_config, $dbh, $agent, $module); # If something went wrong with macros, we log it if ($@) { diff --git a/pandora_server/lib/PandoraFMS/ReconServer.pm b/pandora_server/lib/PandoraFMS/ReconServer.pm index 2f19df0453..d0d06e82bf 100644 --- a/pandora_server/lib/PandoraFMS/ReconServer.pm +++ b/pandora_server/lib/PandoraFMS/ReconServer.pm @@ -141,8 +141,7 @@ sub data_consumer ($$) { } # Call nmap - my $timeout = $pa_config->{'networktimeout'}*1000; - my $nmap_args = '-nsP -PE --max-retries '.$pa_config->{'icmp_checks'}.' --host-timeout '.$timeout.' -T'.$pa_config->{'recon_timing_template'}; + my $nmap_args = '-nsP -PE --max-retries '.$pa_config->{'icmp_checks'}.' --host-timeout '.$pa_config->{'networktimeout'}.'s -T'.$pa_config->{'recon_timing_template'}; my $np = new PandoraFMS::NmapParser; eval { $np->parsescan($pa_config->{'nmap'}, $nmap_args, ($task->{'subnet'})); @@ -327,8 +326,7 @@ sub get_host_parent { my ($pa_config, $host, $dbh, $group, $max_depth, $resolve, $os_detect) = @_; # Call nmap - my $timeout = $pa_config->{'networktimeout'}*1000; - my $nmap_args = '-nsP -PE --traceroute --max-retries '.$pa_config->{'icmp_checks'}.' --host-timeout '.$timeout.' -T'.$pa_config->{'nmap_timing_template'}; + my $nmap_args = '-nsP -PE --traceroute --max-retries '.$pa_config->{'icmp_checks'}.' --host-timeout '.$pa_config->{'networktimeout'}.'s -T'.$pa_config->{'nmap_timing_template'}; my $np = new PandoraFMS::NmapParser; eval { $np->parsescan($pa_config->{'nmap'}, $nmap_args, ($host));