Added support for LigoWave Infinity AP's

This commit is contained in:
Mike Rostermund
2015-11-18 10:41:55 -08:00
parent f6bbf59887
commit 4cb734a3d4
6 changed files with 106 additions and 0 deletions
+11
View File
@@ -107,6 +107,17 @@ $config['os'][$os]['over'][1]['text'] = 'Processor Usage';
$config['os'][$os]['over'][2]['graph'] = 'device_ucd_memory';
$config['os'][$os]['over'][2]['text'] = 'Memory Usage';
$os = 'infinity';
$config['os'][$os]['text'] = 'LigoWave Infinity';
$config['os'][$os]['type'] = 'wireless';
$config['os'][$os]['nobulk'] = 1;
$config['os'][$os]['over'][0]['graph'] = 'device_bits';
$config['os'][$os]['over'][0]['text'] = 'Device Traffic';
$config['os'][$os]['over'][1]['graph'] = 'device_processor';
$config['os'][$os]['over'][1]['text'] = 'Processor Usage';
$config['os'][$os]['over'][2]['graph'] = 'device_mempool';
$config['os'][$os]['over'][2]['text'] = 'Memory Usage';
// Ubiquiti
$os = 'unifi';
$config['os'][$os]['text'] = 'Ubiquiti UniFi';
@@ -0,0 +1,22 @@
<?php
/*
* LibreNMS LigoWave Inifinity memory information module
*
* Copyright (c) 2015 Mike Rostermund <mike@kollegienet.dk>
* 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.
*/
if ($device['os'] == 'infinity') {
echo 'INFINITY-MEMORY-POOL: ';
$total = snmp_get($device, '.1.3.6.1.4.1.10002.1.1.1.1.1.0', '-OvQ');
$free = snmp_get($device, '.1.3.6.1.4.1.10002.1.1.1.1.2.0', '-OvQ');
if (is_numeric($total) && is_numeric($free)) {
discover_mempool($valid_mempool, $device, 0, 'infinity', 'Memory', '1', null, null);
}
}
+17
View File
@@ -0,0 +1,17 @@
<?php
/*
* LibreNMS LigoWave os detection module
*
* Copyright (c) 2015 Mike Rostermund <mike@kollegienet.dk>
* 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.
*/
if (!$os) {
if (preg_match('/^NFT 2N/', $sysDescr)) {
$os = 'infinity';
}
}
@@ -0,0 +1,24 @@
<?php
/*
* LibreNMS LigoWave Infinity CPU information module
*
* Copyright (c) 2015 Mike Rostermund <mike@kollegienet.dk>
* 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.
*/
if ($device['os'] == 'infinity') {
echo 'LigoWave Infinity: ';
$descr = 'CPU';
$usage = snmp_get($device, '.1.3.6.1.4.1.10002.1.1.1.4.2.1.3.2', '-Ovqn');
if (is_numeric($usage)) {
discover_processor($valid['processor'], $device, '.1.3.6.1.4.1.10002.1.1.1.4.2.1.3.2', '0', 'infinity', $descr, '1', $usage, null, null);
}
}
unset($processors_array);
@@ -0,0 +1,17 @@
<?php
/*
* LibreNMS LigoWave Infinity memory information module
*
* Copyright (c) 2015 Mike Rostermund <mike@kollegienet.dk>
* 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.
*/
$total = snmp_get($device, '.1.3.6.1.4.1.10002.1.1.1.1.1.0', '-OvQ');
$free = snmp_get($device, '.1.3.6.1.4.1.10002.1.1.1.1.2.0', '-OvQ');
$mempool['total'] = $total * 1024;
$mempool['free'] = $free * 1024;
$mempool['used'] = ($mempool['total'] - $mempool['free']);
+15
View File
@@ -0,0 +1,15 @@
<?php
/*
* LibreNMS LigoWave Infinity OS information module
*
* Copyright (c) 2015 Mike Rostermund <mike@kollegienet.dk>
* 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 = snmp_get($device, 'SNMPv2-MIB::sysDescr.0', '-Ovq');
$version = explode(' ', $version)[2];
$hardware = snmp_get($device, 'IEEE802dot11-MIB::dot11manufacturerProductName.5', '-Ovq');