mirror of
https://github.com/munin-monitoring/contrib.git
synced 2025-07-25 10:28:36 +00:00
- have some dirs
This commit is contained in:
parent
0b089ea777
commit
08346aac58
687 changed files with 0 additions and 0 deletions
31
plugins/network/net_hosts_
Executable file
31
plugins/network/net_hosts_
Executable file
|
@ -0,0 +1,31 @@
|
|||
#!/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 <<CFG
|
||||
graph_title hosts on network $SUBNET.
|
||||
graph_vlabel hosts
|
||||
graph_category network
|
||||
hosts.label hosts
|
||||
CFG
|
||||
exit 0;;
|
||||
esac
|
||||
|
||||
if [ $SUBNET != "" ]; then
|
||||
echo "hosts.value `fping -t $TIMEOUT -r $RETRIES -ga \"$SUBNET.0/24\" 2>/dev/null | wc -l`"
|
||||
else
|
||||
echo "could not get subnet name ($SUBNET)"
|
||||
fi
|
Loading…
Add table
Add a link
Reference in a new issue