This exporter get informations from Fail2ban and can geoloc IPs if feature is enabled.
Download binary from releases page
Example :
curl -L https://github.com/syberalexis/fail2ban-exporter/releases/download/v3.0.0/fail2ban-exporter-3.0.0-linux-amd64 -o /usr/local/bin/fail2ban-exporter
chmod +x /usr/local/bin/fail2ban-exporter
/usr/local/bin/fail2ban-exporter
docker pull syberalexis/fail2ban-exporter
docker run -d -p 9901:9901 -v /dev/serial0:/dev/serial0 syberalexis/fail2ban-exporter:1.0.0
git clone [email protected]:syberalexis/fail2ban-exporter.git
cd fail2ban-exporter
go build cmd/fail2ban-exporter/main.go -o fail2ban-exporter
./fail2ban-exporter
or
git clone [email protected]:syberalexis/fail2ban-exporter.git
cd fail2ban-exporter
GOOS=linux GOARCH=amd64 VERSION=3.0.0 make clean build
./dist/fail2ban-exporter-3.0.0-linux-amd64
In file /lib/systemd/system/fail2ban_exporter.service
:
[Unit]
Description=Fail2ban Exporter service
Wants=network-online.target
After=network-online.target
[Service]
Type=simple
ExecStart=/usr/local/bin/fail2ban-exporter
Restart=on-failure
RestartSec=5s
[Install]
WantedBy=multi-user.target
systemctl enable fail2ban-exporter
systemctl start fail2ban-exporter
usage: fail2ban-exporter --device=DEVICE [<flags>]
Flags:
-h, --help Show context-sensitive help (also try --help-long and --help-man).
--version Show application version.
--debug Enable debug mode.
--localisation Enable localisation mode.