Warp 10
Main concepts
Warp 10 is a time series database, it uses the notion of class, labels, longitude, latitude, altitude and value. labels is a kind of dictionary. That’s called a map under the warp10 terminology.
A GeoTime Serie (GTS) is defined by a class and some labels. They’re indexed and used to quickly retrieved the data. A GTS may contain some values which have the following model: [ timestamp longitude latitude altitude value ]
Warp 10 uses Warp Script. It’s a stack based language using reverse polish notation.
Endpoint
The Clever Cloud Warp 10 endpoint is:
https://c2-warp10-clevercloud-customers.services.clever-cloud.com/api/v0- Learn more about endpoint gateway on warp10.io
You can find the endpoint and an available token under the metric tab of your application. You can query our Warp 10 platform with your own script. Here’s an example with curl:
curl -T <Path/to/a/warpscript_file> https://c2-warp10-clevercloud-customers.services.clever-cloud.com/api/v0/execToken
Tokens are based on your application with the notion of producer and owner. Hence, only the data owner can see it.
You can find a 5 days available token in the metric tab of your application.
Time and duration in Warp 10
The platform’s time unit is in microsecond.
Duration is set by the followings symbols
d: dayh: Hourms: millisecondns: nanosecondps: picoseconds: secondus: microsecondw: week
Date
Allowed format:
- ISO8601
- Timestamp in microsecond
Builtin function:
NOW: get the current timestampISO8601: Convert a string or a timestamp to a ISO8601 date format
Technical constraints
The followings limits are defined in Warp 10. The soft limit can be passed over by an AUTHENTICATE operation. Operations over soft limits may be intensive. The hard limit is unsurpassable.
| WarpScript Operator | Warp 10 limit description | soft limit | hard limit |
|---|---|---|---|
| MAXGTS | Maximum number of GTS which can be fetched | 10e5 | 5e7 |
| LIMIT | Maximum number of datapoints which can be fetched during a script execution | 10e6 | 10e7 |
| MAXBUCKETS | Maximum number of buckets which can be created by a call to BUCKETIZE | 10e5 | 50e5 |
| MAXDEPTH | Maximum depth (number of levels) of the execution stack | 5e3 | 5e3 |
| MAXLOOP | Maximum number of milliseconds which can be spent in a loop | 5e3 | 10e3 |
| MAXOPS | Maximum number of operations which can be performed during a single WarpScript execution | 5e6 | 5e7 |
| MAXSYMBOLS | Maximum number of simultaneous symbols which can be defined on the stack during a single WarpScript execution | 64 | 256 |
| MAXGEOCELLS | Maximum number of cells a GEOSHAPE | 10e3 | 10e4 |
| MAXPIXELS | Maximum size (in pixels) of images which can be created by PGraphics | 10e5 | 10e5 |
| MAXRECURSION | Maximum nesting depth of macro calls | 16 | 32 |
Usage
An example where it is needed to increase the fetch limit by the LIMIT function
'<READTOKEN>' AUTHENTICATE
50e6 TOLONG LIMIT
// Fetch on the 'accessLogs' class for your application id as labels
[ '<READTOKEN>' 'accessLogs' { 'app_id' '<APP_ID>' } NOW 1 w ] FETCHVisualization and exploration
Quantum
Quantum is a web tool used to run some WarpScript. You can access to it from your metrics interface.
It provides the path to the Clever Cloud Warp 10 gateway and let you explore your data.
Classes Reference
In Warp 10, classes organize metrics from various sources, like applications or add-ons, into specific categories (CPU usage, memory statistics, etc.). This structure makes the data easy to retrieve and analyze with WarpScript.
For a complete list of Telegraf classes and their descriptions, see the classes list.
Macro
Warp 10 provide a server side macro manager. It is a way to release some ready to use WarpScript. Hence, Clever Cloud provides some macros as helpers to avoid redundant and often need code.
Consumption
The following macros are helpers to compute consumption in seconds
app_consumption
Return the consumption in second by applications for a specific organisation.
Start and End parameters can be either a timestamp in microseconds or an iso8601 date format.
'<READ TOKEN>' '<ORGANISATION ID>' '<START>' '<END>' @clevercloud/app_consumptionorga_consumption
Return all the consumption in second for a specific organisation. Start and End parameters
can be either a timestamp in microseconds or an iso8601 date format.
'<READ TOKEN>' '<ORGANISATION ID>' '<START>' '<END>' @clevercloud/app_consumptionDid this documentation help you ?