Receive Fail2Ban ban notifications via webhook callbacks.
Clone the GitHub repo and run:
python setup.py install
Or, to install remotely from GitHub run:
pip install git+https://github.com/alerta/alerta-contrib.git#subdirectory=webhooks/fail2ban
Note: If Alerta is installed in a python virtual environment then plugins need to be installed into the same environment for Alerta to dynamically discover them.
The custom webhook will be auto-detected and added to the list of available API endpoints.
See Fail2Ban
curl -sSL -X POST -H 'Content-Type: application/json' -d \
'
{
"hostname": "foo",
"severity": "critical",
"attributes": {
"bannedIp": "1.2.3.4"
},
"environment": "Development",
"resource": "SSHD",
"event": "The IP 1.2.3.4 has just been banned by Fail2Ban after 6 attempts!",
"message": "test"
}
' \
'http://localhost:8080/api/webhooks/fail2ban?api-key=<API_KEY>'
Copyright (c) 2018 Milos Buncic. Available under the MIT License.