Skip to content

memgraph/prometheus-exporter

Repository files navigation

Memgraph metrics exporter

Memgraph exporter for Prometheus.

The metrics currently collected can be found in the documentation.

Running the exporter

$ git clone https://github.com/memgraph/prometheus-exporter.git
$ cd prometheus-exporter
$ python3 -m pip install requests prometheus_client
$ python3 main.py

Basic Prometheus Configuration

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.

Running and Debugging the Setup

  1. Startup your local Memgraph instance.
  2. 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.

  1. Run the Memgraph exporter
$ cd prometheus-exporter
$ python3 main.py
  1. Make sure the exporter is running
$ curl <<EXPORTER_HOST>>:<<EXPORTER_PORT>>

You should see a Prometheus object containing the metrics information.

  1. Launch Prometheus
$ cd prometheus-exporter
$ docker run --name memgraph-prometheus -d -v $(pwd)/config:/etc/prometheus -p 9090:9090 prom/prometheus
  1. Open the Prometheus UI by going to http://localhost:9090
  2. Launch Grafana
$ docker run --name memgraph-grafana -d -p 3000:3000 grafana/grafana-enterprise
  1. Open the Grafana UI by going to http://localhost:3000
  2. Load our basic Grafana setup TODO

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published