X-Git-Url: https://git.openstreetmap.org./chef.git/blobdiff_plain/7b9ec4b60ee39614d1d083d7220e76b07d2b275f..7eb3680b81fdf339e466d9279584805f17a54c0f:/cookbooks/munin/files/default/plugins/squid_delay_pools diff --git a/cookbooks/munin/files/default/plugins/squid_delay_pools b/cookbooks/munin/files/default/plugins/squid_delay_pools index 35e58956b..13499545c 100755 --- a/cookbooks/munin/files/default/plugins/squid_delay_pools +++ b/cookbooks/munin/files/default/plugins/squid_delay_pools @@ -1,8 +1,10 @@ #!/bin/sh # # Plugin to monitor the number of IPs being slowed down by Squid delay pools +# This monitors the number of IPs being delayed in the last 128 pools, which +# are the normal requests. # -# Parameters: +# Parameters: # # config (required) # autoconf (optional - used by munin-config) @@ -10,7 +12,7 @@ if [ "$1" = "config" ]; then - echo 'graph_title IPs being delayed' + echo 'graph_title IPs being delayed with referer' echo 'graph_args --base 1000 -l 0' echo 'graph_vlabel IPs' echo 'graph_category squid' @@ -21,7 +23,6 @@ if [ "$1" = "config" ]; then exit 0 fi -req0=`squidclient -h 127.0.0.1 mgr:delay|fgrep Current|egrep --count '[0-9]{1,3}:-?[0-9]{1,3} '` +req0=`squidclient -h 127.0.0.1 mgr:delay|awk '\$1 == "Pool:" && \$2 < 128 { pr = 0; } \$1 == "Pool:" && \$2 >= 128 { pr = 1; } { if (pr) { print \$0; } }'|fgrep Current|egrep --count '[0-9]{1,3}:-?[0-9]{1,3} '` echo "squid_delay1.value " `expr 0 + $req0` -