#!/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_args -l 0' 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/../../bin/settings/ip_blocks.map | sort | uniq -c | sed 's:[[:space:]]*\([0-9]\+\) \(.*\):\2.value \1:'