Lines 103-109
if ( defined $ARGV[0] and $ARGV[0] eq "autoconf" )
Link Here
|
103 |
print "no ($ret)\n"; |
103 |
print "no ($ret)\n"; |
104 |
exit 0; |
104 |
exit 0; |
105 |
} |
105 |
} |
106 |
my $ua = LWP::UserAgent->new(timeout => 30); |
106 |
my $ua = LWP::UserAgent->new(timeout => 30, |
|
|
107 |
agent => sprintf("munin/%s (libwww-perl/%s)", $Munin::Common::Defaults::MUNIN_VERSION, $LWP::VERSION)); |
107 |
|
108 |
|
108 |
foreach my $port (@PORTS) { |
109 |
foreach my $port (@PORTS) { |
109 |
my $url = sprintf $URL, $port; |
110 |
my $url = sprintf $URL, $port; |
Lines 170-176
if ( defined $ARGV[0] and $ARGV[0] eq "config" )
Link Here
|
170 |
|
171 |
|
171 |
foreach my $port (@PORTS) |
172 |
foreach my $port (@PORTS) |
172 |
{ |
173 |
{ |
173 |
my $ua = LWP::UserAgent->new(timeout => 30); |
174 |
my $ua = LWP::UserAgent->new(timeout => 30, |
|
|
175 |
agent => sprintf("munin/%s (libwww-perl/%s)", $Munin::Common::Defaults::MUNIN_VERSION, $LWP::VERSION)); |
174 |
my $url = sprintf $URL, $port; |
176 |
my $url = sprintf $URL, $port; |
175 |
my $response = $ua->request(HTTP::Request->new('GET',$url)); |
177 |
my $response = $ua->request(HTTP::Request->new('GET',$url)); |
176 |
if ($response->content =~ /^Busy(?:Servers|Workers):\s+(.+)$/im) { |
178 |
if ($response->content =~ /^Busy(?:Servers|Workers):\s+(.+)$/im) { |