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;
 
  19     print "host_name $host\n" unless $host eq "localhost";
 
  20     print "graph_title Power\n";
 
  21     print "graph_args --base 1000 -l 0\n";
 
  22     print "graph_vlabel Watts\n";
 
  23     print "graph_category power\n";
 
  24     print "graph_info This graph shows the power being supplied by the PDU.\n";
 
  26     print "power.label Power\n";
 
  27     print "power.type GAUGE\n";
 
  28     print "power.info Current power draw in watts.\n";
 
  29     print "power.draw LINE2\n";
 
  31     my $power = $session->get_single(".1.3.6.1.4.1.318.1.1.26.6.3.1.7.1");
 
  33     $power = $power * 10 unless $power eq "U";
 
  35     print "power.value ${power}\n";