diff --git a/config/action.d/apprise.conf b/config/action.d/apprise.conf index 3d80b2eb..e025da2f 100644 --- a/config/action.d/apprise.conf +++ b/config/action.d/apprise.conf @@ -2,8 +2,69 @@ # # Author: Chris Caron # +# ban & send a notification to one or more of the 120+ services supported by +# Apprise. +# - 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. # - +# This plugin requires that Apprise is installed on your system: +# +# pip install apprise +# +# Breakdown: +# config provide a path to an Apprise Config file +# Thie default is /etc/fail2ban/apprise.conf if not provided. +# Both YAML and TEXT formats are supported. +# You can even point your configuration to an Apprise API +# endpoint. +# +# args Provide additional arguments to support the Apprise CLI. +# See https://appriseit.com/cli/usage/ for additional options. +# the --tag (-g) is incredibly useful for integrating with +# fail2ban as you can exculsively have it target specific +# notifications this way. +# +# Config Example #1: Simple +# 1. Create a /etc/fail2ban/apprise.conf +# ``` +# # /etc/fail2ban/apprise.conf +# fail2ban=mailto://user:pass@example.com +# ``` +# 2 In /etc/fail2ban/jail.conf +# ``` +# # ... +# apprise[args='--tag fail2ban'] +# action = %(action_)s +# apprise +# # ... +# ``` +# +# Config Example #2: YAML an Custom path +# 1. Create a /etc/fail2ban/apprise.conf +# ``` +# # /etc/fail2ban/apprise.yaml +# urls: +# - mailto://user:pass@example.com: +# tags: f2b +# ``` +# 2. In /etc/fail2ban/jail.conf +# ``` +# # ... +# apprise[config='/etc/fail2ban/apprise.yaml',args='--tag f2b'] +# action = %(action_)s +# apprise +# # ... +# ``` +# +# Config Example #3: Apprise API +# 1. in /etc/fail2ban/jail.conf +# ``` +# # ... +# apprise[config='http://apprise.example.ca/get/mykey',args='-g f2b'] +# action = %(action_)s +# apprise +# # ... [Definition] # Option: actionstart @@ -48,6 +109,6 @@ config = /etc/fail2ban/apprise.conf # Support passing in arguments for example: "-g fail2ban" # -apprise_args = +args = # -apprise = apprise -c "" +apprise = apprise -c "" diff --git a/config/jail.conf b/config/jail.conf index 47fa1c35..d53de584 100644 --- a/config/jail.conf +++ b/config/jail.conf @@ -227,17 +227,12 @@ action_mwl = %(action_)s 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://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 +# Apprise Integration # -# 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'] +# Leverage args to optionally identify tags (--tag ) entries +# - See action.d/apprise.conf for more details in your current installation +# - config= default is /etc/fail2ban/apprise.conf unless you over-ride it. +# apprise[args='--tag fail2ban'] # action = %(action_)s # apprise