mirror of https://github.com/mikaku/Monitorix.git
allow negative thermal margin values in ipmi
This commit is contained in:
parent
fa6c341336
commit
ea82cfd825
20
lib/ipmi.pm
20
lib/ipmi.pm
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in New Issue