Overview

Endpoint Time Series service (EPTS) is a Kaa service that receives endpoint data samples and transforms them into time series. EPTS broadcasts newly received data points through the time series transmission interface and provides API for historical time series retrieval. EPTS also acts as a time series receiver, so you can ingest and save time series from other transmitters, such as [EPL][EPL].

Endpoint data sample is a piece of endpoint-related data of an arbitrary structure. Data samples typically capture the state of a machine, entity, or process at a given moment. EPTS supports processing data samples encoded as flat or composite JSON records. For example:

{
    "ts": "2019-04-26T15:41:07+0000",
    "temp": 21,
    "humidity": 73,
    "location" : {
        "lat": 34.1340258,
        "lon": -118.3238652
    }
}

Data sample may or may not contain a timestamp. In the latter case, you can configure EPTS to apply the data sample receipt time when extracting data points.

Data point is a data structure consisting of a timestamp and one or more named values. Data point values can be of an arbitrary primitive or a composite data type. A data sample may contain one or more data points. For example, the data sample above can be split by EPTS into a couple of data points (represented as JSONs for simplicity):

{
    "timestamp": 1556293267,
    "values": {
        "temperature": 21,
        "humidity": 73
    }
}

and

{
    "timestamp": 1556293267,
    "values": {
        "latitude": 34.1340258,
        "longitude": -118.3238652
    }
}

Endpoint time series is a named series of endpoint-related data points. Time series names are lowercase and must be unique within a given Kaa application. For example, the first data point above can be saved to the weather time series, while the second—to location.

Interfaces

EPTS supports a number of interfaces to perform its functional role. The key supported interfaces are summarized in the following diagram.

EPTS interfaces diagram

For inter-service communication, Kaa services mainly use REST APIs and messaging protocols that run over [NATS][nats] messaging system.

Data sample transmission

EPTS supports [13/DSTP][13/DSTP] and acts as a data sample receiver service by subscribing to data transmitters. You can use this interface to inject data samples from services such as [DCX][DCX]. See the configuration page for information on how to configure this interface.

Time series transmission

EPTS supports [14/TSTP][14/TSTP] both as a transmitter and a receiver.

Whenever a new data point is saved in EPTS, it is transmitted to downstream services for processing. You can use this feature to receive streaming time series data in your own services.

You can also configure EPTS to receive data points from other services such as [EPL][EPL]. This feature provides an alternative way of injecting time series data into EPTS.

Historical time series

EPTS exposes REST API for retrieving historical time series data.