1
0
Fork 0
mirror of https://github.com/munin-monitoring/contrib.git synced 2025-07-21 10:39:53 +00:00

add temperature support

This commit is contained in:
Air 2019-11-15 23:49:46 +09:00 committed by Christian Häggström
parent 6d9a047849
commit e2fd82d77a

View file

@ -95,6 +95,7 @@ None known.
Kjetil Torgrim Homme <kjetil.homme@redpill-linpro.com>
Andreas Perhab, WT-IO-IT GmbH <andreas.perhab@wt-io-it.at>
Temperature support by Air
=head1 LICENSE
@ -347,6 +348,20 @@ $_.max 100
EOF
my_print_thresholds($_, 'nvme_spare', $device, '10:', '3:');
}
print <<'EOF';
multigraph nvme_temperature
graph_title NVME Temperature
graph_order $sn_list
graph_vlabel Temperature
graph_category disk
graph_info Temperature
EOF
for (@sn) {
print <<"EOF";
$_.label $list->{$_}->{device} temperature
$_.type GAUGE
EOF
}
} else {
for (@sn) {
$list->{$_}->{smart} = smart_log($list->{$_}->{device});
@ -382,4 +397,11 @@ EOF
$spare =~ s/%//;
print "$_.value $spare\n";
}
print "multigraph nvme_temperature\n";
for (@sn) {
my $info = $list->{$_};
my $temperature = $info->{smart}->{temperature};
$temperature =~ s/^(\d+).*/$1/;
print "$_.value $temperature\n";
}
}