use CGI;
use GD;
use DBI;
+use lib '../include';
+use nms;
my $cgi = CGI->new;
my $greentimeout = 900;
my $maxtimeout = $greentimeout*9;
-my $dbh = DBI->connect("dbi:Pg:dbname=snmpfetch;host=violet.tg05.gathering.org", "snmpfetch", "removed")
- or die "Couldn't connect to database";
+my $dbh = nms::db_connect();
GD::Image->trueColor(1);
-$img = GD::Image->new('snmp-bg.png');
+$img = GD::Image->new('bg07.png');
my $blk = $img->colorResolve(0, 0, 0);
-$img->string(gdMediumBoldFont,0,0,"TG05 - DHCP-lease status",$blk);
+$img->string(gdMediumBoldFont,0,0,"TG07 - DHCP-lease status",$blk);
$img->string(gdSmallFont,0,20,"Last recieved DHCP-request",$blk);
# first 1/5: green (<30 min)
if (!defined($ARGV[0])) {
print $cgi->header(-type=>'image/png',
- -refresh=>'10; http://nms.tg05.gathering.org/dhcpkart.pl');
+ -refresh=>'10; http://nms.tg07.gathering.org/dhcpkart.pl');
}
print $img->png;