applied updates based on PR feedback

This commit is contained in:
Chris Caron 2026-02-01 19:45:44 -05:00
parent 8afd0c8956
commit 8a8afefd70
2 changed files with 69 additions and 13 deletions

View file

@ -2,8 +2,69 @@
# #
# Author: Chris Caron <lead2gold@gmail.com> # Author: Chris Caron <lead2gold@gmail.com>
# #
# 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] [Definition]
# Option: actionstart # Option: actionstart
@ -48,6 +109,6 @@ config = /etc/fail2ban/apprise.conf
# Support passing in arguments for example: "-g fail2ban" # Support passing in arguments for example: "-g fail2ban"
# #
apprise_args = args =
# #
apprise = apprise -c "<config>" <apprise_args> apprise = apprise -c "<config>" <args>

View file

@ -227,17 +227,12 @@ action_mwl = %(action_)s
action_xarf = %(action_)s action_xarf = %(action_)s
xarf-login-attack[service=%(__name__)s, sender="%(sender)s", logpath="%(logpath)s", port="%(port)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. # Apprise Integration
# 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
# #
# By default apprise attempts to load the configuration file found in # Leverage args to optionally identify tags (--tag <tag>) entries
# /etc/fail2ban/apprise.conf unless you over-ride this. # - See action.d/apprise.conf for more details in your current installation
# # - config= default is /etc/fail2ban/apprise.conf unless you over-ride it.
# Leverage apprise_args to optionally identify tags (--tag <tag>) entries # apprise[args='--tag fail2ban']
# 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 # action = %(action_)s
# apprise # apprise