mirror of https://github.com/mikaku/Monitorix.git
Fixed in 'traffact' to show an error message when Monitorix is unable to connect to the HTTP server
This commit is contained in:
parent
0ac6b46d22
commit
cb36a02e57
|
@ -333,6 +333,9 @@ sub traffacct_sendreports {
|
||||||
$ua->request(HTTP::Request->new('GET', $url));
|
$ua->request(HTTP::Request->new('GET', $url));
|
||||||
$url = "http://127.0.0.1" . $base_url . "/" . $imgs_dir . "traffacct" . $n . ".1month.png";
|
$url = "http://127.0.0.1" . $base_url . "/" . $imgs_dir . "traffacct" . $n . ".1month.png";
|
||||||
my $image = $ua->request(HTTP::Request->new('GET', $url));
|
my $image = $ua->request(HTTP::Request->new('GET', $url));
|
||||||
|
if(!$image->is_success) {
|
||||||
|
logger("$myself: ERROR: Unable to connect to '$url'.");
|
||||||
|
}
|
||||||
|
|
||||||
# create the multipart container and add attachments
|
# create the multipart container and add attachments
|
||||||
my $msg = new MIME::Lite(
|
my $msg = new MIME::Lite(
|
||||||
|
|
Loading…
Reference in New Issue