fix: Fixed Rittal LCP sensor divisors (#7014)

* Better values for some graphs

* Change definition order

* Update rittal-lcp.yaml
This commit is contained in:
FTBZ
2017-07-13 18:23:55 +01:00
committed by Neil Lathwood
parent c874fc5b1e
commit 138fd2923a
2 changed files with 22 additions and 5 deletions
+7 -5
View File
@@ -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;