Some notes on Firefox's media autoplay settings in practice as of Firefox 124
I've been buying digital music from one of the reasonably goodonline sources of it (the one that recently got acquired, again,making people nervous about its longer term future). In additionto the DRM-free lossless downloads of your purchases, this placelets you stream albums through your web browser, which in my caseis an instance of Firefox. Recently, I noticed that my Firefoxinstance at work would seamlessly transition from one track to thenext track of an album I was streaming, regardless of
The effects of silences (et al) in Prometheus Alertmanager
Prometheus Alertmanager hasvarious features that make it 'silence' alerts. Alerts can be inhibited byother alerts, they can be explicitly silenced , and a route can be muted at certain times or only active at certain times. TheAlertmanager documentation generally describes all of these as"suppressing notifications" or causing a route to "not send anynotifications". However, this limited description is what I wouldcall under-specified, because there are some questions to askabout exactly what happens when you 'silence' alerts .
Some questions to ask about what silencing alerts means
A common desired feature for an alert notification system is thatyou can silence (some) alert notifications for a while. You mightsilence alerts about things that are under planned maintenance, or do itgenerally in the dead of night for things that aren't important enoughto wake someone. This sounds straightforward but in practice my simpledescription here is under-specified and raises some questions about howthings behave (or should behave).
The simplest implementation of silencing alert notifications is forthe alerting system to go through all
How I would automate monitoring DNS queries in basic Prometheus
Recently I wrote about the problem of using basic Prometheus tomonitor DNS query results , whichcomes about primarily because the Blackbox exporter requires aconfiguration stanza (a module ) forevery DNS query you want to make and doesn't expose any labels forwhat the query type and name are. In a comment, Mike Kohne askedif I'd considered using a script to generate the various configurationsneeded for this, where you want to check N DNS queries across Mdifferent DNS servers. I hadn't really thought
Options for diverting alerts in Prometheus
Suppose, not hypothetically, that you have a collection of machinesand some machines are less important than others or are of interestonly to a particular person. Alerts about normal machines shouldgo to everyone; alerts about the special machines should go elsewhere.There are a number of options to set this up in Prometheus and Alertmanager, so today I want to run downa collection of them for my own future use.
First, you have to decide the approach you'll use in Alertmanager.One option is to is
Platform peculiarities and Python (with an example)
I have a long standing little Python tool to turn IP addresses intoverified hostnames and report what's wrong if it can't do this( doing verified reverse DNS lookups is somewhat complicated ). Recently I discoveredthat socket.gethostbyaddr() onmy Linux machines was only returning a single name for an IP addressthat was associated with more than one. A Fediverse thread revealed that thisreproduced for some people, but not for everyone, and that it alsohappened in other programs.
The Python socket.gethostbyaddr
The many possible results of turning an IP address into a 'hostname'
One of the things that you can do with the DNS is ask it togive you the DNS name for an IP address, in what is called a reverseDNS lookup . Afull and careful reverse DNS lookup is more complex than it looksand has more possible results than you might expect. As a result,it's common for system administrators to talk about validatedreverse DNS lookups versus plain or unvalidated reverse DNS lookups.If you care about the results of the reverse DNS lookup, you wantto validate it
The Linux kernel.task_delayacct sysctl and why you might care about it
If you run a recent enough version of iotop on a typical Linuxsystem, it may nag at you to the effect of:
CONFIG_TASK_DELAY_ACCT and kernel.task_delayacct sysctl not enabled in kernel, cannot determine SWAPIN and IO %
You might wonder whether you should turn on this sysctl, how muchyou care, and why it was defaulted to being disabled in the firstplace.
This sysctl enables (Task) Delay accounting , whichtracks things like how long things wait for the CPU or
Reading the Linux cpufreq sysfs interface is (deliberately) slow
The Linux kernel has a CPU frequency (management) system, called cpufreq .As part of this, Linux (on supported hardware) exposes various CPUfrequency information under /sys/devices/system/cpu, as covered in Policy Interface in sysfs .Reading these files can provide you with some information about thestate of your system's CPUs, especially their current frequency(more or less). This information is considered interesting enoughthat the Prometheus host agent collects (some) cpufreqinformation by default. However,
When I reimplement one of my programs, I often wind up polishing it too
Today I discovered a weird limitation of some IP address lookupstuff on the Linux machines I use (a limitationthat's apparently not universal). In response to this, I rewrotethe little Python program that I had previously been using forlooking up IP addresses as a Go program, because I was relativelyconfident I could get Go to work (although it turns out I couldn'tuse net.LookupAddr() andhad to be slightly more complicated). I could have made the Goprogram a basically