COMPLETE: Add support for Maipu


os: mypoweros
text: 'Maipu MyPower'
type: network
icon: maipu
ifname: true
    - { graph: device_bits, text: 'Device Traffic' }
    - { graph: device_processor, text: 'Processor Usage' }
    - { graph: device_mempool, text: 'Memory Usage' }
    - sysObjectID:
        - .
        - .
        - .

add mib file MPIOS-MIB.txt to mibs/

includes/definitions/discovery/mypoweros.yaml for CPU

                oid: cpuUtilCurrentUtil
                num_oid: '.{{ $index }}'
                index: 1

includes/discovery/mempools/ for mem


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);

includes/polling/mempools/ for mem


echo 'Maipu MemPool';

$memory_total = snmp_get($device, "memoryTotalBytes.0", '-OvQ', 'MPIOS-MIB');
$memory_alloc = snmp_get($device, "numBytesAlloc.0", '-OvQ', 'MPIOS-MIB');
$memory_free = snmp_get($device, "numBytesFree.0", '-OvQ', 'MPIOS-MIB');
$mempool['total'] = $memory_total;
$mempool['used'] = $memory_alloc;
$mempool['free'] = $memory_free;

and the logo

I test it in maipu s6600,s3320 and s3120


Do you mind doing it correctly?

I test it,all is right

If you dont know how or just dont want to, its ok.

But we cant add support for that without the snmprec file.

Is in the tests section of the link posted before

sorry for my little english.

Do you mean that I need to upload a snmprec file?

You need to do point 6. ./scripts/collect-snmp-data.php -h yourmaipudeviceid

That will generate a file called maipu.snmprec in $libredir/tests/snmpsim/

We need that file to properly add a new OS.

The BEST way of doing all this is if you do it by yourself, following this:

But if you dont know how to do it, we can do it for you with the data you provided, but we need the snmprec file.

I generate this file mypoweros.snmprec for maipu s3320

thanks for your help

@deddey You should probably create a pull request on github to get this merged upstream.

@deddey Check a test #9825

Thank you for your work, and I am working hard to learn to use git to submit patches.

You’re welcome. You did all the work, I’ve only submitted your changes to git.

Im closing this thread as device has been added to master.

REMEMBER to remove your changes to keep receiving updates.

To do it you must run ./scripts/github-remove -d and then ./ to update your install.

TAKE CARE that command will remove ALL your modified files, so if you has made custom changes they will be removed.