2014-06-03 Ramon Novoa <rnovoa@artica.es>

* util/recon_scripts/snmp-recon.pl: Create a ping module for agents that do
	  not respond to SNMP.



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@10093 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
Ramon Novoa 2014-06-03 13:46:38 +00:00
parent f8df96383d
commit 7185640c79
2 changed files with 17 additions and 12 deletions

View File

@ -1,3 +1,8 @@
2014-06-03 Ramon Novoa <rnovoa@artica.es>
* util/recon_scripts/snmp-recon.pl: Create a ping module for agents that do
not respond to SNMP.
2014-06-03 Junichi Satoh <junichi@rworks.jp> 2014-06-03 Junichi Satoh <junichi@rworks.jp>
* lib/PandoraFMS/Core.pm: Changed to ignore 'FF timeout' except async * lib/PandoraFMS/Core.pm: Changed to ignore 'FF timeout' except async

View File

@ -687,6 +687,18 @@ sub create_pandora_agent($) {
} }
} }
# Create a ping module.
my $module_id = get_agent_module_id($DBH, "ping", $agent_id);
if ($module_id <= 0) {
my %module = ('id_tipo_modulo' => 6,
'id_modulo' => 2,
'nombre' => "ping",
'descripcion' => '',
'id_agente' => $agent_id,
'ip_target' => $device);
pandora_create_module_from_hash (\%CONF, \%module, $DBH);
}
# Add interfaces to the agent if it responds to SNMP. # Add interfaces to the agent if it responds to SNMP.
return $agent_id unless defined($COMMUNITIES{$device}); return $agent_id unless defined($COMMUNITIES{$device});
my @output = snmp_get_value_array($device, $COMMUNITIES{$device}, $IFINDEX); my @output = snmp_get_value_array($device, $COMMUNITIES{$device}, $IFINDEX);
@ -729,18 +741,6 @@ sub create_pandora_agent($) {
pandora_create_module_from_hash (\%CONF, \%module, $DBH); pandora_create_module_from_hash (\%CONF, \%module, $DBH);
} }
# Create a ping module.
my $module_id = get_agent_module_id($DBH, "ping", $agent_id);
if ($module_id <= 0) {
my %module = ('id_tipo_modulo' => 6,
'id_modulo' => 2,
'nombre' => "ping",
'descripcion' => '',
'id_agente' => $agent_id,
'ip_target' => $device);
pandora_create_module_from_hash (\%CONF, \%module, $DBH);
}
return $agent_id; return $agent_id;
} }