Monitoring Server

This page describes how to monitor the Server.

Server exports metrics under the /metrics path on its profiling port. The metrics can be fetched with curl:

$ curl http://localhost:11102/metrics

yorkie_server_version{server_version="0.2.15"} 1
# HELP yorkie_pushpull_received_changes_total The total count of changes included
# TYPE yorkie_pushpull_received_changes_total counter
yorkie_pushpull_received_changes_total 6

This metrics can be collected from Prometheus.

Prometheus and Grafana

Running Prometheus and Grafana is the easiest way to monitor Server’s metrics.

First, download all manifests files from docker folder. Then, start the applications with docker-compose:

$ docker-compose -f docker-compose-monitoring.yml up --build -d

Creating prometheus ... done
Creating grafana    ... done

Now, Prometheus will collect Server metrics every 10 seconds.

Grafana has a built-in Prometheus support; just add a Prometheus data source:

Name:   prometheus
Type:   Prometheus
Url:    http://localhost:9090
Access: proxy

Then, import the default Yorkie dashboard template and customize it. For instance, if Prometheus data source name is my-prometheus, the datasource field values in JSON also need to be my-prometheus.

Sample dashboard:

Edit this page