Projet

Général

Profil

Paste
Télécharger au format
Statistiques
| Branche: | Révision:

root / plugins / network / denyhosts @ a2f35e9b

Historique | Voir | Annoter | Télécharger (861 octets)

1 55f72f0a Thomas Jansson
#!/bin/bash
2
#
3
# Plugin to monitor the number of hosts denied by DenyHosts 
4
#
5
# $Log$
6
# Revision 1.0  2009/06/05 16:00:00 tjansson
7
# Initial revision
8
#
9
# Parameters:
10
#
11
#       config   (required)
12
#       autoconf (optional - used by munin-config)
13
#
14
# Magick markers (optional):
15
#%# family=auto
16
#%# capabilities=autoconf
17
18
LOG=/etc/hosts.deny
19
if [ "$1" = "autoconf" ]; then
20
        if [ -r "$LOG" ]; then
21
                echo yes
22
                exit 0
23
        else
24
                echo no
25
                exit 1
26
        fi
27
fi
28
29
if [ "$1" = "config" ]; then
30
31
        echo 'graph_title Hosts denied by DenyHosts'
32
        echo 'graph_args --base 1000 -l 0'
33
        echo 'graph_vlabel denied hosts '
34
        echo 'graph_category network'
35
        echo 'HostsDenied.label Hosts denied by DenyHosts'
36
        exit 0
37
fi
38
39
echo HostsDenied.value  `egrep -c "DenyHosts" $LOG`