mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
newdevice: Added support for Sinetica UPS
This commit is contained in:
@@ -761,6 +761,7 @@ $config['modules_compat']['rfc1628']['poweralert'] = 1;
|
||||
$config['modules_compat']['rfc1628']['multimatic'] = 1;
|
||||
$config['modules_compat']['rfc1628']['webpower'] = 1;
|
||||
$config['modules_compat']['rfc1628']['huaweiups'] = 1;
|
||||
$config['modules_compat']['rfc1628']['sinetica'] = 1;
|
||||
|
||||
// Enable daily updates
|
||||
$config['update'] = 1;
|
||||
|
@@ -1450,6 +1450,13 @@ $config['os'][$os]['icon'] = 'mge';
|
||||
$config['os'][$os]['over'][0]['graph'] = 'device_current';
|
||||
$config['os'][$os]['over'][0]['text'] = 'Current';
|
||||
|
||||
$os = 'sinetica';
|
||||
$config['os'][$os]['text'] = 'Sinetica UPS';
|
||||
$config['os'][$os]['group'] = 'ups';
|
||||
$config['os'][$os]['type'] = 'power';
|
||||
$config['os'][$os]['over'][0]['graph'] = 'device_current';
|
||||
$config['os'][$os]['over'][0]['text'] = 'Current';
|
||||
|
||||
$os = 'mgepdu';
|
||||
$config['os'][$os]['text'] = 'MGE PDU';
|
||||
$config['os'][$os]['type'] = 'power';
|
||||
|
28
includes/discovery/os/sinetica.inc.php
Normal file
28
includes/discovery/os/sinetica.inc.php
Normal file
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
/**
|
||||
* sinetica.inc.php
|
||||
*
|
||||
* LibreNMS os discovery module for Sinetica
|
||||
*
|
||||
* 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>
|
||||
*/
|
||||
|
||||
if (starts_with($sysDescr, 'Sinetica UPSController.')) {
|
||||
$os = 'sinetica';
|
||||
}
|
31
includes/polling/os/sinetica.inc.php
Normal file
31
includes/polling/os/sinetica.inc.php
Normal file
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
/**
|
||||
* sinetica.inc.php
|
||||
*
|
||||
* LibreNMS os polling module for Sinetica
|
||||
*
|
||||
* 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>
|
||||
*/
|
||||
|
||||
// Sinetica UPSController. Versions: App. 6.04.03, OS 6.3, Btldr 1.06.09, H/w ZBBNC2 Rev 1.01.06
|
||||
|
||||
list($os_temp, $os_ver, $btldr, $hardware_temp) = explode(', ', $poll_device['sysDescr']);
|
||||
|
||||
list($ignore, $version) = explode('App. ', $os_temp);
|
||||
$hardware = preg_replace('/H\/w /', '', $hardware_temp);
|
@@ -1182,6 +1182,11 @@ class DiscoveryTest extends \PHPUnit_Framework_TestCase
|
||||
$this->checkOS('siklu');
|
||||
}
|
||||
|
||||
public function testSinetica()
|
||||
{
|
||||
$this->checkOS('sinetica');
|
||||
}
|
||||
|
||||
public function testSmartax()
|
||||
{
|
||||
$this->checkOS('smartax');
|
||||
|
2
tests/snmpsim/sinetica.snmprec
Normal file
2
tests/snmpsim/sinetica.snmprec
Normal file
@@ -0,0 +1,2 @@
|
||||
1.3.6.1.2.1.1.1.0|4|Sinetica UPSController. Versions: App. 6.04.03, OS 6.3, Btldr 1.06.09, H/w ZBBNC2 Rev 1.01.06
|
||||
1.3.6.1.2.1.1.2.0|6|.1.3.6.1.4.1.13891.101
|
Reference in New Issue
Block a user