Applying Git's pickaxe option across multiple lines of YAML using textconv

For this post, I wanted to talk about a trick I came up a few years ago with to apply Git's pickaxe option in a situation where the change I was interested in wasn't contained in a single line. I'm hoping that readers of this post take away not only the trick itself, but also a perspective on how we can leverage Git's flexibility to create even more powerful tools for searching history!

Read More...
Posted on 2024-05-06

Monitoring systemd user manager with node exporter

I use systemd and its timers to run various tasks on my machines on a regular basis, and since that's all happening in the background, I want to know if those jobs fail. Now, it's better to have a job-specific alert rule that checks that the state of the world is desirable (for example - instead of checking "did the e-mail backup job succeed?", check "is the most recent file in the e-mail backup destination less than 24 hours old?"), but it's nice to have the general "did the service succeed?" check as a backstop for when a specific alert is hard to set up, or when I just haven't gotten around to it yet.

Read More...
Posted on 2024-04-07

My trick for "hot reloading"

A lot of the software I use embeds a scripting language for easy extension - this is great, but much of it doesn't provide facilties for "hot reloading"; that is, iterating on an extension without needing to restart the application and blow away its current state.

Read More...
Posted on 2024-03-17

Use caution when using $rate_interval along with increase()

A few months ago, I was pairing with my coworker Graham on a Grafana dashboard, and we ran into a pitfall I thought it'd be nice to share. We were trying to create a dashboard that would show how many changes happened to a database table between points on the graph, and we were getting some mysterious results!

Read More...
Posted on 2024-02-28

With SQLite, INSERT OR IGNORE Is Often Not What You Want

tl;dr - INSERT OR IGNORE will silently fail if any constraint is violated (even a NOT NULL on a column type!). If you want to express "insert this row unless it already exists", use ON CONFLICT instead.

Read More...
Posted on 2024-02-04