API Reference / REST API / Monitoring REST API

The Monitoring API is only available on Premium plans and plans including our Enterprise add-on.

Overview

This API enables you to see the inner workings of your clusters/replicas. It is not accessible by the standard API clients.

The Monitoring API lets your interact directly with the status of your Algolia clusters from anything that can send an HTTP request.

All the API access is over HTTPS, and accessed via the https://status.algolia.com domain. APPLICATION_ID variable can be found in your dashboard. API_KEY variable can be found in your credential page, under the monitoring section.

1
2
export APPLICATION_ID="your application id"
export API_KEY="your monitoring API key"

The relative path prefix /1/ indicates that we are currently using version 1 of the API.

Request Format

Authentication is done via HTTP headers. The X-Algolia-Application-Id header identifies which application you are accessing, and the X-Algolia-API-Key header authenticates the endpoint.

Response Format

The response format for all requests is a JSON object.

Whether a request succeeded is indicated by the HTTP status code. A 2xx status code indicates success, whereas a 4xx status code indicates failure. When a request fails, the response body is still JSON, but always contains the field message which you can inspect to use for debugging.

Availability considerations

The monitoring API and the status page are separate from the rest of Algolia’s services. This means they are protected against potential outages of the Algolia infrastructure. It also means that errors or unavailability of the monitoring API or status page don’t imply outage of the rest of Algolia’s infrastructure.

Status Endpoints

Quick Reference

Verb Path Method

GET

/1/status

Get current api status

GET

/1/status/{servers}

Current status servers

GET

/1/incidents

List last incidents

GET

/1/incidents/{servers}

List last incidents servers

Get current api status

A

Path: /1/status
HTTP Verb: GET

Description:

This method gets the current status of all clusters/replicas.

Example:

A

1
2
3
4
5
curl -X GET \
     -H "X-Algolia-API-Key: ${API_KEY}" \
     -H "X-Algolia-Application-Id: ${APPLICATION_ID}" \
     --compressed \
    "https://status.algolia.com/1/status"

When the query is successful, the HTTP response is a 200 OK and returns the current status:

1
2
3
4
5
6
{
  "status": {
    "c4-fr": "operational",
    "c2-eu": "operational"
  }
}

Current status servers

A

Path: /1/status/{servers}
HTTP Verb: GET

Description:

This method gets the current status of the clusters/replicas passed in the URL.

Parameters:

servers
type: string, possible values are `operational`, `degraded_performance`, `partial_outage`, `major_outage`
Required

A comma-separated list of the servers (ex: c4-fr,c3-eu)

Example:

A

1
2
3
4
5
curl -X GET \
     -H "X-Algolia-API-Key: ${API_KEY}" \
     -H "X-Algolia-Application-Id: ${APPLICATION_ID}" \
     --compressed \
    "https://status.algolia.com/1/status/c4-fr"

When the query is successful, the HTTP response is a 200 OK and returns the current status of the servers:

1
2
3
4
5
{
  "status": {
    "c4-fr": "operational"
  }
}

List last incidents

A

Path: /1/incidents
HTTP Verb: GET

Description:

This method gets the incidents on the last 30 days

Example:

A

1
2
3
4
5
curl -X GET \
     -H "X-Algolia-API-Key: ${API_KEY}" \
     -H "X-Algolia-Application-Id: ${APPLICATION_ID}" \
     --compressed \
    "https://status.algolia.com/1/incidents"

When the query is successful, the HTTP response is a 200 OK and returns the incidents:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
{
  "incidents": {
    "c4-fr": [
      {
        "t": 1463410109000,
        "v": {
          "title": "Degraded performance of primary DNS provider",
          "body": "Due to the ongoing DDoS attack on our primary DNS provider you might experience fallback to secondary provider and temporary increased latency at the connection establishment. Service availability is not impacted.",
          "status": "degraded_performance"
        }
      }
    ]
  }
}

List last incidents servers

A

Path: /1/incidents/{servers}
HTTP Verb: GET

Description:

This method gets the incidents on the last 30 days for the servers passed in the URL

Parameters:

servers
type: string
Required

A comma-separated list of the servers (ex: c4-fr,c3-eu)

Example:

A

1
2
3
4
5
curl -X GET \
     -H "X-Algolia-API-Key: ${API_KEY}" \
     -H "X-Algolia-Application-Id: ${APPLICATION_ID}" \
     --compressed \
    "https://status.algolia.com/1/incidents/c4-fr"

When the query is successful, the HTTP response is a 200 OK and returns the incidents:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
{
  "incidents": {
    "c4-fr": [
      {
        "t": 1463410109000,
        "v": {
          "title": "Degraded performance of primary DNS provider",
          "body": "Due to the ongoing DDoS attack on our primary DNS provider you might experience fallback to secondary provider and temporary increased latency at the connection establishment. Service availability is not impacted.",
          "status": "degraded_performance"
        }
      }
    ]
  }
}

Monitoring Endpoints

Quick Reference

Verb Path Method

GET

/1/inventory/servers

Inventory servers

GET

/1/latency/{servers}

Average latency

GET

/1/indexing/{servers}

Get indexing time

GET

/1/reachability/{servers}/probes

Server Reachability

Inventory servers

A

Path: /1/inventory/servers
HTTP Verb: GET

Description:

This method gets all the clusters & replicas for this APP_ID

Example:

A

1
2
3
4
5
curl -X GET \
     -H "X-Algolia-API-Key: ${API_KEY}" \
     -H "X-Algolia-Application-Id: ${APPLICATION_ID}" \
     --compressed \
    "https://status.algolia.com/1/inventory/servers"

When the query is successful, the HTTP response is a 200 OK and returns the inventory:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
{
  "inventory": [{
    "name": "c4-fr-1",
    "region": "eu",
    "is_replica": false,
    "cluster": "c4-fr"
  }, {
    "name": "c4-fr-2",
    "region": "eu",
    "is_replica": false,
    "cluster": "c4-fr"
  }, {
    "name": "c4-fr-3",
    "region": "eu",
    "is_replica": false,
    "cluster": "c4-fr"
  }]
}

Average latency

A

Path: /1/latency/{servers}
HTTP Verb: GET

Description:

This method gets the average latency from relevant probes for the servers passed in the URL

Parameters:

servers
type: string
Required

A comma-separated list of the servers (ex: c4-fr,c3-eu)

Example:

A

1
2
3
4
5
curl -X GET \
     -H "X-Algolia-API-Key: ${API_KEY}" \
     -H "X-Algolia-Application-Id: ${APPLICATION_ID}" \
     --compressed \
    "https://status.algolia.com/1/latency/c4-fr"

When the query is successful, the HTTP response is a 200 OK and returns average latency from relevant probes for these servers:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
{
  "metrics": {
    "latency": {
      "c4-fr": [{
        "t": 1464524400000,
        "v": 28
      }, {
        "t": 1464525000000,
        "v": 29
      }, {
        "t": 1464525600000,
        "v": 29
      }]
    }
  }
}

Get indexing time

A

Path: /1/indexing/{servers}
HTTP Verb: GET

Description:

This method gets the average indexing time for the servers passed in the URL

Parameters:

servers
type: string
Required

A comma-separated list of the servers (ex: c4-fr,c3-eu)

Example:

A

1
2
3
4
5
curl -X GET \
     -H "X-Algolia-API-Key: ${API_KEY}" \
     -H "X-Algolia-Application-Id: ${APPLICATION_ID}" \
     --compressed \
    "https://status.algolia.com/1/indexing/c4-fr"

When the query is successful, the HTTP response is a 200 OK and returns the average indexing time for the servers:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
{
  "metrics": {
    "indexing": {
      "c4-fr": [{
        "t": 1464524400000,
        "v": 28
      }, {
        "t": 1464525000000,
        "v": 29
      }, {
        "t": 1464525600000,
        "v": 29
      }]
    }
  }
}

Server Reachability

A

Path: /1/reachability/{servers}/probes
HTTP Verb: GET

Description:

This method gets the reachability for the servers passed in the URL

Parameters:

servers
type: string
Required

A comma-separated list of the servers (ex: c4-fr,c3-eu)

Example:

A

1
2
3
4
5
curl -X GET \
     -H "X-Algolia-API-Key: ${API_KEY}" \
     -H "X-Algolia-Application-Id: ${APPLICATION_ID}" \
     --compressed \
    "https://status.algolia.com/1/reachability/c4-fr/probes"

When the query is successful, the HTTP response is a 200 OK and returns the reachability for the servers passed in the URL:

1
2
3
4
5
6
7
8
{
  "c4-fr": {
    "sdn-probe-frankfurt": true,
    "sdn-probe-awswest1": true,
    "monitoring-2": true,
    "sdn-probe-rosario": true
  }
}

Infrastructure Endpoints

Quick Reference

Verb Path Method

GET

/1/infrastructure/{metric}/period/{period}

Get Infrastructure metrics

Get Infrastructure metrics

A

Path: /1/infrastructure/{metric}/period/{period}
HTTP Verb: GET

Description:

This method gets a metric over a period of time

Parameters:

metric
type: string
Required

Possible values:

  • avg_build_time: Average build time of the indices in seconds
  • ssd_usage: proportion of SSD vs RAM usage in % (0% means no SSD utilization, 32 GB storage used on 64 GB RAM system is 50%)
  • ram_search_usage: RAM usage for the search in MB
  • ram_indexing_usage: RAM usage for the indexing in MB
  • cpu_usage: proportion of CPU idleness in % (0% means the CPU isn’t idle)
  • *: All of the above
period
type: string
Required

Possible values:

  • minute: 1 minute ago, 1 point per 10 seconds (10 points)
  • hour: 1 hour ago, 1 point per 1 minute (60 points)
  • day: 1 day ago, 1 point per 10 minutes (144 points)
  • week: 1 week ago, 1 point per 1 hour (168 points)
  • month: 1 month ago, 1 point per 1 day (30 points)

Example:

A

1
2
3
4
5
curl -X GET \
     -H "X-Algolia-API-Key: ${API_KEY}" \
     -H "X-Algolia-Application-Id: ${APPLICATION_ID}" \
     --compressed \
    "https://status.algolia.com/1/infrastructure/cpu_usage/period/minute"

When the query is successful, the HTTP response is a 200 OK and returns the metrics:

  • t: Timestamp in milliseconds
  • v: value of the metric
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
{
  "metrics": {
    "cpu_usage": {
      "s4-fr": [{
        "t": 1455101280,
        "v": 46
      }, {
        "t": 1455101290,
        "v": 46
      }, {
        "t": 1455101300,
        "v": 46
      }],
      "c3-use-1": [{
        "t": 1455101280,
        "v": 42
      }, {
        "t": 1455101290,
        "v": 42
      }, {
        "t": 1455101300,
        "v": 42
      }, {
        "t": 1455101310,
        "v": 37
      }],
      "c3-use-2": [{
        "t": 1455101280,
        "v": 56
      }, {
        "t": 1455101290,
        "v": 56
      }, {
        "t": 1455101300,
        "v": 56
      }, {
        "t": 1455101310,
        "v": 56
      }, {
        "t": 1455101320,
        "v": 51
      }],
      "c3-use-3": [{
        "t": 1455101280,
        "v": 51
      }, {
        "t": 1455101290,
        "v": 51
      }, {
        "t": 1455101300,
        "v": 51
      }, {
        "t": 1455101310,
        "v": 51
      }, {
        "t": 1455101320,
        "v": 64
      }]
    }
  }
}
Did you find this page helpful?