Skip to content
This repository has been archived by the owner on Apr 11, 2024. It is now read-only.

fix URL not found #29

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 1 addition & 6 deletions check_haproxy_stats.pl
Original file line number Diff line number Diff line change
Expand Up @@ -197,14 +197,9 @@ sub usage {
$geturl .= ';csv';
$haproxy = get($geturl);
} elsif ($url) {
my $haproxyio;
my $getcmd = "curl --insecure -s --fail "
. "--user '$user:$pass' '".$url.";csv'";
open $haproxyio, "-|", $getcmd;
while (<$haproxyio>) {
$haproxy .= $_;
}
close($haproxyio);
$haproxy = `$getcmd`;
} else {
# Connect to haproxy socket and get stats
my $haproxyio = new IO::Socket::UNIX (
Expand Down