|
@@ -1,166 +1,31 @@
|
|
|
<?php
|
|
|
|
|
|
+// MikroTik - http://www.oidview.com/mibs/14988/MIKROTIK-MIB.html
|
|
|
namespace NasBundle\SNMP\MIBS;
|
|
|
|
|
|
-class OIDSFiberHomeV1 extends \NasBundle\SNMP\MIB {
|
|
|
+class OIDSBase extends \NasBundle\SNMP\MIB {
|
|
|
|
|
|
- const OID_authOnuListSlot = "1.3.6.1.4.1.5875.800.3.10.1.1.2";
|
|
|
- const OID_authOnuListPon = "1.3.6.1.4.1.5875.800.3.10.1.1.3";
|
|
|
- const OID_authOnuListOnuid = "1.3.6.1.4.1.5875.800.3.10.1.1.4";
|
|
|
- const OID_authOnuListMac = "1.3.6.1.4.1.5875.800.3.10.1.1.10";
|
|
|
- const OID_onuPonRxOpticalPower = "1.3.6.1.4.1.5875.800.3.9.3.3.1.6";
|
|
|
- const OID_onuPonTxOpticalPower = "1.3.6.1.4.1.5875.800.3.9.3.3.1.7";
|
|
|
- const OID_onuPonOpticalVltage = "1.3.6.1.4.1.5875.800.3.9.3.3.1.8";
|
|
|
- const OID_onuPonOpticalTemperature = "1.3.6.1.4.1.5875.800.3.9.3.3.1.10";
|
|
|
- const OID_onuStatus = "1.3.6.1.4.1.5875.800.3.10.1.1.11";
|
|
|
- const OID_oltPonDesc = "1.3.6.1.4.1.5875.800.3.9.3.4.1.3";
|
|
|
- const OID_oltPonEnableStatus = "1.3.6.1.4.1.5875.800.3.9.3.4.1.4";
|
|
|
+ const OID_mtxrQueueSimpleIndex = "1.3.6.1.4.1.14988.1.1.2.1.1.1";
|
|
|
|
|
|
- const OID_oltPonRxOpticalPower = "1.3.6.1.4.1.5875.800.3.9.3.7.1.2";
|
|
|
- const OID_oltPonTxOpticalPower = "1.3.6.1.4.1.5875.800.3.9.3.4.1.8";
|
|
|
- const OID_oltPonOpticalVltage = "1.3.6.1.4.1.5875.800.3.9.3.4.1.9";
|
|
|
- const OID_oltPonOpticalCurrent = "1.3.6.1.4.1.5875.800.3.9.3.4.1.10";
|
|
|
- const OID_oltPonOpticalTemperature = "1.3.6.1.4.1.5875.800.3.9.3.4.1.11";
|
|
|
+ const OID_mtxrQueueSimpleBytesIn = "1.3.6.1.4.1.14988.1.1.2.1.1.8";
|
|
|
+ const OID_mtxrQueueSimpleBytesOut = "1.3.6.1.4.1.14988.1.1.2.1.1.9";
|
|
|
|
|
|
-
|
|
|
- //Genericos
|
|
|
- const OID_ifHCInOctets = "1.3.6.1.2.1.31.1.1.1.6";
|
|
|
- const OID_ifHCOutOctets = "1.3.6.1.2.1.31.1.1.1.10";
|
|
|
- const OID_ifInOctets = "1.3.6.1.2.1.2.2.1.10";
|
|
|
- const OID_ifOutOctets = "1.3.6.1.2.1.2.2.1.16";
|
|
|
- const OID_ifDescr = "1.3.6.1.2.1.2.2.1.2";
|
|
|
-
|
|
|
- const OID_cardCpu = "1.3.6.1.4.1.5875.800.3.9.8.1.1.5";
|
|
|
- const OID_cardMemory = "1.3.6.1.4.1.5875.800.3.9.8.1.1.6";
|
|
|
-
|
|
|
-
|
|
|
- function convertIndex($index, $values) {
|
|
|
- $data = array();
|
|
|
- foreach($values as $i => $v) {
|
|
|
- if(isset($index[$i])) {
|
|
|
- $data[$index[$i]] = $v;
|
|
|
- }
|
|
|
- }
|
|
|
- if(!empty($index)) return $data;
|
|
|
-
|
|
|
- return $values;
|
|
|
- }
|
|
|
-
|
|
|
- public function onuSlot() {
|
|
|
- return $this->getSNMP()->lastOidWalk(self::OID_authOnuListSlot,14);
|
|
|
- }
|
|
|
-
|
|
|
- public function onuPon() {
|
|
|
- return $this->getSNMP()->lastOidWalk(self::OID_authOnuListPon,14);
|
|
|
- }
|
|
|
-
|
|
|
- public function onuOnuid() {
|
|
|
- return $this->getSNMP()->lastOidWalk(self::OID_authOnuListOnuid,14);
|
|
|
- }
|
|
|
|
|
|
public function onuSerialNumber($index = null) {
|
|
|
if(is_null($index)) {
|
|
|
- return $this->getSNMP()->lastOidWalk(self::OID_authOnuListMac,14);
|
|
|
- }
|
|
|
-
|
|
|
- $values = $this->getSNMP()->lastOidWalk(self::OID_authOnuListMac,14);
|
|
|
- return $this->convertIndex($index, $values);
|
|
|
- }
|
|
|
-
|
|
|
- public function onuPonRxOpticalPower($index = null) {
|
|
|
- if(is_null($index)) {
|
|
|
- return $this->getSNMP()->lastOidWalk(self::OID_onuPonRxOpticalPower,15);
|
|
|
+ return $this->getSNMP()->lastOidWalk(self::OID_mtxrQueueSimpleIndex,14);
|
|
|
}
|
|
|
|
|
|
- $values = $this->getSNMP()->lastOidWalk(self::OID_onuPonRxOpticalPower,15);
|
|
|
- return $this->convertIndex($index, $values);
|
|
|
-
|
|
|
- }
|
|
|
-
|
|
|
- public function onuPonTxOpticalPower($index = null) {
|
|
|
- if(is_null($index)) {
|
|
|
- return $this->getSNMP()->lastOidWalk(self::OID_onuPonTxOpticalPower,15);
|
|
|
- }
|
|
|
-
|
|
|
- $values = $this->getSNMP()->lastOidWalk(self::OID_onuPonTxOpticalPower,15);
|
|
|
- return $this->convertIndex($index, $values);
|
|
|
- }
|
|
|
-
|
|
|
- public function onuPonOpticalVltage($index = null) {
|
|
|
- $values = $this->getSNMP()->lastOidWalk(self::OID_onuPonOpticalVltage,15);
|
|
|
- return $this->convertIndex($index, $values);
|
|
|
- }
|
|
|
-
|
|
|
- public function onuPonOpticalTemperature($index = null) {
|
|
|
- $values = $this->getSNMP()->lastOidWalk(self::OID_onuPonOpticalTemperature,15);
|
|
|
+ $values = $this->getSNMP()->lastOidWalk(self::OID_mtxrQueueSimpleIndex,14);
|
|
|
return $this->convertIndex($index, $values);
|
|
|
}
|
|
|
|
|
|
- public function onuStatus($index = null) {
|
|
|
- $values = $this->getSNMP()->lastOidWalk(self::OID_onuStatus,14);
|
|
|
- return $this->convertIndex($index, $values);
|
|
|
- }
|
|
|
-
|
|
|
- /* OLT PON */
|
|
|
- public function oltPonDesc($index = null) {
|
|
|
- return $this->getSNMP()->lastOidWalk(self::OID_oltPonDesc,15);
|
|
|
- }
|
|
|
-
|
|
|
- public function oltPonEnableStatus($index = null) {
|
|
|
- return $this->getSNMP()->lastOidWalk(self::OID_oltPonEnableStatus,15);
|
|
|
-// return $this->convertIndex($index, $values);
|
|
|
- }
|
|
|
-
|
|
|
- public function oltPonRxOpticalPower($index = null) {
|
|
|
- return $this->getSNMP()->lastOidWalk(self::OID_oltPonRxOpticalPower,15);
|
|
|
-// return $this->convertIndex($index, $values);
|
|
|
- }
|
|
|
-
|
|
|
- public function oltPonTxOpticalPower($index = null) {
|
|
|
- return $this->getSNMP()->lastOidWalk(self::OID_oltPonTxOpticalPower,15);
|
|
|
-// return $this->convertIndex($index, $values);
|
|
|
- }
|
|
|
-
|
|
|
- public function oltPonOpticalVltage($index = null) {
|
|
|
- return $this->getSNMP()->lastOidWalk(self::OID_oltPonOpticalVltage,15);
|
|
|
-// return $this->convertIndex($index, $values);
|
|
|
- }
|
|
|
-
|
|
|
- public function oltPonOpticalCurrent($index = null) {
|
|
|
- return $this->getSNMP()->lastOidWalk(self::OID_oltPonOpticalCurrent,15);
|
|
|
-// return $this->convertIndex($index, $values);
|
|
|
- }
|
|
|
-
|
|
|
- public function oltPonOpticalTemperature($index = null) {
|
|
|
- return $this->getSNMP()->lastOidWalk(self::OID_oltPonOpticalTemperature,15);
|
|
|
-// return $this->convertIndex($index, $values);
|
|
|
- }
|
|
|
-
|
|
|
- public function ifInOctets() {
|
|
|
- return $this->getSNMP()->lastOidWalk(self::OID_ifInOctets,11);
|
|
|
- }
|
|
|
-
|
|
|
- public function ifOutOctets() {
|
|
|
- return $this->getSNMP()->lastOidWalk(self::OID_ifOutOctets,11);
|
|
|
+ public function onuInOctets() {
|
|
|
+ return $this->getSNMP()->lastOidWalk(self::OID_mtxrQueueSimpleBytesIn,14);
|
|
|
}
|
|
|
|
|
|
- public function ifHCInOctets() {
|
|
|
- return $this->getSNMP()->lastOidWalk(self::OID_ifHCInOctets,12);
|
|
|
+ public function onuOutOctets() {
|
|
|
+ return $this->getSNMP()->lastOidWalk(self::OID_mtxrQueueSimpleBytesOut,14);
|
|
|
}
|
|
|
|
|
|
- public function ifHCOutOctets() {
|
|
|
- return $this->getSNMP()->lastOidWalk(self::OID_ifHCOutOctets,12);
|
|
|
- }
|
|
|
-
|
|
|
- public function ifDescr() {
|
|
|
- return $this->getSNMP()->lastOidWalk(self::OID_ifDescr,11);
|
|
|
- }
|
|
|
-
|
|
|
- public function oltCardCpu($index = null) {
|
|
|
- return $this->getSNMP()->lastOidWalk(self::OID_cardCpu,15);
|
|
|
- }
|
|
|
-
|
|
|
- public function oltCardMemory($index = null) {
|
|
|
- return $this->getSNMP()->lastOidWalk(self::OID_cardMemory,15);
|
|
|
- }
|
|
|
}
|