Metrics REST API
Description — Description of the Sync Gateway Metrics Rest API
Abstract — Use the API explorer to find out more about Sync Gateway’s endpoints by functionality.
Related Content — Public REST API | Admin REST API | Use the REST API?
Overview
Developer Preview
This is a Developer Preview feature, intended for development purposes only; the API is uncommitted. Do not use this feature in production. No Enterprise Support is provided for Developer Preview features. Refer to Developer Preview Mode for more information. |
This API is OFF by default.
To activate the API you will need to configure it using the metricsInterface
setting in the configuration file
When activated, this API exposes two endpoints:
-
_metrics — which returns Sync Gateway statistics in Prometheus format
GET host:/4986/_metrics
-
_expvars — which returns the same Sync Gateway statistics in JSON format
For information on integration with Prometheus — see our blog entry Monitoring Couchbase Sync Gateway with Prometheus and Grafana.
"metricsInterface": "127.0.0.1:4986"
API Explorer
The API explorer below groups all the endpoints by functionality. You can click on a label to expand the list of endpoints and also generate a curl request for each endpoint.