Browse Source

add support POE snmp state for SNR switches

Roman Dmitriev 2 years ago
parent
commit
7d7956aa0b
2 changed files with 24 additions and 0 deletions
  1. 12 0
      html/inc/common.php
  2. 12 0
      html/inc/consts.php

+ 12 - 0
html/inc/common.php

@@ -2256,6 +2256,10 @@ function get_port_poe_state($vendor_id, $port, $port_snmp_index, $ip, $community
         $poe_status = HUAWEI_POE_OID . "." . $port_snmp_index;
     }
 
+    if ($vendor_id == 6) {
+        $poe_status = SNR_POE_OID . "." . $port_snmp_index;
+    }
+
     if ($vendor_id == 8) {
         $poe_status = ALLIED_POE_OID . "." . $port_snmp_index;
     }
@@ -2352,6 +2356,14 @@ function get_port_poe_detail($vendor_id, $port, $port_snmp_index, $ip, $communit
         $poe_volt = ELTEX_POE_VOLT . '.' . $port_snmp_index;
     }
 
+    // snr
+    if ($vendor_id == 2) {
+        $poe_class = SNR_POE_CLASS . '.' . $port_snmp_index;
+        $poe_power = SNR_POE_USAGE . '.' . $port_snmp_index;
+        $poe_current = SNR_POE_CURRENT .'.' . $port_snmp_index;
+        $poe_volt = SNR_POE_VOLT . '.' . $port_snmp_index;
+    }
+
     // huawei
     if ($vendor_id == 3) {
         $poe_power = HUAWEI_POE_USAGE . '.' . $port_snmp_index;

+ 12 - 0
html/inc/consts.php

@@ -49,6 +49,18 @@ define("PETH_PSE_PORT_POE_CLASS",".1.3.6.1.2.1.105.1.1.1.10.1");
 //POE enable
 define("PETH_PSE_PORT_ADMIN_ENABLE",".1.3.6.1.2.1.105.1.1.1.3.1");
 
+//SNR
+// Class
+define("SNR_POE_CLASS",".1.3.6.1.4.1.40418.7.100.26.10.1.9");
+// Status
+define("SNR_POE_OID",".1.3.6.1.4.1.40418.7.100.26.10.1.2");
+// VOLTAGE
+define("SNR_POE_VOLT",".1.3.6.1.4.1.40418.7.100.26.10.1.7");
+// CURRENT
+define("SNR_POE_CURRENT",".1.3.6.1.4.1.40418.7.100.26.10.1.6");
+// POWER USAGE
+define("SNR_POE_USAGE",".1.3.6.1.4.1.40418.7.100.26.10.1.5");
+
 //Eltex
 define("ELTEX_POE_OID",".1.3.6.1.4.1.14988.1.1.15.1.1.3");
 // VOLTAGE