1
0
Fork 0
mirror of https://github.com/munin-monitoring/contrib.git synced 2025-07-21 18:41:03 +00:00

Added monitoring of router temperature

This commit is contained in:
Alejandro Suarez 2020-03-27 13:53:47 +01:00 committed by Lars Kruse
parent 0cfcf2ccbf
commit 3032db4890

View file

@ -49,6 +49,7 @@ my $sysFlashUsageOID = "1.3.6.1.2.1.25.2.3.1.6.131072";
my $sysFlashTotalOID = "1.3.6.1.2.1.25.2.3.1.5.131072";
my $sysRAMUsageOID = "1.3.6.1.2.1.25.2.3.1.6.65536";
my $sysRAMTotalOID = "1.3.6.1.2.1.25.2.3.1.5.65536";
my $sysTempOID = "1.3.6.1.4.1.14988.1.1.3.10.0";
my $response;
@ -57,6 +58,7 @@ if (defined $ARGV[0] and $ARGV[0] eq "snmpconf") {
print "require $sysFlashTotalOID\n";
print "require $sysRAMUsageOID\n";
print "require $sysRAMTotalOID\n";
print "require $sysTempOID\n";
exit 0;
}
@ -112,6 +114,17 @@ if ($ARGV[0] and $ARGV[0] eq "config") {
print "sysRAMUsage.label Used Memory\n";
print "sysRAMUsage.draw AREA\n";
}
$response = $session->get_request($sysTempOID);
if (defined $response) {
print "multigraph temp\n";
print "graph_vlabel degC \n";
print "graph_title Temperature\n";
print "graph_category sensors\n";
print "graph_info This graph shows the router's temperature.\n";
print "sysTemp.label Temperature\n";
print "sysTemp.type GAUGE\n";
}
exit 0 unless (($ENV{MUNIN_CAP_DIRTYCONFIG} || 0) == 1);
}
@ -136,4 +149,12 @@ if (defined $response) {
print "sysRAMTotal.value U\n";
}
print "multigraph temp\n";
$response = $session->get_request(-varbindlist => [$sysTempOID]);
if (defined $response) {
print "sysTemp.value ", $response->{$sysTempOID}/10, "\n";
} else {
print "sysTemp.value U\n";
}
# vim:syntax=perl