allow negative thermal margin values in ipmi

This commit is contained in:
Andy Rabagliati 2019-01-16 10:21:22 +02:00
parent fa6c341336
commit ea82cfd825
1 changed files with 10 additions and 10 deletions

View File

@ -78,15 +78,15 @@ sub ipmi_init {
push(@last, "RRA:LAST:0.5:1440:" . (365 * $n));
}
for($n = 0; $n < scalar(my @sl = split(',', $ipmi->{list})); $n++) {
push(@tmp, "DS:ipmi" . $n . "_s1:GAUGE:120:0:U");
push(@tmp, "DS:ipmi" . $n . "_s2:GAUGE:120:0:U");
push(@tmp, "DS:ipmi" . $n . "_s3:GAUGE:120:0:U");
push(@tmp, "DS:ipmi" . $n . "_s4:GAUGE:120:0:U");
push(@tmp, "DS:ipmi" . $n . "_s5:GAUGE:120:0:U");
push(@tmp, "DS:ipmi" . $n . "_s6:GAUGE:120:0:U");
push(@tmp, "DS:ipmi" . $n . "_s7:GAUGE:120:0:U");
push(@tmp, "DS:ipmi" . $n . "_s8:GAUGE:120:0:U");
push(@tmp, "DS:ipmi" . $n . "_s9:GAUGE:120:0:U");
push(@tmp, "DS:ipmi" . $n . "_s1:GAUGE:120:U:U");
push(@tmp, "DS:ipmi" . $n . "_s2:GAUGE:120:U:U");
push(@tmp, "DS:ipmi" . $n . "_s3:GAUGE:120:U:U");
push(@tmp, "DS:ipmi" . $n . "_s4:GAUGE:120:U:U");
push(@tmp, "DS:ipmi" . $n . "_s5:GAUGE:120:U:U");
push(@tmp, "DS:ipmi" . $n . "_s6:GAUGE:120:U:U");
push(@tmp, "DS:ipmi" . $n . "_s7:GAUGE:120:U:U");
push(@tmp, "DS:ipmi" . $n . "_s8:GAUGE:120:U:U");
push(@tmp, "DS:ipmi" . $n . "_s9:GAUGE:120:U:U");
}
eval {
RRDs::create($rrd,
@ -158,7 +158,7 @@ sub ipmi_update {
$str = trim($i);
$unit = $ipmi->{units}->{$e};
foreach(@data) {
if(/^($str)\s+\|\s+(\d+\.*\d*)\s+$unit\s+/) {
if(/^($str)\s+\|\s+(-?\d+\.*\d*)\s+$unit\s+/) {
my $val = $2;
$sens[$e][$e2] = $val;