Improve support for Arista/Metamako MOS devices (#13988)

* Improve support for legacy Arista/Metamako MOS devices

* Fix indentation in license text

* Fix formatting in OS discovery

* Add hardware type discovery for Arista/Metamako MOS

* style fixes

* Implement hardware model detection for Arista MOS

* Refactor to use YAML based OS discovery

* Reformat test data for arista-mos_metamux48,  0.16 code

* Enable lm_sensors polling of Arista MOS devices

* Remove bgp-peers data from arista-mos test files
This commit is contained in:
Nash Kaminski
2022-05-24 03:45:20 -05:00
committed by GitHub
parent f40693b503
commit c49885182f
8 changed files with 37148 additions and 2 deletions

View File

@@ -1,4 +1,4 @@
modules:
os:
serial: SNMPv2-MIB::snmpSetSerialNo.0
sysDescr_regex: '/release (?<version>[\d\.]+)/'
sysDescr_regex: '/release (?<version>[\d\.]+).*?running\son\sa\s(?<hardware>.*)$/'

View File

@@ -0,0 +1,5 @@
<?php
use LibreNMS\Config;
include_once Config::get('install_dir') . '/includes/discovery/sensors/fanspeed/unix.inc.php';

View File

@@ -0,0 +1,5 @@
<?php
use LibreNMS\Config;
include_once Config::get('install_dir') . '/includes/discovery/sensors/temperature/unix.inc.php';

View File

@@ -0,0 +1,5 @@
<?php
use LibreNMS\Config;
include_once Config::get('install_dir') . '/includes/discovery/sensors/voltage/unix.inc.php';

View File

@@ -0,0 +1,29 @@
<?php
/**
* arista-mos.inc.php
*
* Copyright (C) 2018 Goldman Sachs & Co.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* @author Nash Kaminski <Nash.Kaminski@gs.com>
*/
// Workaround for Metamako platform fanspeed reporting bug on early (circa 0.16.x) code versions
if ((strpos($sensor['sensor_oid'], '.1.3.6.1.4.1.2021.13.16.3.1.3.') === 0) &&
($sensor_value >= 2 ** 31)) {
// 2's complement negation of the value
$sensor_value = $sensor_value ^ 0xFFFFFFFF;
$sensor_value += 1;
}

View File

@@ -8,7 +8,7 @@
"sysDescr": "Metamako MOS release 0.32.0 \\\\(build mos-0.32+22\\\\) running on a MetaMux 48 with L-Series",
"sysContact": "<private>",
"version": "0.32.0",
"hardware": null,
"hardware": "MetaMux 48 with L-Series",
"features": null,
"os": "arista-mos",
"type": "network",

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff