mirror of
https://github.com/munin-monitoring/contrib.git
synced 2018-11-08 00:59:34 +01:00
Initial version
This commit is contained in:
parent
3799b62c21
commit
55f72f0a06
39
plugins/other/denyhosts
Executable file
39
plugins/other/denyhosts
Executable file
@ -0,0 +1,39 @@
|
||||
#!/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`
|
Loading…
Reference in New Issue
Block a user