rework: Cisco SB Switch Temp and Fanspeed fix (#15225)

* rework

Sorry for the long waiting time. I've made some tests and found that the value 0 should be ignored anyway because some Cisco switches report a non-existing fan with a speed of 0 which causes several errors when adding e.g. a fanless switch. Therefore I would like to suggest to keep the skip_value for this case.

I've also seen no more fan flapping with the most recent switch firmware so maybe Cisco has fixed something internally.

* Fix Test Data sg350x-24p

* Corrected other ciscoSB-Test data

Corrected other ciscoSB-Test data

* Removed ciscosb generic test data

This snmprec behaves different for my test system and the git checks. In addition the model is missing.

* Reverted cbs250 testfile

For some reason the generated test file contains errors. Reverting

* Weired fix

* Fixed weired update

* Recreated snmp data for cbs250

Recreated snmp data for cbs250

* updatet test data

Reworked Test data with most recend version

* Removed unused SNMPsim-Data

the ciscosb_x snmpsim Data are not used. Most device types are covered with the other test data. SRW-Switch line is currently not fully working. I have such an old device I'll add test data in the future.

* Recaptured cbs250 Test Data

* Renamed cbs250 test data

I have the impression that the online test somehow does not reload the snmprec data correctly. Therefore I rename it to make sure it handles it as a new device

* Removed VLANs

* Removed Farenheit to Celsius conversion

It seems that with the most recent version cisco reports the temperature in C. https://community.librenms.org/t/cisco-cbs-350-reads-wrong-temperature/22038

* Fixed wrong copied data

* Altered warning limit to CLI-values

* Added snmprec data back

Added snmprec data back
This commit is contained in:
Fehler12
2023-11-02 05:28:57 +01:00
committed by GitHub
parent ba1d3ff9bd
commit 12c88f4af0
11 changed files with 5515 additions and 5126 deletions
+28 -3
View File
@@ -60,7 +60,7 @@ modules:
# num_oid: '.1.3.6.1.4.1.9.6.1.101.108.1.1.5.{{ $index }}'
# index: '{{ $index }}'
# descr: 'POE Usage Port {{ $index }}'
# divisor : 1000
# divisor: 1000
# high_limit: rlPethPsePortOperPowerLimit
temperature:
data:
@@ -70,9 +70,34 @@ modules:
num_oid: '.1.3.6.1.4.1.9.6.1.101.83.5.1.1.2.{{ $index }}'
index: '{{ $index }}'
descr: 'FAN {{ $index }} Temperature'
user_func: fahrenheit_to_celsius
# user_func: fahrenheit_to_celsius
warn_limit: 91
high_limit: 95
# true for all switches, got data from cli output "show system sensors" on a SG350-8F8T,
# temperature seems to be the cpu/processing unit temperature, not the fan-in temperature.
# See CLI-output. All other temperatures are not accessable via SNMP (to my research). SG350X-24P and CBS250-4X have higher values
low_limit: 0 # true for CBS250-8T-D and CBS250-8PP-D, all other tolerate -5
skip_values:
-
oid: rlEnvFanDataTemp
op: '=='
value: 0
value: 0
# -
# oid: rlEnvFanDataTemp
# op: '=='
# value: -17.78 # Fahrenheit = 0
fanspeed:
data:
-
oid: rlEnvFanDataSpeed
value: rlEnvFanDataSpeed
num_oid: '.1.3.6.1.4.1.9.6.1.101.83.5.1.1.3.{{ $index }}'
index: '{{ $index }}'
descr: 'FAN {{ $index }} Speed'
high_limit: 10000
low_limit: 500
skip_values:
-
oid: rlEnvFanDataSpeed
op: '=='
value: 0
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -7,7 +7,7 @@
"sysObjectID": ".1.3.6.1.4.1.9.6.1.1004.28.5",
"sysDescr": "CBS350-24P-4G 24-Port Gigabit PoE Managed Switch",
"sysContact": "<private>",
"version": "",
"version": null,
"hardware": "CBS350-24P-4G",
"features": null,
"location": "<private>",
+1 -1
View File
@@ -7,7 +7,7 @@
"sysObjectID": ".1.3.6.1.4.1.9.1.1176",
"sysDescr": "8-port 10/100/1000 Ethernet Switch with PoE",
"sysContact": null,
"version": "",
"version": null,
"hardware": "",
"features": null,
"location": null,
+14 -14
View File
@@ -8863,7 +8863,7 @@
"sensor_divisor": 1000,
"sensor_multiplier": 1,
"sensor_current": 10,
"sensor_limit": 0,
"sensor_limit": null,
"sensor_limit_warn": null,
"sensor_limit_low": null,
"sensor_limit_low_warn": null,
@@ -8888,7 +8888,7 @@
"sensor_divisor": 1000,
"sensor_multiplier": 1,
"sensor_current": 3.4,
"sensor_limit": 0,
"sensor_limit": null,
"sensor_limit_warn": null,
"sensor_limit_low": null,
"sensor_limit_low_warn": null,
@@ -9687,17 +9687,17 @@
"group": null,
"sensor_divisor": 1,
"sensor_multiplier": 1,
"sensor_current": 31.11,
"sensor_limit": 51.11,
"sensor_limit_warn": null,
"sensor_limit_low": 21.11,
"sensor_current": 88,
"sensor_limit": 95,
"sensor_limit_warn": 91,
"sensor_limit_low": 0,
"sensor_limit_low_warn": null,
"sensor_alert": 1,
"sensor_custom": "No",
"entPhysicalIndex": null,
"entPhysicalIndex_measured": null,
"sensor_prev": null,
"user_func": "fahrenheit_to_celsius",
"user_func": null,
"rrd_type": "GAUGE",
"state_name": null
}
@@ -9817,7 +9817,7 @@
"sensor_divisor": 1000,
"sensor_multiplier": 1,
"sensor_current": 10,
"sensor_limit": 0,
"sensor_limit": null,
"sensor_limit_warn": null,
"sensor_limit_low": null,
"sensor_limit_low_warn": null,
@@ -9842,7 +9842,7 @@
"sensor_divisor": 1000,
"sensor_multiplier": 1,
"sensor_current": 3.4,
"sensor_limit": 0,
"sensor_limit": null,
"sensor_limit_warn": null,
"sensor_limit_low": null,
"sensor_limit_low_warn": null,
@@ -10641,17 +10641,17 @@
"group": null,
"sensor_divisor": 1,
"sensor_multiplier": 1,
"sensor_current": 31.11,
"sensor_limit": 51.11,
"sensor_limit_warn": null,
"sensor_limit_low": 21.11,
"sensor_current": 88,
"sensor_limit": 95,
"sensor_limit_warn": 91,
"sensor_limit_low": 0,
"sensor_limit_low_warn": null,
"sensor_alert": 1,
"sensor_custom": "No",
"entPhysicalIndex": null,
"entPhysicalIndex_measured": null,
"sensor_prev": null,
"user_func": "fahrenheit_to_celsius",
"user_func": null,
"rrd_type": "GAUGE",
"state_name": null
}
+1 -1
View File
@@ -7,7 +7,7 @@
"sysObjectID": ".1.3.6.1.4.1.9.6.1.94.48.1",
"sysDescr": "SG350X-48 48-Port Gigabit Stackable Managed Switch",
"sysContact": "<private>",
"version": "",
"version": null,
"hardware": "SG350X-48",
"features": null,
"location": "<private>",
+1 -1
View File
@@ -7,7 +7,7 @@
"sysObjectID": ".1.3.6.1.4.1.9.6.1.93.24.1",
"sysDescr": "SG550X-24 24-Port Gigabit Stackable Managed Switch",
"sysContact": null,
"version": "",
"version": null,
"hardware": "SG550X-24",
"features": null,
"location": null,
+10 -10
View File
@@ -7412,17 +7412,17 @@
"group": null,
"sensor_divisor": 1,
"sensor_multiplier": 1,
"sensor_current": 17.78,
"sensor_limit": 37.78,
"sensor_limit_warn": null,
"sensor_limit_low": 7.78,
"sensor_current": 64,
"sensor_limit": 95,
"sensor_limit_warn": 91,
"sensor_limit_low": 0,
"sensor_limit_low_warn": null,
"sensor_alert": 1,
"sensor_custom": "No",
"entPhysicalIndex": null,
"entPhysicalIndex_measured": null,
"sensor_prev": null,
"user_func": "fahrenheit_to_celsius",
"user_func": null,
"rrd_type": "GAUGE",
"state_name": null
},
@@ -8441,17 +8441,17 @@
"group": null,
"sensor_divisor": 1,
"sensor_multiplier": 1,
"sensor_current": 17.78,
"sensor_limit": 37.78,
"sensor_limit_warn": null,
"sensor_limit_low": 7.78,
"sensor_current": 64,
"sensor_limit": 95,
"sensor_limit_warn": 91,
"sensor_limit_low": 0,
"sensor_limit_low_warn": null,
"sensor_alert": 1,
"sensor_custom": "No",
"entPhysicalIndex": null,
"entPhysicalIndex_measured": null,
"sensor_prev": null,
"user_func": "fahrenheit_to_celsius",
"user_func": null,
"rrd_type": "GAUGE",
"state_name": null
},
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff