Files
librenms-librenms/includes/discovery/sensors/state/voss.inc.php
ospfbgp 9a420a6910 device: Rebranding of Avaya BOSS and VOSS OS' (#8469)
* Update avaya-ers.yaml

Extreme bought avaya network assests so rebranding and moving some files.

* Add files via upload

Extreme bought avaya networking assets and so rebranding to Extreme and adding logos with OS for easier reading when on devices pages

* Update avaya-vsp.yaml

removing .1.3.6.1.4.1.45.3.79.1  This is a VSP 7024xl from avaya.  This is techincally not VOSS but BOSS operating system.  It should be in BOSS and avaya-ers.yaml

* Add files via upload

* Update and rename avaya-vsp.inc.php to extreme-voss.inc.php

* Update and rename avaya-vsp.inc.php to extreme-voss.inc.php

* Update and rename avaya-vsp.inc.php to extreme-voss.inc.php

* Update extreme-voss.inc.php

* Rename avaya-vsp.inc.php to extreme-voss.inc.php

* Rename avaya-vsp.inc.php to extreme-voss.inc.php

* Rename avaya-vsp.yaml to extreme-voss.yaml

* Update and rename avaya-vsp.yaml to extreme-voss.yaml

* Update avaya-ers.yaml

* Rename avaya-ers.yaml to extreme-boss.yaml

* Rename avaya-ers.inc.php to extreme-boss.inc.php

* Update and rename avaya-ers.inc.php to extreme-boss.inc.php

* Update and rename avaya-ers.inc.php to extreme-boss.inc.php

* Update and rename avaya-ers.inc.php to extreme-boss.inc.php

* Update and rename avaya-ers.inc.php to extreme-boss.inc.php

* Update and rename avaya-ers.inc.php to extreme-boss.inc.php

* Update extreme-boss.yaml

* Update extreme-voss.yaml

* Update and rename extreme-boss.yaml to boss.yaml

* Update extreme-voss.yaml

* Rename extreme-voss.yaml to voss.yaml

* Rename extreme-boss.inc.php to boss.inc.php

* Rename extreme-voss.inc.php to voss.inc.php

* Rename extreme-boss.inc.php to boss.inc.php

* Rename extreme-voss.inc.php to voss.inc.php

* Update and rename extreme-voss.inc.php to voss.inc.php

* Rename extreme-voss.yaml to voss.yaml

* Rename extreme-voss.inc.php to voss.inc.php

* Update and rename extreme-voss.inc.php to voss.inc.php

* Update and rename extreme-boss.inc.php to boss.inc.php

* Update and rename extreme-boss.inc.php to boss.inc.php

* Update and rename extreme-boss.inc.php to boss.inc.php

* Rename extreme-boss.inc.php to boss.inc.php

* Update voss.inc.php

* Update boss.inc.php

* Update boss.inc.php

* Update voss.inc.php

* Update voss.inc.php

* Update voss.inc.php

* Update voss.inc.php

* Update voss.inc.php

* Update voss.inc.php

* Update boss.inc.php

* Update boss.inc.php

* Update voss.inc.php

* Update boss.inc.php

* Update voss.inc.php

* Update voss.inc.php

* Rename avaya-vsp_8404c.snmprec to voss_8404c.snmprec

* Rename avaya-vsp_8404.snmprec to voss_8404.snmprec

* Rename avaya-vsp_8284xsq.snmprec to voss_8284xsq.snmprec

* Rename avaya-vsp_7254xtq.snmprec to voss_7254xtq.snmprec

* Rename avaya-vsp_7254xsq.snmprec to voss_7254xsq.snmprec

* Rename avaya-vsp_7024xls.snmprec to boss_7024xls.snmprec

* Rename avaya-vsp_4850gts.snmprec to voss_4850gts.snmprec

* Rename avaya-vsp_4850gts-pwr.snmprec to voss_4850gts-pwr.snmprec

* Rename avaya-vsp_4450gsx-pwr.snmprec to voss_4450gsx-pwr.snmprec

* Rename avaya-ers.snmprec to boss.snmprec

* Rename avaya-ers_1.snmprec to boss_1.snmprec

* Update and rename avaya-ers.json to boss.json

* Update and rename avaya-vsp_8404.json to voss_8404.json

* Update and rename avaya-vsp_8404c.json to voss_8404c.json

* Update and rename AvayaErs.php to Boss.php

* Update Boss.php

* Restore processor_type to avaya-ers in test data

* Update voss_8404c.json

* Update extremeboss.svg

* Update extremevoss.svg
2018-04-21 11:21:14 +01:00

104 lines
3.7 KiB
PHP

<?php
/**
* voss.inc.php
*
* LibreNMS Fan and Power Supply state Discovery module for Extreme/Avaya
* VOSS(VSP Operating System Software)
*
* Copyright (c) 2017 Daniel Cox <danielcoxman@gmail.com>
*
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version. Please see LICENSE.txt at the top level of
* the source code distribution for details.
*/
/* rcChasFanOperStatus
* unknown(1),
* up(2),
* down(3),
*/
$fan_oper_status = '.1.3.6.1.4.1.2272.1.4.7.1.1.2';
$fan = snmpwalk_cache_oid_num($device, $fan_oper_status, array());
if (is_array($fan)) {
foreach ($fan as $oid => $array) {
$state = current($array);
$split_oid = explode('.', $oid);
$index = $split_oid[(count($split_oid) - 1)];
$current_oid = "$fan_oper_status.$index";
$descr = "Fan $index";
$state_name = 'rcChasFanOperStatus';
$state_index_id = create_state_index($state_name);
if ($state_index_id !== null) {
$states = array(
array($state_index_id, 'unknown', 0, 1, 3),
array($state_index_id, 'up', 0, 2, 0),
array($state_index_id, 'down', 0, 3, 1),
);
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');
}
}
discover_sensor($valid['sensor'], 'state', $device, $current_oid, "rcChasFanOperStatus.$index", $state_name, $descr, '1', '1', null, null, '3', '3', $state);
create_sensor_to_state_index($device, $state_name, "rcChasFanOperStatus.$index");
}
}
/* rcChasPowerSupplyOperStatus
* unknown(1),
* empty(2),
* up(3),
* down(4)
*/
$power_supply_oper_status = '.1.3.6.1.4.1.2272.1.4.8.1.1.2';
$power_supply = snmpwalk_cache_oid_num($device, $power_supply_oper_status, array());
if (is_array($power_supply)) {
foreach ($power_supply as $oid => $array) {
$state = current($array);
$split_oid = explode('.', $oid);
$index = $split_oid[(count($split_oid) - 1)];
$current_oid = "$power_supply_oper_status.$index";
$descr = "Power Supply $index";
$state_name = 'rcChasPowerSupplyOperStatus';
$state_index_id = create_state_index($state_name);
if ($state_index_id !== null) {
$states = array(
array($state_index_id, 'unknown', 0, 1, 3),
array($state_index_id, 'empty', 0, 2, 0),
array($state_index_id, 'up', 0, 3, 0),
array($state_index_id, 'down', 0, 4, 1),
);
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');
}
}
discover_sensor($valid['sensor'], 'state', $device, $current_oid, "rcChasPowerSupplyOperStatus.$index", $state_name, $descr, '1', '1', null, null, '4', '4', $state);
create_sensor_to_state_index($device, $state_name, "rcChasPowerSupplyOperStatus.$index");
}
}