diff options
author | Lennart Weller <lhw@ring0.de> | 2016-09-05 08:27:21 +0000 |
---|---|---|
committer | Lennart Weller <lhw@ring0.de> | 2016-09-05 08:27:21 +0000 |
commit | 1746898cefcb17f58b5cf27b4dad3d28236f1152 (patch) | |
tree | 9207f191cf39bbd077a1e1c73d6e82123e2fc710 /charts.d/squid.chart.sh | |
parent | Imported Upstream version 1.2.0+dfsg (diff) | |
download | netdata-1746898cefcb17f58b5cf27b4dad3d28236f1152.tar.xz netdata-1746898cefcb17f58b5cf27b4dad3d28236f1152.zip |
Imported Upstream version 1.3.0+dfsgupstream/1.3.0+dfsg
Diffstat (limited to '')
-rwxr-xr-x | charts.d/squid.chart.sh | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/charts.d/squid.chart.sh b/charts.d/squid.chart.sh index f6154b256..3e72ba6df 100755 --- a/charts.d/squid.chart.sh +++ b/charts.d/squid.chart.sh @@ -1,10 +1,10 @@ -#!/bin/sh +# no need for shebang - this file is loaded from charts.d.plugin squid_host= squid_port= squid_url= squid_timeout=2 -squid_update_every=5 +squid_update_every=2 squid_priority=60000 squid_get_stats_internal() { @@ -63,21 +63,21 @@ squid_check() { squid_create() { # create the charts cat <<EOF -CHART squid.clients_net '' "Squid Client Bandwidth" "kilobits / sec" clients squid.clients.net area $((squid_priority + 1)) $squid_update_every +CHART squid_local.clients_net '' "Squid Client Bandwidth" "kilobits / sec" clients squid.clients.net area $((squid_priority + 1)) $squid_update_every DIMENSION client_http_kbytes_in in incremental 8 1 DIMENSION client_http_kbytes_out out incremental -8 1 DIMENSION client_http_hit_kbytes_out hits incremental -8 1 -CHART squid.clients_requests '' "Squid Client Requests" "requests / sec" clients squid.clients.requests line $((squid_priority + 3)) $squid_update_every +CHART squid_local.clients_requests '' "Squid Client Requests" "requests / sec" clients squid.clients.requests line $((squid_priority + 3)) $squid_update_every DIMENSION client_http_requests requests incremental 1 1 DIMENSION client_http_hits hits incremental 1 1 DIMENSION client_http_errors errors incremental -1 1 -CHART squid.servers_net '' "Squid Server Bandwidth" "kilobits / sec" servers squid.servers.net area $((squid_priority + 2)) $squid_update_every +CHART squid_local.servers_net '' "Squid Server Bandwidth" "kilobits / sec" servers squid.servers.net area $((squid_priority + 2)) $squid_update_every DIMENSION server_all_kbytes_in in incremental 8 1 DIMENSION server_all_kbytes_out out incremental -8 1 -CHART squid.servers_requests '' "Squid Server Requests" "requests / sec" servers squid.servers.requests line $((squid_priority + 4)) $squid_update_every +CHART squid_local.servers_requests '' "Squid Server Requests" "requests / sec" servers squid.servers.requests line $((squid_priority + 4)) $squid_update_every DIMENSION server_all_requests requests incremental 1 1 DIMENSION server_all_errors errors incremental -1 1 EOF @@ -111,24 +111,24 @@ squid_update() { # write the result of the work. cat <<VALUESEOF -BEGIN squid.clients_net $1 +BEGIN squid_local.clients_net $1 SET client_http_kbytes_in = $squid_client_http_kbytes_in SET client_http_kbytes_out = $squid_client_http_kbytes_out SET client_http_hit_kbytes_out = $squid_client_http_hit_kbytes_out END -BEGIN squid.clients_requests $1 +BEGIN squid_local.clients_requests $1 SET client_http_requests = $squid_client_http_requests SET client_http_hits = $squid_client_http_hits SET client_http_errors = $squid_client_http_errors END -BEGIN squid.servers_net $1 +BEGIN squid_local.servers_net $1 SET server_all_kbytes_in = $squid_server_all_kbytes_in SET server_all_kbytes_out = $squid_server_all_kbytes_out END -BEGIN squid.servers_requests $1 +BEGIN squid_local.servers_requests $1 SET server_all_requests = $squid_server_all_requests SET server_all_errors = $squid_server_all_errors END |