mirror of
https://github.com/munin-monitoring/contrib.git
synced 2025-07-25 18:38:30 +00:00
removed autoconf stuff, added note about timeout
This commit is contained in:
parent
4a6b888ddc
commit
1e6bc858a2
1 changed files with 6 additions and 10 deletions
|
@ -1,9 +1,13 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# munin plugin to show number of online network hosts on a subnet (needs fping)
|
# munin plugin to show number of online network hosts on a subnet (needs fping)
|
||||||
# link with subnet name as suffix like _192.168.1
|
# 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
|
# (c) 2011 jon@jon.bpa.nu
|
||||||
#%# family=auto
|
#%# family=manual
|
||||||
#%# capabilities=autoconf
|
|
||||||
|
|
||||||
SUBNET=`echo $0 | cut -d'_' -f3`
|
SUBNET=`echo $0 | cut -d'_' -f3`
|
||||||
TIMEOUT=50 # ms
|
TIMEOUT=50 # ms
|
||||||
|
@ -18,14 +22,6 @@ graph_category network
|
||||||
hosts.label hosts
|
hosts.label hosts
|
||||||
CFG
|
CFG
|
||||||
exit 0;;
|
exit 0;;
|
||||||
autoconf)
|
|
||||||
fping -h 2>/dev/null
|
|
||||||
if [ $? -eq 127 ]; then
|
|
||||||
echo "no (fping not present)"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
echo yes
|
|
||||||
exit 0;;
|
|
||||||
esac
|
esac
|
||||||
|
|
||||||
if [ $SUBNET != "" ]; then
|
if [ $SUBNET != "" ]; then
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue