From: Sarah Hoffmann Date: Fri, 14 Dec 2012 22:37:10 +0000 (+0100) Subject: bulk ip watch X-Git-Tag: deploy~658 X-Git-Url: https://git.openstreetmap.org./nominatim.git/commitdiff_plain/c678e0454117586f1dd5365a6d52cfa924358aa9?ds=inline;hp=a7069753e81844dee38e440545bd21e93a6fbd6b bulk ip watch --- diff --git a/munin/nominatim_throttled_ips b/munin/nominatim_throttled_ips new file mode 100755 index 00000000..b2f28e52 --- /dev/null +++ b/munin/nominatim_throttled_ips @@ -0,0 +1,27 @@ +#!/bin/sh +# +# Plugin to monitor the number of IPs in special pools +# +# Parameters: +# +# config (required) +# autoconf (optional - used by munin-config) +# + +if [ "$1" = "config" ]; then + + echo 'graph_title Restricted IPs' + echo 'graph_vlabel number of IPs' + echo 'graph_category nominatim' + echo 'bulk.label bulk' + echo 'bulk.draw AREA' + echo 'bulk.type GAUGE' + echo 'block.label blocked' + echo 'block.draw STACK' + echo 'block.type GAUGE' + exit 0 +fi + +BASEDIR="$(dirname "$(readlink -f "$0")")" + +cut -f 2 -d ' ' $BASEDIR/../settings/ip_blocks.map | uniq -c | sed 's:[[:space:]]*\([0-9]\+\) \(.*\):\2.value \1:'