Package: wnpp
Severity: wishlist
Owner: Antoine Beaupré <anar...@debian.org>

Reasoning: I need this! :) I could have written a mtail parser instead, but
/fail2ban.actions\s+\[\d+\]:\s+\w+\s+\[(?P<jail>)\] (?P<action>Ban|Unban)\s+/ {
    fail2ban_action_count[$jail][$action]++
/fail2ban.filter\s+\[\d+\]:\s+\w+\s+\[(?P<jail>)\] (?P<action>Found)\s+/ {
    fail2ban_filter_count[$jail][$action]++
* Package name    : fail2ban-prometheus-exporter
  Version         : 0.10.1-1
  Upstream Author : hectorjsmith
* URL             : https://gitlab.com/hectorjsmith/fail2ban-prometheus-exporter
* License         : MIT
  Programming Lang: Go
  Description     : collect and export Prometheus metrics on fail2ban

This Prometheus exporter provides Prometheus (or OpenMetrics) metrics
for the fail2ban package. It tracks the number of IPs currently
blocked, matched, how long they are tracked, and keeps track of
errors.

It parses data from the fail2ban socket and can export metrics over a
normal HTTP service or the text file collector.

----

halfway through doing that, I wondered "surely someone must have fixed that
already", and lo and behold.

A mtail equivalent might be:

# fail2ban log parser
#
# log lines:
#
# 2024-02-17 15:30:53,167 fail2ban.filter         [578]: INFO    
[fraud-donation-spam] Found 185.92.25.49 - 2024-02-17 15:30:52
# 2024-02-17 15:30:53,542 fail2ban.actions        [578]: NOTICE  
[fraud-donation-spam] Ban 185.92.25.49
# 2024-02-24 15:30:45,200 fail2ban.actions        [578]: NOTICE  
[fraud-donation-spam] Unban 91.230.225.115

counter fail2ban_action_count by jail, action

}

}

.... but is not quite as accurate, because it tracks bans/unbans
independently, and doesn't reflect the actual state of the system
properly.
Autocrypt: addr=anar...@debian.org; prefer-encrypt=nopreference; 
keydata=xjMEZHZPzhYJKwYBBAHaRw8BAQdAWdVzOFRW6FYVpeVaDo3sC4aJ2kUW4ukdEZ36UJLAHd7NJUFudG9pbmUgQmVhdXByw6kgPGFuYXJjYXRAZGViaWFuLm9yZz7ClgQTFggAPhYhBLu2zUyY104TWKdSpgIpOm+k5TRzBQJkdmCVAhsDBQkB4TOABQsJCAcDBRUKCQgLBRYCAwEAAh4BAheAAAoJEAIpOm+k5TRz+w8BANbRA+AMH0LN7trugVhaWe4wDpg94UVJloHPL+adJMK/AQCh39hyQXk3ivS2cK7xKZUgK0dBsbtJ2I2XBXvL9dS3Cc44BGR2UM4SCisGAQQBl1UBBQEBB0CYZha2IMY54WFXMG4S9/Smef54Pgon99LJ/hJ885p0ZAMBCAfCdwQYFggAIBYhBLu2zUyY104TWKdSpgIpOm+k5TRzBQJkdlDOAhsMAAoJEAIpOm+k5TRzBg0A+IbcsZhLx6FRIqBJCdfYMo7qovEo+vX0HZsUPRlq4HkBAIctCzmH3WyfOD/aUTeOF3tY+tIGUxxjQLGsNQZeGrQI
Date: Tue, 27 Feb 2024 14:34:11 -0500
Message-ID: <87msrl3dn0....@angela.anarc.at>

Reply via email to