mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00: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:
@@ -66,15 +66,15 @@ function getDates($dayofmonth) {
|
||||
}
|
||||
|
||||
|
||||
function getValue($host, $community, $id, $inout) {
|
||||
function getValue($host, $community, $port, $id, $inout) {
|
||||
$oid = "IF-MIB::ifHC" . $inout . "Octets." . $id;
|
||||
$value = `snmpget -c $community -v2c -O qv $host $oid`;
|
||||
$value = `snmpget -c $community -v2c -O qv $host:$port $oid`;
|
||||
return $value;
|
||||
}
|
||||
|
||||
function getIfName($host, $id) {
|
||||
function getIfName($host, $port, $id) {
|
||||
$oid = "IF-MIB::ifDescr." . $id;
|
||||
$value = `snmpget -c xyyz -v2c -O qv $host $oid`;
|
||||
$value = `snmpget -c xyyz -v2c -O qv $host:$port $oid`;
|
||||
return $value;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user