today's howtos
-
Some notes on Grafana annotations sourced from Prometheus metrics
Grafana Annotations have long been one of those 'I should look into this sometime' Grafana features that seemed potentially useful but not immediately compelling, and also a bunch of work to set up. Recently I learned (or re-learned) that you can dynamically generate annotations from Prometheus metrics and other data sources, and spent some time experimenting with this, not always successfully. As a result, I have some notes and some opinions. I'll start with the bad news.
Grafana has two sorts of annotations, basic ones that are a single point in time (for example, 'a new configuration was deployed at this time') and region annotations, which cover a span of time (for example, 'an alert was firing'). Unfortunately, you can't currently generate region annotations from Prometheus metrics; if you try, for example by setting an annotation on the Prometheus 'ALERTS' metric (as the Grafana UI for Prometheus based annotations will lead you to try), the results are unpleasant. The only Prometheus based annotations you can use are single point in time ones. Generally this means that you want a Prometheus metric that is the time something happened, such as when a host rebooted (ie, node_boot_time_seconds) or an alert started (the ALERTS_FOR_STATE metric). Because Grafana deals in milliseconds, you need to multiply these 'time in seconds' metrics by 1000. There's a helpful tooltip in the Grafana UI to remind you of this.
-
ZFS DVAs and what they cover on raidz vdevs
In ZFS, a DVA (Device Virtual Address) is the equivalent of a block address in a regular filesystem. For our purposes today, the important thing is that a DVA tells you where to find data by a combination of the vdev (as a numeric index) and an offset into the vdev (and also a size). This implies, for example, that in mirrored vdevs, all mirrors of a block are at the same place on each disk, and that in raidz vdevs the offset is striped sequentially across all of your disks.
Recently I got confused about one bit of how DVA offsets work on raidz vdevs. On a raidz vdev, is the offset an offset into the logical data on the vdev (which is to say, ignoring and skipping over the space used by parity), or is it an offset into the physical data on the vdev (including parity space)?
-
Surprising Things You Can Do With R
This post will explore the various applications of R and show what you can accomplish with it after learning it.
-
DIY out of band management: remote console server
Because the event is located in another country, many hours of travel away, there are a couple of scenarios where remote control of my home router can be a life-saver. For example, should my home router crash, remotely turning power off and on again gets the event back online.
But, power-cycling a machine is a pretty big hammer. For some cases, like locking yourself out with a configuration mistake, a more precise tool like a remote serial console might be nicer.
In this article, I’ll present two cheap and pragmatic DIY out-of-band management solutions that I have experimented with in the last couple of weeks and wanted to share: [...]
-
Fdisk Command in Linux - Options + Examples
As a Linux geek, you are not satisfied with one operating system. You need divisions on your hard disk called partitions to install multiple distributions. Partitions behave as separate hard disks letting you use each sector individually.
Fdisk command enables you to create and manage partition tables. In this tutorial, we will learn about fdisk commands in Linux and perform operations on the hard disk.