Not finding my happiness among munin plugins for fail2ban I decided to write it myself. The plugins automatically adapts to your fail2ban because it retrieves Jails activated. It creates the file / usr/share/munin/plugins/fail2ban and filled it with the code below
PHP Code:
#! / Bin / bash
PROGNAME = fail2ban
Stated = / var / lib / munin / plugin-state
LISTJAIL = $ (fail2ban-client status | grep "Jail list:" | sed 's / `- Jail list: \ t \ t / / g' | sed 's / / / g')
if ["$ 1" = "config"]
Then
echo 'System.Type ABSOLUTE'
echo 'graph_title Fail2ban'
echo 'Number of graph_vlabel ban'
echo 'graph_category Security'
for f in $ LISTJAIL; do
echo "$ $ f f.label"
therefore
exit 0
Bookmarks