The default logging mechanism of Fail2Ban is quite noisy. It would be great is the plugin supported sending a daily summary instead of actions taken instead of an individual email for each action.
The script below does what I describe. I have never gotten round to understanding how to make a OMV plugin, but I imagine should be pretty easy to have the plugin add this as a cron job and then set Fail2Ban not send mails itself.
Send Summary of last 24H Fail2Ban Actions taken
!/bin/bash
grep "Ban " /var/log/fail2ban.log | grep date +%Y-%m-%d -d yesterday | /usr/bin/sort | /usr/bin/logresolve | /usr/bin/uniq -c | /usr/bin/sort -n | mail -s "Fail2Ban Yesterday Summary date +%Y-%m-%d -d yesterday" name@example.com
The default logging mechanism of Fail2Ban is quite noisy. It would be great is the plugin supported sending a daily summary instead of actions taken instead of an individual email for each action.
The script below does what I describe. I have never gotten round to understanding how to make a OMV plugin, but I imagine should be pretty easy to have the plugin add this as a cron job and then set Fail2Ban not send mails itself.