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.10.2.1.1.11.1");
 
  19     my $critical = $session->get_single(".1.3.6.1.4.1.318.1.1.26.10.2.1.1.10.1");
 
  21     print "host_name $host\n" unless $host eq "localhost";
 
  22     print "graph_title Temperature\n";
 
  23     print "graph_args -l 0\n";
 
  24     print "graph_vlabel Degrees Celsius\n";
 
  25     print "graph_category sensors\n";
 
  26     print "graph_info This graph shows the temperature from the PDUs environmental sensor.\n";
 
  28     print "temperature.label Temperature\n";
 
  29     print "temperature.type GAUGE\n";
 
  30     print "temperature.info Temperature in degrees celsius.\n";
 
  31     print "temperature.draw LINE2\n";
 
  32     print "temperature.warning :${warning}\n";
 
  33     print "temperature.critical :${critical}\n";
 
  35     my $temperature = $session->get_single(".1.3.6.1.4.1.318.1.1.26.10.2.2.1.8.1");
 
  37     $temperature = $temperature / 10 unless $temperature eq "U";
 
  39     print "temperature.value ${temperature}\n";