mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-31 01:35:36 +02:00
Merge branch 'develop' of github.com:pandorafms/pandorafms into develop
This commit is contained in:
commit
6d22779d92
@ -47,7 +47,8 @@ Besides the defined module macros, the following macros are available:
|
|||||||
<li>_email_tag_ : Emails associated to the module tags.</li>
|
<li>_email_tag_ : Emails associated to the module tags.</li>
|
||||||
<li>_phone_tag_ : Phone numbers associated to the module tags.</li>
|
<li>_phone_tag_ : Phone numbers associated to the module tags.</li>
|
||||||
<li>_moduletags_ : URLs associated to the module tags.</li>
|
<li>_moduletags_ : URLs associated to the module tags.</li>
|
||||||
|
<li>_alert_critical_instructions_: Instructions for CRITICAL status, as contained in module.</li>
|
||||||
|
<li>_alert_warning_instructions_: Instrucciones for WARNING status, as contained in module.</li>
|
||||||
</ul>
|
</ul>
|
||||||
<p>
|
<p>
|
||||||
</p>
|
</p>
|
||||||
|
@ -41,15 +41,18 @@ Además de las macros de módulo definidas, las siguientes macros están disponi
|
|||||||
<li>_interval_ : Intervalo de la ejecución del módulo. </li>
|
<li>_interval_ : Intervalo de la ejecución del módulo. </li>
|
||||||
<li>_target_ip_ : Dirección IP del objetivo del módulo.</li>
|
<li>_target_ip_ : Dirección IP del objetivo del módulo.</li>
|
||||||
<li>_target_port_ : Puerto del objetivo del módulo.</li>
|
<li>_target_port_ : Puerto del objetivo del módulo.</li>
|
||||||
<li>_plugin_parameters_ : Parámetros del Plug-in del módulo.</li>
|
|
||||||
<li>_groupcontact_ : Información de contacto del grupo. Se configura al crear el grupo.</li>
|
<li>_groupcontact_ : Información de contacto del grupo. Se configura al crear el grupo.</li>
|
||||||
<li>_groupother_ : Otra información sobre el grupo. Se configura al crear el grupo.</li>
|
<li>_groupother_ : Otra información sobre el grupo. Se configura al crear el grupo.</li>
|
||||||
<li>_name_tag_ : Nombre de los tags asociados al módulo.</li>
|
<li>_name_tag_ : Nombre de los tags asociados al módulo.</li>
|
||||||
<li>_email_tag_ : Emails asociados a los tags de módulos.</li>
|
<li>_email_tag_ : Emails asociados a los tags de módulos.</li>
|
||||||
<li>_phone_tag_ : Teléfonos asociados a los tags de módulos.</li>
|
<li>_phone_tag_ : Teléfonos asociados a los tags de módulos.</li>
|
||||||
<li>_moduletags_ : Teléfonos asociados a los tags de módulos.</li>
|
<li>_moduletags_ : Teléfonos asociados a los tags de módulos.</li>
|
||||||
|
<li>_plugin_param1_ - _plugin_param10_ (podria ser mas): El valor de campo de los parametros de plug-in correspondiente.</li>
|
||||||
|
<li>i_plugin_param1_desc_ - _plugin_param10_desc_ (podria ser mas): La descripcion del campo de los parametros de plug-in correspondiente.</li>
|
||||||
|
<li>_alert_critical_instructions_: Instrucciones contenidas en el módulo para un estado CRITICAL.</li>
|
||||||
|
<li>_alert_warning_instructions_: Instrucciones contenidas en el módulo para un estado WARNING.</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
Ejemplo: Error en el agente _agent_: _alert_description_
|
Ejemplo: Error en el agente _agent_: _alert_description_
|
||||||
</p>
|
</p>
|
||||||
|
@ -208,24 +208,24 @@ sub data_consumer ($$) {
|
|||||||
# Agent and module macros
|
# Agent and module macros
|
||||||
my %macros = (_agent_ => (defined ($agent)) ? $agent->{'nombre'} : '',
|
my %macros = (_agent_ => (defined ($agent)) ? $agent->{'nombre'} : '',
|
||||||
_agentdescription_ => (defined ($agent)) ? $agent->{'comentarios'} : '',
|
_agentdescription_ => (defined ($agent)) ? $agent->{'comentarios'} : '',
|
||||||
_agentstatus_ => (defined ($agent)) ? get_agent_status ($pa_config, $dbh, $agent->{'id_agente'}) : '',
|
_agentstatus_ => undef,
|
||||||
_address_ => (defined ($agent)) ? $agent->{'direccion'} : '',
|
_address_ => (defined ($agent)) ? $agent->{'direccion'} : '',
|
||||||
_module_ => (defined ($module)) ? $module->{'nombre'} : '',
|
_module_ => (defined ($module)) ? $module->{'nombre'} : '',
|
||||||
_modulegroup_ => (defined ($module)) ? (get_module_group_name ($dbh, $module->{'id_module_group'}) || '') : '',
|
_modulegroup_ => undef,
|
||||||
_moduledescription_ => (defined ($module)) ? $module->{'descripcion'} : '',
|
_moduledescription_ => (defined ($module)) ? $module->{'descripcion'} : '',
|
||||||
_modulestatus_ => (defined ($module)) ? get_agentmodule_status($pa_config, $dbh, $module->{'id_agente_modulo'}) : '',
|
_modulestatus_ => undef,
|
||||||
_moduletags_ => (defined ($module)) ? pandora_get_module_url_tags ($pa_config, $dbh, $module->{'id_agente_modulo'}) : '',
|
_moduletags_ => undef,
|
||||||
_id_agent_ => (defined ($module)) ? $module->{'id_agente'} : '',
|
_id_agent_ => (defined ($module)) ? $module->{'id_agente'} : '',
|
||||||
_interval_ => (defined ($module) && $module->{'module_interval'} != 0) ? $module->{'module_interval'} : (defined ($agent)) ? $agent->{'intervalo'} : '',
|
_interval_ => (defined ($module) && $module->{'module_interval'} != 0) ? $module->{'module_interval'} : (defined ($agent)) ? $agent->{'intervalo'} : '',
|
||||||
_target_ip_ => (defined ($module)) ? $module->{'ip_target'} : '',
|
_target_ip_ => (defined ($module)) ? $module->{'ip_target'} : '',
|
||||||
_target_port_ => (defined ($module)) ? $module->{'tcp_port'} : '',
|
_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'} : '',
|
_plugin_parameters_ => (defined ($module)) ? $module->{'plugin_parameter'} : '',
|
||||||
_email_tag_ => (defined ($module)) ? pandora_get_module_email_tags ($pa_config, $dbh, $module->{'id_agente_modulo'}) : '',
|
_email_tag_ => undef,
|
||||||
_phone_tag_ => (defined ($module)) ? pandora_get_module_phone_tags ($pa_config, $dbh, $module->{'id_agente_modulo'}) : '',
|
_phone_tag_ => undef,
|
||||||
_name_tag_ => (defined ($module)) ? pandora_get_module_tags ($pa_config, $dbh, $module->{'id_agente_modulo'}) : '',
|
_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 something went wrong with macros, we log it
|
||||||
if ($@) {
|
if ($@) {
|
||||||
|
@ -141,8 +141,7 @@ sub data_consumer ($$) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# Call nmap
|
# Call nmap
|
||||||
my $timeout = $pa_config->{'networktimeout'}*1000;
|
my $nmap_args = '-nsP -PE --max-retries '.$pa_config->{'icmp_checks'}.' --host-timeout '.$pa_config->{'networktimeout'}.'s -T'.$pa_config->{'recon_timing_template'};
|
||||||
my $nmap_args = '-nsP -PE --max-retries '.$pa_config->{'icmp_checks'}.' --host-timeout '.$timeout.' -T'.$pa_config->{'recon_timing_template'};
|
|
||||||
my $np = new PandoraFMS::NmapParser;
|
my $np = new PandoraFMS::NmapParser;
|
||||||
eval {
|
eval {
|
||||||
$np->parsescan($pa_config->{'nmap'}, $nmap_args, ($task->{'subnet'}));
|
$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) = @_;
|
my ($pa_config, $host, $dbh, $group, $max_depth, $resolve, $os_detect) = @_;
|
||||||
|
|
||||||
# Call nmap
|
# Call nmap
|
||||||
my $timeout = $pa_config->{'networktimeout'}*1000;
|
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 $nmap_args = '-nsP -PE --traceroute --max-retries '.$pa_config->{'icmp_checks'}.' --host-timeout '.$timeout.' -T'.$pa_config->{'nmap_timing_template'};
|
|
||||||
my $np = new PandoraFMS::NmapParser;
|
my $np = new PandoraFMS::NmapParser;
|
||||||
eval {
|
eval {
|
||||||
$np->parsescan($pa_config->{'nmap'}, $nmap_args, ($host));
|
$np->parsescan($pa_config->{'nmap'}, $nmap_args, ($host));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user