-
Smokeping On Raspberry Pi Zero
Smokeping is a self-contained network monitoring app , capable of monitoring using ICMP/Ping, HTTP, DNS – as well as other signals generated from CLI monitoring tools (e.g. curl, dig, mtr etc). It provides a web-based monitoring UI to chart the probe measurements so no further monitoring apps (like Prometheus) are needed.
Running smokeping on a $5 Raspberry Pi Zero is a fun experiment in lightweight computing . Using Apache Mod FastCGI makes the app usable on the meager hardware.
-
Testing Without Excuses
Every app has that last inch (or mile) of code that’s not covered by tests. Usually it’s an interactive cycle of compile-run-inspect on the command line like
You Test
curl -X POST https://reqbin.com/echo/post/json
##👀 You Expect:
{"success":"true"}
Despite having 3-4 testing frameworks for unit tests, e2e, regression etc– there’s always a gap where you find yourself re-playing commands in the terminal to test.
A common case is 🔥firefighting where ad-hoc tests are needed to validate an emergency config change or deployment.
-
Opsworks -- Quickly Listing Hosts on the Command Line
Here’s a great example of using the aws-cli to speed up your life. Uses jq and aws-cli
# bash / zsh function function opsworks-hosts-prod () { aws opsworks describe-instances --stack-id=fffff-fffff-ffff-fff-fffffff | jq '.Instances[].PublicDns' | grep -v null | sed s/\"//g } # usage $ opsworks-hosts-prod XXXXX.compute-1.amazonaws.com XXXXX.compute-1.amazonaws.com XXXXX.compute-1.amazonaws.com XXXXX.compute-1.amazonaws.com