Commit version 24.12.13800
This commit is contained in:
@ -6,7 +6,7 @@
|
||||
*
|
||||
* @package observium
|
||||
* @subpackage discovery
|
||||
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2021 Observium Limited
|
||||
* @copyright (C) Adam Armstrong
|
||||
*
|
||||
*/
|
||||
|
||||
@ -31,61 +31,61 @@
|
||||
// Q1
|
||||
$oid_descr = snmp_get_oid($device, 'pm200frs02Rinvsfp.0', 'EKINOPS-Pm200frs02-MIB');
|
||||
if ($oid_descr && !str_contains($oid_descr, 'NOT EQUIPPED')) {
|
||||
$index = '0';
|
||||
$index = '0';
|
||||
|
||||
list($name, ) = explode("\n", $oid_descr);
|
||||
list(, $ifAlias) = explode("(", $name);
|
||||
$ifAlias = trim($ifAlias, " )");
|
||||
[$name,] = explode("\n", $oid_descr);
|
||||
[, $ifAlias] = explode("(", $name);
|
||||
$ifAlias = trim($ifAlias, " )");
|
||||
|
||||
$match = [ 'measured_match' => [ 'entity_type' => 'port', 'field' => 'ifAlias', 'match' => $ifAlias ] ];
|
||||
$options = entity_measured_match_definition($device, $match);
|
||||
print_debug_vars($options);
|
||||
$match = ['measured_match' => ['entity_type' => 'port', 'field' => 'ifAlias', 'match' => $ifAlias]];
|
||||
$options = entity_measured_match_definition($device, $match);
|
||||
print_debug_vars($options);
|
||||
|
||||
$descr = "Client Trscv Temperature ($ifAlias)";
|
||||
$class = 'temperature';
|
||||
$oid_name = 'pm200frs02Mesrtrscv1Temp';
|
||||
$oid_num = '.1.3.6.1.4.1.20044.90.3.1.252.'.$index;
|
||||
$scale = 0.00390625; // value/256
|
||||
$value = snmp_get_oid($device, $oid_name.'.'.$index, 'EKINOPS-Pm200frs02-MIB');
|
||||
discover_sensor_ng($device, $class, $mib, $oid_name, $oid_num, $index, NULL, $descr, $scale, $value, $options);
|
||||
$descr = "Client Trscv Temperature ($ifAlias)";
|
||||
$class = 'temperature';
|
||||
$oid_name = 'pm200frs02Mesrtrscv1Temp';
|
||||
$oid_num = '.1.3.6.1.4.1.20044.90.3.1.252.' . $index;
|
||||
$scale = 0.00390625; // value/256
|
||||
$value = snmp_get_oid($device, $oid_name . '.' . $index, 'EKINOPS-Pm200frs02-MIB');
|
||||
discover_sensor_ng($device, $class, $mib, $oid_name, $oid_num, $index, $descr, $scale, $value, $options);
|
||||
|
||||
$descr = "Client Trscv Voltage ($ifAlias)";
|
||||
$class = 'voltage';
|
||||
$oid_name = 'pm200frs02Mesrtrscv1PowerSupply';
|
||||
$oid_num = '.1.3.6.1.4.1.20044.90.3.1.254.'.$index;
|
||||
$scale = 0.0001; // value/10000
|
||||
$value = snmp_get_oid($device, $oid_name.'.'.$index, 'EKINOPS-Pm200frs02-MIB');
|
||||
discover_sensor_ng($device, $class, $mib, $oid_name, $oid_num, $index, NULL, $descr, $scale, $value, $options);
|
||||
$descr = "Client Trscv Voltage ($ifAlias)";
|
||||
$class = 'voltage';
|
||||
$oid_name = 'pm200frs02Mesrtrscv1PowerSupply';
|
||||
$oid_num = '.1.3.6.1.4.1.20044.90.3.1.254.' . $index;
|
||||
$scale = 0.0001; // value/10000
|
||||
$value = snmp_get_oid($device, $oid_name . '.' . $index, 'EKINOPS-Pm200frs02-MIB');
|
||||
discover_sensor_ng($device, $class, $mib, $oid_name, $oid_num, $index, $descr, $scale, $value, $options);
|
||||
}
|
||||
|
||||
// Q2
|
||||
$oid_descr = snmp_get_oid($device, 'pm200frs02Rinvsfp.1', 'EKINOPS-Pm200frs02-MIB');
|
||||
if ($oid_descr && !str_contains($oid_descr, 'NOT EQUIPPED')) {
|
||||
$index = '0';
|
||||
$index = '0';
|
||||
|
||||
list($name, ) = explode("\n", $oid_descr);
|
||||
list(, $ifAlias) = explode("(", $name);
|
||||
$ifAlias = trim($ifAlias, " )");
|
||||
[$name,] = explode("\n", $oid_descr);
|
||||
[, $ifAlias] = explode("(", $name);
|
||||
$ifAlias = trim($ifAlias, " )");
|
||||
|
||||
$match = [ 'measured_match' => [ 'entity_type' => 'port', 'field' => 'ifAlias', 'match' => $ifAlias ] ];
|
||||
$options = entity_measured_match_definition($device, $match);
|
||||
print_debug_vars($options);
|
||||
$match = ['measured_match' => ['entity_type' => 'port', 'field' => 'ifAlias', 'match' => $ifAlias]];
|
||||
$options = entity_measured_match_definition($device, $match);
|
||||
print_debug_vars($options);
|
||||
|
||||
$descr = "Client Trscv Temperature ($ifAlias)";
|
||||
$class = 'temperature';
|
||||
$oid_name = 'pm200frs02Mesrtrscv2Temp';
|
||||
$oid_num = '.1.3.6.1.4.1.20044.90.3.1.253.'.$index;
|
||||
$scale = 0.00390625; // value/256
|
||||
$value = snmp_get_oid($device, $oid_name.'.'.$index, 'EKINOPS-Pm200frs02-MIB');
|
||||
discover_sensor_ng($device, $class, $mib, $oid_name, $oid_num, $index, NULL, $descr, $scale, $value, $options);
|
||||
$descr = "Client Trscv Temperature ($ifAlias)";
|
||||
$class = 'temperature';
|
||||
$oid_name = 'pm200frs02Mesrtrscv2Temp';
|
||||
$oid_num = '.1.3.6.1.4.1.20044.90.3.1.253.' . $index;
|
||||
$scale = 0.00390625; // value/256
|
||||
$value = snmp_get_oid($device, $oid_name . '.' . $index, 'EKINOPS-Pm200frs02-MIB');
|
||||
discover_sensor_ng($device, $class, $mib, $oid_name, $oid_num, $index, $descr, $scale, $value, $options);
|
||||
|
||||
$descr = "Client Trscv Voltage ($ifAlias)";
|
||||
$class = 'voltage';
|
||||
$oid_name = 'pm200frs02Mesrtrscv2PowerSupply';
|
||||
$oid_num = '.1.3.6.1.4.1.20044.90.3.1.255.'.$index;
|
||||
$scale = 0.0001; // value/10000
|
||||
$value = snmp_get_oid($device, $oid_name.'.'.$index, 'EKINOPS-Pm200frs02-MIB');
|
||||
discover_sensor_ng($device, $class, $mib, $oid_name, $oid_num, $index, NULL, $descr, $scale, $value, $options);
|
||||
$descr = "Client Trscv Voltage ($ifAlias)";
|
||||
$class = 'voltage';
|
||||
$oid_name = 'pm200frs02Mesrtrscv2PowerSupply';
|
||||
$oid_num = '.1.3.6.1.4.1.20044.90.3.1.255.' . $index;
|
||||
$scale = 0.0001; // value/10000
|
||||
$value = snmp_get_oid($device, $oid_name . '.' . $index, 'EKINOPS-Pm200frs02-MIB');
|
||||
discover_sensor_ng($device, $class, $mib, $oid_name, $oid_num, $index, $descr, $scale, $value, $options);
|
||||
}
|
||||
|
||||
// EOF
|
Reference in New Issue
Block a user