Api reference icon

Monitoring REST API

Last updated 13 October 2017

Introduction

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

Quick Reference

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.

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.

Status API

Path Verb Method

/1/status

GET Get current api status

/1/status/{servers}

GET Current status servers

/1/incidents

GET List last incidents

/1/incidents/{servers}

GET List last incidents servers

Usage API

Path Verb Method

/1/usage/{statistic}/period/{period}

GET Get usage

/1/usage/{statistic}/period/{period}/{index}

GET Get usage index

Monitoring API

Path Verb Method

/1/inventory/servers

GET Inventory servers

/1/inventory/probes

GET Inventory probes

/1/latency/{servers}

GET Average latency

/1/latency/{servers}/probes/relevant

GET Relevant latency

/1/latency/{servers}/probes/others

GET Others latency

/1/indexing/{servers}

GET Get indexing time

/1/reachability/{servers}/probes

GET Server Reachability

Infrastructure API

Path Verb Method

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

GET Get Infrastructure metrics

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 API

Get current api status

Path

/1/status

HTTP Verb GET

Description

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

Example

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:

{
  "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
mandatory yes
description

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

Example

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:

{
  "status": {
    "c4-fr": "operational"
  }
}

List last incidents

Path

/1/incidents

HTTP Verb GET

Description

This method gets the incidents on the last 30 days

Example

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:

{
  "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
mandatory yes
description

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

Example

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:

{
  "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 API

Get usage

Path

/1/usage/{statistic}/period/{period}

HTTP Verb GET

Description

This method gets a statistic over a period of time

Parameters

statistic
type string
mandatory yes
description

Possible values:

  • search_operations: Number of search operations by type (Simple queries, Multiple queries)
  • acl_operations: Number of ACL operations by type (Get Api Key, Get Api Keys, Add Api Key, Update Api Key, Delete Api Key)
  • indexing_operations: Number of indexing operations by type (Get settings, Set settings, Copy/Move index, Clear index, Delete index, Wait task, Get log, Browse)
  • record_operations: Number of operations in records by type (Batch, Add record, Delete record, Update record, Partial Update record)
  • synonym_operations: Number of synonyms operations by type (Get Synonym, Delete Synonym, Update synonym, Query Synonym, Batch Synonym)
  • total_indexing_operations: The total number of indexing operations (= sum of the values of indexing_operations)
  • total_search_operations: The total number of search operations (= sum of the values of search_operations)
  • total_acl_operations: The total number of acl operations (= sum of the values of acl_operations)
  • total_records_operations: The total number of records operations (= sum of the values of record_operations)
  • total_operations: The total number of operations (= total_indexing_operations + total_search_operations + total_acl_operations + total_records_operations + total_synonym_operations)
  • total_synonym_operations: The total number of operations on synonyms (= sum of the values of synonym_operations)
  • records: Number of records
  • max_qps: The maximum number of query per second
  • avg_processing_time: Average processing time in milliseconds
  • data_size (= total records) in bytes of the index (before compression)
  • file_size: Index size in bytes. That includes the dataSize, but also all the metadata built around it in order to make search possible.
  • *: All of the above
period
type string
mandatory yes
description

Possible values:

  • day: 1 day ago, 1 point per 1 hour (24 points)
  • month: 1 month ago (30 days), 1 point per day (30 points)
  • year: 1 year ago (365 days), 1 point per day (365 points)

Example

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/period/day"

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
{
  "records": [{
    "t": 1455451200000,
    "v": 53863464
  }, {
    "t": 1455454800000,
    "v": 53897109
  }, {
    "t": 1455458400000,
    "v": 53931564
  }, {
    "t": 1455462000000,
    "v": 53972616
  }, {
    "t": 1455465600000,
    "v": 54016510
  }, {
    "t": 1455469200000,
    "v": 54064319
  }, {
    "t": 1455472800000,
    "v": 54107551
  }, {
    "t": 1455476400000,
    "v": 54151915
  }, {
    "t": 1455480000000,
    "v": 54196529
  }, {
    "t": 1455483600000,
    "v": 54233253
  }, {
    "t": 1455487200000,
    "v": 54266067
  }, {
    "t": 1455490800000,
    "v": 54293818
  }, {
    "t": 1455494400000,
    "v": 54315302
  }, {
    "t": 1455498000000,
    "v": 54334219
  }, {
    "t": 1455501600000,
    "v": 54351330
  }, {
    "t": 1455505200000,
    "v": 54367352
  }, {
    "t": 1455508800000,
    "v": 54354455
  }, {
    "t": 1455512400000,
    "v": 54065720
  }, {
    "t": 1455516000000,
    "v": 53936329
  }, {
    "t": 1455519600000,
    "v": 53954953
  }, {
    "t": 1455523200000,
    "v": 53974880
  }, {
    "t": 1455526800000,
    "v": 53994008
  }, {
    "t": 1455530400000,
    "v": 54015318
  }, {
    "t": 1455534000000,
    "v": 54025655
  }]
}

Errors

Error Code Reason
400 `metric` or `period` or `index` is not acceptable

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

statistic
type string
mandatory yes
description

Possible values:

  • search_operations: Number of search operations by type (Simple queries, Multiple queries)
  • acl_operations: Number of ACL operations by type (Get Api Key, Get Api Keys, Add Api Key, Update Api Key, Delete Api Key)
  • indexing_operations: Number of indexing operations by type (Get settings, Set settings, Copy/Move index, Clear index, Delete index, Wait task, Get log, Browse)
  • record_operations: Number of operations in records by type (Batch, Add record, Delete record, Update record, Partial Update record)
  • synonym_operations: Number of synonyms operations by type (Get Synonym, Delete Synonym, Update synonym, Query Synonym, Batch Synonym)
  • total_indexing_operations: The total number of indexing operations (= sum of the values of indexing_operations)
  • total_search_operations: The total number of search operations (= sum of the values of search_operations)
  • total_acl_operations: The total number of acl operations (= sum of the values of acl_operations)
  • total_records_operations: The total number of records operations (= sum of the values of record_operations)
  • total_operations: The total number of operations (= total_indexing_operations + total_search_operations + total_acl_operations + total_records_operations + total_synonym_operations)
  • total_synonym_operations: The total number of operations on synonyms (= sum of the values of synonym_operations)
  • records: Number of records
  • max_qps: The maximum number of query per second
  • avg_processing_time: Average processing time in milliseconds
  • data_size: Data size in bytes
  • file_size: File size in bytes
  • *: All of the above
period
type string
mandatory yes
description

Possible values:

  • day: 1 day ago, 1 point per 1 hour (24 points)
  • month: 1 month ago (30 days), 1 point per day (30 points)
  • year: 1 year ago (365 days), 1 point per day (365 points)
index
type string
mandatory yes
description

Index name

Example

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/period/day/index/users"

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

{
  "records": [{
    "t": 1455451200000,
    "v": 53863464
  }, {
    "t": 1455454800000,
    "v": 53897109
  }, {
    "t": 1455458400000,
    "v": 53931564
  }, {
    "t": 1455462000000,
    "v": 53972616
  }, {
    "t": 1455465600000,
    "v": 54016510
  }, {
    "t": 1455469200000,
    "v": 54064319
  }, {
    "t": 1455472800000,
    "v": 54107551
  }, {
    "t": 1455476400000,
    "v": 54151915
  }, {
    "t": 1455480000000,
    "v": 54196529
  }, {
    "t": 1455483600000,
    "v": 54233253
  }, {
    "t": 1455487200000,
    "v": 54266067
  }, {
    "t": 1455490800000,
    "v": 54293818
  }, {
    "t": 1455494400000,
    "v": 54315302
  }, {
    "t": 1455498000000,
    "v": 54334219
  }, {
    "t": 1455501600000,
    "v": 54351330
  }, {
    "t": 1455505200000,
    "v": 54367352
  }, {
    "t": 1455508800000,
    "v": 54354455
  }, {
    "t": 1455512400000,
    "v": 54065720
  }, {
    "t": 1455516000000,
    "v": 53936329
  }, {
    "t": 1455519600000,
    "v": 53954953
  }, {
    "t": 1455523200000,
    "v": 53974880
  }, {
    "t": 1455526800000,
    "v": 53994008
  }, {
    "t": 1455530400000,
    "v": 54015318
  }, {
    "t": 1455534000000,
    "v": 54025655
  }]
}

Errors

Error Code Reason
400 `metric` or `period` or `index` is not acceptable

Monitoring API

Inventory servers

Path

/1/inventory/servers

HTTP Verb GET

Description

This method gets all the clusters & replicas for this APP_ID

Example

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

{
  "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

Example

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:

{
  "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
mandatory yes
description

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

Example

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:

{
  "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
mandatory yes
description

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

Example

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:

{
  "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
mandatory yes
description

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

Example

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:

{
  "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
mandatory yes
description

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

Example

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:

{
  "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
mandatory yes
description

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

Example

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:

{
  "c4-fr": {
    "sdn-probe-frankfurt": true,
    "sdn-probe-awswest1": true,
    "monitoring-2": true,
    "sdn-probe-rosario": true
  }
}

Infrastructure API

This endpoint is only available for enterprise customer.

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
mandatory yes
description

Possible values:

  • avg_build_time: Average build time of the indices in seconds
  • ssd_usage: SSD usage in % (0 means no utilisation)
  • ram_search_usage: RAM usage for the search in Mbytes
  • ram_indexing_usage: RAM usage for the indexing in Mbytes
  • cpu_usage: CPU usage in % (0 means no utilisation)
  • cpu_time: Time the cpu uses to compute the search in milliseconds
  • *: All of the above
period
type string
mandatory yes
description

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

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
{
  "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
      }
    }
  }
}
© Algolia - Privacy Policy