2013-07-16 Ramon Novoa <rnovoa@artica.es>
* include/functions_snmp_browser.php: Use version 2c by default. Some OIDs may not be available for version 1 queries. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@8531 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
b0db2b309a
commit
38258fc362
|
@ -1,3 +1,8 @@
|
||||||
|
2013-07-16 Ramon Novoa <rnovoa@artica.es>
|
||||||
|
|
||||||
|
* include/functions_snmp_browser.php: Use version 2c by default. Some
|
||||||
|
OIDs may not be available for version 1 queries.
|
||||||
|
|
||||||
2013-07-16 Sergio Martin <sergio.martin@artica.es>
|
2013-07-16 Sergio Martin <sergio.martin@artica.es>
|
||||||
|
|
||||||
* godmode/massive/massive_delete_alerts.php: Fixed an
|
* godmode/massive/massive_delete_alerts.php: Fixed an
|
||||||
|
|
|
@ -163,7 +163,7 @@ function snmp_browser_get_tree ($target_ip, $community, $starting_oid = '.') {
|
||||||
$snmpwalk_bin = $config['snmpwalk'];
|
$snmpwalk_bin = $config['snmpwalk'];
|
||||||
}
|
}
|
||||||
$oid_tree = array('__LEAVES__' => array());
|
$oid_tree = array('__LEAVES__' => array());
|
||||||
exec ($snmpwalk_bin . ' -m ALL -M +' . escapeshellarg($config['homedir'] . '/attachment/mibs') . ' -Cc -c ' . escapeshellarg($community) . ' -v 1 ' . escapeshellarg($target_ip) . ' ' . escapeshellarg($starting_oid), $output, $rc);
|
exec ($snmpwalk_bin . ' -m ALL -M +' . escapeshellarg($config['homedir'] . '/attachment/mibs') . ' -Cc -c ' . escapeshellarg($community) . ' -v 2c ' . escapeshellarg($target_ip) . ' ' . escapeshellarg($starting_oid), $output, $rc);
|
||||||
|
|
||||||
//if ($rc != 0) {
|
//if ($rc != 0) {
|
||||||
// return __('No data');
|
// return __('No data');
|
||||||
|
@ -260,7 +260,7 @@ function snmp_browser_get_oid ($target_ip, $community, $target_oid) {
|
||||||
else {
|
else {
|
||||||
$snmpget_bin = $config['snmpget'];
|
$snmpget_bin = $config['snmpget'];
|
||||||
}
|
}
|
||||||
exec ($snmpget_bin . ' -m ALL -M +' . escapeshellarg($config['homedir'] . '/attachment/mibs') . ' -On -v1 -c ' . escapeshellarg($community) . " " . escapeshellarg($target_ip) . ' ' . escapeshellarg($target_oid), $output, $rc);
|
exec ($snmpget_bin . ' -m ALL -M +' . escapeshellarg($config['homedir'] . '/attachment/mibs') . ' -On -v 2c -c ' . escapeshellarg($community) . " " . escapeshellarg($target_ip) . ' ' . escapeshellarg($target_oid), $output, $rc);
|
||||||
if ($rc != 0) {
|
if ($rc != 0) {
|
||||||
return $oid_data;
|
return $oid_data;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue