Bug#1064925: ITP: fail2ban-prometheus-exporter - collect and export Prometheus metrics on Fail2Ban

2024-02-27 Thread Antoine Beaupré
Package: wnpp
Severity: wishlist
Owner: Antoine Beaupré 

Reasoning: I need this! :) I could have written a mtail parser instead, but
/fail2ban.actions\s+\[\d+\]:\s+\w+\s+\[(?P)\] (?PBan|Unban)\s+/ {
fail2ban_action_count[$jail][$action]++
/fail2ban.filter\s+\[\d+\]:\s+\w+\s+\[(?P)\] (?PFound)\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>



Bug#1064881: ITP: golang-github-soniakeys-quant -- An interface for image color quantizers.

2024-02-27 Thread Robin Jarry
Package: wnpp
Severity: wishlist
Owner: Robin Jarry 

* Package name: golang-github-soniakeys-quant
  Version : 1.0.0-1
  Upstream Author : Sonia Keys
* URL : https://github.com/soniakeys/quant
* License : Expat
  Programming Lang: Go
  Description : An interface for image color quantizers.

 Quant
 .
 Experiments with color quantizers
 .
 Implemented here are two rather simple quantizers and an (also simple)
 ditherer. The quantizers satisfy the draw.Quantizer interface of the
 standard library. The ditherer satisfies the draw.Drawer interface of
 the standard library.

We need this as an indirect dependency for golang-sourcehut-rockorager-vaxis.



Bug#1064880: ITP: golang-github-mattn-go-sixel -- DRCS/Sixel Encoder/Decoder

2024-02-27 Thread Robin Jarry
Package: wnpp
Severity: wishlist
Owner: Robin Jarry 

* Package name: golang-github-mattn-go-sixel
  Version : 0.0.5-1
  Upstream Author : mattn
* URL : https://github.com/mattn/go-sixel
* License : Expat
  Programming Lang: Go
  Description : DRCS/Sixel Encoder/Decoder

 go-sixel
 .
 DRCS Sixel Encoder/Decoder
 .
 (http://go-gyazo.appspot.com/75ec3ce96dfc573e.png)
 .
 Installation
 .
   $ go get github.com/mattn/go-sixel
 .
 You can install gosr (go sixel renderer), gosd (go sixel decoder) with
 following installation instruction.
 .
   $ go get github.com/mattn/go-sixel/cmd/gosr
   $ go get github.com/mattn/go-sixel/cmd/gosd
 .
   COMMAND | DESCRIPTION
 --+---
   gosr| Image renderer
   gosd| Decoder to png
   goscat  | Render cats
   gosgif  | Render animation GIF
   gosl| Run SL
 .
 Usage
 .
 Encode
 .
   $ cat foo.png | gosr -
 .
 Decode
 .
   $ cat foo.drcs | gosd > foo.png
 .
 Use as library
 .
   img, _, _ := image.Decode(filename)
   sixel.NewEncoder(os.Stdout).Encode(img)
 .
 License
 .
 MIT
 .
 Author
 .
 Yasuhiro Matsumoto (a.k.a mattn)

We need this as a dependency for vaxis.