Advertisement
Guest User

Untitled

a guest
Feb 25th, 2013
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.06 KB | None | 0 0
  1. Can't call method "bulkwalk" on unblessed reference at /usr/lib/zabbix/externalscripts/cisco_ifindex.pl line 19.
  2.  
  3.  
  4.  
  5. #!/usr/bin/perl -w
  6.  
  7. $TAGSEP = ",";
  8.  
  9. use SNMP;
  10.  
  11. die "Usage: $0 <host> <port> <community>" if ($#ARGV < 2);
  12.  
  13. $sess = new SNMP::Session(DestHost => "$ARGV[0]",
  14. Community => "$ARGV[2]",
  15. Version => "2c",
  16. RemotePort => "$ARGV[1]",
  17. UseNumeric => 1,
  18. NonIncreasing => 1,
  19. UseLongNames => 1);
  20.  
  21. die $sess->{ErrorStr} if ($sess->{ErrorNum});
  22.  
  23. ===>>> LINE 19 ($ifInOctets, $ifDescr, $ifType, $ifAdmin, $ifInErrors, $ifHCInOctets, $ifAlias) = $sess->bulkwalk(0, 500, [
  24. ['.1.3.6.1.2.1.2.2.1.10'],
  25. ['.1.3.6.1.2.1.2.2.1.2'],
  26. ['.1.3.6.1.2.1.2.2.1.3'],
  27. ['.1.3.6.1.2.1.2.2.1.7'],
  28. ['.1.3.6.1.2.1.2.2.1.14'],
  29. ['.1.3.6.1.2.1.31.1.1.1.6'],
  30. ['.1.3.6.1.2.1.31.1.1.1.18']
  31. ]);
  32.  
  33. die $sess->{ErrorStr} if ($sess->{ErrorNum});
  34.  
  35. for $i (0..$#$ifInOctets) {
  36. $json{ $$ifInOctets[$i]->iid } = {};
  37. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement