diff --git a/pandora_server/ChangeLog b/pandora_server/ChangeLog index 7e6a50621d..1828c644a8 100644 --- a/pandora_server/ChangeLog +++ b/pandora_server/ChangeLog @@ -1,3 +1,8 @@ +2012-08-16 Vanessa Gil + + * util/recon_scripts/snmpdevices.pl: Added several communities + to recon scripts. + 2012-08-10 Miguel de Dios * lib/PandoraFMS/PredictionServer.pm: changed for the SLA service diff --git a/pandora_server/util/recon_scripts/snmpdevices.pl b/pandora_server/util/recon_scripts/snmpdevices.pl index e3ace43657..42bca49a3f 100755 --- a/pandora_server/util/recon_scripts/snmpdevices.pl +++ b/pandora_server/util/recon_scripts/snmpdevices.pl @@ -205,11 +205,21 @@ for (my $i = 1; $net_addr <= $net_addr->broadcast; $i++, $net_addr++) { $resp = ""; - # Obtain SNMP response - $resp = get_snmp_response ($target_timeout, $target_community, $addr); + my @community_list = split (",", $target_community); + my $community_validate = 0; + my $community; + + foreach $community (@community_list) { + $resp = get_snmp_response ($target_timeout, $community, $addr); + + if ($resp ne "") { + $community_validate = 1; + $target_community = $community; + last; + } + } - # No valid SNMP response. - if ($resp eq ""){ + if ($community_validate eq 0) { next; }