Files
librenms-librenms/includes/polling/os/arris-c4.inc.php
TheGreatDoc 0bee4b3d74 Arris CMTS - C4/C4c remamed and Added C3 support (#8883)
* Added Arris C3 to cmts.yaml

* Added Arris C3 hardware

* ARRIS CMTS->Move from cmts to arris_c4 yaml

* Fixed some Arris_c4 definitions

* Added Arris C3 CMTS

* Fixed some typos

* Arris C3 test files

* Arris C4 test files

* Deleted not anymore valid files

* Renamed from underscore

* Fixed some typos

* Correct test files

* Removed old snmprec files

* Correct test files v2

* Deleted more old files

* Return to cmts for valid_sensor() for Arris C4/C4c

* Re-done test files

* Re-do test files after rebase
2018-07-24 22:31:44 +01:00

37 lines
1.1 KiB
PHP

<?php
/**
* arris-c4.inc.php
*
* LibreNMS os poller module for Arris CMTS
*
* 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/>.
*
* @package LibreNMS
* @link http://librenms.org
* @copyright 2016 Neil Lathwood
* @author Neil Lathwood <neil@lathwood.co.uk>
*/
preg_match("/CMTS_V([0-9\.]+),/", $device['sysDescr'], $match);
$version = $match[1];
$data = explode(".", $device["sysObjectID"]);
$id = end($data);
if ($id == "1") {
$hardware = "C4";
} elseif ($id == "2") {
$hardware = "C4c";
}
unset($data);