mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
committed by
Søren Rosiak
parent
cfddc11e76
commit
67362e0124
BIN
html/images/os/dcn.png
Normal file
BIN
html/images/os/dcn.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 441 B |
8
includes/definitions/dcn-software.yaml
Normal file
8
includes/definitions/dcn-software.yaml
Normal file
@@ -0,0 +1,8 @@
|
||||
os: dcn-software
|
||||
text: 'Digital China Networks'
|
||||
type: network
|
||||
icon: dcn
|
||||
over:
|
||||
- { graph: device_bits, text: 'Device Traffic' }
|
||||
- { graph: device_processor, text: 'Processor Usage' }
|
||||
- { graph: device_mempool, text: 'Memory Usage' }
|
||||
34
includes/discovery/os/dcn-software.inc.php
Normal file
34
includes/discovery/os/dcn-software.inc.php
Normal file
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
/**
|
||||
* dcn-software.inc.php
|
||||
*
|
||||
* LibreNMS os discovery module for DCN
|
||||
*
|
||||
* 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>
|
||||
*/
|
||||
|
||||
$dcn_oids = array(
|
||||
'.1.3.6.1.4.1.6339.1.1.1.280',
|
||||
);
|
||||
|
||||
if (starts_with($sysObjectId, $dcn_oids)) {
|
||||
$os = 'dcn-software';
|
||||
}
|
||||
|
||||
unset($dcn_oids);
|
||||
30
includes/polling/os/dcn-software.inc.php
Normal file
30
includes/polling/os/dcn-software.inc.php
Normal file
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
/**
|
||||
* dcn-software.inc.php
|
||||
*
|
||||
* LibreNMS os poller module for DCN
|
||||
*
|
||||
* 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('/([\w-]+) Device, .* SoftWare Version ([\w\.\(\)]+) .* Serial No.:([\w]+) .*/', $poll_device['sysDescr'], $match);
|
||||
|
||||
$hardware = $match[1];
|
||||
$version = $match[2];
|
||||
$serial = $match[3];
|
||||
@@ -393,6 +393,11 @@ class DiscoveryTest extends \PHPUnit_Framework_TestCase
|
||||
$this->checkOS('datadomain');
|
||||
}
|
||||
|
||||
public function testDcnSoftware()
|
||||
{
|
||||
$this->checkOS('dcn-software');
|
||||
}
|
||||
|
||||
public function testDdnos()
|
||||
{
|
||||
$this->checkOS('ddnos');
|
||||
|
||||
2
tests/snmpsim/dcn-software.snmprec
Normal file
2
tests/snmpsim/dcn-software.snmprec
Normal file
@@ -0,0 +1,2 @@
|
||||
1.3.6.1.2.1.1.1.0|4|S4600-52P-SI Device, Compiled Jun 06 16:24:54 2016 SoftWare Version 7.0.3.5(R0241.0101) BootRom Version 7.2.16 HardWare Version 1.0.1 Serial No.:SW045010FB16000330 Copyright (C) 2001-2016 by Digital China Networks Limited. All rights reserved
|
||||
1.3.6.1.2.1.1.2.0|6|1.3.6.1.4.1.6339.1.1.1.280
|
||||
Reference in New Issue
Block a user