6 #%# capabilities=snmpconf
12 use Munin::Plugin::SNMP;
14 my $session = Munin::Plugin::SNMP->session;
16 if (defined $ARGV[0] and $ARGV[0] eq "config") {
17 my $host = $session->hostname;
18 my $warning = $session->get_single(".1.3.6.1.4.1.318.1.1.26.6.1.1.6.1");
19 my $critical = $session->get_single(".1.3.6.1.4.1.318.1.1.26.6.1.1.7.1");
21 print "host_name $host\n" unless $host eq "localhost";
22 print "graph_title Load\n";
23 print "graph_args --base 1000 -l 0\n";
24 print "graph_vlabel Amps\n";
25 print "graph_category power\n";
26 print "graph_info This graph shows the total throughput the PDU.\n";
28 print "current.label Current\n";
29 print "current.type GUAGE\n";
30 print "current.info Current load in amps.\n";
31 print "current.draw LINE2\n";
32 print "current.warning ${warning}\n";
33 print "current.critical ${critical}\n";
35 my $current = $session->get_single(".1.3.6.1.4.1.318.1.1.26.6.3.1.5.1");
37 $current = $current / 10 unless $current eq "U";
39 print "current.value ${current}\n";