gonzocrazy eb76218127 Opengear add mempool discovery+polling (#11491)
* opengear MemPools

Discovery and Polling of opengear mempools - opengear Detail Memory Usage is already collected however that can not be used to trigger rules.

* add test

opengear mempools tests

* remove newline
2020-04-27 09:04:57 +02:00

23 lines
743 B
PHP

<?php
/*
*
* LibreNMS mempools discovery module for opengear devices
*
* 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.
* @package LibreNMS
* @subpackage discovery
* @link http://librenms.org
*/
if ($device['os'] == 'opengear') {
$usage = snmp_get($device, 'memIndex.0', '-OvQ', 'UCD-SNMP-MIB');
if (is_numeric($usage)) {
discover_mempool($valid_mempool, $device, '0', 'opengear', 'Memory', '1', null, null);
}
}