Attention

You are viewing an older version of the documentation. The latest version is v3.3.

Time-series processing

Important

Time-series processing must be enabled in the ECI image before it can be used. Creating an ECI image that contains the Time-series processing feature can be accomplished by selecting the Time-series processing feature option during image setup. See section Building ECI for more information.

../_images/option_time-series.png

Time-series data processing stack

The following section is applicable to:

../_images/target2.png

This feature contains some template files for launching a time-series data processing stack consisting of the MQTT broker mosquitto, telegraf as data collection service, InfluxDB as time-series database and grafana for visualization. These services are used as Docker containers and pulled from the Docker Hub registry. docker-compose files are provided to compose, configure and launch the full stack.

As these files and especially the service configurations are just templates, there is no data collected, stored or displayed. MQTT broker configuration is stored in /opt/timeseries/timeseries-stack/mqtt/ directory, telegraf configuration is located in /opt/timeseries/timeseries-stack/telegraf and might be changed and extended to match your local data sources and their proper collection.

Important

Some other ECI features might also launch an MQTT broker (e.g. Intel® In-band Manageability or Intel® Secure Device Onboarding) on the same default ports causing the time-series data processing stack’s MQTT broker to fail on startup due to already used port. In this case you either have to stop the other feature / service or change the port on either instance.

Time-series stack setup

There are 3 variants supported for time-series data processing stack setup:

  1. External MQTT broker: Only telegraf, influxdb and grafana services are configured and launched (a separately launched MQTT broker is assumed and required)

  2. With MQTT broker: Additionally mosquitto MQTT broker is part of the service composition

  3. With secure MQTT broker: Additionally the MQTT broker is set to TLS mode and the communication from/to the broker is secured

Deploying the stack

  1. Navigate to /opt/timeseries/timeseries-stack and execute docker-compose with the desired variant:

    Broker

    <compose files>

    No

    -f timeseries-stack.yml

    Yes

    -f timeseries-stack.yml -f mqtt-broker.yml

    Secure(TLS)

    -f timeseries-stack.yml -f secure-mqtt-broker.yml

    # cd /opt/timeseries/timeseries-stack
    # docker-compose <compose files> up -d
    

    Stopping the stack:

    # cd /opt/timeseries/timeseries-stack
    # docker-compose <compose files> down
    

Secure time-series stack setup

This configuration enables Transport Layer Security (TLS) for the all services.

Note

This requires certificates and keys to be provided or generated for every service.

Certificate and key generation

Some template certificate and key configurations are provided in /opt/timeseries/timeseries-stack/ssl-config directory. Those are used for certificate and key generation by the provided script. The distinguished name section modify as desired but keep the value for CN.

  1. For certificate and key generation, navigate to /opt/timeseries/timeseries-stack and call ts-create-certs.sh script.

    # cd /opt/timeseries/timeseries-stack
    # ./ts-create-certs.sh
    
  2. Choose and enter a password for the certificate, then enter the password again for signing the individual keys per service

Deploying the secure stack

  1. Navigate to /opt/timeseries/timeseries-stack and execute docker-compose with the desired variant:

    # cd /opt/timeseries/timeseries-stack
    # docker-compose -f secure-timeseries-stack.yml up -d
    

    Stopping the stack:

    # cd /opt/timeseries/timeseries-stack
    # docker-compose -f secure-timeseries-stack.yml down