X-Git-Url: https://git.openstreetmap.org/chef.git/blobdiff_plain/805ab61e66fe3adb45e57f50e49b168d84a6a8b1..7b9ec4b60ee39614d1d083d7220e76b07d2b275f:/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 new file mode 100755 index 000000000..35e58956b --- /dev/null +++ b/cookbooks/munin/files/default/plugins/squid_delay_pools @@ -0,0 +1,27 @@ +#!/bin/sh +# +# Plugin to monitor the number of IPs being slowed down by Squid delay pools +# +# Parameters: +# +# config (required) +# autoconf (optional - used by munin-config) +# + +if [ "$1" = "config" ]; then + + echo 'graph_title IPs being delayed' + echo 'graph_args --base 1000 -l 0' + echo 'graph_vlabel IPs' + echo 'graph_category squid' + echo 'squid_delay1.label IPs' + echo 'squid_delay1.min 0' + echo 'squid_delay1.draw AREA' + + exit 0 +fi + +req0=`squidclient -h 127.0.0.1 mgr:delay|fgrep Current|egrep --count '[0-9]{1,3}:-?[0-9]{1,3} '` + +echo "squid_delay1.value " `expr 0 + $req0` +