Introducing: A Goat (API And CLI Version)

2022-07-17
software

I just announced a small side-project of mine: a RIPE Atlas API wrapper and CLI tool written in #golang. Read on if you ever wondered why this exist and what it can do.

The RIPE NCC R&D team has been maintaining a set of Python packages for a while now regarding RIPE Atlas:

Partially because this is written in Python and I'm writing Go stuff nowadays as a hobby, and partially because I heard that some users would much prefer a Go interface - or a simple to use static binary to run - I started to look at what it would take to have a Go based interface. goatAPI and goatCLI are outcomes of this work.

The software is at v0.2.0 now - meaning it's far from "complete" for any definiton of the word.

What goatAPI gives you now:

  • API wrappers for finding measurements, probes, anchors with applicable filters
  • measurement result types for relatively easy handling from Go clients
  • API wrapper for getting results using these types

What goatCLI gives as you a command line interface (static binary, once you compile):

  • search for probes, anchors, measurements with a lot of command line filtering
  • download and display results for existing measurements

Ideas, Internals

goatAPI is an API level abstraction: it provides Go objects and functions to make it easy to interact with the API. You don't have to worry about what URL to call, or how parameters are expressed: the wrapper does it all for you.

goatCLI is a command line tool in the form of static binary (if you want, so it's easy to deploy) to interact with goatAPI, and to make the output more digestible to actual users. Besides helping with finding measurements, probes or anchors, it also has some "output formatters" that take measurement results, and turn them into user readable output. I believe there's a lot of potential to this to support continuous monitoring, automatic aggregation, feeding results to Prometheus / Grafana / ... and much more.

The reason to separate these two is because I imagine some Go programmers would much prefer to to use a library to deal with RIPE Atlas objects, whereas hard core terminal users need a tool to let them find a probe or anchor, some results the are interested in, and (later) to schedule a measurement and analyse its results in a single command.

You can go ahead and start with either of these two packages. I think I even made binaries for macOS and Linux for the v0.2.0 goatCLI release so you can go ahead and play with it immediately (if you trust such binaries -- you also have the option to compile yourself!).

TODO

This work has a lot of details, much of that is yet to be done:

  • add support for older result versions
  • add support for scheduling measurements
  • add support for listening to results as they come in real-time on the result stream
  • more and better "output processors" to make results actually useful for real-time use-cases such as monitoring and alerting

By all means, if you're interested, fork the repo(s), open issues or PRs or contribute in any other way. I'm open to suggestions!


© Kistel