#!/bin/sh # munin plugin to show number of online network hosts on a subnet (needs fping) # link with subnet name as suffix like _192.168.1 # will most likely need a custom timeout setting in /etc/munin/plugin-conf.d/munin-node # for example: # [net_hosts_*] # timeout 20 # # (c) 2011 jon@jon.bpa.nu #%# family=manual SUBNET=`echo $0 | cut -d'_' -f3` TIMEOUT=50 # ms RETRIES=0 case $1 in config) cat </dev/null | wc -l`" else echo "could not get subnet name ($SUBNET)" fi