mirror of
https://github.com/munin-monitoring/contrib.git
synced 2025-07-25 10:28:36 +00:00
snmp__screenos: support receiving CPU utilization information.
This commit is contained in:
parent
d7e8315462
commit
8d259040ac
1 changed files with 46 additions and 6 deletions
|
@ -1,5 +1,5 @@
|
|||
#!/usr/bin/perl -w
|
||||
# -*- perl -*-
|
||||
# -*- cperl -*-
|
||||
|
||||
=head1 NAME
|
||||
|
||||
|
@ -57,6 +57,10 @@ use Munin::Plugin::SNMP;
|
|||
# This corresponds to NETSCREEN-SMI::netscreenResource
|
||||
my $oidBase = '1.3.6.1.4.1.3224.16';
|
||||
|
||||
my $oidCpuAvg = $oidBase . '.1.1';
|
||||
my $oidCpuLast1Min = $oidBase . '.1.2';
|
||||
my $oidCpuLast5Min = $oidBase . '.1.3';
|
||||
my $oidCpuLast15Min = $oidBase . '.1.4';
|
||||
my $oidMemAllocate = $oidBase . '.2.1';
|
||||
my $oidMemLeft = $oidBase . '.2.2';
|
||||
my $oidSessAllocate = $oidBase . '.3.2';
|
||||
|
@ -68,11 +72,15 @@ if (defined $ARGV[0] and $ARGV[0] eq "snmpconf") {
|
|||
}
|
||||
|
||||
my $session = Munin::Plugin::SNMP->session();
|
||||
my $data = $session->get_entries(-columns => [ $oidMemAllocate,
|
||||
$oidMemLeft,
|
||||
$oidSessAllocate,
|
||||
$oidSessMaximum,
|
||||
$oidSessFailed ]);
|
||||
my $data = $session->get_entries(-columns => [$oidCpuAvg,
|
||||
$oidCpuLast1Min,
|
||||
$oidCpuLast5Min,
|
||||
$oidCpuLast15Min,
|
||||
$oidMemAllocate,
|
||||
$oidMemLeft,
|
||||
$oidSessAllocate,
|
||||
$oidSessMaximum,
|
||||
$oidSessFailed ]);
|
||||
|
||||
if ($ARGV[0] and $ARGV[0] eq "config") {
|
||||
my ($host) = Munin::Plugin::SNMP->config_session();
|
||||
|
@ -114,6 +122,32 @@ sessions.critical $sessCritical
|
|||
failed.label Failed Sessions
|
||||
failed.min 0
|
||||
failed.critical 1
|
||||
|
||||
multigraph screenos_cpu
|
||||
graph_title CPU Utilizaiton
|
||||
graph_vabel Percentage
|
||||
graph_category system
|
||||
|
||||
average.label Average
|
||||
average.min 0
|
||||
average.max 100
|
||||
average.warning 75
|
||||
average.critical 85
|
||||
last1.label Last minute
|
||||
last1.min 0
|
||||
last1.max 100
|
||||
last1.warning 75
|
||||
last1.critical 85
|
||||
last5.label Last 5 minutes
|
||||
last5.min 0
|
||||
last5.max 100
|
||||
last5.warning 75
|
||||
last5.critical 85
|
||||
last15.label Last 15 minutes
|
||||
last15.min 0
|
||||
last15.max 100
|
||||
last15.warning 75
|
||||
last15.critical 85
|
||||
END
|
||||
|
||||
exit 0;
|
||||
|
@ -126,4 +160,10 @@ memory.value $data->{"$oidMemAllocate.0"}
|
|||
multigraph screenos_sessions
|
||||
sessions.value $data->{"$oidSessAllocate.0"}
|
||||
failed.value $data->{"$oidSessFailed.0"}
|
||||
|
||||
multigraph screenos_cpu
|
||||
average.value $data->{"$oidCpuAvg.0"}
|
||||
last1.value $data->{"$oidCpuLast1Min.0"}
|
||||
last5.value $data->{"$oidCpuLast5Min.0"}
|
||||
last15.value $data->{"$oidCpuLast15Min.0"}
|
||||
END
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue