Popular posts
How to expose Prometheus metrics from a json blob returned by a server.
Here is a walk through, based on json retreived from an EthSwarm node.
Retreive the json from EthSwarm status API
Here is a sample for the status json, from the API documentation,
{ "overlay": "36b7efd913ca4cf880b8eeac5093fa27b0825906c600685b6abdd6566e6cfe8f", "proximity": 0, "beeMode": "light", "reserveSize": 0, "reserveSizeWithinRadius": 0, "pullsyncRate": 0, "storageRadius": 0, "connectedPeers": 0, "neighborhoodSize": 0, "requestFailed": true, "batchCommitment": 0, "isReachable": true, "lastSyncedBlock": 0, "committedDepth": 0 }Prometheus exporter package
ethswarm/status.go start with the package declaration and imports
You have a small/mid sized server and you want to install new software or custom kernel on it. But it take forever to build anything on it compared to your brand new 8 or 12 core modern laptop with fast NVMe SSD.
In addition, you don´t want to pollute your server with all the build dependencies.
Docker is here to save the day, allowing you to create fast and disposable build environments.
-rw-r--r-- 1 fs fs 8.6M 2024-12-22 17:33 linux-headers-6.12.6-test_6.12.6-1_amd64.deb -rw-r--r-- 1 fs fs 19M 2024-12-22 17:33 linux-image-6.12.6-test_6.12.6-1_amd64.deb -rw-r--r-- 1 fs fs 285M 2024-12-22 17:33 linux-image-6.12.6-test-dbg_6.12.6-1_amd64.deb -rw-r--r-- 1 fs fs 1.4M 2024-12-22 17:33 linux-libc-dev_6.12.6-1_amd64.debHere are two examples with linux kernel image and zfs-linux backport.
1.8Gb docker image
As I encountered some ruby problem with Vagrant on my Archlinux laptop, I decided to use Docker as a workaround.
$ vagrant /usr/lib/ruby/3.3.0/rubygems/specification.rb:2245:in `raise_if_conflicts': Unable to activate vagrant_cloud-3.1.1, because rexml-3.3.2 conflicts with rexml (~> 3.2.5) (Gem::ConflictError) from /usr/lib/ruby/3.3.0/rubygems/specification.rb:1383:in `activate' from /usr/lib/ruby/3.3.0/rubygems/core_ext/kernel_gem.rb:62:in `block in gem' from /usr/lib/ruby/3.3.0/rubygems/core_ext/kernel_gem.rb:62:in `synchronize' from /usr/lib/ruby/3.3.0/rubygems/core_ext/kernel_gem.rb:62:in `gem' from /opt/vagrant/embedded/gems/gems/vagrant-2.4.2/bin/vagrant:17:in `block in <main>' from /opt/vagrant/embedded/gems/gems/vagrant-2.4.2/bin/vagrant:16:in `each' from /opt/vagrant/embedded/gems/gems/vagrant-2.4.2/bin/vagrant:16:in `<main>'So let’s create a Docker image, using a debian slim image and just install vagrant and some vagrant plugins.
Introduction
BOSH is an open source project from Cloud Foundry that allow release engineering, software deployment and application lifecycle management of large scale and distributed system.

I wanted to take a look at it and fortunately it is possible to play on a local playground environment on VirtualBox using the bosh-lite instruction.