• Introduction to TIGK stack for IoT

    08/07/2017 at 17:03 0 comments

    The TIGK Stack is a collection of associated technologies which combine to deliver a platform for storing, capturing, monitoring and visualizing data that is in time series. The TIGK stack consists of the following technologies:

    • Telgeraf – collection of tie sequential data from a range of sources including IoT devices.
    • InfluxDB – high performance and efficient database store for handling high volumes of time-series data.
    • Grafana  – real-time visualization of InfluxDB data.
    • Kapacitor – monitoring and alerting based on views of InfluxDB data and anomalies contained within those views.
    • As we can see from this tech stack, TIGK is perfect for monitoring IoT devices in real-time to automate complex systems such as a manufacturing plant.

    Basic Feature Set of TIGK

    As this is a combination of technologies, it is best to introduce the key features of each part of the TIGK stack thus:

    • Telegraf – lightweight and efficient with support for multiple data sources. Comes complete with over 40 plugins to help with input and output. Can interface with messaging systems such as Apache Kafka and with third party API from Google and Amazon.
    • InfluxDB – open source, a simple architecture capable of handling unstructured data. High performance with inbuilt horizontal scaling through server clustering. Standardized native API and an SQL command set suited to time-series data.
    • Chronograf – Integrated at a granular level with InfluxDB. Included smart query builder to aid with rapid query building. Suitable for producing ad hoc visualizations on the fly.
    • Kapacitor – able to stream InfluxDB data directly, and also trigger events based upon the data stream. Two-way communication to write data back to InfluxDB after being actioned with standard InfluxDB SQL. Historical data can be ported into a data stream on the fly.
    The Main Benefits of Using TIGK

    The TIGK stack offers some pretty comprehensive benefits to developers who choose to use it. TIGK offers true real-time analysis of data streams, as well as on-the-fly processing and computation.

    When this capability is combined with the fact that historical data can be aggregated into a real-time stream at the same time, the possibility to perform not only real-time analysis but also historic analysis exists. This delivers the capability to use TIGK to implement a solid predictive analytics platform.

    TIGK is rapid to implement, and because it is distributed under an open source license, the cost of ownership is relatively low once developers are up to speed.

    Use Cases for TIGK

    TICG aligns well with many potential use cases. It especially fits uses which rely upon triggering events based on constant real-time data streams. An excellent example of this would be fleet tracking. TIGK can monitor the fleet data in real-time and create an alert condition if something out of the ordinary occurs. It can also visualize the fleet in its entirety, creating a real-time dashboard of fleet status.

    IoT devices are also a strong point for TIGK. Solutions that rely upon many IoT devices combining date streams to build an overall view, such as an automated manufacturing line, work well with TIGK. TIGK can trigger alert events, and visualize the entire status of a production line easily.

    Setup

    The quickest and most manageable way to deploy a TIGK Stack is with a docker swarm cluster. Below is a copy of our docker-compose yaml file template for your review.

    With this one just needs a few things:

    1. A VPS, AWS, or an Openstack account
    2. docker-machine
    3. docker-compose
    4. docker-ce

    Installation and setup of the above tools is out of scope for this article but will be covered in a future video.

    Docker-compose.yml:

    version: '3'
    services:
      proxy:
        image: jwilder/nginx-proxy
        environment:
          - "DEFAULT_HOST: portainer.examle.com"
        deploy:
          replicas: 1
          placement:
            constraints:
              - node.role == manager
          restart_policy:
            condition: on-failure
        ports:
          - "80:80/tcp"
        networks:
          - influx
      # FRONT
      portainer:
     # full tag list: https://hub.docker.com/r/library/portainer/tags/
    ...
    Read more »