docs/get-started/tutorials/prometheus-metrics.md
In this tutorial, you will learn how to set up Grafana to display Quickwit metrics using Prometheus. Grafana will visualize the metrics collected from Quickwit, allowing you to monitor its performance effectively.
First, create a docker-compose.yml file in your project directory. This file will configure and run Quickwit, Prometheus, and Grafana as Docker services.
Here’s the complete Docker Compose configuration:
services:
quickwit:
image: quickwit/quickwit:0.9.0
ports:
- 7280:7280
command: ["run"]
grafana:
image: grafana/grafana-oss:13.0.2
container_name: grafana
ports:
- "${MAP_HOST_GRAFANA:-127.0.0.1}:3000:3000"
prometheus:
image: prom/prometheus:v3.13.1
container_name: prometheus
volumes:
- ./prometheus.yml:/etc/prometheus/prometheus.yml # Ensure prometheus.yml exists in the same directory
ports:
- 9090:9090
7280./metrics endpoint.Prometheus needs a configuration file to define how it scrapes metrics from Quickwit. Create a file named prometheus.yml in the same directory as your Docker Compose file with the following content:
global:
scrape_interval: 1s
scrape_timeout: 1s
scrape_configs:
- job_name: quickwit
metrics_path: /metrics
static_configs:
- targets:
- quickwit:7280
Run the following command in your terminal to start all services defined in the Docker Compose file:
docker compose up
This will launch Quickwit, Prometheus, and Grafana services.
http://localhost:3000 and sign in with the default credentials (admin / admin). Grafana will ask you to choose a new password.http://prometheus:9090.Now that Grafana is set up with Prometheus as a data source, you can create custom dashboards or use Quickwit's pre-configured dashboards: