2012-08-16 Vanessa Gil <vanessa.gil@artica.es>

* util/recon_scripts/snmpdevices.pl: Added several communities
	to recon scripts.


git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6865 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
vgilc 2012-08-16 11:55:18 +00:00
parent c4d355a411
commit ca71a9ebb1
2 changed files with 19 additions and 4 deletions

View File

@ -1,3 +1,8 @@
2012-08-16 Vanessa Gil <vanessa.gil@artica.es>
* util/recon_scripts/snmpdevices.pl: Added several communities
to recon scripts.
2012-08-10 Miguel de Dios <miguel.dedios@artica.es>
* lib/PandoraFMS/PredictionServer.pm: changed for the SLA service

View File

@ -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;
}