Révision 17f78427
Whitespace cleanup
- remove trailing whitespace
- remove empty lines at the end of files
| plugins/system/blockhosts | ||
|---|---|---|
| 2 | 2 |
# Plugin to monitor the number of hosts denied by BlockHosts |
| 3 | 3 |
# |
| 4 | 4 |
# $Log$ |
| 5 |
# based on:
|
|
| 5 |
# based on: |
|
| 6 | 6 |
# denyhosts plugin |
| 7 | 7 |
# Revision 1.0 2009/06/05 16:00:00 tjansson |
| 8 | 8 |
# |
| ... | ... | |
| 11 | 11 |
# Parameters: |
| 12 | 12 |
# config (required) |
| 13 | 13 |
# autoconf (optional - used by munin-config) |
| 14 |
|
|
| 14 |
|
|
| 15 | 15 |
LOG=/etc/hosts.allow |
| 16 | 16 |
|
| 17 | 17 |
if [ "$1" = "autoconf" ]; then |
| ... | ... | |
| 23 | 23 |
exit 1 |
| 24 | 24 |
fi |
| 25 | 25 |
fi |
| 26 |
|
|
| 26 |
|
|
| 27 | 27 |
if [ "$1" = "config" ]; then |
| 28 |
|
|
| 28 |
|
|
| 29 | 29 |
echo 'graph_title Hosts denied by BlockHosts' |
| 30 | 30 |
echo 'graph_args -l 0' |
| 31 | 31 |
echo 'graph_vlabel denied hosts ' |
| ... | ... | |
| 34 | 34 |
echo 'HostsWatched.label Hosts watched by BlockHosts' |
| 35 | 35 |
exit 0 |
| 36 | 36 |
fi |
| 37 |
|
|
| 37 |
|
|
| 38 | 38 |
echo HostsDenied.value `egrep -c " : deny" $LOG` |
| 39 | 39 |
echo HostsWatched.value `egrep -c "#bh: ip:" $LOG` |
Formats disponibles : Unified diff