mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
fix: Fixed Rittal LCP sensor divisors (#7014)
* Better values for some graphs * Change definition order * Update rittal-lcp.yaml
This commit is contained in:
@@ -2,16 +2,18 @@ os: rittal-lcp
|
||||
text: 'Rittal LCP'
|
||||
type: environment
|
||||
icon: rittal
|
||||
over:
|
||||
- { graph: device_temperature, text: 'Temperatures' }
|
||||
- { graph: device_power, text: 'Cooling capacity' }
|
||||
mib_dir:
|
||||
- rittal
|
||||
over:
|
||||
- { graph: device_processor, text: 'Processor Usage' }
|
||||
- { graph: device_ucd_memory, text: 'Memory Usage' }
|
||||
- { graph: device_storage, text: 'Storage Usage' }
|
||||
discovery_modules:
|
||||
storage: 0
|
||||
mempools: 0
|
||||
processors: 0
|
||||
discovery:
|
||||
-
|
||||
sysObjectId:
|
||||
- .1.3.6.1.4.1.2606.7
|
||||
- sysDescr:
|
||||
- 'Rittal LCP'
|
||||
|
||||
@@ -109,6 +109,21 @@ if (is_array($oids)) {
|
||||
} $descr = preg_replace('/[T|t]emperature[|s]/', '', $descr);
|
||||
}
|
||||
|
||||
if ($device['os'] == 'rittal-lcp') {
|
||||
if ($type == 'voltage') {
|
||||
$divisor = 1000;
|
||||
}
|
||||
if ($descr == 'Temperature.Value') {
|
||||
$divisor = 1000;
|
||||
}
|
||||
if ($descr == 'System.Temperature.Value') {
|
||||
$divisor = 1000;
|
||||
}
|
||||
if ($type == 'humidity' && $current == '0') {
|
||||
$valid_sensor = false;
|
||||
}
|
||||
}
|
||||
|
||||
// echo($descr . "|" . $index . "|" .$current . "|" . $multiplier . "|" . $divisor ."|" . $entry['entPhySensorScale'] . "|" . $entry['entPhySensorPrecision'] . "\n");
|
||||
if ($current == '-127' || ($device['os'] == 'asa' && str_contains($device['hardware'], 'sc'))) {
|
||||
$valid_sensor = false;
|
||||
|
||||
Reference in New Issue
Block a user