Time-series Processing

Time-series Data Processing Stack

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 the service configurations are templates, data is not collected, stored, or displayed.

MQTT broker configuration is stored in the /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 (for example, Intel® In-band Manageability) on the same default ports causing the time-series data processing stack’s MQTT broker to fail on startup as the port is already in use.

In this case, you have to either stop the other feature, service or change the port on either instance.

Install Time-series Data Processing Stack

  1. Time-series Data Processing Stack requires the Docker Engine. Install Docker if not already done.

  2. Install the Docker Compose plugin on the target system.

  3. Setup the ECI repository, then perform either of the following commands to install this component:

    Install from meta-package
    $ sudo apt install eci-timeseries
    
    Install from individual Deb packages
    $ sudo apt install timeseries-stack
    

Set up Time-series Stack

The time-series data processing stack setup supports the following three variants:

  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 the Transport Layer Security (TLS) mode and the communication from/to the broker is secured

Deploy Stack

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

To stop the stack, run the following commands:

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

Set up Secure Time-series Stack

This configuration enables TLS for all services.

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

Generate Certificate and Key

Some template certificate and key configurations are provided in the /opt/timeseries/timeseries-stack/ssl-config directory. The provided script uses the template and key configurations to generate certificate and key. Modify the distinguished name, however retain the value for CN.

  1. To generate the certificate and key, navigate to /opt/timeseries/timeseries-stack and run the ts-create-certs.sh script.

    $ cd /opt/timeseries/timeseries-stack
    $ ./ts-create-certs.sh
    
  2. Enter a password for the certificate, then re-enter the password for signing the individual keys per service.

Deploy 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
    
  2. To stop the stack:

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