#-----------------------------------
#!/usr/bin/perl.
#Temperatur auslesen
use strict;
use CGI::Carp qw(fatalsToBrowser);
print "Content-type: text/html\n\n";
print '', "\n";
my $Output1 = qx(/usr/bin/snmpwalk -v1 -c public srv1 .1.3.6.1.4.1.2021.8.1.101| cut -f4 -d':');
print "
Raumtemperaturen
";
print "Serverraum1 | srv1 | $Output1 ° C |
";
my $Output2 = qx(/usr/bin/snmpwalk -v1 -c public srv2 .1.3.6.1.4.1.2021.8.1.101| cut -f4 -d':');
print "Serverraum2 | srv2 | $Output2 ° C |
";
my $Output3 = qx(/usr/bin/snmpwalk -v1 -c public srv3 .1.3.6.1.4.1.2021.8.1.101| cut -f4 -d':');
print "Serverraum3 | srv3 | $Output3 ° C |
";
my $Output4 = qx(/usr/bin/snmpwalk -v1 -c public srv4 .1.3.6.1.4.1.2021.8.1.101.0.0.2| cut -f4 -d':');
print "Serverraum4 | srv4 | $Output4 ° C |
";
print "
";
my $Output5 = qx(/bin/date);
print "
letzte Abfrage: $Output5
";
print "zur Aktualisierung bitte F5 druecken.";
print "";
#----------------------------------