newdevice: Added support for Sinetica UPS

This commit is contained in:
Neil Lathwood
2016-10-05 18:58:41 +01:00
parent 12c4b8acb2
commit 09e888190a
6 changed files with 74 additions and 0 deletions

View File

@@ -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;

View File

@@ -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';

View 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';
}

View 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);

View File

@@ -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');

View 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