# Evidently and Grafana

Evidently has a monitoring service component that collects data and model metrics from an ML service. It is based on the shared `Analyzer` functionality and can compute the same metrics and statistical tests as `Dashboards` and JSON `Profiles`.

The `Monitors` output the metrics that can be further logged elsewhere. It is currently recommended to use the Evidently monitoring service together with Grafana and Prometheus.

The core difference from JSON profiles is the ability to calculate metrics on top of the streaming data. Monitoring includes the configuration options that help define the monitoring logic by setting options like the size of the window, choice of moving reference, etc.

{% hint style="info" %}
**Monitoring functionality is in active development and may be subject to API change.** If you integrate this in your production pipeline, we suggest explicitly specifying the Evidently package version. Feel free to ping us on Discord if you face any issues, and we'll help to figure them out.
{% endhint %}

## Evidently and Grafana for real-time ML monitoring

Grafana is an open-source [data visualization platform](https://github.com/grafana/grafana). It is frequently paired with the Prometheus [time series database](https://github.com/prometheus/prometheus) to monitor software system performance.

You can use this same stack for ML monitoring. In this case, Evidently provides a metrics calculation layer, Prometheus is used to store the metrics, and Grafana is used to display the dashboards and manage alerts.

![](/files/g5a9pqsZPjleEoOEF5NK)

### Integration example

**An integration example is available as a Docker container:**

{% embed url="<https://github.com/evidentlyai/evidently/blob/main/examples/integrations/grafana_monitoring_service>" %}

It contains a script that will spin up the example locally. Follow the readme to install and modify the example to adapt it to your use case.

The example includes several pre-built dashboards to display Evidently reports in the Grafana interface. You can customize and modify dashboards to your needs. The example also shows how you can set up several dashboards to monitor multiple models, and switch between the views.

### 1. Data Drift Dashboard

![](/files/hNSW7uUn5VqpbSkyZPTz)

### 2. Classification Performance Dashboard

![](/files/jS2fxwWWJ6MZt9vYTZ8n)

![](/files/CoZ2RehIFFR3a2nUOLNF)

### 3. Regression Performance Dashboard

![](/files/uC6Ka0KZXdbp1dSvbzwr)

### 4. Categorical Target Drift Dashboard

![](/files/Xngr8lDSSwFNP5lJ3VTg)

### 5. Numerical Target Drift Dashboard

![](/files/vzP9aYkDT0eg0oru5IjX)

Go to example:

{% embed url="<https://github.com/evidentlyai/evidently/blob/main/examples/integrations/grafana_monitoring_service>" %}

We plan to add more pre-built dashboards in the future.

You can also read the [release blog post](https://evidentlyai.com/blog/evidently-and-grafana-ml-monitoring-live-dashboards).


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs-old.evidentlyai.com/v0.1.57/integrations/evidently-and-grafana.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
