mirror of
https://github.com/munin-monitoring/contrib.git
synced 2025-07-25 18:38:30 +00:00
Initial version
This commit is contained in:
parent
391d15269b
commit
6a93141805
1 changed files with 39 additions and 0 deletions
39
plugins/other/blockhosts
Executable file
39
plugins/other/blockhosts
Executable file
|
@ -0,0 +1,39 @@
|
||||||
|
#!/bin/sh
|
||||||
|
# Plugin to monitor the number of hosts denied by BlockHosts
|
||||||
|
#
|
||||||
|
# $Log$
|
||||||
|
# based on:
|
||||||
|
# denyhosts plugin
|
||||||
|
# Revision 1.0 2009/06/05 16:00:00 tjansson
|
||||||
|
#
|
||||||
|
# Modified by d.becker 2010/02/04
|
||||||
|
#
|
||||||
|
# Parameters:
|
||||||
|
# config (required)
|
||||||
|
# autoconf (optional - used by munin-config)
|
||||||
|
|
||||||
|
LOG=/etc/hosts.allow
|
||||||
|
|
||||||
|
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 BlockHosts'
|
||||||
|
echo 'graph_args -l 0'
|
||||||
|
echo 'graph_vlabel denied hosts '
|
||||||
|
echo 'graph_category system'
|
||||||
|
echo 'HostsDenied.label Hosts denied by BlockHosts'
|
||||||
|
echo 'HostsWatched.label Hosts watched by BlockHosts'
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo HostsDenied.value `egrep -c " : deny" $LOG`
|
||||||
|
echo HostsWatched.value `egrep -c "#bh: ip:" $LOG`
|
Loading…
Add table
Add a link
Reference in a new issue