From 6cdb5738ec2f840291157744e39f4878f319728b Mon Sep 17 00:00:00 2001 From: Chris Caron Date: Wed, 28 Jan 2026 21:49:42 -0500 Subject: [PATCH] improved apprise fail2ban integration (support tagging) --- config/action.d/apprise.conf | 6 +++++- config/jail.conf | 13 +++++++++---- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/config/action.d/apprise.conf b/config/action.d/apprise.conf index c6ce539a..3d80b2eb 100644 --- a/config/action.d/apprise.conf +++ b/config/action.d/apprise.conf @@ -45,5 +45,9 @@ actionunban = # Define location of the default apprise configuration file to use # config = /etc/fail2ban/apprise.conf + +# Support passing in arguments for example: "-g fail2ban" # -apprise = apprise -c "" +apprise_args = +# +apprise = apprise -c "" diff --git a/config/jail.conf b/config/jail.conf index d0b3fa44..47fa1c35 100644 --- a/config/jail.conf +++ b/config/jail.conf @@ -228,11 +228,16 @@ action_xarf = %(action_)s xarf-login-attack[service=%(__name__)s, sender="%(sender)s", logpath="%(logpath)s", port="%(port)s"] # ban & send a notification to one or more of the 50+ services supported by Apprise. -# See https://github.com/caronc/apprise/wiki for details on what is supported. +# See https://appriseit.com/services/ for details on what is supported. +# See https://appriseit.com/getting-started/configuration/ for information on how to prepare +# an Apprise configuration file. Both YAML and TEXT formats are supported # -# You may optionally over-ride the default configuration line (containing the Apprise URLs) -# by using 'apprise[config="/alternate/path/to/apprise.cfg"]' otherwise -# /etc/fail2ban/apprise.conf is sourced for your supported notification configuration. +# By default apprise attempts to load the configuration file found in +# /etc/fail2ban/apprise.conf unless you over-ride this. +# +# Leverage apprise_args to optionally identify tags (--tag ) entries +# apprise[config="/alternate/path/to/apprise.cfg", apprise_args='-g fail2ban'] +# apprise[config="/alternate/path/to/apprise.yaml", apprise_args='--tag fail2ban'] # action = %(action_)s # apprise