Skip to content

Commit

Permalink
docs: Update Prometheus metrics config file.
Browse files Browse the repository at this point in the history
As of Prometheus 2.0, Prometheus metrics must be in the text-based format.

Source: https://prometheus.io/docs/instrumenting/exposition_formats/
  • Loading branch information
danielmai authored Sep 14, 2018
1 parent f184b73 commit 66d9f94
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions wiki/content/deploy/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -1332,11 +1332,11 @@ Dgraph server instances more evenly.
stage. Increasing this increases memory consumption.

## Monitoring
Dgraph exposes metrics via `/debug/vars` endpoint in json format. Dgraph doesn't store the metrics and only exposes the value of the metrics at that instant. You can either poll this endpoint to get the data in your monitoring systems or install **[Prometheus](https://prometheus.io/docs/introduction/install/)**. Replace targets in the below config file with the ip of your Dgraph instances and run prometheus using the command `prometheus -config.file my_config.yaml`.
Dgraph exposes metrics via the `/debug/vars` endpoint in json format and the `/debug/prometheus_metrics` endpoint in Prometheus's text-based format. Dgraph doesn't store the metrics and only exposes the value of the metrics at that instant. You can either poll this endpoint to get the data in your monitoring systems or install **[Prometheus](https://prometheus.io/docs/introduction/install/)**. Replace targets in the below config file with the ip of your Dgraph instances and run prometheus using the command `prometheus -config.file my_config.yaml`.
```sh
scrape_configs:
- job_name: "dgraph"
metrics_path: "/debug/vars"
metrics_path: "/debug/prometheus_metrics"
scrape_interval: "2s"
static_configs:
- targets:
Expand Down

0 comments on commit 66d9f94

Please sign in to comment.