mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
fix skip_value_lt plurality confusion (#12056)
* fix skip_value_lt plurality confusion * Update atenpdu.yaml
This commit is contained in:
@@ -260,10 +260,10 @@ class YamlDiscovery
|
||||
foreach ($skip_values as $skip_value) {
|
||||
if (is_array($skip_value) && $pre_cache) {
|
||||
// Dynamic skipping of data
|
||||
$op = isset($skip_value['op']) ? $skip_value['op'] : '!=';
|
||||
$op = $skip_value['op'] ?? '!=';
|
||||
$tmp_value = static::getValueFromData($skip_value['oid'], $index, $yaml_item_data, $pre_cache);
|
||||
if (Str::contains($skip_value['oid'], '.')) {
|
||||
list($skip_value['oid'], $targeted_index) = explode('.', $skip_value['oid'], 2);
|
||||
[$skip_value['oid'], $targeted_index] = explode('.', $skip_value['oid'], 2);
|
||||
$tmp_value = static::getValueFromData($skip_value['oid'], $targeted_index, $yaml_item_data, $pre_cache);
|
||||
}
|
||||
if (compare_var($tmp_value, $skip_value['value'], $op)) {
|
||||
|
@@ -62,7 +62,7 @@ modules:
|
||||
sensors:
|
||||
airflow:
|
||||
options:
|
||||
skip_values_lt: 0
|
||||
skip_value_lt: 0
|
||||
data:
|
||||
-
|
||||
oid: airFlowSensorTable
|
||||
|
@@ -2,14 +2,13 @@ mib: MWR-ETHERNET-MIB:MWR-RADIO-MC-MIB
|
||||
modules:
|
||||
sensors:
|
||||
temperature:
|
||||
options:
|
||||
skip_values_lt: 0
|
||||
data:
|
||||
-
|
||||
oid: mwrSystemTemperature
|
||||
num_oid: '.1.3.6.1.4.1.7262.4.5.2.2.3.{{ $index }}'
|
||||
descr: 'Current System Temperature'
|
||||
index: 'mwrSystemTemperature.{{ $index }}'
|
||||
skip_value_lt: 0
|
||||
state:
|
||||
data:
|
||||
-
|
||||
|
@@ -9,22 +9,20 @@ modules:
|
||||
descr: 'Main(s) CPU average usage'
|
||||
sensors:
|
||||
fanspeed:
|
||||
options:
|
||||
skip_values_lt: 0
|
||||
data:
|
||||
-
|
||||
oid: fanDescriptionEntry
|
||||
value: fanSpeed
|
||||
skip_value_lt: 0
|
||||
num_oid: '.1.3.6.1.4.1.2011.2.235.1.1.8.50.1.2.{{ $index }}'
|
||||
descr: 'fanDevicename'
|
||||
index: 'fanSpeed.{{ $index }}'
|
||||
power:
|
||||
options:
|
||||
skip_values_lt: 0
|
||||
data:
|
||||
-
|
||||
oid: powerSupplyDescriptionEntry
|
||||
value: powerSupplyInputPower
|
||||
skip_value_lt: 0
|
||||
num_oid: '.1.3.6.1.4.1.2011.2.235.1.1.6.50.1.8.{{ $index }}'
|
||||
descr: 'Power Supply {{ $index }} Input'
|
||||
index: 'powerSupplyIndex.{{ $index }}'
|
||||
|
@@ -9,7 +9,7 @@ modules:
|
||||
voltage:
|
||||
options:
|
||||
divisor: 10
|
||||
skip_values_lt: 40
|
||||
skip_value_lt: 40
|
||||
data:
|
||||
-
|
||||
oid: uLN1
|
||||
|
@@ -8,8 +8,6 @@ modules:
|
||||
- boxServicesNormalTempRangeMin
|
||||
- boxServicesNormalTempRangeMax
|
||||
temperature:
|
||||
options:
|
||||
skip_values_lt: 0
|
||||
data:
|
||||
-
|
||||
oid: boxServicesTempSensorsTable
|
||||
|
@@ -10,7 +10,6 @@ modules:
|
||||
descr: Battery time remaining
|
||||
voltage:
|
||||
options:
|
||||
skip_values_lt: 0
|
||||
divisor: 10
|
||||
data:
|
||||
-
|
||||
@@ -67,7 +66,6 @@ modules:
|
||||
descr: Module Negative Charge
|
||||
frequency:
|
||||
options:
|
||||
skip_values_lt: 0
|
||||
divisor: 10
|
||||
data:
|
||||
-
|
||||
@@ -97,7 +95,6 @@ modules:
|
||||
descr: Battery charge remaining
|
||||
temperature:
|
||||
options:
|
||||
skip_values_lt: 0
|
||||
divisor: 10
|
||||
data:
|
||||
-
|
||||
@@ -132,7 +129,7 @@ modules:
|
||||
high_limit: upsEEnvironmentTemperatureHighSetPoint
|
||||
current:
|
||||
options:
|
||||
skip_values_lt: 0
|
||||
skip_value_lt: 0
|
||||
divisor: 10
|
||||
data:
|
||||
-
|
||||
@@ -167,7 +164,7 @@ modules:
|
||||
descr: Negative Charge
|
||||
humidity:
|
||||
options:
|
||||
skip_values_lt: 0
|
||||
skip_value_lt: 0
|
||||
data:
|
||||
-
|
||||
oid: upsEEnvironmentHumidity
|
||||
@@ -177,7 +174,7 @@ modules:
|
||||
descr: Environment Current
|
||||
power:
|
||||
options:
|
||||
skip_values_lt: 0
|
||||
skip_value_lt: 0
|
||||
data:
|
||||
-
|
||||
oid: upsESystemInputTable
|
||||
|
@@ -23,7 +23,7 @@ modules:
|
||||
sensors:
|
||||
fanspeed:
|
||||
options:
|
||||
skip_values_lt: 0
|
||||
skip_value_lt: 0
|
||||
data:
|
||||
-
|
||||
oid: zyxelHwMonitorFanRpmTable
|
||||
@@ -43,8 +43,6 @@ modules:
|
||||
index: 'fanRpmCurValue.{{ $index }}'
|
||||
low_limit: fanRpmLowThresh
|
||||
temperature:
|
||||
options:
|
||||
skip_values_lt: 0
|
||||
data:
|
||||
-
|
||||
oid: zyxelHwMonitorTemperatureTable
|
||||
@@ -84,7 +82,7 @@ modules:
|
||||
value: 'Temperature'
|
||||
voltage:
|
||||
options:
|
||||
skip_values_lt: 0
|
||||
skip_value_lt: 0
|
||||
divisor: 1000
|
||||
data:
|
||||
-
|
||||
|
@@ -442,7 +442,10 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
"skip_values_lt": {
|
||||
"skip_value_gt": {
|
||||
"type": "integer"
|
||||
},
|
||||
"skip_value_lt": {
|
||||
"type": "integer"
|
||||
}
|
||||
},
|
||||
|
Reference in New Issue
Block a user