Support for point in time data

TSGrid supports data that relates to a specific point in time. i.e. it has a single timestamp associated with it. Some examples would include:

  • Page clicks
  • On/off events
  • Temperature measurements
  • etc.
[
    {
        "sensorId": 1,
        "time": "2020-01-01T00:00:00Z",
        "value": 1
    },
    {
        "sensorId": 1,
        "time": "2020-01-01T00:01:00Z",
        "value": 1
    }
]

Support for interval data

TSGrid also natively supports interval data i.e. data that relates to a period of time. Some examples would include:

  • Smart meter data
  • Aggregated sales data
  • etc.
[
    {
        "sensorId": 1,
        "from": "2020-01-01T00:00:00Z",
        "until": "2020-01-01T00:15:00Z",
        "value": 10
    },
    {
        "sensorId": 1,
        "from": "2020-01-01T00:15:00Z",
        "until": "2020-01-01T00:30:00Z",
        "value": 10
    }
]

Pre-aggregation

Ingested data is "rolled up" to various resolutions in the background. The rolled up data supplements the raw data, offering speedy queries. If you want a daily total it's already there

  • Multiple resolutions
  • Multiple aggregation functions
  • Interval aware
[
    {
        "sensorId": 1,
        "from": "2020-01-01T00:00:00Z",
        "until": "2020-01-02T00:00:00Z",
        "value": 960
    },
    {
        "sensorId": 2,
        "from": "2020-01-01T00:00:00Z",
        "until": "2020-01-02T00:00:00Z",
        "value": 960
    }
]

Timezone aware

Most timeseries databases store everything at UTC time. We also store the zone offset. This allows TSGrid (and you!) to do some clever things:

  • Compare data using local time
  • Understand if a DST switch took place
  • Aggregate data across timezones
[
    {
        "sensorId": 1,
        "time": "2020-01-01T00:00:00+02:00",
        "value": 10
    },
    {
        "sensorId": 1,
        "time": "2020-01-01T00:15:00+02:00",
        "value": 10
    },
    {
        "sensorId": 2,
        "time": "2020-01-01T01:00:00Z",
        "value": 10
    }
]

Smart TTL

You can configure a TTL for your raw data or any of the pre-aggregated resolutions. Each resolution can have a different TTL allowing you to purge data at different points in time as it's value degrades.

  • TTL based on the reading timestamp
  • TTL based on the ingestion time
{
    "name": "my-db",
    "readingType": "Instant",
    "dataType": "Int",
    "ttlTimestamp": "IngestionTime",
    "resolutions": {
    	"Raw": { "ttlDays": 90 },
    	"Hourly": { "ttlDays": 180 },
    	"Daily": { "ttlDays": -1 }
    },
    "aggregationType": "Sum",
    "aggregationTimezone": "UTC"
}

We talk REST

Get started using cURL or Postman

TSGrid uses REST to make your life easier. We even provide a Postman collection to get you started. No need to mess around with binary protocols, schemas or other complications

POST /databases HTTP/1.1
Host: localhost:8080
Content-Type: application/json

{
   "name": "testdb",
   "readingType": "Discrete",
   "dataType": "Int",
   "aggregationType": "Sum",
   "aggregationTimezone": "UTC"
}

Built for ops

TSGrid has been deployed on AWS, GCP, Docker, Kubernetes. Logs are available in the popular logstash format. Prometheus metrics are coming soon

  • Built on the rock solid JVM using Scala
  • Runs on Docker and Kubernetes
  • Easy to backup and restore
docker java logo

Get started today

Read our quickstart guide now!