InfluxDB, Telegraf and Grafana on a Raspberry PI

The combination of InfluxDB, Telegraf and Grafana lets you collect and visualise almost any data. Here is who is doing what:

  • InfluxDB is a time-series database
  • Telegraf is an agent collecting data and sending it to InfluxDB
  • Grafana is a tool to visualize data using dashboard. Is supports, InfluxDB as a data source, amonst many others.

The result of this tutorial will be a nice dashboard of the system usage on a Raspberry PI.

Continue reading “InfluxDB, Telegraf and Grafana on a Raspberry PI”

Analyze Linux disk usage

Fixing a disk space problem on a Linux server without a graphical interface is tedious without the right command line tools handy.

Disk usage

A quick df -h  lists all disks and their current usage.

Find large files

To find large folders with files to clean up, you can use ncdu. Install it ( sudo apt-get install ncdu ) and start it pointing to a certain folder.

Why I love Kotlin

At avisec we decided to use Kotlin when we started to rewrite our backend service. This has proven to be a very good decision. Here are my top 10 reasons why I do love Kotlin:

  1. Data classes eliminate a lot of boilerplate code.
  2. The nullability support of the compiler forces you to think about nulls everywhere. This reduces the number of NullpointerException related bugs to a minimum.
  3. The lambda syntax is very, very lean.
  4. No more guessing which functional Java interface to use.
  5. The standard library provides is a great help.
  6. The IntelliJ support is seamless.
  7. Java and Kotlin integrate both ways – you can start writing Kotlin code in Java projects today, no big deal.
  8. Return values are supported for most (?) structures: if, try/catch, when
  9. Assign default values to parameters and used named parameters when calling functions.
  10. Generics in Kotlin are more powerful than in Java.

Let’s hope the current adoption rate of Kotlin continues and it will become a widely used alternative for Java on the JVM.

Windows (Samba) Share on a Raspberry PI

Assuming you are working  somewhere with a small team and you need a local Windows share to collaborate on documents and oder data. A first choice would obviously be to use Dropbox or a similar cloud service. However if you do not want to send your data to another company or if your internet connection is unstable, you might want to use a server in your local network. My suggestion here is the following: Grab yourself a Rapberry PI, configure a Windows compatible Samba share and start using it.

Continue reading “Windows (Samba) Share on a Raspberry PI”

Mosquitto TLS instability

We’ve been facing recurring TLS issues with Mosquitto, our MQTT broker. The clients tried to send a message and lost the connection in a random and non-reproducible manner. In the Mosquitto error log we always found the following problem:

This issue is reported on GitHub and there seems to be no solution to it yet. However wiebeytec recommended to use an NGINX stream proxy to terminate the TLS connection and forward the decrypted traffic locally to Mosquitto. This is what we did and it solved our issue too!



I’m currently working at Avisec on an open source webcam software component to turn your Raspberry PI and your DSLR into an awesome image-publishing device. Here is a sneak preview of how it could look like when you publish your images to the (commercial) providers Teleport or Panomax.

The images are taken every 15 minutes from my home in Hirschthal AG, Switzerland. (with panorama) (with timelapse)