newdevice: Added fan and temp sensor state discovery Avaya ERS

* newdevice: Added support for Emerson energy systems (#7128)

* newdevice: Added support for Emerson energy systems

* added missing test

* Update ees.yaml

Added Avaya ERS fan and temp state discovery

* removed some left over debug code

Update avaya-ers.inc.php
This commit is contained in:
Tom Sealey
2017-08-10 11:24:11 +01:00
committed by Neil Lathwood
parent aca772511b
commit 34a070f524
5 changed files with 3342 additions and 1 deletions

View File

@@ -0,0 +1,64 @@
<?php
/**
* avaya-ers.inc.php
*
* LibreNMS Fan and Power Supply state Discovery module for Avaya ERS
*/
if ($device['os'] === 'avaya-ers') {
$oid = snmpwalk_cache_oid($device, 's5ChasComTable', array(), 'S5-CHASSIS-MIB');
$cur_oid = '.1.3.6.1.4.1.45.1.6.3.3.1.1.10.';
if (is_array($oid)) {
//get states
$state_name = 's5ChasComOperState';
$state_index_id = create_state_index($state_name);
//Create State Translation
if ($state_index_id) {
$states = array(
array($state_index_id,'other' ,0,1,3) ,
array($state_index_id,'notAvail' ,0,2,3) ,
array($state_index_id,'removed' ,0,3,3) ,
array($state_index_id,'disabled' ,0,4,3) ,
array($state_index_id,'normal' ,0,5,0) ,
array($state_index_id,'resetInProg',0,6,1) ,
array($state_index_id,'testing' ,0,7,1) ,
array($state_index_id,'warning' ,0,8,1) ,
array($state_index_id,'nonFatalErr',0,9,1) ,
array($state_index_id,'fatalErr' ,0,10,2) ,
array($state_index_id,'notConfig' ,0,11,3) ,
array($state_index_id,'obsoleted' ,0,12,3)
);
}
foreach ($states as $value) {
$insert = array(
'state_index_id' => $value[0],
'state_descr' => $value[1],
'state_draw_graph' => $value[2],
'state_value' => $value[3],
'state_generic_value' => $value[4]
);
dbInsert($insert, 'state_translations');
}
// get fans (6) and temp (5) sensor only from walk
$sensors = array();
foreach ($oid as $key => $value) {
if ($key[s5ChasComGrpIndx] == 5 || $key[s5ChasComGrpIndx] == 6) {
$ers_sensors[$key] = $value;
}
}
foreach ($ers_sensors as $index => $entry) {
//Get unit number
$unit_array = explode(".", $index);
$unit = floor($unit_array[1]/10);
$descr = "Unit $unit: $entry[s5ChasComDescr]";
//Discover Sensors
discover_sensor($valid['sensor'], 'state', $device, $cur_oid.$index, "s5ChasComOperState.$index", $state_name, $descr, '1', '1', null, null, null, null, $entry[s5ChasComOperState]);
//Create Sensor To State Index
create_sensor_to_state_index($device, $state_name, "s5ChasComOperState.$index");
}
}
}

2041
mibs/nortel/S5-CHASSIS-MIB Normal file

File diff suppressed because it is too large Load Diff

77
mibs/nortel/S5-ROOT-MIB Normal file
View File

@@ -0,0 +1,77 @@
S5-ROOT-MIB DEFINITIONS ::= BEGIN
IMPORTS
MODULE-IDENTITY
FROM SNMPv2-SMI
series5000
FROM SYNOPTICS-ROOT-MIB;
s5RootMib MODULE-IDENTITY
LAST-UPDATED "200407200000Z"
ORGANIZATION "Nortel Networks"
CONTACT-INFO "Nortel Networks"
DESCRIPTION
"5000 Root MIB
Copyright 1993-2004 Nortel Networks, Inc.
All rights reserved.
This Nortel Networks SNMP Management Information Base Specification
(Specification) embodies Nortel Networks' confidential and
proprietary intellectual property. Nortel Networks retains all
title and ownership in the Specification, including any
revisions.
This Specification is supplied 'AS IS,' and Nortel Networks makes
no warranty, either express or implied, as to the use,
operation, condition, or performance of the Specification."
REVISION "200407200000Z" -- 20 July 2004
DESCRIPTION "Version 118: Conversion to SMIv2"
::= { series5000 0 }
-- Branches under "series5000"
-- branch for registration of values for objects
-- with syntax of OBJECT IDENTIFIER
s5reg OBJECT IDENTIFIER ::= { series5000 1 }
-- Branch for 'Enterprise' field values in traps
s5Traps OBJECT IDENTIFIER ::= { series5000 2 }
s5EthTrap -- Ethernet
OBJECT IDENTIFIER ::= { s5Traps 1 }
s5TokTrap -- Token Ring
OBJECT IDENTIFIER ::= { s5Traps 2 }
s5FddTrap -- FDDI
OBJECT IDENTIFIER ::= { s5Traps 3 }
s5ChaTrap -- Chassis
OBJECT IDENTIFIER ::= { s5Traps 4 }
s5ComTrap -- Common
OBJECT IDENTIFIER ::= { s5Traps 5 }
s5EcellTrap -- EtherCell
OBJECT IDENTIFIER ::= { s5Traps 6 }
atmTraps -- Atm
OBJECT IDENTIFIER ::= { s5Traps 7 }
remoteLoginTrap -- Remote Login
OBJECT IDENTIFIER ::= { s5Traps 8 }
stpChangeTrap -- STP Topology Change
OBJECT IDENTIFIER ::= { s5Traps 9 }
-- Major 5000 MIB branches
s5Chassis OBJECT IDENTIFIER ::= { series5000 3 }
s5Agent OBJECT IDENTIFIER ::= { series5000 4 }
s5Com OBJECT IDENTIFIER ::= { series5000 5 }
s5Eth OBJECT IDENTIFIER ::= { series5000 6 }
s5Tok OBJECT IDENTIFIER ::= { series5000 7 }
s5Fddi OBJECT IDENTIFIER ::= { series5000 8 }
s5EnTop OBJECT IDENTIFIER ::= { series5000 9 }
s5TrTop OBJECT IDENTIFIER ::= { series5000 10 }
s5FdTop OBJECT IDENTIFIER ::= { series5000 11 }
s5EnMsTop OBJECT IDENTIFIER ::= { series5000 13 }
s5AtmTop OBJECT IDENTIFIER ::= { series5000 14 }
s5IfExt OBJECT IDENTIFIER ::= { series5000 15 }
bnLogMsg OBJECT IDENTIFIER ::= { series5000 16 }
s5Tcs OBJECT IDENTIFIER ::= { series5000 17 }
END

File diff suppressed because it is too large Load Diff