Skip to content
GSchmalfuss edited this page Jun 18, 2019 · 3 revisions

Mosquitto MQTT broker with capture interface.

This fork of MOSQUITTO is made to support the "Flex4Apps" project (https://github.com/Flex4Apps/flex4apps).

A major goal of Flex4Apps is to make anomaly detection and machine learning algorithms available for new and existing IoT solutions. According to its toolbox-philosophy, Flex4Apps doesn't use proprietary software and/or hardware to reach this goal, but rather uses and adapts existing tools.

Since MQTT has been widely adopted to IoT applications it has become a quasi-standard for the internet of things. MQTT implements a simple message distribution algorithm that can evolve while an IoT system grows and – one of the most important aspects – it doesn't expect all network elements to be connected and fully operational all the time.

However, this separation of connection-related, lower-layer functionality from application based, upper-layer information distribution makes it challenging to survey the whole network behaviour in terms of failure resiliency and run-time stability. Furthermore, MQTT in many cases is not sufficiently enough equipped with security features. That makes it susceptible to intrusion attacks and misconfiguration.

Using anomaly-detection methods offered with Flex4Apps can significantly improve existing and new installed IoT systems based on MQTT. In order to adopt Flex4Apps tools with that kind of IoT networks we built a bridge that allows log data to flow from an IoT system to the cloud-based Flex4Apps environment.

The open-source MQTT broker software MOSQUITTO serves as the central network entity in MQTT networks and is an ideal “probe” to extract log information to be used in Flex4Apps. To let MOSQUITTO deliver log information which can be fed to Elasticsearch - a basic component of Flex4Apps - this version implements a method to push logs to a network-based receiver.

The figure below shows a possible infrastructure that can be built with the modified broker software:

To insert log data into ElasticStack (ELK Stack) there exists an interface utility named Logstash. Logstash can be accessed via TCP and it best accepts JSON formatted information. There is no restriction on structure and size of this information. Therefore MOSQUITTO converts its log data into JSON format.

MOSQUITTO can run in a cloud-based environment like Docker or Kubernetes. It also can be installed on local servers or even barebone systems like IPC or dedicated gateways. This makes it a well-suited entry point for IoT systems to Flex4Apps.

Branches

  • master: points to upstream mosquitto (https://github.com/eclipse/mosquitto.git) Branch master Tag v1.5 (5e60136449d678948520085985d7e7f91f9e601c)
  • src: modified mosquitto source code with capture interface based on upstream mosquitto v1.5
  • docker: a dockerfile and a pre-built mosquitto binary (containing capture interface) for debian stretch
Clone this wiki locally