mirror of
https://github.com/librenms/librenms.git
synced 2024-09-21 10:28:13 +00:00
newdevice: Improved APC NetBotz Support (#6157)
* initial * woops * remove quote
This commit is contained in:
parent
6f2ba2b45b
commit
faf5517362
@ -1,10 +1,10 @@
|
||||
os: netbotz
|
||||
text: 'Netbotz Environment sensor'
|
||||
text: 'NetBotz Environment Sensor'
|
||||
type: environment
|
||||
icon: apc
|
||||
over:
|
||||
- { graph: device_temperature, text: Temperature }
|
||||
- { graph: device_humidity, text: Humidity }
|
||||
discovery:
|
||||
- sysObjectId:
|
||||
- .1.3.6.1.4.1.5528.100.20.10.2014
|
||||
- .1.3.6.1.4.1.5528.100.20.10.2016
|
||||
- .1.3.6.1.4.1.5528.100.20.10
|
||||
|
@ -13,7 +13,6 @@ if ($oids) {
|
||||
$temperature_oid = ".1.3.6.1.4.1.5528.100.4.1.1.1.8.$temperature_id";
|
||||
$temperature = snmp_get($device, $temperature_oid, '-Ovq');
|
||||
$descr = str_replace('"', '', $descr);
|
||||
$descr = preg_replace('/Temperature /', '', $descr);
|
||||
$descr = trim($descr);
|
||||
if ($temperature != '0' && $temperature <= '1000') {
|
||||
discover_sensor($valid['sensor'], 'temperature', $device, $temperature_oid, $temperature_id, 'netbotz', $descr, '1', '1', null, null, null, null, $temperature);
|
||||
|
14
includes/polling/os/netbotz.inc.php
Normal file
14
includes/polling/os/netbotz.inc.php
Normal file
@ -0,0 +1,14 @@
|
||||
<?php
|
||||
/*
|
||||
* LibreNMS
|
||||
*
|
||||
* Copyright (c) 2017 Søren Friis Rosiak <sorenrosiak@gmail.com>
|
||||
* 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. Please see LICENSE.txt at the top level of
|
||||
* the source code distribution for details.
|
||||
*/
|
||||
|
||||
$version = trim(snmp_get($device, '1.3.6.1.4.1.318.1.4.2.4.1.4.1', '-OQv', '', ''), '"');
|
||||
$hardware = snmp_get($device, 'sysObjectID.0', '-Osqv', 'SNMPv2-MIB:NETBOTZ410-MIB');
|
8913
mibs/netbotz/NETBOTZ410-MIB
Executable file
8913
mibs/netbotz/NETBOTZ410-MIB
Executable file
File diff suppressed because it is too large
Load Diff
@ -1160,6 +1160,7 @@ class DiscoveryTest extends \PHPUnit_Framework_TestCase
|
||||
{
|
||||
$this->checkOS('netbotz', 'netbotz-2014');
|
||||
$this->checkOS('netbotz', 'netbotz-2016');
|
||||
$this->checkOS('netbotz', 'netbotz-2017');
|
||||
}
|
||||
|
||||
public function testNetgear()
|
||||
|
2
tests/snmpsim/netbotz-2017.snmprec
Normal file
2
tests/snmpsim/netbotz-2017.snmprec
Normal file
@ -0,0 +1,2 @@
|
||||
1.3.6.1.2.1.1.1.0|4|Linux netbotzD9BAF5 2.6.12 #307 Wed Feb 8 15:19:24 EST 2017 ppc
|
||||
1.3.6.1.2.1.1.2.0|6|1.3.6.1.4.1.5528.100.20.10.2017
|
Loading…
Reference in New Issue
Block a user