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

Fixed typo in variables

This commit is contained in:
Alejandro Suarez 2020-03-25 20:07:40 +01:00 committed by Lars Kruse
parent 1acb0665e8
commit e1bc7ad6c7

View file

@ -55,8 +55,8 @@ elsif (!defined($host))
die "# Error: couldn't understand what I'm supposed to monitor.";
}
my $sysFalshUsage = "1.3.6.1.2.1.25.2.3.1.6.131072";
my $sysFalshTotal = "1.3.6.1.2.1.25.2.3.1.5.131072";
my $sysFlashUsage = "1.3.6.1.2.1.25.2.3.1.6.131072";
my $sysFlashTotal = "1.3.6.1.2.1.25.2.3.1.5.131072";
my ($session, $error) = Net::SNMP->session(
-hostname => $host,
@ -74,33 +74,34 @@ if (!defined ($session))
if ($ARGV[0] and $ARGV[0] eq "config")
{
print "host_name $host\n";
if (!defined ($response = $session->get_request($sysFalshTotal)))
if (!defined ($response = $session->get_request($sysFlashTotal)))
{
die "Croaking: " . $session->error();
}
print "graph_args --base 1024 -l 0 --vertical-label Bytes --upper-limit " . ($response->{$sysFalshTotal} * 1024) . "\n";
print "graph_args --base 1024 -l 0 --vertical-label Bytes --upper-limit " . ($response->{$sysFlashTotal} * 1024) . "\n";
print "graph_title Flash disk usage\n";
print "graph_category system\n";
print "graph_info This graph shows the router's flash disk usage.\n";
print "graph_order Total Used\n";
print "graph_vlabel bytes\n";
print "sysFalshTotal.label Total Memory\n";
print "sysFalshTotal.draw AREA\n";
print "sysFalshUsage.label Used Memory\n";
print "sysFalshUsage.draw AREA\n";
print "sysFlashTotal.label Total Memory\n";
print "sysFlashTotal.draw AREA\n";
print "sysFlashUsage.label Used Memory\n";
print "sysFlashUsage.draw AREA\n";
exit 0;
}
if (defined ($response = $session->get_request(-varbindlist => [$sysFalshUsage, $sysFalshTotal])))
if (defined ($response = $session->get_request(-varbindlist => [$sysFlashUsage, $sysFlashTotal])))
{
print "sysFalshUsage.value ", $response->{$sysFalshUsage}*1024, "\n";
print "sysFalshTotal.value ", $response->{$sysFalshTotal}*1024, "\n";
print "sysFlashUsage.value ", $response->{$sysFlashUsage}*1024, "\n";
print "sysFlashTotal.value ", $response->{$sysFlashTotal}*1024, "\n";
}
else
{
print "sysFalshUsage.value U\n";
print "sysFalshTotal.value U\n";
print "sysFlashUsage.value U\n";
print "sysFlashTotal.value U\n";
}
# vim:syntax=perl