mirror of
https://github.com/munin-monitoring/contrib.git
synced 2025-07-21 18:41:03 +00:00
Use longer timeout.
This commit is contained in:
parent
0602fba8ac
commit
6eeb457fc2
1 changed files with 2 additions and 2 deletions
|
@ -51,7 +51,7 @@ use constant {
|
||||||
|
|
||||||
if(defined $ARGV[0] and $ARGV[0] eq 'autoconf'){
|
if(defined $ARGV[0] and $ARGV[0] eq 'autoconf'){
|
||||||
my $url = $ENV{url} || "http://192.168.1.254/cgi-bin/dslstatistics.ha";
|
my $url = $ENV{url} || "http://192.168.1.254/cgi-bin/dslstatistics.ha";
|
||||||
my $html = HTTP::Tiny->new(timeout => 1 )->get($url);
|
my $html = HTTP::Tiny->new(timeout => 30 )->get($url);
|
||||||
|
|
||||||
if($html->{success} && $html->{content} =~ m{Broadband Status}){
|
if($html->{success} && $html->{content} =~ m{Broadband Status}){
|
||||||
print "yes\n";
|
print "yes\n";
|
||||||
|
@ -159,7 +159,7 @@ lof_up.min 0
|
||||||
########################## MAIN #############################
|
########################## MAIN #############################
|
||||||
|
|
||||||
my $url = $ENV{url} || "http://192.168.1.254/cgi-bin/dslstatistics.ha";
|
my $url = $ENV{url} || "http://192.168.1.254/cgi-bin/dslstatistics.ha";
|
||||||
my $html = HTTP::Tiny->new(timeout => 1 )->get($url);
|
my $html = HTTP::Tiny->new(timeout => 30 )->get($url);
|
||||||
die "Couldn't fetch $url" unless $html->{success};
|
die "Couldn't fetch $url" unless $html->{success};
|
||||||
my @stats = $html->{content} =~ m{<td class="col2">(.*?)</td>}sg;
|
my @stats = $html->{content} =~ m{<td class="col2">(.*?)</td>}sg;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue