Merge branch 'fix/update-banned-metric-to-exclude-expired-bans' into 'main'
Fix/update banned metric to exclude expired bans See merge request hectorjsmith/fail2ban-prometheus-exporter!21
This commit is contained in:
commit
9d6b35c59a
@ -7,7 +7,7 @@ import (
|
||||
)
|
||||
|
||||
const queryBadIpsPerJail = "SELECT j.name, (SELECT COUNT(1) FROM bips b WHERE j.name = b.jail) FROM jails j"
|
||||
const queryBannedIpsPerJail = "SELECT j.name, (SELECT COUNT(1) FROM bans b WHERE j.name = b.jail) FROM jails j"
|
||||
const queryBannedIpsPerJail = "SELECT j.name, (SELECT COUNT(1) FROM bans b WHERE j.name = b.jail AND b.timeofban + b.bantime >= strftime('%s','now') + 0) FROM jails j"
|
||||
const queryJailNameToEnabled = "SELECT j.name, j.enabled FROM jails j"
|
||||
|
||||
type Fail2BanDB struct {
|
||||
|
Loading…
Reference in New Issue
Block a user