diff options
author | Lennart Weller <lhw@ring0.de> | 2016-04-21 12:27:29 +0000 |
---|---|---|
committer | Lennart Weller <lhw@ring0.de> | 2016-04-21 12:27:29 +0000 |
commit | 30b94862648cdbf4f537337d2e2f01c369a9dee9 (patch) | |
tree | f0219dd8bd744fc09899bd0266402e05a4bff854 /charts.d/squid.chart.sh | |
parent | Imported Upstream version 1.0.0 (diff) | |
download | netdata-30b94862648cdbf4f537337d2e2f01c369a9dee9.tar.xz netdata-30b94862648cdbf4f537337d2e2f01c369a9dee9.zip |
Imported Upstream version 1.1.0upstream/1.1.0
Diffstat (limited to '')
-rwxr-xr-x | charts.d/squid.chart.sh | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/charts.d/squid.chart.sh b/charts.d/squid.chart.sh index 6260ce97..5e1ebb06 100755 --- a/charts.d/squid.chart.sh +++ b/charts.d/squid.chart.sh @@ -9,14 +9,7 @@ squid_priority=60000 squid_get_stats_internal() { local host="$1" port="$2" url="$3" - - nc -w $squid_timeout $host $port <<EOF -GET $url HTTP/1.0 -Host: $host:$port -Accept: */* -User-Agent: netdata (charts.d/squid.chart.sh) - -EOF + squidclient -h $host -p $port $url } squid_get_stats() { @@ -47,8 +40,8 @@ squid_autodetect() { } squid_check() { - require_cmd nc || return 1 - require_cmd sed || return 1 + require_cmd squidclient || return 1 + require_cmd sed || return 1 require_cmd egrep || return 1 if [ -z "$squid_host" -o -z "$squid_port" -o -z "$squid_url" ] |