<?php
/**
 * Observium
 *
 *   This file is part of Observium.
 *
 * @package        observium
 * @subpackage     definitions
 * @copyright  (C) 2006-2013 Adam Armstrong, (C) 2013-2019 Observium Limited
 *
 */


$mib = 'V1600D';
$config['mibs'][$mib]['enable'] = 1;
$config['mibs'][$mib]['mib_dir'] = 'vsolution';
$config['mibs'][$mib]['descr'] = '';

$config['mibs'][$mib]['sysHardVersion'][]   = [ 'oid' => '.1.3.6.1.4.1.37950.1.1.5.10.12.5.5.0' ];
$config['mibs'][$mib]['sysFirmVersion'][]   = [ 'oid' => '.1.3.6.1.4.1.37950.1.1.5.10.12.5.4.0' ];
$config['mibs'][$mib]['sysRunningTime'][]   = [ 'oid' => '.1.3.6.1.4.1.37950.1.1.5.10.12.5.8.0' ];
$config['mibs'][$mib]['sysTemperature'][]   = [ 'oid' => '.1.3.6.1.4.1.37950.1.1.5.10.12.5.9.0' ];
$config['mibs'][$mib]['sysSerialNumber'][]   = [ 'oid' => '.1.3.6.1.4.1.37950.1.1.5.10.12.5.11.0' ];
$config['mibs'][$mib]['sysDeviceModel'][]   = [ 'oid' => '.1.3.6.1.4.1.37950.1.1.5.10.12.5.15.0' ];



$config['mibs'][$mib]['processor'][] = [
  'type'      => 'static',
  'descr'     => 'CPU Load',
  'oid'     => 'cpuLoad.0',
  'oid_num'       => '.1.3.6.1.4.1.37950.1.1.5.10.12.3.0',
  'min'       => 0,
];

$config['mibs'][$mib]['mempool']["MemoryTable"] = [
  'type'      => 'static',
  'descr'     => 'RAM',
  'oid'       => 'memoryLoad.0',
'oid_perc'  => '.1.3.6.1.4.1.37950.1.1.5.10.12.4.0',
'min'       => 0,
];

$config['mibs'][$mib]['sensor'][] = [
  'type'      => 'static',
  'class'      => 'temperature',
  'descr'      => 'Temperature',
  'scale'               => 1,
  'min'                 => -100,
  'oid'      => 'sysTemperature.0',
  'oid_num'    => '.1.3.6.1.4.1.37950.1.1.5.10.12.5.9',
];


$config['mibs'][$mib]['sensor'][] = [
  'class'      => 'dbm',
  'descr'      => 'TX Power PON0/%index%',
  'min'                 => 0,
  'oid'      => 'transmitPower',
  'oid_num'    => '.1.3.6.1.4.1.37950.1.1.5.10.13.1.1.5',
  'measured'            => 'port',
  'measured_match'      => [ 'entity_type' => 'port', 'field' => 'ifName', 'match' => '[A-Z]PON0/%index%$', 'condition' => 'REGEXP' ],
  'transformations' => [ 
    [ 'action' => 'replace',  'from' => 'dBm)', 'to' => '']
  ],
];

$config['mibs'][$mib]['sensor'][] = [
  'class'      => 'temperature',
  'descr'      => 'Temperature PON0/%index%',
  'min'                 => 1,
  'oid'      => 'tempperature',
  'oid_num'    => '.1.3.6.1.4.1.37950.1.1.5.10.13.1.1.2',
  'measured'            => 'port',
  'limit_high' => '90',
  'limit_low' => '15',
  'measured_match'      => [ 'entity_type' => 'port', 'field' => 'ifName', 'match' => '[A-Z]PON0/%index%$', 'condition' => 'REGEXP' ],
];

# Onu Trance Riceve Power

#$config['mibs'][$mib]['sensor'][] = [
#  'class'      => 'dbm',
#  'descr'      => 'Rx Power EPON0/%index%',
#  'min'                 => 0,
#  'oid'      => 'onuOpmPowerRx',
#  'oid_num'    => '.1.3.6.1.4.1.37950.1.1.5.12.2.1.14.1.3',
#  'measured'            => 'port',
#  'measured_match'      => [ 'entity_type' => 'port', 'field' => 'ifName', 'match' => '[A-Z]EPON0/%index%$', 'condition' => 'REGEXP' ],
#  'transformations' => [ 
#    [ 'action' => 'replace',  'from' => 'dBm)', 'to' => '']
#  ],
#  ];

# Onu Online Show By Pon

 $config['mibs'][$mib]['counter'][] = [
  'type'      => 'static',
  'class'      => 'counter',
  'descr'      => 'ONU Online - PON %index%',
  'scale'        => 1,
  'min'         => 0,
  'oid'      => 'onuNumberOnline',
  'oid_num'    => '.1.3.6.1.4.1.37950.1.1.5.12.1.27.1.3',
 ];
 
# Onu Deragister Reason
 $config['mibs'][$mib]['status'][] = array(
  'table'               => 'onuAuthInfo2Entry',
  'oid'                 => 'lineStatus2',
  'descr'               => 'DownReason->  %onuAuthInfo2DeregReason% %onuAuthInfoLastDeregTime% EPON0/%index% %onuAuthInfoDescription2%',
  'oid_num'             => '.1.3.6.1.4.1.37950.1.1.5.12.1.25.1.4',
  'measured'            => 'port',
  'measured_match' => [[ 'entity_type' => 'port', 'field' => 'ifName', 'match' => '[A-Z]EPON0/%index%$', 'condition' =>  'REGEXP'] ],
  'type'                => 'OnuStatus'
 );
 $type = 'OnuStatus';
 $config['mibs'][$mib]['states'][$type][0] = array('name' => 'Offline',   'event' => 'alert');
 $config['mibs'][$mib]['states'][$type][1] = array('name' => 'Online',    'event' => 'ok');
 $config['mibs'][$mib]['states'][$type][2] = array('name' => 'Not Down',   'event' => 'ignore');
 
 
 # Onu Deragister Reason
 $config['mibs'][$mib]['status'][] = array(
  'table'               => 'onuAuthInfo2Entry',
  'oid'                 => 'onuAuthInfo2DeregReason',
  'descr'               => 'EPON0/%index% %onuAuthInfoDescription2% %onuMacAddr2%',
  'oid_num'             => '.1.3.6.1.4.1.37950.1.1.5.12.1.25.1.19',
  'measured'            => 'port',
  'measured_match' => [[ 'entity_type' => 'port', 'field' => 'ifName', 'match' => '[A-Z]EPON0/%index%$', 'condition' =>  'REGEXP'] ],
  'type'                => 'OnuStatus'
 );
 $type = 'OnuStatus';
 $config['mibs'][$mib]['states'][$type][0] = array('name' => 'Wire-Down',   'event' => 'alert');
 $config['mibs'][$mib]['states'][$type][1] = array('name' => 'Power-Off',    'event' => 'ignore');
 $config['mibs'][$mib]['states'][$type][2] = array('name' => 'Not Down',   'event' => 'ok');
 
 
 
 
 
 
 
 
 
// EOF

