2010-12-07 Sergio Martin <sergio.martin@artica.es>

* util/recon_scripts/snmpdevices.pl: Fixed the snmp recon script 
	example to recognize the not consecutive interfaces



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@3654 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
zarzuelo 2010-12-07 16:43:11 +00:00
parent 7e5eeba045
commit 4d900fe2d3
2 changed files with 11 additions and 6 deletions

View File

@ -1,3 +1,8 @@
2010-12-07 Sergio Martin <sergio.martin@artica.es>
* util/recon_scripts/snmpdevices.pl: Fixed the snmp recon script
example to recognize the not consecutive interfaces
2010-12-02 Dario Rodriguez <dario.rodriguez@artica.es>
* lib/PandoraFMS/ReconServer.pm: Fixed a bug with recon server.

View File

@ -27,7 +27,7 @@ my $target_interval = 600;
##########################################################################
# Code begins here, do not touch
##########################################################################
my $pandora_conf = "/etc/pandora/pandora_server.conf";
my $pandora_conf = "/etc/pandora/pandora_server.conf.2010-11-11";
my $task_id = $ARGV[0]; # Passed automatically by the server
my $target_group = $ARGV[1]; # Defined by user
my $create_incident = $ARGV[2]; # Defined by user
@ -252,13 +252,13 @@ for (my $i = 1, $net_addr++; $net_addr < $net_addr->broadcast; $i++, $net_addr++
process_module_snmp ($dbh, $target_community, $addr, ".1.3.6.1.2.1.4.10.0", "", "Local OutRequests", "remote_snmp_inc", "System local outgoing traffic (bytes)", $conf);
# Process interface list
# Get interface limit
my $interface_limit = `/usr/bin/snmpget -v 1 -r0 -t$target_timeout -OUevqt -c '$target_community' $addr .1.3.6.1.2.1.2.1.0 2>/dev/null`;
# Get interface indexes
my $interface_indexes = `/usr/bin/snmpwalk -Ouvq -c '$target_community' -v 1 $addr ifIndex>/dev/null`;
my @ids = split("\n", $interface_indexes);
for ($ax = 1; $ax<$interface_limit; $ax++){
foreach my $ax (@ids) {
my $interface = `/usr/bin/snmpget -v 1 -r0 -t$target_timeout -OUevqt -c '$target_community' $addr RFC1213-MIB::ifDescr.$ax 2>/dev/null`;