MAIPU MyPowerOS: CPU, Memory, expanded detection (#9825)

* New OS: MAIPU MyPowerOS

* fix file permissions
This commit is contained in:
TheGreatDoc
2019-02-15 15:02:06 +01:00
committed by Tony Murray
parent 5d74839139
commit 6ea0e72d73
9 changed files with 42146 additions and 1 deletions

View File

@@ -0,0 +1,8 @@
mib: MPIOS-MIB
modules:
processors:
data:
-
oid: cpuUtilCurrentUtil
num_oid: '.1.3.6.1.4.1.5651.3.20.1.1.3.5.1.10.{{ $index }}'
index: 1

View File

@@ -3,10 +3,15 @@ text: 'Maipu MyPower'
type: network
icon: maipu
ifname: true
mib_dir:
- maipu
over:
- { graph: device_bits, text: 'Device Traffic' }
- { graph: device_processor, text: 'Processor Usage' }
- { graph: device_mempool, text: 'Memory Usage' }
discovery:
- sysObjectID:
- .1.3.6.1.4.1.5651.1.102.21
- .1.3.6.1.4.1.5651.1.101
- .1.3.6.1.4.1.5651.1.102
- .1.3.6.1.4.1.5651.1.103

View File

@@ -0,0 +1,9 @@
<?php
if ($device['os'] === 'mypoweros') {
echo 'MAIPU-MEMORY-POOL: ';
$usage = snmp_get($device, 'allocBytesPercent.0', '-OvQ', 'MPIOS-MIB');
if (is_numeric($usage)) {
discover_mempool($valid_mempool, $device, 0, 'mypoweros', 'Memory', '100', null, null);
}
}

View File

@@ -0,0 +1,9 @@
<?php
echo 'Maipu MemPool';
$memory = snmp_get_multi_oid($device, ['memoryTotalBytes.0, numBytesAlloc.0, numBytesFree.0'], '-OvQ', 'MPIOS-MIB');
$mempool['total'] = $memory['memoryTotalBytes.0'];
$mempool['used'] = $memory['numBytesAlloc.0'];
$mempool['free'] = $memory['numBytesFree.0'];