freshtracks

Suggest Edits

Expression Query

 
Suggest Edits

Run a PromQL Instant Query

The PromQL Query

 

Basic Auth

 Authentication is required for this endpoint.
gethttps://api.freshtracks.io/api/v1/query
curl --request GET \
  --url 'https://api.freshtracks.io/api/v1/query?query=query'
var request = require("request");

var options = { method: 'GET',
  url: 'https://api.freshtracks.io/api/v1/query',
  qs: { query: 'query' } };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.freshtracks.io/api/v1/query?query=query")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.freshtracks.io/api/v1/query?query=query");

xhr.send(data);
import requests

url = "https://api.freshtracks.io/api/v1/query"

querystring = {"query":"query"}

response = requests.request("GET", url, params=querystring)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Query Params

query
string
required

The PromQL Query

time
string

The instant of the query

timeout
integer

Evaluation Timeout

Response

All ok

Suggest Edits

Run a PromQL Range Query

 

Basic Auth

 Authentication is required for this endpoint.
gethttps://api.freshtracks.io/api/v1/query_range
curl --request GET \
  --url 'https://api.freshtracks.io/api/v1/query_range?query=query&start=start&end=end&step=step'
var request = require("request");

var options = { method: 'GET',
  url: 'https://api.freshtracks.io/api/v1/query_range',
  qs: 
   { query: 'query',
     start: 'start',
     end: 'end',
     step: 'step' } };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.freshtracks.io/api/v1/query_range?query=query&start=start&end=end&step=step")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.freshtracks.io/api/v1/query_range?query=query&start=start&end=end&step=step");

xhr.send(data);
import requests

url = "https://api.freshtracks.io/api/v1/query_range"

querystring = {"query":"query","start":"start","end":"end","step":"step"}

response = requests.request("GET", url, params=querystring)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Query Params

query
string
required

The PromQL Query

start
string
required

Start Timestamp - rcs3339 or unix_timestamp

end
string
required

End Timestamp - rcs3339 or unix_timestamp

step
string
required

<duration> - Query resoltuion step width

timeout
string

Evaluation Timeout

Response

All good

Suggest Edits

Metadata Query

 
Suggest Edits

Run a metadata query

<series_selector>: Repeated series selector argument that selects the series to return. At least one match[] argument must be provided.

 

Basic Auth

 Authentication is required for this endpoint.
gethttps://api.freshtracks.io/api/v1/series
curl --request GET \
  --url 'https://api.freshtracks.io/api/v1/series?match%5B%5D=match%5B%5D'
var request = require("request");

var options = { method: 'GET',
  url: 'https://api.freshtracks.io/api/v1/series',
  qs: { 'match[]': 'match[]' } };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.freshtracks.io/api/v1/series?match%5B%5D=match%5B%5D")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.freshtracks.io/api/v1/series?match%5B%5D=match%5B%5D");

xhr.send(data);
import requests

url = "https://api.freshtracks.io/api/v1/series"

querystring = {"match[]":"match[]"}

response = requests.request("GET", url, params=querystring)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Query Params

match[]
string
required
start
string

<rfc3339 | unix_timestamp>: Start timestamp.

end
string

<rfc3339 | unix_timestamp>: End timestamp.

Response

All OK

Suggest Edits

Get label values for a label.

The following endpoint returns a list of label values for a provided label name

 

Basic Auth

 Authentication is required for this endpoint.
gethttps://api.freshtracks.io/api/v1/label/labelName/values
curl --request GET \
  --url https://api.freshtracks.io/api/v1/label/labelName/values
var request = require("request");

var options = { method: 'GET',
  url: 'https://api.freshtracks.io/api/v1/label/labelName/values' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.freshtracks.io/api/v1/label/labelName/values")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.freshtracks.io/api/v1/label/labelName/values");

xhr.send(data);
import requests

url = "https://api.freshtracks.io/api/v1/label/labelName/values"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

labelName
string
required

Response

All OK

Suggest Edits

Alertmanager

 

See Configuring Alerts for documentation about how to setup your alerts.

Suggest Edits

Get the current alertmanager configuration

Must specify the header 'Content-Type: application/x-yaml'

 
gethttps://api.freshtracks.io/configs/v1/amconfig
curl --request GET \
  --url https://api.freshtracks.io/configs/v1/amconfig
var request = require("request");

var options = { method: 'GET',
  url: 'https://api.freshtracks.io/configs/v1/amconfig' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.freshtracks.io/configs/v1/amconfig")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.freshtracks.io/configs/v1/amconfig");

xhr.send(data);
import requests

url = "https://api.freshtracks.io/configs/v1/amconfig"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Response

bodystring
curl -XGET https://user:<freshtracks-io-token>@api.freshtracks.io/configs/v1/amconfig -H 'Content-Type: application/x-yaml'
Suggest Edits

Delete your current alertmanager configuration

Must specify the header 'Content-Type: application/x-yaml'

 
deletehttps://api.freshtracks.io/configs/v1/amconfig
curl --request DELETE \
  --url https://api.freshtracks.io/configs/v1/amconfig
var request = require("request");

var options = { method: 'DELETE',
  url: 'https://api.freshtracks.io/configs/v1/amconfig' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.freshtracks.io/configs/v1/amconfig")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Delete.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("DELETE", "https://api.freshtracks.io/configs/v1/amconfig");

xhr.send(data);
import requests

url = "https://api.freshtracks.io/configs/v1/amconfig"

response = requests.request("DELETE", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Response

curl -XDELETE https://user:<freshtracks-io-token>@api.freshtracks.io/configs/v1/amconfig
Suggest Edits

Set your alertmanager configuration

Must specify the header 'Content-Type: application/x-yaml'

 
posthttps://api.freshtracks.io/configs/v1/amconfig
curl --request POST \
  --url https://api.freshtracks.io/configs/v1/amconfig
var request = require("request");

var options = { method: 'POST',
  url: 'https://api.freshtracks.io/configs/v1/amconfig' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.freshtracks.io/configs/v1/amconfig")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "https://api.freshtracks.io/configs/v1/amconfig");

xhr.send(data);
import requests

url = "https://api.freshtracks.io/configs/v1/amconfig"

response = requests.request("POST", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Response

curl -XPOST --data-binary "@alertmanager.yml" https://user:<freshtracks-io-token>@api.freshtracks.io/configs/v1/amconfig -H 'Content-Type: application/x-yaml'
Suggest Edits

Recording Rules

 
Suggest Edits

Get a list of all rule files and the number of rules in each file

 
gethttps://api.freshtracks.io/configs/v1/rules
curl --request GET \
  --url https://api.freshtracks.io/configs/v1/rules
var request = require("request");

var options = { method: 'GET',
  url: 'https://api.freshtracks.io/configs/v1/rules' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.freshtracks.io/configs/v1/rules")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.freshtracks.io/configs/v1/rules");

xhr.send(data);
import requests

url = "https://api.freshtracks.io/configs/v1/rules"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Response

ruleGroupsarray
totalRulesinteger
curl -XGET https://user:<freshtracks-io-token>@api.freshtracks.io/configs/v1/rules
Suggest Edits

Get the rule file in Prometheus 2.x format

Rule groups are not guaranteed to be in the same order as when uploaded. Must specify the header 'Content-Type: application/x-yaml'

 
gethttps://api.freshtracks.io/configs/v1/rules/name
curl --request GET \
  --url https://api.freshtracks.io/configs/v1/rules/name
var request = require("request");

var options = { method: 'GET',
  url: 'https://api.freshtracks.io/configs/v1/rules/name' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.freshtracks.io/configs/v1/rules/name")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.freshtracks.io/configs/v1/rules/name");

xhr.send(data);
import requests

url = "https://api.freshtracks.io/configs/v1/rules/name"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

name
string
required

Response

bodystring
curl -XGET https://user:<freshtracks-io-token>@api.freshtracks.io/configs/v1/rules/<rulefile-name> -H 'Content-Type: application/x-yaml'
Suggest Edits

Delete a rule group with specified name

 
deletehttps://api.freshtracks.io/configs/v1/rules/name
curl --request DELETE \
  --url https://api.freshtracks.io/configs/v1/rules/name
var request = require("request");

var options = { method: 'DELETE',
  url: 'https://api.freshtracks.io/configs/v1/rules/name' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.freshtracks.io/configs/v1/rules/name")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Delete.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("DELETE", "https://api.freshtracks.io/configs/v1/rules/name");

xhr.send(data);
import requests

url = "https://api.freshtracks.io/configs/v1/rules/name"

response = requests.request("DELETE", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

name
string
required

Response

curl -XDELETE https://user:<freshtracks-io-token>@api.freshtracks.io/configs/v1/rules/<rulefile-name>
Suggest Edits

Upload a Prometheus 2.x format rules file

Upload a Prometheus 2.x format rules file, replacing a previous rule file with the same name. Must specifiy the header 'Content-Type: application/x-yaml'

 
posthttps://api.freshtracks.io/configs/v1/rules/name
curl --request POST \
  --url https://api.freshtracks.io/configs/v1/rules/name
var request = require("request");

var options = { method: 'POST',
  url: 'https://api.freshtracks.io/configs/v1/rules/name' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.freshtracks.io/configs/v1/rules/name")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "https://api.freshtracks.io/configs/v1/rules/name");

xhr.send(data);
import requests

url = "https://api.freshtracks.io/configs/v1/rules/name"

response = requests.request("POST", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

name
string
required

Response

curl -XPOST --data-binary "@rules.yml" https://user:pass@api.freshtracks.io/configs/v1/rules/rules.yml -H 'Content-Type: application/x-yaml'
Suggest Edits

Recording Rules

 
Suggest Edits

Create recording rules and dashboards for application metrics

Creates recording rules and grafana dashboards from the provided application metrics. Uploads them to prometheus and grafana respectively.

 
posthttps://api.freshtracks.io/app/v1/metrics
curl --request POST \
  --url https://api.freshtracks.io/app/v1/metrics
var request = require("request");

var options = { method: 'POST',
  url: 'https://api.freshtracks.io/app/v1/metrics' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.freshtracks.io/app/v1/metrics")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "https://api.freshtracks.io/app/v1/metrics");

xhr.send(data);
import requests

url = "https://api.freshtracks.io/app/v1/metrics"

response = requests.request("POST", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Body Params

appMetrics
array of objects
app
metrics

Response

Suggest Edits

Generate Prometheus recording rules for application metrics

Generates a response containing Prometheus recording rules for the provided application metrics, but does not upload them to prometheus. Intended for internal use. CreateAppMetrics is more suitabe for most use cases.

 
posthttps://api.freshtracks.io/app/v1/prometheus
curl --request POST \
  --url https://api.freshtracks.io/app/v1/prometheus
var request = require("request");

var options = { method: 'POST',
  url: 'https://api.freshtracks.io/app/v1/prometheus' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.freshtracks.io/app/v1/prometheus")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "https://api.freshtracks.io/app/v1/prometheus");

xhr.send(data);
import requests

url = "https://api.freshtracks.io/app/v1/prometheus"

response = requests.request("POST", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Body Params

appMetrics
array of objects
app
metrics

Response

groupsarray