This is a Prometheus exporter for Fail2Ban.
It uses fail2ban-client
to scrape information and serves it via HTTP on port 9635.
- Clone this repo,
cd
into it - Build:
$ mvn clean install
- Configure:
$ vi src/main/resources/application.properties
- Run:
$ java -jar target/fail2ban-exporter-<version>-jar-with-dependencies.jar
When using server.metrics.sudo=true
, be sure to add <user> ALL(ALL) NOPASSWD: /usr/bin/fail2ban-client
to your sudoers file.
This project is based on this exporter which generates a .prom
file instead of serving HTTP.