Skip to content

Commit

Permalink
Added support for Seagate EX-OS (librenms#16557)
Browse files Browse the repository at this point in the history
* Added support for Seagate EX-OS

* Added test data

* Updated small graph definitions

* Removed length/width in svg logo

* Removed sysDescr
  • Loading branch information
laf authored Nov 22, 2024
1 parent e4b2fee commit 2de1278
Show file tree
Hide file tree
Showing 14 changed files with 2,019 additions and 0 deletions.
1 change: 1 addition & 0 deletions html/images/logos/seagate.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions html/images/os/seagate.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
56 changes: 56 additions & 0 deletions includes/definitions/discovery/exos.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
mib: FCMGMT-MIB
modules:
os:
hardware: connUnitProduct
serial: connUnitSn
sensors:
state:
data:
-
oid: connUnitState
value: connUnitState
num_oid: '.1.3.6.1.3.94.1.6.1.5.{{ $index }}'
descr: 'Connectivity Unit State'
index: 'connUnitState.{{ $index }}'
state_name: connUnitState
states:
- { value: 2, generic: 0, graph: 0, descr: Online }
- { value: 3, generic: 2, graph: 0, descr: Offline }
- { value: 1, generic: 3, graph: 0, descr: none }
-
oid: connUnitStatus
value: connUnitStatus
num_oid: '.1.3.6.1.3.94.1.6.1.6.{{ $index }}'
descr: 'Connectivity Unit Status'
index: 'connUnitStatus.{{ $index }}'
state_name: connUnitStatus
states:
- { value: 1, generic: 3, graph: 0, descr: none }
- { value: 2, generic: 3, graph: 0, descr: Unused }
- { value: 3, generic: 0, graph: 0, descr: Ok }
- { value: 4, generic: 1, graph: 0, descr: Warning }
- { value: 5, generic: 2, graph: 0, descr: Failed }
-
oid: connUnitPrincipal
value: connUnitPrincipal
num_oid: '.1.3.6.1.3.94.1.6.1.13.{{ $index }}'
descr: 'Principal Unit'
index: 'connUnitPrincipal.{{ $index }}'
state_name: connUnitPrincipal
states:
- { value: 1, generic: 3, graph: 0, descr: Unknown }
- { value: 2, generic: 0, graph: 0, descr: No }
- { value: 3, generic: 0, graph: 0, descr: Yes }
-
oid: connUnitSensorTable
value: connUnitSensorStatus
num_oid: '.1.3.6.1.3.94.1.8.1.4.{{ $index }}'
descr: '{{ $connUnitSensorName }}'
index: 'connUnitSensorName.{{ $index }}'
state_name: connUnitSensorName
states:
- { value: 1, generic: 3, graph: 0, descr: Unknown }
- { value: 2, generic: 3, graph: 0, descr: Other }
- { value: 3, generic: 0, graph: 0, descr: Ok }
- { value: 4, generic: 1, graph: 0, descr: Warning }
- { value: 5, generic: 2, graph: 0, descr: Failed }
12 changes: 12 additions & 0 deletions includes/definitions/exos.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
os: exos
text: Exos
type: storage
icon: seagate
over:
- { graph: device_bits, text: 'Device Traffic' }
- { graph: device_temperature, text: 'Temperature' }
- { graph: device_current, text: 'Current' }
discovery:
-
sysObjectID:
- .1.3.6.1.4.1.347.2.5730
12 changes: 12 additions & 0 deletions includes/discovery/sensors/current/exos.inc.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?php

echo 'Exos ';

if (is_array($pre_cache['exos']['connUnitSensorTable'])) {
foreach ($pre_cache['exos']['connUnitSensorTable'] as $index => $entry) {
if (preg_match('/Current.* ([: 0-9\.]+A)/', $entry['connUnitSensorMessage'], $temp_value)) {
$value = str_replace('A', '', $temp_value[1]);
discover_sensor($valid['sensor'], 'current', $device, ".1.3.6.1.3.94.1.8.1.6.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.{$entry['connUnitSensorIndex']}", $entry['connUnitSensorIndex'], 'exos', $entry['connUnitSensorName'], 1, '1', null, null, null, null, $value);
}
}
}
4 changes: 4 additions & 0 deletions includes/discovery/sensors/pre-cache/exos.inc.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?php

echo 'connUnitSensorTable ';
$pre_cache['exos']['connUnitSensorTable'] = snmpwalk_cache_multi_oid($device, 'connUnitSensorTable', [], 'FCMGMT-MIB');
12 changes: 12 additions & 0 deletions includes/discovery/sensors/temperature/exos.inc.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?php

echo 'Exos ';

if (is_array($pre_cache['exos']['connUnitSensorTable'])) {
foreach ($pre_cache['exos']['connUnitSensorTable'] as $index => $entry) {
if (preg_match('/ Temp.* ([: 0-9]+ C)/', $entry['connUnitSensorMessage'], $temp_value)) {
[$value, $dump] = explode(' ', $temp_value[1]);
discover_sensor($valid['sensor'], 'temperature', $device, ".1.3.6.1.3.94.1.8.1.6.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.{$entry['connUnitSensorIndex']}", $entry['connUnitSensorIndex'], 'exos', $entry['connUnitSensorName'], 1, '1', null, null, null, null, $value);
}
}
}
12 changes: 12 additions & 0 deletions includes/discovery/sensors/voltage/exos.inc.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?php

echo 'Exos ';

if (is_array($pre_cache['exos']['connUnitSensorTable'])) {
foreach ($pre_cache['exos']['connUnitSensorTable'] as $index => $entry) {
if (preg_match('/Voltage.* ([: 0-9\.]+V)/', $entry['connUnitSensorMessage'], $temp_value)) {
$value = str_replace('V', '', $temp_value[1]);
discover_sensor($valid['sensor'], 'voltage', $device, ".1.3.6.1.3.94.1.8.1.6.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.{$entry['connUnitSensorIndex']}", $entry['connUnitSensorIndex'], 'exos', $entry['connUnitSensorName'], 1, '1', null, null, null, null, $value);
}
}
}
4 changes: 4 additions & 0 deletions includes/polling/sensors/current/exos.inc.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?php

preg_match('/Current.* ([: 0-9\.]+A)/', $sensor_value, $temp_value);
$value = str_replace('A', '', $temp_value[1]);
4 changes: 4 additions & 0 deletions includes/polling/sensors/temperature/exos.inc.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?php

preg_match('/ Temp.* ([: 0-9]+ C)/', $sensor_value, $temp_value);
[$sensor_value, $dump] = explode(' ', $temp_value[1]);
4 changes: 4 additions & 0 deletions includes/polling/sensors/voltage/exos.inc.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?php

preg_match('/Voltage.* ([: 0-9\.]+V)/', $sensor_value, $temp_value);
$sensor_value = str_replace('V', '', $temp_value[1]);
116 changes: 116 additions & 0 deletions mibs/seagate/SEAGATESYSTEMTRAP-MIB
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
-- ------------------------------------------------------
-- Seagate Enterprise Array MIB for SNMP traps
--
-- $Revision: 11692 $
--
-- Copyright 2020 Seagate Technology LLC or one of its affiliates
-- All rights reserved. Use is subject to license terms.
--
-- ------------------------------------------------------

SEAGATESYSTEMTRAP-MIB
-- Last edit date: May 14th, 2020
DEFINITIONS ::= BEGIN
IMPORTS
enterprises
FROM RFC1155-SMI
TRAP-TYPE
FROM RFC-1215
connUnitEventId, connUnitEventType, connUnitEventDescr
FROM FCMGMT-MIB;


--Textual conventions for this MIB

----------------------------------------------------------------------
seagateSystems OBJECT IDENTIFIER ::= { enterprises 347 }


-- Related traps

seagateEventInfoTrap TRAP-TYPE
ENTERPRISE seagateSystems
VARIABLES { connUnitEventId,
connUnitEventType,
connUnitEventDescr }
DESCRIPTION
"An event has been generated by the storage array.
Recommended severity level (for filtering): info"

-- Trap annotations are as follows:
--#TYPE "Informational storage event"
--#SUMMARY "Informational storage event # %d, type %d, description: %s"
--#ARGUMENTS {0,1,2}
--#SEVERITY INFORMATIONAL
--#TIMEINDEX 6
::= 1

seagateEventWarningTrap TRAP-TYPE
ENTERPRISE seagateSystems
VARIABLES { connUnitEventId,
connUnitEventType,
connUnitEventDescr }
DESCRIPTION
"An event has been generated by the storage array.
Recommended severity level (for filtering): warning"

-- Trap annotations are as follows:
--#TYPE "Warning storage event"
--#SUMMARY "Warning storage event # %d, type %d, description: %s"
--#ARGUMENTS {0,1,2}
--#SEVERITY MINOR
--#TIMEINDEX 6
::= 2

seagateEventErrorTrap TRAP-TYPE
ENTERPRISE seagateSystems
VARIABLES { connUnitEventId,
connUnitEventType,
connUnitEventDescr }
DESCRIPTION
"An event has been generated by the storage array.
Recommended severity level (for filtering): error"

-- Trap annotations are as follows:
--#TYPE "Error storage event"
--#SUMMARY "Error storage event # %d, type %d, description: %s"
--#ARGUMENTS {0,1,2}
--#SEVERITY MAJOR
--#TIMEINDEX 6
::= 3

seagateEventCriticalTrap TRAP-TYPE
ENTERPRISE seagateSystems
VARIABLES { connUnitEventId,
connUnitEventType,
connUnitEventDescr }
DESCRIPTION
"An event has been generated by the storage array.
Recommended severity level (for filtering): critical"

-- Trap annotations are as follows:
--#TYPE "Critical storage event"
--#SUMMARY "Critical storage event # %d, type %d, description: %s"
--#ARGUMENTS {0,1,2}
--#SEVERITY CRITICAL
--#TIMEINDEX 6
::= 4

seagateEventResolvedTrap TRAP-TYPE
ENTERPRISE seagateSystems
VARIABLES { connUnitEventId,
connUnitEventType,
connUnitEventDescr }
DESCRIPTION
"An issue has been resolved on the array.
Recommended severity level (for filtering): resolved"

-- Trap annotations are as follows:
--#TYPE "Resolved storage event"
--#SUMMARY "Resolved storage event # %d, type %d, description: %s"
--#ARGUMENTS {0,1,2}
--#SEVERITY INFORMATIONAL
--#TIMEINDEX 6
::= 5

END
Loading

0 comments on commit 2de1278

Please sign in to comment.