IoT Logging Kickstart

IoT Kickstart Overview

An IoT Kickstart is a Scaleway instance providing an application for a typical IoT use case.

Scaleway will spawn, install and configure the instance for you with the required software so messages flowing through your IoT Hub end up in the application.

IoT Logging Kickstart Overview

The logging Kickstart provides a database and a dashboard to store and visualize log messages transmitted through your IoT Hub.

It will setup and configure the following software on a Scaleway instance:

  • ElasticSearch: a document database tailored for log storage
  • Kibana: a powerful log visualization dashboard
  • Bridge: a very simple, Scaleway-made, MQTT client to store messages in ElasticSearch

Creating Kickstart

First go to the Kickstarts page in your Scaleway console and click the + button, then :

  • Select the Kickstart purpose.
  • Choose the Hub to connect to, if you have not yet created a Hub please follow these instructions.
  • Choose the Device to connect to, if you have not yet added a device to your Hub please follow these instructions. Please note the Device should allow insecure connections. The reason for this is we don’t keep the Device certificates we provide you when devices are created, so we can’t provide the device certificate to the Kickstart to establish a secure, TLS mutually authenticated, connexion to your Hub. Device not allowing insecure connections won’t be listed here.
  • Choose a region and name for the Scaleway instance we will spawn for you.
  • Choose a password for the Kickstart application dashboard (user name is always admin)
  • Create the Kickstart and go get a coffee while it is being set up (this may take a while). You will know the Kickstart is up and running when the Dashboard link (on the Kickstart list page) will open the application dashboard. Use the credentials provided previously.

The kickstart setup process will insert a first log item in the database to make sure it is up and running.

Using Kickstart

The bridge will connect to your IoT Hub and subscribe to # (all topics, more information about MQTT topics here. Any valid (see below) message published on your IoT Hub will be stored as a document in the ElasticSearch database.

If message payload is a UTF-8 encoded string, there are 3 possibilities:

  • payload is a number: this number will show up in a value field of the document
  • payload is a JSON encoded string: the first order JSON fields will be stored in the document
  • payload is any other string: this string will show up in a payload field of the document The bridge also adds a topic and a timestamp field to any document.

Let’s try! Add a new device to your hub (allow insecure connections) and grab it’s device id and issue this command (host may vary, check endpoint in your Hub overview page):

mosquitto_pub -h iot.fr-par.scw.cloud -i <device id> -t home/bedroom/temperature -m 19.4

Now open kickstart dashboard (Kibana) and go to Discover page, you should see an item matching the message you just sent.

Congratulations! You now enjoy the power of the ElasticSearch/Kibana combo to support your IoT application.

For more information about Kibana features, see it’s documentation.

Discover a New Cloud Experience

Deploy SSD Cloud Servers in seconds.