Getting started
Metric pull endpoints
Let Tuumo pull datapoints from your systems
There are three ways to populate metric datapoints:
Input (manually type values in our UI)
Push (via API)
Pull (via pull endpoints)
This article covers how to use the Pull method.
Overview
Pull endpoints are basically configuration that tell Tuumo how to fetch metric datapoints from your system. The configuration is:
URL to your https endpoint
Our IP address where our datapoints request will be coming from. Used eg. for whitelisting
Automatic pull -toggle that says whether or not we should periodically request missing datapoints
Secret for request authentication
Finally you need to associate a metric with the metric pull endpoint, so that we will start requesting missing datapoints for that metric.
In addition to configuring a metric pull endpoint, you need to have a functioning https endpoint that can:
Receive an https request from our IP address
Authenticate and validate our request
Respond with the requested metric datapoints if they are available
Note: we are not specifying timezones for metrics, datapoints nor pull endpoints. It is up to the client to decide when a specific day start or ends. When we request a datapoint for a specific day/week/month/quarter, make sure that is has ended before responding with a datapoint.
Create a metric pull endpoint
Go to product settings by clicking the product menu in the left navigation bar, and selecting "Product settings"
Go to pull endpoints
Click create a pull endpoint
Add a descriptive and the URL of the https API endpoint and click Save
Generate a secret
Go to metric pull endpoint secret generation section
Generate a secret. It is only visible one.
Copy the secret to a secure place. If lost, a new one can be generated
Associate with a metric
Go to metrics
Go to metric settings via the menu with a vertical ellipsis next to the metric you want associated with a pull endpoint
Use the pull endpoint select to choose the metric endpoint you have created
Create the https endpoint
This process differs based on the platform/language/frameworks/libraries used. The general process is:
Receive an https request from our IP address
Authenticate and validate our request
The authorization header has a value in format "HMAC-SHA512 Signature=<hex encoded signature>" where the signature is a sha512 HMAC of the request body
You generate the hex encoded hmac sha512 signature using the currently active secret and verify that the signature is the same as in the authorization header
The request body should be in the format:
Finally Respond with the requested metric datapoints if they are available. The response should be "Content-Type": "application/json"and in the format:
Here is an example in typescript using react-router v7 in framework mode:
Test the endpoint
Return to pull endpoint settings
Go to test section
Choose a metric that the endpoint should be able to return data for
Choose a date to test what results you would get for that date
Verify that past dates return correct values
Verify that current and future dates do not return values
If there are errors, double check connectivity, your application code and logs. If there are issues we can provide support.
Manually pull missing datapoints
Go to pull manually section
Select only missing datapoints
Click pull to do the initial datapoint population
If you have performance issues (too many datapoints requested causing timeouts), edit your application code to only return datapoints for a limited number of dates
You can invoke data pull multiple times and get datapoints imported in batches
This section can be also used to overwrite existing datapoints, in case there was an error or a change in how to datapoints are generated.
Toggle automatic pull
Toggle automatic pull
Every hour we check if there are missing datapoints for a date (timezone utc) and pull them using the pull endpoint settings
After initial pull, there should be a single datapoint requested every time
Support
If you have issues reach out to us via email support@tuumo.fi.
