Projet

Général

Profil

Révision 1e6bc858

ID1e6bc858a23302abb996e3c4352cae3cfe8ba3bc
Parent 4a6b888d
Enfant 64296bf2

Ajouté par jon il y a presque 14 ans

removed autoconf stuff, added note about timeout

Voir les différences:

plugins/other/net_hosts_
1 1
#!/bin/sh
2 2
# munin plugin to show number of online network hosts on a subnet (needs fping)
3 3
# link with subnet name as suffix like _192.168.1
4
# will most likely need a custom timeout setting in /etc/munin/plugin-conf.d/munin-node
5
# for example:
6
# [net_hosts_*]
7
# timeout 20
8
#
4 9
# (c) 2011 jon@jon.bpa.nu
5
#%# family=auto
6
#%# capabilities=autoconf
10
#%# family=manual
7 11

  
8 12
SUBNET=`echo $0 | cut -d'_' -f3`
9 13
TIMEOUT=50 # ms
......
18 22
hosts.label hosts
19 23
CFG
20 24
	exit 0;;
21
	autoconf)
22
	fping -h 2>/dev/null
23
	if [ $? -eq 127 ]; then
24
		echo "no (fping not present)"
25
		exit 1
26
	fi
27
	echo yes
28
	exit 0;;
29 25
esac
30 26

  
31 27
if [ $SUBNET != "" ]; then

Formats disponibles : Unified diff