mirror of
https://github.com/munin-monitoring/contrib.git
synced 2025-07-21 18:41:03 +00:00
Initial version
This commit is contained in:
parent
af93507780
commit
8ae7fea741
1 changed files with 40 additions and 0 deletions
40
plugins/other/fail2ban_
Executable file
40
plugins/other/fail2ban_
Executable file
|
@ -0,0 +1,40 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# Wildcard-plugin to monitor bans on Fail2ban jails. To monitor an jail, link
|
||||
# fail2ban_<jail> to this file. E.g.
|
||||
|
||||
# ln -s /usr/share/node/node/plugins-auto/fail2ban_
|
||||
# /etc/munin/node.d/fail2ban_ssh-iptables
|
||||
|
||||
# Magic markers (optional - used by munin-config and some installation
|
||||
# scripts):
|
||||
|
||||
#%# family=auto
|
||||
#%# capabilities=autoconf
|
||||
|
||||
JAIL=${0##*/fail2ban_}
|
||||
|
||||
case $1 in
|
||||
autoconf)
|
||||
if [ -x $(which fail2ban-client) ]; then
|
||||
echo yes
|
||||
exit 0
|
||||
else
|
||||
echo no
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
config)
|
||||
echo "graph_title Fail2ban - $JAIL"
|
||||
echo 'graph_vlabel active bans'
|
||||
echo 'graph_category network'
|
||||
echo 'graph_info This graph shows the amount of bans caught by Fail2ban'
|
||||
echo "fail2ban.label $JAIL"
|
||||
echo 'fail2ban.type GAUGE'
|
||||
echo 'fail2ban.info The number of current bans.'
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
|
||||
echo -n "fail2ban.value "
|
||||
$(which fail2ban-client) status $JAIL|awk '/Currently banned:/ { print $NF }'
|
Loading…
Add table
Add a link
Reference in a new issue