Am 23.05.11 12:13, schrieb David Comerford: > Hey guys, > > Quick one, could be simple but here goes. > Trying to use SNMP Sync with APC PDU (with IP enabled). > > Fill in the community string and submit. Recieve the following... > > *Warning*: Missing argument 3 for doPDUSNMPmining(), called in > /var/www/racktables/wwwroot/inc/snmp.php on line 980 and defined in * > /var/www/racktables/wwwroot/inc/snmp.php* on line *1209* > *Notice*: Undefined variable: snmpsetup in * > /var/www/racktables/wwwroot/inc/snmp.php* on line *1213* > *Notice*: Object of class SNMPDevice to string conversion in * > /var/www/racktables/wwwroot/inc/snmp.php* on line *1306* > *Warning*: snmp3_get() > [function.snmp3-get<http://192.168.164.83/function.snmp3-get>]: > Invalid security level: in */var/www/racktables/wwwroot/inc/snmp.php* on > line *1306* > *Warning*: snmp3_get() > [function.snmp3-get<http://192.168.164.83/function.snmp3-get>]: > Invalid security level: in */var/www/racktables/wwwroot/inc/snmp.php* on > line *1306* > *Notice*: Object of class SNMPDevice to string conversion in * > /var/www/racktables/wwwroot/inc/snmp.php* on line *1306* > *Warning*: snmp3_get() > [function.snmp3-get<http://192.168.164.83/function.snmp3-get>]: > Invalid security level: in */var/www/racktables/wwwroot/inc/snmp.php* on > line *1306* > *Warning*: snmp3_get() > [function.snmp3-get<http://192.168.164.83/function.snmp3-get>]: > Invalid security level: in */var/www/racktables/wwwroot/inc/snmp.php* on > line *1306* > *Notice*: Object of class SNMPDevice to string conversion in * > /var/www/racktables/wwwroot/inc/snmp.php* on line *1306* > *Warning*: snmp3_get() > [function.snmp3-get<http://192.168.164.83/function.snmp3-get>]: > Invalid security level: in */var/www/racktables/wwwroot/inc/snmp.php* on > line *1306* > *Warning*: snmp3_get() > [function.snmp3-get<http://192.168.164.83/function.snmp3-get>]: > Invalid security level: in */var/www/racktables/wwwroot/inc/snmp.php* on > line *1306* > *Notice*: Object of class SNMPDevice to string conversion in * > /var/www/racktables/wwwroot/inc/snmp.php* on line *1306* > *Warning*: snmp3_get() > [function.snmp3-get<http://192.168.164.83/function.snmp3-get>]: > Invalid security level: in */var/www/racktables/wwwroot/inc/snmp.php* on > line *1306* > *Warning*: snmp3_get() > [function.snmp3-get<http://192.168.164.83/function.snmp3-get>]: > Invalid security level: in */var/www/racktables/wwwroot/inc/snmp.php* on > line *1306* > *Fatal error*: Call to undefined method APCPowerSwitch::snmpwalk() in * > /var/www/racktables/wwwroot/inc/snmp.php* on line *1322* Same here, I tried a quick patch, but this only gives me "outlet 16" and misses the 15 before, so some more work needed. But maybe you can try this: --- /var/www/rocket.19.1/inc/snmp.php 2011-02-04 13:09:52.000000000 +0100 +++ /var/www/rocket/inc/snmp.php 2011-05-23 13:06:27.000000000 +0200 @@ -977,7 +977,7 @@ case 8: return doSwitchSNMPmining ($objectInfo, $device); case 2: - return doPDUSNMPmining ($objectInfo, $device); + return doPDUSNMPmining ($objectInfo, $endpoints[0], $snmpsetup); } } @@ -1319,8 +1319,8 @@ protected $snmpMib = 'SNMPv2-SMI::enterprises.318'; function getPorts() { - $data = $this->snmpwalk("{$this->snmpMib}.1.1.12.3.3.1.1.2"); - $status = $this->snmpwalk("{$this->snmpMib}.1.1.12.3.3.1.1.4"); + $data = $this->snmpwalkoid("{$this->snmpMib}.1.1.12.3.3.1.1.2"); + $status = $this->snmpwalkoid("{$this->snmpMib}.1.1.12.3.3.1.1.4"); $out = array(); foreach ($data as $id => $d) { $out[$id + 1] = array(trim(str_replace('STRING: ', '', $d), '"'), str_replace('INTEGER: ', '', $status[$id]));