A note on using the Go Prometheus client package to exposed labeled metrics

For reasons beyond the scope of this blog entry, I have been recentlyplaying around adding some Prometheus metrics to a Go program through theofficial Prometheus Go client packages . Theparticular metrics I wanted to add were going to have labels:

scripts_requests_total { script="ntpdate" } 58scripts_requests_total { script="sntp" }    112

How to do this is not entirely clear in the Prometheus client packagedocumentation. You start by creating, say, a CounterVec , then


What I want out of my window manager

One answer to what I want out of my window manager is ' fvwm '. It's my current window manager and I'm not likely to switch toanything else because I'm perfectlysatisfied with it. But that's not a good answer, because fvwm hasa lot of features and I'm not using them all .As with everyone who uses a highly customizable thing, my importantsubset of fvwm is probably not quite the same as anyone else'simportant subset of it.

(


Some things on the GUID checksum in ZFS pool uberblocks

When I talked about how ' zpool import ' generates its view of apool's configuration , I mentioned that anadditional kernel check of the pool configuration is that ZFSuberblocks have a simple 'checksum' of all ofthe GUIDs of the vdev tree. When the kernel is consideringa pool configuration, it rejects it if the sum of the GUIDs in thevdev tree doesn't match the GUID sum from the uberblock.

(The documentation of the disk format claims that it's only thechecksum of the


How 'zpool import' generates its view of a pool's configuration

Full bore ZFS pool import happens in two stages ,where ' zpool import ' puts together a vdev configuration for thepool, passes it to the kernel, and then the kernel reads the realpool configuration from ZFS objects in the pool's Meta Object Set.How ' zpool import ' does this is outlined at a high level by acomment in zutil_import.c ;to summarize the comment, the configuration is created by assemblingand merging together information from the ZFS label of each device.There is an


I think I like systemd's DynamicUser feature (under the right circumstances)

Our Prometheus metrics system involvesa lot of daemons that do things like generate metrics, both officialdaemons and various third party ones . Many of thesedaemons and the things they do are essentially stateless, becausethey can be and it makesthem simpler.I was recently setting up such a daemon (a new one) on my officeworkstation, and as part of that I wanted to pick a UID for it torun as. I consider this particular daemon slightly more risky thanusual, so I didn't want


ZFS pool imports happen in two stages of pool configuration processing

The mechanics of how ZFS pools are imported is one of the moreobscure areas of ZFS, which is a potential problem given that thingscan go very wrong ( often with quite unhelpful errors ). One special thing about ZFS pool importingis that it effectively happens in two stages, first with user-levelprocessing and then again in the kernel, and these two stages usetwo potentially different pool configurations. My primary sourcefor this is the discussion from Illumos issue #9075 :

[...]


Why file and directory operations are synchronous in NFS

One of the things that unpleasantly surprises people about NFS everyso often is that file and directory operations like creating a file,renaming it, or removing it are synchronous. This can make operationslike unpacking a tar file or doing a VCS clone or checkout be startlingly slow, much slower thanthey are on a local filesystem. Even removing a directory tree canbe drastically slower than it is locally.

(Anything that creates files also suffers from the issue that NFSclients normally force a flush to disk after they finish writing


Why we're going to be using Certbot as our new Let's Encrypt client

We need a new Let's Encrypt client to replace acmetool , and I'm on record as not particularlyliking Certbot ; it lacks some featuresthat are important to us, it's a pretty big program, and it's quiteornate (and there's the issue of the EFF trying to get you to signup for their mailing list when you register a Let's Encrypt accountwith an email address). But despite that, Certbot is going to beour future Let's Encrypt


Wireless networks have names and thus identify themselves

Recently something occurred to me that sounds obvious when I phraseit this way, which is that wireless networks have names . Wirelessnetworks intrinsically identify themselves through their SSID .This is unlike wired networks, which mostly have no reliableidentifier (one exception is wired networks using IEEE 802.1Xauthentication , sinceclients need to know what they're authenticating to).

This matters because there are a number of situations where programsmight want to know what network they're on, so they can treatdifferent


Some brief views on iOS clients for Mastodon (as of mid 2019)

I'm on Mastodon and I have both an iPhone and an iPad ,so of course I've poked at a number of iOS clients for Mastodon.(I'm restricting my views to Mastodon specifically instead of theFediverse as a whole because I've never used any of these clientson a non-Mastodon instance.)

I'll put my UI biases up front; what I want is basically Tweetbot for Mastodon. I think that Twitter and Mastodonare pretty similar environments, and Tweetbot has a