mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
MAIPU MyPowerOS: CPU, Memory, expanded detection (#9825)
* New OS: MAIPU MyPowerOS * fix file permissions
This commit is contained in:
8
includes/definitions/discovery/mypoweros.yaml
Executable file
8
includes/definitions/discovery/mypoweros.yaml
Executable 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
|
@@ -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
|
||||
|
||||
|
9
includes/discovery/mempools/mypoweros.inc.php
Executable file
9
includes/discovery/mempools/mypoweros.inc.php
Executable 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);
|
||||
}
|
||||
}
|
9
includes/polling/mempools/mypoweros.inc.php
Executable file
9
includes/polling/mempools/mypoweros.inc.php
Executable 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'];
|
Reference in New Issue
Block a user