Memgraph exporter for Prometheus.
The metrics currently collected can be found in the documentation.
$ git clone https://github.com/memgraph/prometheus-exporter.git
$ cd prometheus-exporter
$ python3 -m pip install requests prometheus_client
$ python3 main.py
Add Memgraph target to the Prometheus scrape_configs
:
scrape_configs:
- job_name: 'memgraph-metrics'
static_configs:
- targets: ['<<EXPORTER_HOST>>:<<EXPORTER_PORT>>']
Adjust the host accordingly.
When running our basic setup as described bellow, the Prometheus configuration is already setup for you.
For more informatioin about the Prometheus scrape_configs.
- Startup your local Memgraph instance.
- Make sure Memgraph is sending the metric information
$ curl <<MEMGRAPH_METRICS_HOST>>:<<MEMGRAPH_METRICS_PORT>>
You should see a JSON object containing the metrics information.
- Run the Memgraph exporter
$ cd prometheus-exporter
$ python3 main.py
- Make sure the exporter is running
$ curl <<EXPORTER_HOST>>:<<EXPORTER_PORT>>
You should see a Prometheus object containing the metrics information.
- Launch Prometheus
$ cd prometheus-exporter
$ docker run --name memgraph-prometheus -d --network host -v $(pwd)/config:/etc/prometheus -p 9090:9090 prom/prometheus
- Open the Prometheus UI by going to http://localhost:9090
- Launch Grafana
$ docker run --name memgraph-grafana -d --network host -p 3000:3000 grafana/grafana-enterprise
- Open the Grafana UI by going to http://localhost:3000
- Load our basic Grafana setup TODO