mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
fix: Fixed CPU/Mem polling for Cyberoam-UTM devices (#6315)
This commit is contained in:
@@ -26,7 +26,7 @@
|
||||
if ($device['os'] === 'cyberoam-utm') {
|
||||
echo 'Cyberoam UTM : ';
|
||||
|
||||
$oid = '.1.3.6.1.4.1.21067.2.1.1.3.0';
|
||||
$oid = '.1.3.6.1.4.1.21067.2.1.2.2.1.0';
|
||||
$descr = 'Processor';
|
||||
$usage = snmp_get($device, $oid, '-Ovqn');
|
||||
|
||||
|
@@ -23,17 +23,19 @@
|
||||
* @author Neil Lathwood <neil@lathwood.co.uk>
|
||||
*/
|
||||
|
||||
if ($mempool['mempool_index'] === 0) {
|
||||
if ($mempool['mempool_index'] == 0) {
|
||||
$mem_perc = snmp_get($device, '.1.3.6.1.4.1.21067.2.1.2.4.2.0', '-OvQ');
|
||||
$mem_capacity = snmp_get($device, '.1.3.6.1.4.1.21067.2.1.2.4.1.0', '-OvQ');
|
||||
$mem_capacity = ($mem_capacity*1024*1024);
|
||||
$mempool['total'] = $mem_capacity;
|
||||
$mempool['used'] = ($mem_capacity / 100) * $mem_perc;
|
||||
$mempool['free'] = $mempool['total'] - $mempool['used'];
|
||||
}
|
||||
|
||||
if ($mempool['mempool_index'] === 1) {
|
||||
if ($mempool['mempool_index'] == 1) {
|
||||
$swap_perc = snmp_get($device, '.1.3.6.1.4.1.21067.2.1.2.4.4.0', '-OvQ');
|
||||
$swap_capacity = snmp_get($device, '.1.3.6.1.4.1.21067.2.1.2.4.3.0', '-OvQ');
|
||||
$swap_capacity = ($swap_capacity*1024*1024);
|
||||
$mempool['total'] = $swap_capacity;
|
||||
$mempool['used'] = ($swap_capacity / 100) * $swap_perc;
|
||||
$mempool['free'] = $mempool['total'] - $mempool['used'];
|
||||
|
Reference in New Issue
Block a user