2013-05-13 Ramon Novoa <rnovoa@artica.es>

* lib/PandoraFMS/Tools.pm: Merged from 4.0 branch. Directly call
	  snmptranslate, since SNMP::translateObj does not seem to load
	  enterprise MIBs.



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@8123 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
ramonn 2013-05-13 10:29:03 +00:00
parent 04dfc6736b
commit c5de827411
2 changed files with 12 additions and 8 deletions

View File

@ -1,3 +1,9 @@
2013-05-13 Ramon Novoa <rnovoa@artica.es>
* lib/PandoraFMS/Tools.pm: Merged from 4.0 branch. Directly call
snmptranslate, since SNMP::translateObj does not seem to load
enterprise MIBs.
2013-05-13 Sancho Lerena <slerena@artica.es>
* lib/PandoraFMS/Core.pm: Fixes crash on inverse resolution for

View File

@ -984,15 +984,13 @@ sub month_have_days($$) {
sub translate_obj ($$) {
my ($dbh, $obj) = @_;
# SNMP is not thread safe
if (defined ($SNMPSem)) {
$SNMPSem->down ();
# Translate!
my $oid = `snmptranslate -On -mALL $obj 2>/dev/null`;
if ($? != 0) {
return undef;
}
my $oid = SNMP::translateObj ($obj);
if (defined ($SNMPSem)) {
$SNMPSem->up ();
}
chomp($oid);
return $oid;
}