Rewrite of fail2ban available for testing

Hi,

I rewrote the fail2ban plugin for check_mk 2.0 from scratch.
I use it in my own setup without problem.
But I consider it Beta software. So beware, have a look and please report any errors.

I uploaded it into the exchange and waiting for the release by the admins. After that it is available in the exchange as well.

CU
Jens

2 Likes

Hi,

Thank you for this. From what I can tell, looks good.

Just one thing, in the fail2ban-1.8.9.mkp there seems to be a small issue in the agent (it’s correct in github). The agent from the mkp has this code:

#!/bin/sh
if [ -x /usr/bin/fail2ban-client ]; then
echo '<<<fail2ban>>>'
jails=`/usr/bin/fail2ban-client status | grep "Jail list" | sed -e 's/.*://' -e 's/,//g'`
        echo "Detected jails: $JAILS"
        for jail in $JAILS
        do
                /usr/bin/fail2ban-client status $jail
        done
fi

On the 4th line you should have JAILS instead of jails. (or change them all to lowercase like in the github version). Changing it on my installation made it work like a charm.

Louis.