]> git.openstreetmap.org Git - chef.git/blob - cookbooks/munin/files/default/plugins/squid_delay_pools
Validate sysfs settings on each chef run
[chef.git] / cookbooks / munin / files / default / plugins / squid_delay_pools
1 #!/bin/sh
2 #
3 # Plugin to monitor the number of IPs being slowed down by Squid delay pools
4 #
5 # Parameters: 
6 #
7 #       config   (required)
8 #       autoconf (optional - used by munin-config)
9 #
10
11 if [ "$1" = "config" ]; then
12
13         echo 'graph_title IPs being delayed'
14         echo 'graph_args --base 1000 -l 0'
15         echo 'graph_vlabel IPs'
16         echo 'graph_category squid'
17         echo 'squid_delay1.label IPs'
18         echo 'squid_delay1.min 0'
19         echo 'squid_delay1.draw AREA'
20
21         exit 0
22 fi
23
24 req0=`squidclient -h 127.0.0.1 mgr:delay|fgrep Current|egrep --count '[0-9]{1,3}:-?[0-9]{1,3} '`
25
26 echo "squid_delay1.value " `expr 0 + $req0`
27