9 use HTTP::Request::Common;
13 my $conf = YAML::Tiny->read("$Bin/checkalive.yml")->[0];
15 my $ua = LWP::UserAgent->new;
17 foreach my $url (@{$conf->{urls}}) {
18 my $response = $ua->request(GET $url);
19 logging($response->status_line, " ", $url);
25 my $logfile = "$Bin/checkalive." . today() . ".log";
26 open LOG, ">>$logfile";
27 print LOG "[" . localtime() . "] ($$) " , @msg, "\n";
32 my ($s, $mi, $h, $d, $mo, $y, $w) = localtime();
34 return sprintf("%4d%02d%02d", $y, $mo, $d, $h, $mi, $s);