Last active
February 3, 2020 11:53
-
-
Save Torstein-Eide/19c0cc94fb0f9e25a1b92dc2bf726129 to your computer and use it in GitHub Desktop.
Observium Korenix definisjon
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Observium | |
* | |
* This file is part of Observium. | |
* | |
*/ | |
/////// Jetnet4508f-v2 ///////// | |
$mib = 'Jetnet4508fV2'; // does not like N in JetNet | |
$config['mibs'][$mib]['enable'] = 1; | |
$config['mibs'][$mib]['identity_num'] = '.1.3.6.1.4.1.24062.2.2.18'; | |
$config['mibs'][$mib]['mib_dir'] = 'korenix-netjet'; | |
$config['mibs'][$mib]['descr'] = ''; | |
$config['mibs'][$mib]['version'][] = array( | |
'oid' => 'systemFwVer.0', | |
'transformations' => array('action' => 'regex_replace', 'from' => '/(.*)-.*-.*/', | |
'to' => '$1')); | |
$config['mibs'][$mib]['ports']['portTable']['oids'] = array( | |
'ifName' => array('oid' => 'portCtrlPortName'), | |
'ifAlias' => array('oid' => 'portCtrlPortDescription') | |
// MAC? | |
// 'MACAddrEntry' | |
); | |
/////// Jetnet4510 ///////// | |
$mib = 'Jetnet4510'; // does not like N in JetNet | |
$config['mibs'][$mib]['enable'] = 1; | |
$config['mibs'][$mib]['identity_num'] = '.1.3.6.1.4.1.24062.2.2.3'; | |
$config['mibs'][$mib]['mib_dir'] = 'korenix-netjet'; | |
$config['mibs'][$mib]['descr'] = ''; | |
$config['mibs'][$mib]['version'][] = array( | |
'oid' => 'systemFwVer.0', | |
'transformations' => array('action' => 'regex_replace', 'from' => '/.*-(.*)-.*-.*/', | |
'to' => '$1')); | |
$config['mibs'][$mib]['ports']['portTable']['oids'] = array( | |
'ifName' => array('oid' => 'portCtrlPortName'), | |
'ifAlias' => array('oid' => 'portCtrlPortDescription')); | |
$config['mibs'][$mib]['status'][] = array( | |
'type' => 'SfpTransceiver', | |
'descr' => '%port_label% Transceiver (%sfpVender%, %sfpDistance%m, %sfpWavelength%nm)', | |
'oid' => 'portStatusType', | |
'oid_extra' => [ 'sfpVender','sfpWavelength', 'sfpDistance' ], | |
'measured' => 'port', | |
'measured_match' => ['entity_type' => 'port', 'field' => 'ifIndex', 'match' => '%index%' ] | |
); | |
$type = 'SfpTransceiver'; | |
$config['mibs'][$mib]['states'][$type][0] = array('name' => '' , 'event' => 'exclude'); | |
$config['mibs'][$mib]['states'][$type][1] = array('name' => 'hundredBaseTX' , 'event' => 'exclude'); | |
$config['mibs'][$mib]['states'][$type][2] = array('name' => 'thousandBaseT' , 'event' => 'exclude'); | |
$config['mibs'][$mib]['states'][$type][3] = array('name' => 'hundredBaseFX' , 'event' => 'ok'); | |
$config['mibs'][$mib]['states'][$type][4] = array('name' => 'thousandBaseSX', 'event' => 'ok'); | |
$config['mibs'][$mib]['states'][$type][5] = array('name' => 'thousandBaseLX', 'event' => 'ok'); | |
$config['mibs'][$mib]['states'][$type][6] = array('name' => 'other' , 'event' => 'ok'); | |
$config['mibs'][$mib]['states'][$type][7] = array('name' => 'notPresent', 'event' => 'exclude'); | |
//////////////////////////////////////////////////////////////////// | |
/////// Jetnet5010G-MIB ///////// | |
$mib = 'Jetnet5010G'; // does not like N in JetNet | |
$config['mibs'][$mib]['enable'] = 1; | |
$config['mibs'][$mib]['identity_num'] = '.1.3.6.1.4.1.24062.2.3.1'; | |
$config['mibs'][$mib]['mib_dir'] = 'korenix-netjet'; | |
$config['mibs'][$mib]['descr'] = ''; | |
$config['mibs'][$mib]['version'][] = array( | |
'oid' => 'systemFwVer.0', | |
'transformations' => array('action' => 'regex_replace', 'from' => '/JetNet5010G-(.*)-.*-.*/', | |
'to' => '$1')); | |
$config['mibs'][$mib]['ports']['portTable']['oids'] = array( | |
'ifName' => array('oid' => 'portCtrlPortName'), | |
'ifAlias' => array('oid' => 'portCtrlPortDescription')); | |
$type = 'LEDstatus'; | |
$config['mibs'][$mib]['states'][$type][1] = array('name' => 'on' , 'event' => 'ok'); | |
$config['mibs'][$mib]['states'][$type][2] = array('name' => 'blinkNormal', 'event' => 'warning'); | |
$config['mibs'][$mib]['states'][$type][3] = array('name' => 'blinkFast' , 'event' => 'alert'); | |
$config['mibs'][$mib]['states'][$type][4] = array('name' => 'off' , 'event' => 'ok'); | |
$type = 'LEDstatusPower'; | |
$config['mibs'][$mib]['states'][$type][1] = array('name' => 'on' , 'event' => 'ok'); | |
$config['mibs'][$mib]['states'][$type][2] = array('name' => 'blinkNormal', 'event' => 'warning'); | |
$config['mibs'][$mib]['states'][$type][3] = array('name' => 'blinkFast' , 'event' => 'alert'); | |
$config['mibs'][$mib]['states'][$type][4] = array('name' => 'off' , 'event' => 'alert'); | |
$config['mibs'][$mib]['status'][] = array( | |
'type' => 'LEDstatus', //change to power when easy to disable. | |
'descr' => 'Powersupply 1', | |
'oid' => 'ledPower1Status', | |
// 'oid_num' => '', | |
'measured' => 'powersupply' | |
); | |
$config['mibs'][$mib]['status'][] = array( | |
'type' => 'LEDstatus', //change to power when easy to disable. | |
'descr' => 'Powersupply 2', | |
'oid' => 'ledPower2Status', | |
// 'oid_num' => '', | |
'measured' => 'powersupply' | |
); | |
// This is pseudo status, just for see which transceiver used on port. T* is exclude do to not being SFP. | |
$config['mibs'][$mib]['status'][] = array( | |
'type' => 'portStatusType', | |
'descr' => '%port_label% Transceiver (%sfpVender%, %sfpDistance%m, %sfpWavelength%nm)', | |
'oid' => 'portStatusType', | |
'oid_extra' => [ 'sfpVender','sfpWavelength', 'sfpDistance' ], | |
'measured' => 'port', | |
'measured_match' => ['entity_type' => 'port', 'field' => 'ifIndex', 'match' => '%index%' ] | |
); | |
$type = 'portStatusType'; | |
$config['mibs'][$mib]['states'][$type][0] = array('name' => '' , 'event' => 'exclude'); | |
$config['mibs'][$mib]['states'][$type][1] = array('name' => 'hundredBaseTX' , 'event' => 'exclude'); | |
$config['mibs'][$mib]['states'][$type][2] = array('name' => 'thousandBaseT' , 'event' => 'exclude'); | |
$config['mibs'][$mib]['states'][$type][3] = array('name' => 'hundredBaseFX' , 'event' => 'ok'); | |
$config['mibs'][$mib]['states'][$type][4] = array('name' => 'thousandBaseSX', 'event' => 'ok'); | |
$config['mibs'][$mib]['states'][$type][5] = array('name' => 'thousandBaseLX', 'event' => 'ok'); | |
$config['mibs'][$mib]['states'][$type][6] = array('name' => 'other' , 'event' => 'ok'); | |
$config['mibs'][$mib]['states'][$type][7] = array('name' => 'notPresent' , 'event' => 'exclude'); | |
/////// Jetnet5310G //////// | |
$mib = 'Jetnet5310G'; // does not like N in JetNet | |
$config['mibs'][$mib]['enable'] = 1; | |
$config['mibs'][$mib]['identity_num'] = '.1.3.6.1.4.1.24062.2.3.9'; | |
$config['mibs'][$mib]['mib_dir'] = 'korenix-netjet'; | |
$config['mibs'][$mib]['descr'] = ''; | |
$config['mibs'][$mib]['ports']['portTable']['oids'] = array( | |
'ifName' => array('oid' => 'portCtrlPortName'), | |
'ifAlias' => array('oid' => 'portCtrlPortDescription')); | |
// Jetnet5310G::systemFwVer.0 = STRING: 2.0c_b1-20180614-18:17:54 | |
$config['mibs'][$mib]['version'][] = array( | |
'oid' => 'Jetnet5310G::systemFwVer.0', | |
'transformations' => array('action' => 'regex_replace', 'from' => '/(.*)-.*-.*/', | |
'to' => '$1')); | |
// Jetnet5310G::systemSerialNumber.0 = STRING: JN2017091516, unrealaible | |
// $config['mibs'][$mib]['serial'][] = array( 'oid' => 'systemSerialNumber.0'); //unrealaible, returs "N/A" | |
// PoE status | |
$config['mibs'][$mib]['status'][] = array( | |
'type' => 'poeStatusDetectionStatus', | |
'descr' => '%port_label% PoE state (%poeCtrlPoweringMode%)', | |
'descr_transform' => [ 'action' => 'replace', | |
'from' => [ 'ieee802dot3af', 'ieee802dot3at-lldp', 'ieee802dot3at-2event' ], | |
'to' => [ '802.3af PoE', '802.3at PoE+ LLDP' , '802.3at PoE+ 2event' ] ], | |
'oid' => 'poeStatusDetectionStatus', | |
'oid_extra' => [ 'poeCtrlPoweringMode', poeCtrlStatus ], | |
'measured' => 'port', | |
'measured_match' => ['entity_type' => 'port', 'field' => 'ifIndex', 'match' => '%index%' ] | |
); | |
$type = 'poeStatusDetectionStatus'; | |
$config['mibs'][$mib]['states'][$type][1] = array('name' => 'searching' , 'event' => 'ok'); | |
$config['mibs'][$mib]['states'][$type][2] = array('name' => 'powering' , 'event' => 'ok'); | |
$config['mibs'][$mib]['states'][$type][3] = array('name' => 'disable' , 'event' => 'ignore'); | |
// POE power | |
//Jetnet5310G::poeStatusConsumption.3 = STRING: 8.6 | |
$config['mibs'][$mib]['sensor'][] = [ | |
'class' => 'power', | |
'descr' => '%port_label% PoE Power (%poeCtrlPoweringMode%, PD %poeStatusPdClass%)', | |
'descr_transform' => [ 'action' => 'replace', | |
'from' => [ 'ieee802dot3af', 'ieee802dot3at-lldp', 'ieee802dot3at-2event' ], | |
'to' => [ '802.3af PoE', '802.3at PoE+ LLDP' , '802.3at PoE+ 2event' ] ], | |
'oid' => 'poeStatusConsumption', | |
'oid_num' => '.1.3.6.1.4.1.24062.2.3.9.4.3.1.1.5', | |
'oid_extra' => [ 'poeCtrlPoweringMode', 'poeStatusDetectionStatus', 'poeStatusPdClass' ], | |
'rename_rrd' => 'poe-power-%index%', | |
'measured_match' => [ ['entity_type' => 'port', 'field' => 'ifIndex', 'match' => '%index%' ] ], | |
'min' => 0.1, | |
'max' => 50, | |
'limit_high_warn' => 25, // Can Class be used, or % of High? | |
'oid_limit_high' => 'poePowerBudget', | |
'test' => [ 'field' => 'poeStatusDetectionStatus', 'operator' => 'notin', 'value' => [ 'searching', 'disable' ] ] | |
]; | |
/// POE Current | |
$config['mibs'][$mib]['sensor'][] = [ | |
//'table' => 'PoeStatus', | |
'class' => 'current', | |
'descr' => '%port_label% PoE Current (%poeCtrlPoweringMode%, PD %poeStatusPdClass%)', | |
'descr_transform' => [ 'action' => 'replace', | |
'from' => [ 'ieee802dot3af', 'ieee802dot3at-lldp', 'ieee802dot3at-2event' ], | |
'to' => [ '802.3af PoE', '802.3at PoE+ LLDP' , '802.3at PoE+ 2event' ] ], | |
'oid' => 'poeStatusCurrent', | |
'oid_extra' => [ 'poeCtrlPoweringMode', 'poeStatusDetectionStatus', 'poeStatusPdClass' ], | |
'rename_rrd' => 'poe-current-%index%', | |
'measured_match' => [ ['entity_type' => 'port', 'field' => 'ifIndex', 'match' => '%index%' ] ], | |
'min' => 0.1, //unscaled | |
'max' => 1000, //unscaled | |
'scale' => 0.001, | |
'limit_high' => 0.67, // Can Class be used? | |
// C4 =670mA, C3=300mA, C2=160mA, C1=90mA, C0=300mA | |
'test' => [ 'field' => 'poeStatusDetectionStatus', 'operator' => 'notin', 'value' => [ 'searching', 'disable' ] ] | |
]; | |
// POE voltage | |
$config['mibs'][$mib]['sensor'][] = [ | |
'class' => 'voltage', | |
'descr' => '%port_label% PoE Voltage (%poeCtrlPoweringMode%, PD %poeStatusPdClass%)', | |
'descr_transform' => [ 'action' => 'replace', | |
'from' => [ 'ieee802dot3af', 'ieee802dot3at-lldp', 'ieee802dot3at-2event' ], | |
'to' => [ '802.3af PoE', '802.3at PoE+ LLDP' , '802.3at PoE+ 2event' ] ], | |
'oid' => 'poeStatusVoltage', | |
'oid_extra' => [ 'poeCtrlPoweringMode', 'poeStatusDetectionStatus', 'poeStatusPdClass' ], | |
'rename_rrd' => 'poe-voltage-%index%', | |
'measured_match' => [ ['entity_type' => 'port', 'field' => 'ifIndex', 'match' => '%index%' ] ], | |
'min' => 0.1, | |
'max' => 100, | |
'limit_high' => 57, | |
'limit_low' => 45, | |
'test' => [ 'field' => 'poeStatusDetectionStatus', 'operator' => 'notin', 'value' => [ 'searching', 'disable' ] ] | |
]; | |
/// SFP data | |
// SFP Module Temperature | |
$config['mibs'][$mib]['sensor'][] = array( | |
'class' => 'temperature', | |
'descr' => '%port_label% Module Temperature', | |
'oid' => 'portSfpDdmTempatureCurrent', | |
//'oid_num' => '', | |
'measured_match' => [ ['entity_type' => 'port', 'field' => 'ifIndex', 'match' => '%index%' ] ], | |
'oid_limit_high' => 'portSfpDdmTempatureRange', | |
'min' => 0, | |
'max' => 300); | |
// SFP Transmit Power | |
$config['mibs'][$mib]['sensor'][] = array( | |
'class' => 'power', | |
'descr' => '%port_label% Transmit Power', | |
'oid' => 'portSfpDdmTxPowerCurrent', | |
//'oid_num' => '', | |
'measured_match' => [ ['entity_type' => 'port', 'field' => 'ifIndex', 'match' => '%index%' ] ], | |
'oid_limit_high' => 'portSfpDdmTxPowerRange', | |
'min' => 0, | |
'max' => 300); | |
// SFP Receive Power | |
$config['mibs'][$mib]['sensor'][] = array( | |
'class' => 'power', | |
'descr' => '%port_label% Receive Power', | |
'oid' => 'portSfpDdmRxPowerCurrent', | |
//'oid_num' => '', | |
'measured_match' => [ ['entity_type' => 'port', 'field' => 'ifIndex', 'match' => '%index%' ] ], | |
'oid_limit_high' => 'portSfpDdmRxPowerRange', | |
'min' => 0, | |
'max' => 300); | |
// This is pseudo status, just for see which transceiver used on port. T* is exclude do to not being SFP. | |
$config['mibs'][$mib]['status'][] = array( | |
'type' => 'SfpTransceiver', | |
'descr' => '%port_label% Transceiver (%sfpVender%, %sfpDistance%m, %sfpWavelength%nm)', | |
'descr_transform' => [ 'action' => 'replace', | |
'from' => [ '0000', ], | |
'to' => [ '0k' ] ], | |
'oid' => 'portStatusType', | |
'oid_num' => '.1.3.6.1.4.1.24062.2.3.9.3.2.1.1.2', | |
'oid_extra' => [ 'sfpVender','sfpWavelength', 'sfpDistance' ], | |
'measured' => 'port', | |
'measured_match' => ['entity_type' => 'port', 'field' => 'ifIndex', 'match' => '%index%' ] | |
); | |
$type = 'SfpTransceiver'; | |
$config['mibs'][$mib]['states'][$type][0] = array('name' => '' , 'event' => 'exclude'); | |
$config['mibs'][$mib]['states'][$type][1] = array('name' => 'hundredBaseTX' , 'event' => 'exclude'); | |
$config['mibs'][$mib]['states'][$type][2] = array('name' => 'thousandBaseT' , 'event' => 'exclude'); | |
$config['mibs'][$mib]['states'][$type][3] = array('name' => 'hundredBaseFX' , 'event' => 'ok'); | |
$config['mibs'][$mib]['states'][$type][4] = array('name' => 'thousandBaseSX', 'event' => 'ok'); | |
$config['mibs'][$mib]['states'][$type][5] = array('name' => 'thousandBaseLX', 'event' => 'ok'); | |
$config['mibs'][$mib]['states'][$type][6] = array('name' => 'other' , 'event' => 'ok'); | |
$config['mibs'][$mib]['states'][$type][7] = array('name' => 'notPresent', 'event' => 'exclude'); | |
$type = 'LEDstatus'; | |
$config['mibs'][$mib]['states'][$type][1] = array('name' => 'on' , 'event' => 'ok'); | |
$config['mibs'][$mib]['states'][$type][2] = array('name' => 'blinkNormal', 'event' => 'warning'); | |
$config['mibs'][$mib]['states'][$type][3] = array('name' => 'blinkFast' , 'event' => 'alert'); | |
$config['mibs'][$mib]['states'][$type][4] = array('name' => 'off' , 'event' => 'ok'); | |
$type = 'LEDstatusPower'; | |
$config['mibs'][$mib]['states'][$type][1] = array('name' => 'on' , 'event' => 'ok'); | |
$config['mibs'][$mib]['states'][$type][2] = array('name' => 'blinkNormal', 'event' => 'warning'); | |
$config['mibs'][$mib]['states'][$type][3] = array('name' => 'blinkFast' , 'event' => 'alert'); | |
$config['mibs'][$mib]['states'][$type][4] = array('name' => 'off' , 'event' => 'alert'); | |
$type = 'poeSystemStatus'; | |
$config['mibs'][$mib]['states'][$type][1] = array('name' => 'enable' , 'event' => 'ok'); | |
$config['mibs'][$mib]['states'][$type][2] = array('name' => 'disable', 'event' => 'ok'); | |
$config['mibs'][$mib]['status'][] = array( | |
'type' => 'poeSystemStatus', //change to power when easy to disable. | |
'descr' => 'Device POE status', | |
'oid' => 'poeSystemStatus', | |
// 'oid_num' => '', | |
'measured' => 'Device' | |
); | |
$config['mibs'][$mib]['status'][] = array( | |
'type' => 'LEDstatus', //change to power when easy to disable. | |
'descr' => 'Powersupply 1', | |
'oid' => 'ledPower1Status', | |
// 'oid_num' => '', | |
'measured' => 'powersupply' | |
); | |
$config['mibs'][$mib]['status'][] = array( | |
'type' => 'LEDstatus', //change to power when easy to disable. | |
'descr' => 'Powersupply 2', | |
'oid' => 'ledPower2Status', | |
// 'oid_num' => '', | |
'measured' => 'powersupply', | |
'test' => [ 'field' => 'ledPower2Status', 'operator' => 'notin', 'value' => [ 'off' ] ] | |
); | |
$config['mibs'][$mib]['status'][] = array( | |
'type' => 'LEDstatus', | |
'descr' => 'Device Ready LED', | |
'oid' => 'ledRDYStatus', | |
// 'oid_num' => '', | |
'measured' => 'device' | |
); | |
// EOF |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$model = "korenix"; | |
$config['model'][$model] = array( | |
'.1.3.6.1.4.1.24062.2.1.1' => array('name' => 'JetNet 4508f-V1'), | |
'.1.3.6.1.4.1.24062.2.2.1' => array('name' => 'JetNet 5010G', 'mibs' => array('Jetnet5010G')), | |
'.1.3.6.1.4.1.24062.2.2.3' => array('name' => 'JetNet 4510' , 'mibs' => array('Jetnet4510')), | |
'.1.3.6.1.4.1.24062.2.2.18' => array('name' => 'JetNet 4508f-V2','mibs' => array('Jetnet4508fV2')), | |
'.1.3.6.1.4.1.24062.2.3.9' => array('name' => 'JetNet 5310G', 'mibs' => array('Jetnet5310G') ), | |
'.1.3.6.1.4.1.24062.2.6.2' => array('name' => 'JetNet 6524G'), | |
); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Korenix | |
$os = "korenix-jetnet"; | |
$config['os'][$os]['text'] = "Korenix Jetnet"; | |
$config['os'][$os]['vendor'] = "Korenix"; | |
$config['os'][$os]['type'] = "network"; | |
$config['os'][$os]['model'] = "korenix"; | |
$config['os'][$os]['graphs'][0] = "device_bits"; | |
$config['os'][$os]['graphs'][1] = "device_ping"; | |
$config['os'][$os]['graphs'][2] = "device_uptime"; | |
$config['os'][$os]['graphs'][3] = "device_power"; | |
/*$config['os'][$os]['graphs'][4] = "device_current"; | |
$config['os'][$os]['graphs'][5] = "device_voltage"; */ | |
$config['os'][$os]['sysObjectID'][] = ".1.3.6.1.4.1.24062.2"; | |
$config['os'][$os]['mib_blacklist'][] = "UCD-SNMP-MIB"; | |
$config['os'][$os]['mib_blacklist'][] = "HOST-RESOURCES-MIB"; | |
$config['os'][$os]['mib_blacklist'][] = "CISCO-CDP-MIB"; | |
$config['os'][$os]['mib_blacklist'][] = "BGP4-MIB"; | |
$config['os'][$os]['mib_blacklist'][] = "ADSL-LINE-MIB"; | |
$config['os'][$os]['mib_blacklist'][] = "DISMAN-PING-MIB"; | |
$config['os'][$os]['mib_blacklist'][] = "EtherLike-MIB"; | |
$config['os'][$os]['mib_blacklist'][] = "ENTITY-SENSOR-MIB"; | |
$config['os'][$os]['mib_blacklist'][] = "ENTITY-MIB"; | |
$config['os'][$os]['mib_blacklist'][] = "OSPF-MIB"; | |
$config['os'][$os]['mib_blacklist'][] = "PW-STD-MIB"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment