Overview#
The monitoring API is only available on Enterprise plans.
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 & usages 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.
Status Endpoints#
Quick Reference#
Verb | Path | Method |
---|---|---|
GET |
/1/status |
|
GET |
/1/status/ |
|
GET |
/1/incidents |
|
GET |
/1/incidents/ |
Get current api status#
Path: /1/status
HTTP Verb: GET
Description:
This method gets the current status of all clusters/replicas.
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#
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: |
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#
Path: /1/incidents
HTTP Verb: GET
Description:
This method gets the incidents on the last 30 days
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#
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: |
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"
}
}
]
}
}
Usage Endpoints#
Quick Reference#
Verb | Path | Method |
---|---|---|
GET |
/1/usage/ |
|
GET |
/1/usage/ |
Get usage#
Path: /1/usage/{statistic}
/period/{period}
HTTP Verb: GET
Description:
This method gets a statistic over a period of time
Parameters:
period
# |
type: string
Required
Possible values:
|
||
statistic
# |
type: string
Required
Possible values: To avoid unnecessary extra calls, you may want to request all or part of the following metrics with the different Grouping statistics listed below. Search operations#
ACL operations#
Indexing operations#
Record operations#
Synonym operations#
Rule operations#
Total operations#
Processing time#
Indices#
Maximum QPS (query per second)#
Used search capacity#
Degraded queries#You use the degraded_queries_* methods to monitor the impact on queries when the server is overloaded. For some methods, we speak of “seconds impacted”. This refers to the percentage of seconds, for a given period, that were affected by a particular degradation. For instance, if degraded_queries_max_capacity_seconds_impacted returns 50% for one hour, it means that 1800/3600 were affected by a max_capacity. Note that the impacted seconds may not be contiguous.
You can get information on degraded queries by making the following call to the REST API. In this example, we retrieve all degraded queries from the last day. Copy
Grouping#
|
Errors:
400
:metric
orperiod
is not acceptable
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/usage/records,max_qps,region_max_qps/period/day"
When the query is successful, the HTTP response is a 200 OK and returns the metrics:
t
: Timestamp in millisecondsv
: Value of the metric
Depending on the metric kind, the type of the value may differ. The majority of the metrics are integer values except the following ones:
degraded_queries_*
max_qps
region_*
used_search_capacity
The values of those metrics are returned as maps of string to integer where
the keys are server names, or regions in the case of region_*
metrics.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
{
"records": [
{"t": 1455451200000, "v": 53863464},
{"t": 1455454800000, "v": 53897109},
...
],
"max_qps": [
{"t": 1455451200000, "v": {"c4-fr-1": 35, "c4-fr-2": 40, "c4-fr-3": 37}},
{"t": 1455454800000, "v": {"c4-fr-1": 34, "c4-fr-2": 35, "c4-fr-3": 33}},
...
],
"region_max_qps": [
{"t": 1455451200000, "v": {"eu": 185}},
{"t": 1455454800000, "v": {"eu": 186}},
...
]
}
Get usage index#
Path: /1/usage/{statistic}
/period/{period}
/{index}
HTTP Verb: GET
Description:
This method gets a statistic over a period of time
Parameters:
period
# |
type: string
Required
Possible values:
|
index
# |
type: string
Required
Index name |
statistic
# |
type: string
Required
Possible values: To avoid unnecessary extra calls, you may want to request all or part of the following metrics with the different Grouping statistics listed below. Search operations#
ACL operations#
Indexing operations#
Record operations#
Synonym operations#
Rule operations#
Total operations#
Processing time#
Indices#
Grouping#
|
Errors:
400
:metric
orperiod
orindex
is not acceptable
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/usage/records,avg_processing_time/period/day/users"
When the query is successful, the HTTP response is a 200 OK and returns the metrics:
t
: Timestamp in millisecondsv
: Value of the metric
1
2
3
4
5
6
7
8
9
10
11
12
{
"records": [
{"t": 1455451200000, "v": 53863464},
{"t": 1455454800000, "v": 53897109},
...
],
"avg_processing_time": [
{"t": 1455451200000, "v": 2},
{"t": 1455454800000, "v": 3},
...
]
}
Monitoring Endpoints#
Quick Reference#
Verb | Path | Method |
---|---|---|
GET |
/1/inventory/servers |
|
GET |
/1/inventory/probes |
|
GET |
/1/latency/ |
|
GET |
/1/latency/ |
|
GET |
/1/latency/ |
|
GET |
/1/indexing/ |
|
GET |
/1/reachability/ |
Inventory servers#
Path: /1/inventory/servers
HTTP Verb: GET
Description:
This method gets all the clusters & replicas for this APP_ID
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: 7f3c958936c885de959cb4c55e45751e
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"
}]
}
Inventory probes#
Path: /1/inventory/probes
HTTP Verb: GET
Description:
This method gets all the probes associated with this APP_ID
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/probes"
When the query is successful, the HTTP response is a 200 OK and returns the probes:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
{
"probes": [{
"name": "sdn-probe-frankfurt",
"city": "Frankfurt",
"country": "DE",
"latitude": 50.110922,
"longitude": 8.682127,
"regions": ["eu", "de", "ru", "nl"]
}, {
"name": "sdn-probe-awswest1",
"city": "N. California (AWS)",
"country": "US",
"latitude": 41.487222,
"longitude": -120.5425,
"regions": ["usw", "use", "ca", "usc"]
}]
}
Average latency#
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: |
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 releveant 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
}]
}
}
}
Relevant latency#
Path: /1/latency/{servers}
/probes/relevant
HTTP Verb: GET
Description:
This method gets the latency from relevant probes for the servers passed in the URL
Parameters:
servers
# |
type: string
Required
A comma-separated list of the servers (ex: |
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/probes/relevant"
When the query is successful, the HTTP response is a 200 OK and returns the latency from releveant probes for these servers:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
{
"metrics": {
"latency_by_probes": {
"c4-fr": {
"sdn-probe-frankfurt": [{
"t": 1464525000000,
"v": 14
}, {
"t": 1464525600000,
"v": 14
}, {
"t": 1464526200000,
"v": 14
}, {
"t": 1464526800000,
"v": 15
}]
}
}
}
}
Others latency#
Path: /1/latency/{servers}
/probes/others
HTTP Verb: GET
Description:
This method gets the latency from others probes for the servers passed in the URL
Parameters:
servers
# |
type: string
Required
A comma-separated list of the servers (ex: |
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/probes/others"
When the query is successful, the HTTP response is a 200 OK and returns the latency from others probes for these servers:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
{
"metrics": {
"latency_by_probes": {
"c4-fr": {
"sdn-probe-frankfurt": [{
"t": 1464525000000,
"v": 14
}, {
"t": 1464525600000,
"v": 14
}, {
"t": 1464526200000,
"v": 14
}, {
"t": 1464526800000,
"v": 15
}]
}
}
}
}
Get indexing time#
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: |
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#
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: |
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/ |
Get Infrastructure metrics#
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:
|
period
# |
type: string
Required
Possible values:
|
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 millisecondsv
: 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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
{
"period": "1min",
"metrics": {
"cpu_usage": {
"s4-fr": {
"region": "fr",
"data": [{
"t": 1455101280,
"v": 46
}, {
"t": 1455101290,
"v": 46
}, {
"t": 1455101300,
"v": 46
}],
"is_replica": true
},
"c3-use-1": {
"region": "use",
"data": [{
"t": 1455101280,
"v": 42
}, {
"t": 1455101290,
"v": 42
}, {
"t": 1455101300,
"v": 42
}, {
"t": 1455101310,
"v": 37
}],
"cluster": "c3-use",
"is_replica": false
},
"c3-use-2": {
"region": "use",
"data": [{
"t": 1455101280,
"v": 56
}, {
"t": 1455101290,
"v": 56
}, {
"t": 1455101300,
"v": 56
}, {
"t": 1455101310,
"v": 56
}, {
"t": 1455101320,
"v": 51
}],
"cluster": "c3-use",
"is_replica": false
},
"c3-use-3": {
"region": "use",
"data": [{
"t": 1455101280,
"v": 51
}, {
"t": 1455101290,
"v": 51
}, {
"t": 1455101300,
"v": 51
}, {
"t": 1455101310,
"v": 51
}, {
"t": 1455101320,
"v": 64
}],
"cluster": "c3-use",
"is_replica": false
}
}
}
}