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:
Adam Amstrong
2009-02-02 16:00:11 +00:00
parent da6dd950b1
commit 96bb007d4b
35 changed files with 129 additions and 112 deletions

View File

@@ -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;
}