Details

    • Improvement
    • Resolution: Fixed
    • Minor
    • None
    • Professional Edition
    • Discovery
    • None

    Description

      see attache file

      Attachments

        1. moxa.txt
          5 kB
        2. MoxaEDS-P506E.snmpwlk
          618 kB
        3. screenshot-1.png
          screenshot-1.png
          93 kB

        Activity

          [OBS-3233] Moxa EDS-P506E support.

          The

          $config['mibs'][$mib]['processor']['swMgmt']

          "swMgmt" is the parent oid.

          okay, the oid and key can be the same.

          Eideen Torstein Eide added a comment - The $config[ 'mibs' ][$mib][ 'processor' ][ 'swMgmt' ] "swMgmt" is the parent oid. okay, the oid and key can be the same.

          Why? the discovery will translate it. i currently don't see the benefit of using my time on doing a task that the discovery script does more effectively at minimal cost.

          Eideen Torstein Eide added a comment - Why? the discovery will translate it. i currently don't see the benefit of using my time on doing a task that the discovery script does more effectively at minimal cost.

          Module Start: os  #####
           
          +-------------+-------------------------+
          | OID         |                         |
          +-------------+-------------------------+
          | sysDescr    | SW01 i PS102            |
          | sysObjectID | .1.3.6.1.4.1.8691.7.162 |
          +-------------+-------------------------+
           
           o Detect OS matched (moxa-switch: Moxa Switch): 
          +-------------+---------------------+-------------------------+
          | OID         | Matched definition  |                         |
          +-------------+---------------------+-------------------------+
          | sysObjectID | .1.3.6.1.4.1.8691.7 | .1.3.6.1.4.1.8691.7.162 |
          +-------------+---------------------+-------------------------+
           
           
           o Duration             0.0701s
           

          User defined. and with that we need a model.php entry per model anyway, it is redundant.

          Eideen Torstein Eide added a comment - Module Start: os #####   +-------------+-------------------------+ | OID | | +-------------+-------------------------+ | sysDescr | SW01 i PS102 | | sysObjectID | . 1.3 . 6.1 . 4.1 . 8691.7 . 162 | +-------------+-------------------------+   o Detect OS matched (moxa- switch : Moxa Switch): +-------------+---------------------+-------------------------+ | OID | Matched definition | | +-------------+---------------------+-------------------------+ | sysObjectID | . 1.3 . 6.1 . 4.1 . 8691.7 | . 1.3 . 6.1 . 4.1 . 8691.7 . 162 | +-------------+---------------------+-------------------------+     o Duration 0 .0701s   User defined. and with that we need a model.php entry per model anyway, it is redundant.

          we do have OID that is definited.

          Eideen Torstein Eide added a comment - we do have OID that is definited.

          Please show why incorrect (examples of incorrect sysDescr) for hardware detect:

          -$config['os'][$os]['sysDescr_regex'][]      = '/^(?:MOXA )?(?<hardware>\w\S+)/';

          landy Mike Stupalov added a comment - Please show why incorrect (examples of incorrect sysDescr) for hardware detect: -$config['os'][$os]['sysDescr_regex'][] = '/^(?:MOXA )?(?<hardware>\w\S+)/';

          and please still use file attachments.

          landy Mike Stupalov added a comment - and please still use file attachments.

          There is not "random keys", it's should be table oid name or same as oid name:

          $config['mibs'][$mib]['processor']['swMgmt']

          do not use 5s cpu load - this is not correct for monitoring, because every device increase self load on snmp request/responce.
          correctly to use is 1m/5m or whatever exist for device snmp data.:

          -'oid' => 'cpuLoading5s.0',
          +'oid' => 'cpuLoading30s.0',

          landy Mike Stupalov added a comment - There is not "random keys", it's should be table oid name or same as oid name: $config['mibs'][$mib]['processor']['swMgmt'] do not use 5s cpu load - this is not correct for monitoring, because every device increase self load on snmp request/responce. correctly to use is 1m/5m or whatever exist for device snmp data.: -'oid' => 'cpuLoading5s.0', +'oid' => 'cpuLoading30s.0',

          What you mean as ifHardType (we not have such oid definition)?..

          landy Mike Stupalov added a comment - What you mean as ifHardType (we not have such oid definition)?..

          Please... fill oid_num keys.. this is not hard.

          landy Mike Stupalov added a comment - Please... fill oid_num keys.. this is not hard.
          Eideen Torstein Eide added a comment - - edited

          The 'sysDescr' is user defined so it can't be used as identifier.
          the etherlike MIB is not working with "ifDuplex".

          Index: includes/definitions/os/moxa.inc.php
          ===================================================================
          --- includes/definitions/os/moxa.inc.php	(revision 10289)
          +++ includes/definitions/os/moxa.inc.php	(working copy)
          @@ -49,5 +49,6 @@
          -$config['os'][$os]['sysDescr_regex'][]      = '/^(?:MOXA )?(?<hardware>\w\S+)/';
           $config['os'][$os]['mib_blacklist'][]       = "HOST-RESOURCES-MIB";
           $config['os'][$os]['mib_blacklist'][]       = "UCD-SNMP-MIB";
          +$config['os'][$os]['mib_blacklist'][]                = "EtherLike-MIB"; //  For "ifDuplex" to work the private MIB needs to run first.
           
           // EOF
          

          Missning memory, cpu.
          Also add for MOXA-EDS408A-MIB

          Index: includes/definitions/mibs/moxa.inc.php
          ===================================================================
          --- includes/definitions/mibs/moxa.inc.php	(revision 10289)
          +++ includes/definitions/mibs/moxa.inc.php	(working copy)
          @@ -55,7 +55,9 @@
                                                                                                                  'speed100M-Half'  => 'halfDuplex',
                                                                                                                  'speed10M-Full'   => 'fullDuplex',
                                                                                                                  'speed10M-Half'   => 'halfDuplex', ] ]),
          -  'ifAlias'              => array('oid' => 'portName')
          +  'ifAlias'              => array('oid' => 'portName'),
          +  'ifHardType'					 =>array('oid' => 'portDesc'),
          + 
           );
           
           $config['mibs'][$mib]['status'][] = array(
          @@ -78,6 +80,70 @@
           $config['mibs'][$mib]['states'][$type][0]  = array('name' => 'not-present', 'event' => 'alert');
           $config['mibs'][$mib]['states'][$type][1]  = array('name' => 'present',     'event' => 'ok');
           
          +
          +$mib = 'MOXA-EDS408A-MIB';
          +$config['mibs'][$mib]['enable'] = 1;
          +$config['mibs'][$mib]['identity_num'] = '.1.3.6.1.4.1.8691.7.7';
          +$config['mibs'][$mib]['mib_dir'] = 'moxa';
          +$config['mibs'][$mib]['descr'] = 'The MIB module for Moxa EDS-408A series specific information.';
          +
          +$config['mibs'][$mib]['version'][] = array('oid' => 'firmwareVersion.0', 'transform' => [ 'action' => 'replace', 'from' => 'V', 'to' => '' ]);
          +
          +$config['mibs'][$mib]['ip-address'][] = [
          +  'ifIndex'       => '%index%', // there is not real ifIndex, just always 0
          +  'version'       => 'ipv4',
          +  'oid_mask'      => 'switchIpMask',
          +  'oid_address'   => 'switchIpAddr',
          +];
          +
          +$config['mibs'][$mib]['ports']['portTable']['oids'] = array(
          +  /*'ifName'               => array('oid' => 'portSubdesc'),*/
          +  'ifDuplex'             => array('oid' => 'monitorSpeed', 'transform' => [ 'action' => 'map', 'map' => [ 'na' => 'unknown',
          +                                                                                                       'speed100M-Full'  => 'fullDuplex',
          +                                                                                                       'speed100M-Half'  => 'halfDuplex',
          +                                                                                                       'speed10M-Full'   => 'fullDuplex',
          +                                                                                                       'speed10M-Half'   => 'halfDuplex', ] ]),
          +  'ifAlias'              => array('oid' => 'portName'),
          +  'ifHardType'					 =>array('oid' => 'portDesc'),
          +);
          +
          +$config['mibs'][$mib]['status'][] = array(
          +  'type'           => 'powerInputStatus',
          +  'descr'          => 'Power Supply 1',
          +  'oid'            => 'power1InputStatus',
          +  //'oid_num'        => '',
          +  'measured'       => 'powersupply',
          +  'test'           => [ 'field' => 'power1InputStatus', 'operator' => 'ne', 'value' => 'not-present' ]
          +);
          +$config['mibs'][$mib]['status'][] = array(
          +  'type'           => 'powerInputStatus',
          +  'descr'          => 'Power Supply 2',
          +  'oid'            => 'power2InputStatus',
          +  //'oid_num'        => '',
          +  'measured'       => 'powersupply',
          +  'test'           => [ 'field' => 'power2InputStatus', 'operator' => 'ne', 'value' => 'not-present' ]
          +);
          +$type = 'powerInputStatus';
          +$config['mibs'][$mib]['states'][$type][0]  = array('name' => 'not-present', 'event' => 'alert');
          +$config['mibs'][$mib]['states'][$type][1]  = array('name' => 'present',     'event' => 'ok');
          +
          +$config['mibs'][$mib]['processor']['swMgmt'] = array(
          +'type' => 'static',
          +'descr' => 'Processor',
          +'oid' => 'cpuLoading5s.0', 
          +//'oid_num' => ''
          +);
          +$config['mibs'][$mib]['mempool']['swMgmt'] = array(
          +'type'      => 'static', 
          +'descr' => 'Memory', 
          +//'scale' => 1024,
          +'oid_total' => 'totalMemory.0',
          +//'oid_free'  => 'freeMemory.0',
          +'oid_used' => 'usedMemory.0'
          +     );
          +
          +
          +
           $mib = 'MOXA-EDS405A_PTP-MIB';
           $config['mibs'][$mib]['enable'] = 1;
           $config['mibs'][$mib]['identity_num'] = '.1.3.6.1.4.1.8691.7.89';
          @@ -128,6 +194,25 @@
           $config['mibs'][$mib]['states'][$type][0]  = array('name' => 'not-present', 'event' => 'alert');
           $config['mibs'][$mib]['states'][$type][1]  = array('name' => 'present',     'event' => 'ok');
           
          +$config['mibs'][$mib]['processor']['swMgmt'] = array(
          +'type' => 'static',
          +'descr' => 'Processor',
          +'oid' => 'cpuLoading5s.0', 
          +//'oid_num' => ''
          +);
          +$config['mibs'][$mib]['mempool']['swMgmt'] = array(
          +'type'      => 'static', 
          +'descr' => 'Memory', 
          +//'scale' => 1024,
          +'oid_total' => 'totalMemory.0',
          +//'oid_free'  => 'freeMemory.0',
          +'oid_used' => 'usedMemory.0'
          +     );
          +
          +
          +
          +
          +
           $mib = 'MOXA-EDS508A-MIB';
           $config['mibs'][$mib]['enable'] = 1;
           $config['mibs'][$mib]['identity_num'] = '.1.3.6.1.4.1.8691.7.9';
          @@ -321,4 +406,20 @@
           $config['mibs'][$mib]['states'][$type][5]  = array('name' => 'legacyPowered',     'event' => 'ok');
           $config['mibs'][$mib]['states'][$type][6]  = array('name' => 'potentialLegacyPD', 'event' => 'ok');
           
          +
          +
          +$config['mibs'][$mib]['processor']['swMgmt'] = array(
          +'type' => 'static',
          +'descr' => 'Processor',
          +'oid' => 'cpuLoading5s.0', 
          +//'oid_num' => ''
          +);
          +$config['mibs'][$mib]['mempool']['swMgmt'] = array(
          +'type'      => 'static', 
          +'descr' => 'Memory', 
          +//'scale' => 1024,
          +'oid_total' => 'totalMemory.0',
          +//'oid_free'  => 'freeMemory.0',
          +'oid_used' => 'usedMemory.0'
          +     );
           // EOF
          
          

          Eideen Torstein Eide added a comment - - edited The 'sysDescr' is user defined so it can't be used as identifier. the etherlike MIB is not working with "ifDuplex". Index: includes/definitions/os/moxa.inc.php =================================================================== --- includes/definitions/os/moxa.inc.php (revision 10289) +++ includes/definitions/os/moxa.inc.php (working copy ) @@ -49,5 +49,6 @@ - $config [ 'os' ][ $os ][ 'sysDescr_regex' ][] = '/^(?:MOXA )?(?<hardware>\w\S+)/' ; $config [ 'os' ][ $os ][ 'mib_blacklist' ][] = "HOST-RESOURCES-MIB" ; $config [ 'os' ][ $os ][ 'mib_blacklist' ][] = "UCD-SNMP-MIB" ; + $config [ 'os' ][ $os ][ 'mib_blacklist' ][] = "EtherLike-MIB" ; // For "ifDuplex" to work the private MIB needs to run first. // EOF Missning memory, cpu. Also add for MOXA-EDS408A-MIB Index: includes/definitions/mibs/moxa.inc.php =================================================================== --- includes/definitions/mibs/moxa.inc.php (revision 10289) +++ includes/definitions/mibs/moxa.inc.php (working copy ) @@ -55,7 +55,9 @@ 'speed100M-Half' => 'halfDuplex' , 'speed10M-Full' => 'fullDuplex' , 'speed10M-Half' => 'halfDuplex' , ] ]), - 'ifAlias' => array ( 'oid' => 'portName' ) + 'ifAlias' => array ( 'oid' => 'portName' ), + 'ifHardType' => array ( 'oid' => 'portDesc' ), + ); $config [ 'mibs' ][ $mib ][ 'status' ][] = array ( @@ -78,6 +80,70 @@ $config [ 'mibs' ][ $mib ][ 'states' ][ $type ][0] = array ( 'name' => 'not-present' , 'event' => 'alert' ); $config [ 'mibs' ][ $mib ][ 'states' ][ $type ][1] = array ( 'name' => 'present' , 'event' => 'ok' ); + + $mib = 'MOXA-EDS408A-MIB' ; + $config [ 'mibs' ][ $mib ][ 'enable' ] = 1; + $config [ 'mibs' ][ $mib ][ 'identity_num' ] = '.1.3.6.1.4.1.8691.7.7' ; + $config [ 'mibs' ][ $mib ][ 'mib_dir' ] = 'moxa' ; + $config [ 'mibs' ][ $mib ][ 'descr' ] = 'The MIB module for Moxa EDS-408A series specific information.' ; + + $config [ 'mibs' ][ $mib ][ 'version' ][] = array ( 'oid' => 'firmwareVersion.0' , 'transform' => [ 'action' => 'replace' , 'from' => 'V' , 'to' => '' ]); + + $config [ 'mibs' ][ $mib ][ 'ip-address' ][] = [ + 'ifIndex' => '%index%' , // there is not real ifIndex, just always 0 + 'version' => 'ipv4' , + 'oid_mask' => 'switchIpMask' , + 'oid_address' => 'switchIpAddr' , +]; + + $config [ 'mibs' ][ $mib ][ 'ports' ][ 'portTable' ][ 'oids' ] = array ( + /*'ifName' => array('oid' => 'portSubdesc'),*/ + 'ifDuplex' => array ( 'oid' => 'monitorSpeed' , 'transform' => [ 'action' => 'map' , 'map' => [ 'na' => 'unknown' , + 'speed100M-Full' => 'fullDuplex' , + 'speed100M-Half' => 'halfDuplex' , + 'speed10M-Full' => 'fullDuplex' , + 'speed10M-Half' => 'halfDuplex' , ] ]), + 'ifAlias' => array ( 'oid' => 'portName' ), + 'ifHardType' => array ( 'oid' => 'portDesc' ), +); + + $config [ 'mibs' ][ $mib ][ 'status' ][] = array ( + 'type' => 'powerInputStatus' , + 'descr' => 'Power Supply 1' , + 'oid' => 'power1InputStatus' , + //'oid_num' => '', + 'measured' => 'powersupply' , + 'test' => [ 'field' => 'power1InputStatus' , 'operator' => 'ne' , 'value' => 'not-present' ] +); + $config [ 'mibs' ][ $mib ][ 'status' ][] = array ( + 'type' => 'powerInputStatus' , + 'descr' => 'Power Supply 2' , + 'oid' => 'power2InputStatus' , + //'oid_num' => '', + 'measured' => 'powersupply' , + 'test' => [ 'field' => 'power2InputStatus' , 'operator' => 'ne' , 'value' => 'not-present' ] +); + $type = 'powerInputStatus' ; + $config [ 'mibs' ][ $mib ][ 'states' ][ $type ][0] = array ( 'name' => 'not-present' , 'event' => 'alert' ); + $config [ 'mibs' ][ $mib ][ 'states' ][ $type ][1] = array ( 'name' => 'present' , 'event' => 'ok' ); + + $config [ 'mibs' ][ $mib ][ 'processor' ][ 'swMgmt' ] = array ( + 'type' => 'static' , + 'descr' => 'Processor' , + 'oid' => 'cpuLoading5s.0' , + //'oid_num' => '' +); + $config [ 'mibs' ][ $mib ][ 'mempool' ][ 'swMgmt' ] = array ( + 'type' => 'static' , + 'descr' => 'Memory' , + //'scale' => 1024, + 'oid_total' => 'totalMemory.0' , + //'oid_free' => 'freeMemory.0', + 'oid_used' => 'usedMemory.0' + ); + + + $mib = 'MOXA-EDS405A_PTP-MIB' ; $config [ 'mibs' ][ $mib ][ 'enable' ] = 1; $config [ 'mibs' ][ $mib ][ 'identity_num' ] = '.1.3.6.1.4.1.8691.7.89' ; @@ -128,6 +194,25 @@ $config [ 'mibs' ][ $mib ][ 'states' ][ $type ][0] = array ( 'name' => 'not-present' , 'event' => 'alert' ); $config [ 'mibs' ][ $mib ][ 'states' ][ $type ][1] = array ( 'name' => 'present' , 'event' => 'ok' ); + $config [ 'mibs' ][ $mib ][ 'processor' ][ 'swMgmt' ] = array ( + 'type' => 'static' , + 'descr' => 'Processor' , + 'oid' => 'cpuLoading5s.0' , + //'oid_num' => '' +); + $config [ 'mibs' ][ $mib ][ 'mempool' ][ 'swMgmt' ] = array ( + 'type' => 'static' , + 'descr' => 'Memory' , + //'scale' => 1024, + 'oid_total' => 'totalMemory.0' , + //'oid_free' => 'freeMemory.0', + 'oid_used' => 'usedMemory.0' + ); + + + + + $mib = 'MOXA-EDS508A-MIB' ; $config [ 'mibs' ][ $mib ][ 'enable' ] = 1; $config [ 'mibs' ][ $mib ][ 'identity_num' ] = '.1.3.6.1.4.1.8691.7.9' ; @@ -321,4 +406,20 @@ $config [ 'mibs' ][ $mib ][ 'states' ][ $type ][5] = array ( 'name' => 'legacyPowered' , 'event' => 'ok' ); $config [ 'mibs' ][ $mib ][ 'states' ][ $type ][6] = array ( 'name' => 'potentialLegacyPD' , 'event' => 'ok' ); + + + $config [ 'mibs' ][ $mib ][ 'processor' ][ 'swMgmt' ] = array ( + 'type' => 'static' , + 'descr' => 'Processor' , + 'oid' => 'cpuLoading5s.0' , + //'oid_num' => '' +); + $config [ 'mibs' ][ $mib ][ 'mempool' ][ 'swMgmt' ] = array ( + 'type' => 'static' , + 'descr' => 'Memory' , + //'scale' => 1024, + 'oid_total' => 'totalMemory.0' , + //'oid_free' => 'freeMemory.0', + 'oid_used' => 'usedMemory.0' + ); // EOF

          Added in r10272.

          landy Mike Stupalov added a comment - Added in r10272.

          People

            landy Mike Stupalov
            Eideen Torstein Eide
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: