mirror of
https://github.com/stylersnico/librenms.git
synced 2026-07-28 08:02:41 +02:00
per-port SNMP polling. thanks to jonathan@studenteninternet.be
git-svn-id: http://www.observium.org/svn/observer/trunk@340 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
|
||||
echo("Interfaces : ");
|
||||
|
||||
$cmd = $config['snmpwalk'] . " -O nsq -" . $device['snmpver'] . " -c " . $device['community'] . " " . $device['hostname'] . " .1.3.6.1.2.1.2.2.1.2";
|
||||
$cmd = $config['snmpwalk'] . " -O nsq -" . $device['snmpver'] . " -c " . $device['community'] . " " . $device['hostname'].":".$device['port'] . " .1.3.6.1.2.1.2.2.1.2";
|
||||
$interfaces = trim(shell_exec($cmd));
|
||||
$interfaces = str_replace("\"", "", $interfaces);
|
||||
$interfaces = str_replace("ifDescr.", "", $interfaces);
|
||||
@@ -19,7 +19,7 @@
|
||||
list($ifIndex, $ifName) = explode("||", $entry);
|
||||
|
||||
if($config['ifdescr'][$device['os']]) {
|
||||
$ifDescr = shell_exec($config['snmpget'] . " -O qv -" . $device['snmpver'] . " -c " . $device['community'] . " " . $device['hostname'] . " ifDescr.$ifIndex");
|
||||
$ifDescr = shell_exec($config['snmpget'] . " -O qv -" . $device['snmpver'] . " -c " . $device['community'] . " " . $device['hostname'].":".$device['port'] . " ifDescr.$ifIndex");
|
||||
$ifDescr = str_replace("No Such Object available on this agent at this OID", "", $ifDescr);
|
||||
$ifDescr = str_replace("No Such Instance currently exists at this OID", "", $ifDescr);
|
||||
$ifDescr = trim(str_replace("\"", "", $ifDescr));
|
||||
|
||||
Reference in New Issue
Block a user