mirror of
https://github.com/munin-monitoring/contrib.git
synced 2025-07-22 14:16:00 +00:00
Merge pull request #1479 from kalvdans/nvme-temperature
add temperature support
This commit is contained in:
commit
143084b046
1 changed files with 22 additions and 0 deletions
|
@ -95,6 +95,7 @@ None known.
|
||||||
|
|
||||||
Kjetil Torgrim Homme <kjetil.homme@redpill-linpro.com>
|
Kjetil Torgrim Homme <kjetil.homme@redpill-linpro.com>
|
||||||
Andreas Perhab, WT-IO-IT GmbH <andreas.perhab@wt-io-it.at>
|
Andreas Perhab, WT-IO-IT GmbH <andreas.perhab@wt-io-it.at>
|
||||||
|
Temperature support by Air
|
||||||
|
|
||||||
=head1 LICENSE
|
=head1 LICENSE
|
||||||
|
|
||||||
|
@ -347,6 +348,20 @@ $_.max 100
|
||||||
EOF
|
EOF
|
||||||
my_print_thresholds($_, 'nvme_spare', $device, '10:', '3:');
|
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 {
|
} else {
|
||||||
for (@sn) {
|
for (@sn) {
|
||||||
$list->{$_}->{smart} = smart_log($list->{$_}->{device});
|
$list->{$_}->{smart} = smart_log($list->{$_}->{device});
|
||||||
|
@ -382,4 +397,11 @@ EOF
|
||||||
$spare =~ s/%//;
|
$spare =~ s/%//;
|
||||||
print "$_.value $spare\n";
|
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";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue