margau.net

Welcome to margau.net, my personal blog about IT-Infra, networking & similar topics.

Thanos Remote Write Lag Graph shown in the Query UI

Remote Write to Thanos: Are your Prometheus metrics being transmitted reliably? Are they lagging?

Push your Prometheus metrics to Thanos, and check if they’re actually arriving by monitoring the latest timestamp of a time series!

26. October 2025 · 9 min · margau

Forgejo Runner with IPv6 only on Kubernetes

Deploy your own Forgejo runner in an IPv6-only Kubernetes cluster by patching the docker daemon.json

29. June 2025 · 9 min · margau

How to monitor Borgmatic Backups with Prometheus

TL;DR Monitor borgmatic with Prometheus textfiles Updates 22.11.2025: Borgmatic 2.x Setup and History If you run infrastructure, you should have backups. Backups are only useful if they are tested and monitored. Part of my strategy to prevent “Schrödinger’s Backup” is tight monitoring and alarming. In the early days, I had borgbackup running with Icinga. Later, I switched to Prometheus, with a textfile created by a custom bash script. Right now, I’m cleaning things up in my infrastructure, and switching to borgmatic. ...

2. August 2024 · Last Modified: 22. November 2025 · 7 min · margau

WireGuard and Linux VRFs

TL;DR Using WireGuard with VRFs under systemd-networkd. The concept When using VPNs for all of your traffic, you usually have a “private” network part (inside VPN), and a public one (public/direct internet, not trusted), which needs separation. From a practical perspective, you might want to have a Linux-based router with an “inner” default network, transported by WireGuard tunnels, and an external network for the internet, over which the VPN data is transported. The Public routing domain shall be routed completely separated from the private routing domain, so no packets can leak between them. No Layer 2 is used, packets in both domains are isolated and shall be routed differently. ...

12. January 2024 · 5 min · margau
A4 Sheet of paperless-ngx ASN QR Code Labels

paperless-ngx with qr codes as ASN: My Workflow

TL;DR Adding QR Code labels with a unique serial number to scanned papers, matching paper originals and paperless version of documents. Updates 19.11.2023: Barcode Generation How can a workflow for handling paper documents with paperless-ngx look like? paperless-ngx is a pretty good tool for handling digital and scanned documents, which is under active development by the paperless community. Recently, some cool new features regarding the handling of paper originals were added. ...

15. April 2023 · Last Modified: 19. November 2023 · 5 min · margau

Monitor (apt)-package upgrades in Prometheus: pkg-exporter

TL:DR Monitor your apt-based packages with Prometheus. Project on GitHub Project on PyPi Why do we need to monitor software packages? When you are operating a larger amount of servers, VMs or containers, you need to keep the software on them up-to-date, at least for security reasons. You most probably won’t do this manually, but use helper systems like unattended upgrades on Debian/apt-based systems. But, as always, something automated may or may not happen when not observed actively. Unattended upgrades may fail for example when user input is required. ...

3. October 2021 · 5 min · margau

WLED for SP501E LED Controller

Running WLED on SP501E LED-Controllers In 2020, I got myself a few SP501E LED Controllers to experiment with. Over time, I have installed those, and embedded them in a bunch of home assistant automations. Make sure to read the first post, where much of this is explained in detail. Over time, I reprogrammed most of the controllers from esphome to WLED. There a few reasons: While the esphome-Firmware has a much wider field of use, WLED allows for more creativity. It has more effects included, slightly better control features (see the image below), a better User Interface for direct control, and allows for out-of-the-box remote control using Show Control software (sACN, Art-Net) or other projects like LedFX. ...

21. March 2021 · 3 min · margau

Custom Firmware for SP501E LED Controller

2h LED hack Recently, I got myself a little “WS2812 LED Pixel Controller” from AliExpress. The Controller is called “SP501E”, did cost around €8 and is supposed to be a “smart Wi-Fi device”. Therefore, I suspected an ESP8266 controller inside it, and I may be able to use my own firmware with it. I was right, and so the SP501E is now part of my Home Assistant without any cloud. ...

21. November 2020 · 5 min · margau

Borgbackup und Icinga

Dieser Beitrag ist höchstwahrscheinlich veraltet, oder es gibt eine bessere Lösung! Bitte wende die entsprechende Vorsicht an. „Kein Backup – kein Mitleid“ – dieser weit verbreitete Spruch zeigt deutlich, wie wichtig ein Backup ist. Um Backups meiner Server und VM’s durchzuführen, verwende ich seit einiger Zeit das Tool borgbackup – welches bei vergleichsweise wenig Aufwand viele gute Features (Deduplikation, inkrementelles Backup, Kompression etc.) bietet. Ein Backup ist aber nur so gut, wie es auch getestet und überwacht wird: ...

17. December 2018 · 3 min · margau

Logikschaltungen

Für unseren Informatikunterricht habe ich ein paar Logikschaltungen gebaut, um die „Theorie“ der Digitaltechnik auch mal in der Praxis sehen zu können. Herausgekommen dabei sind 2 Module, aus denen sich durch Jumper ein NOT-Gatter (Invertierer) und ein Flipflop bauen lässt, sowie ein jeweils eigenständiges AND- bzw. OR-Gatter. Als NPN-Transistoren habe ich den Typ BC 337 verwendet, da ich von einem alten Fehlkauf noch einige übrig hatte. Stromversorgung Für die Stromversorgung habe ich zunächst eine kleine Platine gebaut, die mittels Brückengleichrichter und 7805-Linearregler die Schaltung mit stabilen 5V beliefert. Eine kleine Power-LED ist auch noch dabei. Im Betrieb wird die Stromversorgungsplatine einfach an ca. 7-12V (z.B. 9V-Blockbatterie) angeschlossen, und die einzelnen Module bekommen ihre 5V Betriebsspannung: AND-Gatter ...

3. December 2016 · 3 min · margau