Första comitten av mina egna munin-plugins.
This commit is contained in:
37
denyhosts
Executable file
37
denyhosts
Executable file
@@ -0,0 +1,37 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Plugin to check /etc/hosts.deny for blocked hosts
|
||||
#
|
||||
# Parameters:
|
||||
#
|
||||
# config (required)
|
||||
# autoconf (optional - only used by munin-config)
|
||||
#
|
||||
#%# family=auto
|
||||
#%# capabilities=autoconf
|
||||
|
||||
|
||||
|
||||
if [ "$1" = "autoconf" ]; then
|
||||
echo yes
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [ "$1" = "config" ]; then
|
||||
|
||||
echo 'graph_title Denyhosts'
|
||||
echo 'graph_args -l 0 --base 1000'
|
||||
echo 'graph_vlabel blocked hosts'
|
||||
echo 'graph_category network'
|
||||
echo 'graph_period second'
|
||||
echo 'graph_info This graph shows the current number of blocked hosts for SSHD.'
|
||||
echo 'blocked.label active'
|
||||
echo 'blocked.max 1000'
|
||||
echo 'blocked.min 0'
|
||||
echo 'blocked.info The number of active blocked hosts.'
|
||||
exit 0
|
||||
fi
|
||||
|
||||
echo -n "blocked.value "
|
||||
grep -c "^# DenyHosts:" /etc/hosts.deny
|
||||
|
||||
Reference in New Issue
Block a user