mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
add snmpv3 support to old snmp queries - patch by gl
git-svn-id: http://www.observium.org/svn/observer/trunk@3184 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
@@ -6,7 +6,7 @@ echo("Polling SNOM device...\n");
|
||||
|
||||
## FIXME - This needs a good cleanup...
|
||||
|
||||
$cmd = "snmpget -O qv -" . $device['snmpver'] . " -c " . $device['community'] . " " . $device['hostname'].":".$device['port'] . " 1.3.6.1.2.1.7526.2.4";
|
||||
$cmd = "snmpget -O qv " . snmp_gen_auth($device) . " " . $device['hostname'].":".$device['port'] . " 1.3.6.1.2.1.7526.2.4";
|
||||
$poll_device['sysDescr'] = `$cmd`;
|
||||
$poll_device['sysDescr'] = str_replace("-", " ", $poll_device['sysDescr']);
|
||||
$poll_device['sysDescr'] = str_replace("\"", "", $poll_device['sysDescr']);
|
||||
@@ -14,8 +14,8 @@ list($hardware, $features, $version) = explode(" ", $poll_device['sysDescr']);
|
||||
|
||||
// Get data for calls and network from SNOM specific SNMP OIDs.
|
||||
|
||||
$cmda = "snmpget -O qv -" . $device['snmpver'] . " -c " . $device['community'] . " " . $device['hostname'].":".$device['port'] . " 1.3.6.1.2.1.7526.2.1.1 1.3.6.1.2.1.7526.2.1.2 1.3.6.1.2.1.7526.2.2.1 1.3.6.1.2.1.7526.2.2.2";
|
||||
$cmdb = "snmpget -O qv -" . $device['snmpver'] . " -c " . $device['community'] . " " . $device['hostname'].":".$device['port'] . " 1.3.6.1.2.1.7526.2.5 1.3.6.1.2.1.7526.2.6";
|
||||
$cmda = "snmpget -O qv " . snmp_gen_auth($device) . " " . $device['hostname'].":".$device['port'] . " 1.3.6.1.2.1.7526.2.1.1 1.3.6.1.2.1.7526.2.1.2 1.3.6.1.2.1.7526.2.2.1 1.3.6.1.2.1.7526.2.2.2";
|
||||
$cmdb = "snmpget -O qv " . snmp_gen_auth($device) . " " . $device['hostname'].":".$device['port'] . " 1.3.6.1.2.1.7526.2.5 1.3.6.1.2.1.7526.2.6";
|
||||
#echo($cmda);
|
||||
$snmpdata = `$cmda`;
|
||||
$snmpdatab = `$cmdb`;
|
||||
|
||||
Reference in New Issue
Block a user