Tracking My Website Performance and Delivery Stats in InfluxDB

Earlier this year, I moved from serving via my own bespoke Content Delivery Network (CDN) to serving it via BunnyCDN.

It was, and remains, the right decision. However, it did mean that I lost (convenient) access to a number of the stats that I use to ensure that things are working correctly - in particular service time, hit rate and request outcomes.

I recently found the time to look at addressing that, so this post details the process I've followed to regain access to this information, without increasing my own access to PII (so, without affecting my GDPR posture), by pulling information from multiple sources into InfluxDB.

Read more…

Running multiple Tor daemons with Docker

Running a Tor relay helps give bandwidth back to the network, however it's not uncommon for new relay operators to be surprised at Tor's performance profile.

Tor is not multi-threaded, so operators arrive with multi-core machines and find that only a single core is actually being worked. However, it is possible to maximise use of multiple CPU cores by running multiple instances of the tor daemon - this documentation details how to do it using docker (although it's perfectly possible without containerisation too).

Read more…

Collecting Nextcloud User Quota Information With Telegraf

Collecting system level stats from Nextcloud with Telegraf is well documented, and very well supported.

However, I wanted to extract some additional information - current storage quota allocations and usage. Nextcloud allows you to apply a storage quota to each individual user, so I though it'd be useful to be able to monitor for accounts that are getting close to their quota.

The information is a bit more buried within Nextcloud's APIs than the system level stats, and so can not be (as easily) consumed using inputs.http.

This post gives details of an exec plugin which can fetch quota usage, per user, and pass it into Telegraf in InfluxDB line protocol

Read more…

Privacy Policy - 20211123

This page serves as the GDPR Privacy Notice for

The controller of the data collected is Ben Tasker.

You have the right to object to processing, either by objecting to a specific mechanism as described below, or by Contacting Me. If you feel your objection has not been appropriately handled, or that the processing does not have a lawful basis, you also have the right to complain to a supervisory authority.

As an overall summary of the policy - I collect some data in order to run and improve the site, but will not share that data with third parties unless I'm legally compelled to do so.

Where I'm performing a service for you (i.e. you're a customer rather than simply visiting the site), our contract will include sections as needed to cover any additional elements I may encounter whilst working for you.

Read more…

Automounting a remote server over SSH with sshfs and autofs

Sometimes it can be pretty useful to access a remote system's filesystem from your own, and sometimes NFS isn't a great fit for the connectivity at hand.

It is, however, possible to use sshfs to mount a remote filesystem on pretty much any box that you can SSH to - giving quite a bit of convenience without the need to make changes at the remote end.

This documentation details how to create an auto-mounting SSHFS mount

Read more…

New Site Live

I've migrated my site from Joomla! to Nikola - moving from having active code exposed to visitors, to simply serving static files.

As with any migration of this size, there'll be things I've missed, and there are a few things where I've kicked the can down the road a bit

  • Search is not yet implemented
  • The template uses Javascript (this will be made optional in future)

At some point soon, I'll write up a post detailing how I migrated, and why

Update: that post can be found at Migrating from Joomla to Nikola

Tracking my remaining AAISP Data Quota with Telegraf

Some time back, I switched our internet connection over from BT to Andrews & Arnold. Although the quality and reliability of our service has improved immensely, it does mean I've had to get used to us having a quota (generous though it is) rather than being "Unlimited".

AAISP make checking this pretty easy - you can simply go to their homepage and it'll display there.

However, they also expose a JSON API to check it

curl -s -L --header "Accept: application/json" | jq
  "monthly_quota": 5000000000000,
  "monthly_quota_gb": 5000,
  "quota_remaining": 9026529201951,
  "quota_remaining_gb": 9026,
  "quota_status": "green"

(AAISP let you roll over half of your unused each month, which is why quota_remaining is higher than monthly_quota)

So I wanted to configure Telegraf to poll this periodically and write it into InfluxDB.

This post details the steps I followed

Read more…

Allowing your internal search engine to index Gitlab Issues, Commits and Wiki pages

I've basically lived my life inside issue tracking systems - it used to be JIRA, and I had built tooling allowing effective indexing/mirroring of JIRA issues, but then Atlassian decided to all but do away with on-prem users. So, like many others, I moved over to Gitlab instead.

As a product, Gitlab's great: it's got project lifecycle management, issue tracking, wiki support and even a container registry baked straight into it.

However, it's indexability is basically non existent - even if you have projects marked as public, significant parts of pages are fetched by javascript, so a crawler can't index things like issue references (no, I'm not kidding) unless they execute javascript. It's like they reverse search engine optimised...

It's not just on-prem Gitlab either, it also affects their cloud offering.

Search within Gitlab is excellent, but this is of little use if you have things spread across systems and want to search from a single central point (to be fair to Gitlab, their idea is that everything you do should be within their solution, but life rarely actually works that way).

This documentation details how to use my new tooling (rudimentary as it currently is) to expose an indexable version of your Gitlab life. Although this is focused on an on-prem install, this tool should work with their cloud offering too, as the APIs are the same (but I haven't tested against it).


Read more…

Creating a In-Home-Display (IHD) to view real-time energy usage

A month or two back, I put up a post detailing how I was capturing information on our energy usage into InfluxDB. The natural extension of that was to create an In Home Display (IHD) that displays current and historic usage.

Some time back, I created a Music Kiosk using a Raspberry Pi and a touchscreen, so it made sense to adjust that in order to fulfil both needs.

This post details the steps I took to have my kiosk run Flux queries against my InfluxDB instance to retrieve energy consumption data, and then graph it using Flot.

Read more…