I have two seperate servers running Virtualmin, one on 20.04.05, and the other on 22.04.1 (details below). I monitor both with Zabbix which shows the 22.04.01 F2b as Down when in fact it is not.
After looking in to it I see that both F2b services are up and running, but 22.04.1 reports it as “1” and 20.04.05 reports it as “0”. This causes Zabbix to alert an error on one of the servers and not the other.
I noticed that one shows the PID as “f2b/server” and the other as “fail2ban-server”.
Any ideas why they report differently?
.
20.04.5:
root@redacted:~# ps -x | grep fail2ban
51552 ? Ssl 65:28 /usr/bin/python3 /usr/bin/fail2ban-server -xf start
1337921 pts/0 S+ 0:00 grep --color=auto fail2ban
22.04.1:
root@redacted:~# ps -x | grep fail2ban
40373 ? Ssl 6:33 /usr/bin/python3 /usr/bin/fail2ban-server -xf start
131491 pts/1 R+ 0:00 grep --color=auto fail2ban
Both services are up and are activly banning attacking IPs:
(The output is a bit different, guessing due to one being “Pro” version and one not?)
22.04.1:
root@redacted:~# systemctl status fail2ban
● fail2ban.service - Fail2Ban Service
Loaded: loaded (/lib/systemd/system/fail2ban.service; enabled; vendor preset: enabled)
Active: active (running) since Wed 2022-12-07 18:10:00 PST; 15h ago
Docs: man:fail2ban(1)
Main PID: 40373 (fail2ban-server)
Tasks: 19 (limit: 19118)
Memory: 17.3M
CPU: 6min 44.754s
CGroup: /system.slice/fail2ban.service
└─40373 /usr/bin/python3 /usr/bin/fail2ban-server -xf start
Dec 07 18:10:00 redacted.com systemd[1]: Started Fail2Ban Service.
Dec 07 18:10:01 redacted.com fail2ban-server[40373]: Server ready
20.04.5:
root@redacted:~# systemctl status fail2ban
● fail2ban.service - Fail2Ban Service
Loaded: loaded (/etc/systemd/system/fail2ban.service; enabled; vendor preset: enabled)
Drop-In: /etc/systemd/system/fail2ban.service.d
└─override.conf
Active: active (running) since Thu 2022-12-08 09:33:13 PST; 49s ago
Docs: man:fail2ban(1)
Process: 1345685 ExecStartPre=/bin/mkdir -p /run/fail2ban (code=exited, status=0/SUCCESS)
Process: 1345694 ExecStartPost=/bin/sh -c while ! [ -S /run/fail2ban/fail2ban.sock ]; do sleep 1; done (code=exited, status=0/SUCCESS)
Process: 1345849 ExecStartPost=/bin/chgrp fail2ban /run/fail2ban/fail2ban.sock (code=exited, status=0/SUCCESS)
Process: 1345850 ExecStartPost=/bin/chmod g+w /run/fail2ban/fail2ban.sock (code=exited, status=0/SUCCESS)
Main PID: 1345693 (f2b/server)
Tasks: 19 (limit: 19140)
Memory: 18.2M
CGroup: /system.slice/fail2ban.service
└─1345693 /usr/bin/python3 /usr/bin/fail2ban-server -xf start
Dec 08 09:33:12 redacted.com fail2ban-server[1345693]: Server ready
Dec 08 09:33:13 redacted.com systemd[1]: Started Fail2Ban Service.
Systems Details:
20.04.5 Server:
| SYSTEM INFORMATION||
|----------------------|---------------------------|
| OS type and version | Ubuntu Linux 20.04.5 |
| Webmin version | 2.001 |
| Usermin version | 1.860 |
| Virtualmin version | 7.3-1 Pro |
| Theme version | 20.02 |
| Package updates | All installed packages are up to date |
22.04.1:
| SYSTEM INFORMATION||
|----------------------|---------------------------|
| OS type and version | Ubuntu Linux 22.04.1 |
| Webmin version | 2.001 |
| Usermin version | 1.860 |
| Virtualmin version | 7.3-1 |
| Theme version | 20.01.1:5 |
| Package updates | All installed packages are up to date |