From c678e0454117586f1dd5365a6d52cfa924358aa9 Mon Sep 17 00:00:00 2001 From: Sarah Hoffmann Date: Fri, 14 Dec 2012 23:37:10 +0100 Subject: [PATCH] bulk ip watch --- munin/nominatim_throttled_ips | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100755 munin/nominatim_throttled_ips 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:' -- 2.39.5