mirror of
https://github.com/munin-monitoring/contrib.git
synced 2018-11-08 00:59:34 +01:00
17f784270a
* remove trailing whitespace * remove empty lines at the end of files
40 lines
860 B
Bash
Executable File
40 lines
860 B
Bash
Executable File
#!/bin/bash
|
|
#
|
|
# Plugin to monitor the number of hosts denied by DenyHosts
|
|
#
|
|
# $Log$
|
|
# Revision 1.0 2009/06/05 16:00:00 tjansson
|
|
# Initial revision
|
|
#
|
|
# Parameters:
|
|
#
|
|
# config (required)
|
|
# autoconf (optional - used by munin-config)
|
|
#
|
|
# Magick markers (optional):
|
|
#%# family=auto
|
|
#%# capabilities=autoconf
|
|
|
|
LOG=/etc/hosts.deny
|
|
if [ "$1" = "autoconf" ]; then
|
|
if [ -r "$LOG" ]; then
|
|
echo yes
|
|
exit 0
|
|
else
|
|
echo no
|
|
exit 1
|
|
fi
|
|
fi
|
|
|
|
if [ "$1" = "config" ]; then
|
|
|
|
echo 'graph_title Hosts denied by DenyHosts'
|
|
echo 'graph_args --base 1000 -l 0'
|
|
echo 'graph_vlabel denied hosts '
|
|
echo 'graph_category network'
|
|
echo 'HostsDenied.label Hosts denied by DenyHosts'
|
|
exit 0
|
|
fi
|
|
|
|
echo HostsDenied.value `egrep -c "DenyHosts" $LOG`
|