Introduction
Streametry lets you store and analyze metrics in real-time. Push events with metrics as soon as they occur and then process them using flexible queries. All queries are continuous so you get new results as soon as something changes.
Data is organized into "applications" which roughly resemble databases within a server. Each application can have one or more "collections" where you can store similar items. Each item in a collection is inserted and retrieved using a unique key.
Every time you push an update history of metric changes is saved automatically. You can then analyze this historic data and combine with real-time updates.
Getting Started
If using self-hosted server run: ./bin/streametry
To learn the basics try the Tutorial or navigate your browser to:
http://localhost:8181
and follow links to PlayGround to see live examples and practice running queries.
Quick Start
From the command line:
Push some data to collection "sensors" for sensor named "sen":
curl http://localhost:8181/met/sensors/sen -XPOST -d '{temp: 20}'
Get data back:
curl http://localhost:8181/met/sensors/sen
should return
{"temp": 20}
Run a simple query using CoffeeScript syntax:
curl http://localhost:8181/met -XPOST -d 'stream("sensors") .filter( (sensor) -> sensor.temp > 0 )'
To learn more try the full Tutorial.
Embed
To stream data to a webpage use the JavaScript API. See the embedding example: web/embed.html or web/embed-chart.html on the server.
Configure
To configure the port for HTTP api edit the config file ./conf/conf.json
under section web
.
Logging
Log files are located in the logs/
sub directory and logging level can be set in the config file.