Merge pull request #4513 from OpcaoTelecom/datacom-transceiver

newdevice: Added Datacom Dbm Support
This commit is contained in:
Neil Lathwood
2016-09-21 19:00:54 +01:00
committed by GitHub
5 changed files with 1766 additions and 1337 deletions

View File

@@ -0,0 +1,37 @@
<?php
if ($device['os'] == 'datacom') {
echo 'Datacom';
$multiplier = 1;
$divisor = 100;
foreach ($datacom_oids as $index => $entry) {
if (is_numeric(str_replace('dBm', '', $entry['ddTransceiversRxPower']))) {
$oid = '.1.3.6.1.4.1.3709.3.5.201.1.28.1.1.4.' . $index;
$descr = dbFetchCell('SELECT `ifDescr` FROM `ports` WHERE `ifIndex`= ? AND `device_id` = ?', array($index, $device['device_id'])) . ' Rx Power';
/* Basic default values */
$limit_low = -30;
$warn_limit_low = -12.3;
$limit = 2.5;
$warn_limit = -3;
$current = $entry['ddTransceiversRxPower'];
$entPhysicalIndex = $index;
$entPhysicalIndex_measured = 'ports';
discover_sensor($valid['sensor'], 'dbm', $device, $oid, 'rx-' . $index, 'datacom', $descr, $divisor, $multiplier, $limit_low, $warn_limit_low, $warn_limit, $limit, $current, 'snmp', $entPhysicalIndex, $entPhysicalIndex_measured);
}
if (is_numeric(str_replace('dBm', '', $entry['ddTransceiversTxPower']))) {
$oid = '.1.3.6.1.4.1.3709.3.5.201.1.28.1.1.5.' . $index;
$descr = dbFetchCell('SELECT `ifDescr` FROM `ports` WHERE `ifIndex`= ? AND `device_id` = ?', array($index, $device['device_id'])) . ' Tx Power';
/* Basic default values */
$limit_low = -30;
$warn_limit_low = -12.3;
$limit = 2.5;
$warn_limit = -3;
$current = $entry['ddTransceiversTxPower'];
$entPhysicalIndex = $index;
$entPhysicalIndex_measured = 'ports';
discover_sensor($valid['sensor'], 'dbm', $device, $oid, 'tx-' . $index, 'datacom', $descr, $divisor, $multiplier, $limit_low, $warn_limit_low, $warn_limit, $limit, $current, 'snmp', $entPhysicalIndex, $entPhysicalIndex_measured);
}
}
}

View File

@@ -0,0 +1,10 @@
<?php
if ($device['os'] == 'datacom') {
echo 'Pre-cache Datacom: ';
$datacom_oids = array();
echo 'Caching OIDs:';
$datacom_oids = snmpwalk_cache_multi_oid($device, 'ddTransceiversEntry', array(), 'DMswitch-MIB');
}

View File

@@ -1,6 +1,6 @@
--
-- DATACOM Telematica
-- Copyright 2014 by DATACOM (Teracom Telematica Ltda). All Rights Reserved.
-- Copyright 2015 by DATACOM (Teracom Telematica Ltda). All Rights Reserved.
-- This DATACOM SNMP MIB Specification is DATACOM proprietary intellectual property.
--
-- This module will be extend, as required. The specification and other information
@@ -29,7 +29,7 @@ IMPORTS
dmSwitchMIB MODULE-IDENTITY
LAST-UPDATED "201407180000Z"
LAST-UPDATED "201512100000Z"
ORGANIZATION "DATACOM"
CONTACT-INFO
"DATACOM
@@ -82,6 +82,7 @@ eapsMgt OBJECT IDENTIFIER ::= { dmSwitchMIBObjects 24 }
cfmProbeMgmt OBJECT IDENTIFIER ::= { dmSwitchMIBObjects 25 }
cpumonMgmt OBJECT IDENTIFIER ::= { dmSwitchMIBObjects 26 }
queuePortMgmt OBJECT IDENTIFIER ::= { dmSwitchMIBObjects 27 }
ddTransceiversMgmt OBJECT IDENTIFIER ::= { dmSwitchMIBObjects 28 }
-- -------------------------------------------------------------
-- Textual Conventions
@@ -327,14 +328,12 @@ swProdModelId OBJECT-TYPE
eth44gt4gc2xxsmplsdc(63),
eth44gt4gc4xxmplsdc(64),
eth24gx2x10gxhseriesII(65),
eth20gt4gc2xssl3(66),
eth20gp4gc2xssl3(67),
eth20gt4gc4xsl3(68),
eth20gp4gc4xsl3(69),
eth44gt4gc2xssl3(70),
eth44gp4gc2xssl3(71),
eth44gt4gc4xsl3(72),
eth44gp4gc4xsl3(73)
eth20gt4gc4xs(66),
eth24gxhseriesII(67),
eth2x10gxhseriesII(68),
eth48gxhseriesII(69),
eth4x10gxhseriesII(70),
eth24gx4xs(71)
}
MAX-ACCESS read-only
STATUS current
@@ -780,7 +779,7 @@ swChassisModel OBJECT-TYPE
::= { switchMgt 17 }
switchSessionTable OBJECT-TYPE
SYNTAX SEQUENCE OF SwitchIndivAlarmOutEntry
SYNTAX SEQUENCE OF SwitchSessionEntry
MAX-ACCESS not-accessible
STATUS current
DESCRIPTION "Table about CLI sessions informations."
@@ -938,7 +937,8 @@ portType OBJECT-TYPE
thousandBaseSfp(8),
hundredBaseFxScSingleMode(9),
hundredBaseFxScMultiMode(10),
tenG(11)
tenG(11),
tenGSfp(12)
}
MAX-ACCESS read-only
STATUS current
@@ -2876,7 +2876,10 @@ trapSystemWarningsUnits OBJECT-TYPE
sysWarUnitsHsEnNoError(1),
sysWarUnitsHsEnWES(2),
sysWarUnitsHsEnWHSDis(3),
sysWarUnitsHsEnWDifMod(4)
sysWarUnitsHsEnWDifMod(4),
sysWarUnitsCommFail(5),
sysWarUnitsMPLS(6),
sysWarUnitsL3(7)
}
MAX-ACCESS accessible-for-notify
STATUS current
@@ -4527,7 +4530,7 @@ cpuActiveUsageTable OBJECT-TYPE
::= { cpumonMgmt 1 }
cpuActiveUsageEntry OBJECT-TYPE
SYNTAX CpuUsageEntry
SYNTAX CpuActiveUsageEntry
MAX-ACCESS not-accessible
STATUS current
DESCRIPTION "Table of cpu usage."
@@ -4603,7 +4606,7 @@ cpuStandbyUsageTable OBJECT-TYPE
::= { cpumonMgmt 3 }
cpuStandbyUsageEntry OBJECT-TYPE
SYNTAX CpuUsageEntry
SYNTAX CpuStandbyUsageEntry
MAX-ACCESS not-accessible
STATUS current
DESCRIPTION "Table of cpu usage."
@@ -4668,4 +4671,153 @@ memStandbyUsageValue OBJECT-TYPE
STATUS current
DESCRIPTION "The memory usage (percentage)."
::= { memStandbyUsageEntry 2 }
END
--
-- queuePortMgmt
--
queuePortTable OBJECT-TYPE
SYNTAX SEQUENCE OF QueuePortEntry
MAX-ACCESS not-accessible
STATUS current
DESCRIPTION "Table for statistics of interface queues."
::= { queuePortMgmt 1 }
queuePortEntry OBJECT-TYPE
SYNTAX QueuePortEntry
MAX-ACCESS not-accessible
STATUS current
DESCRIPTION "An entry in the table, containing information
about configuration in one switch port of the switch."
INDEX { queuePortIfIndex, queuePortQueueIndex }
::= { queuePortTable 1 }
QueuePortEntry ::= SEQUENCE
{
queuePortIfIndex Integer32,
queuePortQueueIndex Integer32,
queuePortSentPackets Counter64,
queuePortSentBytes Counter64,
queuePortDroppedPackets Counter64,
queuePortDroppedBytes Counter64
}
queuePortIfIndex OBJECT-TYPE
SYNTAX Integer32
MAX-ACCESS not-accessible
STATUS current
DESCRIPTION "This is defined as ifIndex in the IF-MIB."
::= { queuePortEntry 1 }
queuePortQueueIndex OBJECT-TYPE
SYNTAX Integer32
MAX-ACCESS not-accessible
STATUS current
DESCRIPTION "The COS queue from the interface."
::= { queuePortEntry 2 }
queuePortSentPackets OBJECT-TYPE
SYNTAX Counter64
MAX-ACCESS read-only
STATUS current
DESCRIPTION "Counter of sent packets."
::= { queuePortEntry 3 }
queuePortSentBytes OBJECT-TYPE
SYNTAX Counter64
MAX-ACCESS read-only
STATUS current
DESCRIPTION "Counter of sent bytes."
::= { queuePortEntry 4 }
queuePortDroppedPackets OBJECT-TYPE
SYNTAX Counter64
MAX-ACCESS read-only
STATUS current
DESCRIPTION "Counter of dropped packets."
::= { queuePortEntry 5 }
queuePortDroppedBytes OBJECT-TYPE
SYNTAX Counter64
MAX-ACCESS read-only
STATUS current
DESCRIPTION "Counter of dropped bytes."
::= { queuePortEntry 6 }
--
-- ddTransceiversMgmt
--
ddTransceiversTable OBJECT-TYPE
SYNTAX SEQUENCE OF DdTransceiversEntry
MAX-ACCESS not-accessible
STATUS current
DESCRIPTION "Transceivers digital diagnostic table."
::= { ddTransceiversMgmt 1 }
ddTransceiversEntry OBJECT-TYPE
SYNTAX DdTransceiversEntry
MAX-ACCESS not-accessible
STATUS current
DESCRIPTION "An entry in the table, containing information
about digital diagnostic."
INDEX { ddTransceiversIfIndex}
::= { ddTransceiversTable 1 }
DdTransceiversEntry ::= SEQUENCE
{
ddTransceiversIfIndex Integer32,
ddTransceiversTemperature DisplayString,
ddTransceiversVcc3v3 DisplayString,
ddTransceiversRxPower DisplayString,
ddTransceiversTxPower DisplayString,
ddTransceiversTxBias DisplayString
}
ddTransceiversIfIndex OBJECT-TYPE
SYNTAX Integer32
MAX-ACCESS not-accessible
STATUS current
DESCRIPTION "This is defined as ifIndex in the IF-MIB."
::= { ddTransceiversEntry 1 }
ddTransceiversTemperature OBJECT-TYPE
SYNTAX DisplayString (SIZE(0..20))
MAX-ACCESS read-only
STATUS current
DESCRIPTION "Transceiver temperature information in Celsius"
::= { ddTransceiversEntry 2 }
ddTransceiversVcc3v3 OBJECT-TYPE
SYNTAX DisplayString (SIZE(0..20))
MAX-ACCESS read-only
STATUS current
DESCRIPTION "Transceiver Vcc 3v3 information in Volts"
::= { ddTransceiversEntry 3 }
ddTransceiversRxPower OBJECT-TYPE
SYNTAX DisplayString (SIZE(0..20))
MAX-ACCESS read-only
STATUS current
DESCRIPTION "Transceiver rx power information in Decibels"
::= { ddTransceiversEntry 4 }
ddTransceiversTxPower OBJECT-TYPE
SYNTAX DisplayString (SIZE(0..20))
MAX-ACCESS read-only
STATUS current
DESCRIPTION "Transceiver tx power information in Decibels"
::= { ddTransceiversEntry 5 }
ddTransceiversTxBias OBJECT-TYPE
SYNTAX DisplayString (SIZE(0..20))
MAX-ACCESS read-only
STATUS current
DESCRIPTION "Transceiver tx bias information in Amperes"
::= { ddTransceiversEntry 6 }
END

File diff suppressed because it is too large Load Diff

View File

@@ -1,112 +1,113 @@
--
-- DATACOM Telematica
-- Copyright 1999-2006 by Datacom Telematica (Teracom Telematica Ltda). All Rights Reserved.
-- This DATACOM SNMP MIB Specification is Datacom proprietary intellectual property.
--
-- This module will be extend, as required. The specification and other information
-- contained in this document can be modified without prior notice. The user should
-- consult Datacom to determine whether any such changes have been done.
--
DATACOM-SMI DEFINITIONS ::= BEGIN
IMPORTS
enterprises
FROM RFC1155-SMI;
datacom OBJECT IDENTIFIER ::={ enterprises 3709 }
-- MODULE-IDENTITY
-- LAST-UPDATED "9912150000Z"
-- ORGANIZATION "Datacom Telem<65>tica"
-- CONTACT-INFO
-- "Datacom Telem<65>tica
--
-- Postal: Datacom Telematica
-- Av. Fran<61>a, 735
-- Navegantes, POA, RS
-- CEP 90230-220
-- BRAZIL
--
-- Tel: +55(051)3358-0100
-- Fax: +55(051)3358-0101
--
-- E-mail: datacom@datacom-telematica.com.br"
-- DESCRIPTION
-- " The Structure of Management Information for
-- Datacom Telematica enterprise. "
--
datacomRegistrations OBJECT IDENTIFIER ::={ datacom 1 }
datacomGenericMIBs OBJECT IDENTIFIER ::={ datacom 2 }
datacomProductsMIBs OBJECT IDENTIFIER ::={ datacom 3 }
datacomExperimental OBJECT IDENTIFIER ::={ datacom 4 }
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-- -- -- -- -- -- -- -- -- -- -- -- -- --
--
-- datacomRegistration
-- Register the modules identification of MIBs
datacomModules OBJECT IDENTIFIER ::={ datacomRegistrations 1 }
--
-- Products registration
-- Register the management cards
datacomManagementCards OBJECT IDENTIFIER ::={ datacomRegistrations 2 }
-- Register the modems
datacomModems OBJECT IDENTIFIER ::={ datacomRegistrations 3 }
-- Register the data converters.
datacomAccessDevices OBJECT IDENTIFIER ::={ datacomRegistrations 5 }
-- -- -- -- -- -- -- -- -- -- -- -- -- --
--
-- datacomProductsMIBs
-- Modem MIBs
datacomModemsMIBs OBJECT IDENTIFIER ::={ datacomProductsMIBs 3 }
-- Access Devices MIBs
datacomAccessDevicesMIBs OBJECT IDENTIFIER ::={ datacomProductsMIBs 5 }
-- -- -- -- -- -- -- -- -- -- -- -- -- --
--
-- datacomExperimental
datacomExpGenericMIBs OBJECT IDENTIFIER ::={ datacomExperimental 2 }
datacomExpProductsMIBs OBJECT IDENTIFIER ::={ datacomExperimental 3 }
--
-- datacomExpProductsMIBs
datacomExpModemsMIBs OBJECT IDENTIFIER ::={ datacomExpProductsMIBs 3 }
-- Access Devices MIBs
datacomExpAccessDevicesMIBs OBJECT IDENTIFIER ::={ datacomExpProductsMIBs 5 }
END
--
-- DATACOM Telematica
-- Copyright 1999-2006 by Datacom Telematica (Teracom Telematica Ltda). All Rights Reserved.
-- This DATACOM SNMP MIB Specification is Datacom proprietary intellectual property.
--
-- This module will be extend, as required. The specification and other information
-- contained in this document can be modified without prior notice. The user should
-- consult Datacom to determine whether any such changes have been done.
--
DATACOM-SMI DEFINITIONS ::= BEGIN
IMPORTS
enterprises
FROM RFC1155-SMI;
datacom OBJECT IDENTIFIER ::={ enterprises 3709 }
-- MODULE-IDENTITY
-- ORGANIZATION "DATACOM"
-- CONTACT-INFO
-- "DATACOM
--
-- Postal: DATACOM
-- Rua America, 1000
-- Eldorado do Sul, RS
-- CEP 92990-000
-- BRAZIL
--
-- Tel:+55(51)3933 3000
-- Fax:+55(51)3933 3003
--
-- E-mail: datacom@datacom.ind.br "
-- DESCRIPTION
-- " The Structure of Management Information for
-- Datacom Telematica enterprise. "
--
datacomRegistrations OBJECT IDENTIFIER ::={ datacom 1 }
datacomGenericMIBs OBJECT IDENTIFIER ::={ datacom 2 }
datacomProductsMIBs OBJECT IDENTIFIER ::={ datacom 3 }
datacomExperimental OBJECT IDENTIFIER ::={ datacom 4 }
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-- -- -- -- -- -- -- -- -- -- -- -- -- --
--
-- datacomRegistration
-- Register the modules identification of MIBs
datacomModules OBJECT IDENTIFIER ::={ datacomRegistrations 1 }
--
-- Products registration
-- Register the management cards
datacomManagementCards OBJECT IDENTIFIER ::={ datacomRegistrations 2 }
-- Register the modems
datacomModems OBJECT IDENTIFIER ::={ datacomRegistrations 3 }
-- Register the data converters.
datacomAccessDevices OBJECT IDENTIFIER ::={ datacomRegistrations 5 }
-- Register the devices.
datacomDevices OBJECT IDENTIFIER ::={ datacomRegistrations 6 }
-- -- -- -- -- -- -- -- -- -- -- -- -- --
--
-- datacomProductsMIBs
-- Modem MIBs
datacomModemsMIBs OBJECT IDENTIFIER ::={ datacomProductsMIBs 3 }
-- Access Devices MIBs
datacomAccessDevicesMIBs OBJECT IDENTIFIER ::={ datacomProductsMIBs 5 }
-- Devices MIBs
datacomDevicesMIBs OBJECT IDENTIFIER ::={ datacomProductsMIBs 6 }
-- -- -- -- -- -- -- -- -- -- -- -- -- --
--
-- datacomExperimental
datacomExpGenericMIBs OBJECT IDENTIFIER ::={ datacomExperimental 2 }
datacomExpProductsMIBs OBJECT IDENTIFIER ::={ datacomExperimental 3 }
--
-- datacomExpProductsMIBs
datacomExpModemsMIBs OBJECT IDENTIFIER ::={ datacomExpProductsMIBs 3 }
-- Access Devices MIBs
datacomExpAccessDevicesMIBs OBJECT IDENTIFIER ::={ datacomExpProductsMIBs 5 }
END