Projet

Général

Profil

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

root / plugins / network / denyhosts @ d7f54f3e

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

1 55f72f0a Thomas Jansson
#!/bin/bash
2
#
3 17f78427 Lars Kruse
# Plugin to monitor the number of hosts denied by DenyHosts
4 55f72f0a Thomas Jansson
#
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
        else
23
                echo no
24
        fi
25 e4cd049b Lars Kruse
        exit 0
26 55f72f0a Thomas Jansson
fi
27
28
if [ "$1" = "config" ]; then
29
30
        echo 'graph_title Hosts denied by DenyHosts'
31
        echo 'graph_args --base 1000 -l 0'
32
        echo 'graph_vlabel denied hosts '
33
        echo 'graph_category network'
34
        echo 'HostsDenied.label Hosts denied by DenyHosts'
35
        exit 0
36
fi
37
38
echo HostsDenied.value  `egrep -c "DenyHosts" $LOG`