diff --git a/includes/common.php b/includes/common.php index b0cd6c7af0..af127932c5 100644 --- a/includes/common.php +++ b/includes/common.php @@ -699,4 +699,19 @@ function get_graph_subtypes($type) { return $types; } +/* + * @return rounded value to 10th/100th/1000th depending on input (valid: 10, 100, 1000) + */ +function round_Nth($val = 0, $round_to) { + if (($round_to == "10") || ($round_to == "100") || ($round_to == "1000")) { + $diff = $val % $round_to; + if ($diff >= ($round_to / 2)) { + $ret = $val + ($round_to-$diff); + } else { + $ret = $val - $diff; + } + return $ret; + } +} + ?> diff --git a/includes/discovery/fanspeeds/extreme.inc.php b/includes/discovery/fanspeeds/extreme.inc.php index cd11b11d0c..983172d850 100644 --- a/includes/discovery/fanspeeds/extreme.inc.php +++ b/includes/discovery/fanspeeds/extreme.inc.php @@ -16,10 +16,11 @@ if ($device['os'] == 'xos') { $oid = "1.3.6.1.4.1.1916.1.1.1.9.1.4.$index"; $value = snmp_get($device, $oid, '-Oqv', 'EXTREME-BASE-MIB'); $descr = "Fan Speed $modindex"; - $high_limit = ($value * 1.5); - $high_warn_limit = ($value * 1.25); - $low_warn_limit = ($value * 0.75); - $low_limit = ($value * 0.5); + // round function used to round limit values to hundreds to avoid h/w/l limits being changed on every discovery as a change of 1rpm for fan speed would cause the limit values to change since they're dynamically calculated + $high_limit = round_Nth(($value * 1.5), 100); + $high_warn_limit = round_Nth(($value * 1.25), 100); + $low_warn_limit = round_Nth(($value * 0.75), 100); + $low_limit = round_Nth(($value * 0.5), 100); if (is_numeric($value)) { discover_sensor($valid['sensor'], 'fanspeed', $device, $oid, $index, 'extreme-fanspeed', $descr, '1', '1', $low_limit, $low_warn_limit, $high_warn_limit, $high_limit, $value); } diff --git a/includes/discovery/mempools/extreme.inc.php b/includes/discovery/mempools/extreme.inc.php new file mode 100644 index 0000000000..45d35f6977 --- /dev/null +++ b/includes/discovery/mempools/extreme.inc.php @@ -0,0 +1,12 @@ + 'Summit X250-24x', '.1.3.6.1.4.1.1916.2.92' => 'Summit X250-48p', '.1.3.6.1.4.1.1916.2.91' => 'Summit X250-48t', - '.1.3.6.1.4.1.1916.2.93' => 'Summit X250e-24t (3-Stack)', + '.1.3.6.1.4.1.1916.2.93' => 'Summit X250/X450-24 (3-Stack)', '.1.3.6.1.4.1.1916.2.88' => 'Summit X250e-24t (Single)', '.1.3.6.1.4.1.1916.2.66' => 'Summit X450-24t', '.1.3.6.1.4.1.1916.2.65' => 'Summit X450-24x', @@ -412,6 +412,8 @@ $rewrite_extreme_hardware = array( '.1.3.6.1.4.1.1916.2.129' => 'NWI-e450a', '.1.3.6.1.4.1.1916.2.133' => 'Summit x480-48t', '.1.3.6.1.4.1.1916.2.141' => 'Summit x480-48x', + '.1.3.6.1.4.1.1916.2.167' => 'Summit x670-48x', + '.1.3.6.1.4.1.1916.2.168' => 'Summit x670v-48x', ); $rewrite_ironware_hardware = array( @@ -665,6 +667,7 @@ $rewrite_ironware_hardware = array( 'snFESX624P' => 'FESX624POE+2XG-PREM', 'snFWSX424' => 'FWSX24G', 'snFWSX424Switch' => 'FWSX424', + 'FWSX24GSwitch' => 'FWSX424', 'snFWSX424Router' => 'FWSX424', 'snFWSX424Plus1XG' => 'FWSX24G + 1 10G', 'snFWSX424Plus1XGSwitch' => 'FWSX424+1XG', @@ -846,6 +849,7 @@ $rewrite_ironware_hardware = array( 'snCer2048C' => 'NetIron CER 2048C', 'snCer2048FX' => 'NetIron CER 2048F + 2x10G', 'snCer2048CX' => 'NetIron CER 2048C + 2x10G', + 'snTI2X24Router' => 'Stackable TurboIron-X24', ); $rewrite_ios_features = array(