Prometheus and mite

Mite is designed to output the data on its performance tests to prometheus (for storage, indexing, and machine-readable retrievability) and then grafana (for data visualization and analysis). In the following sections, weʼll discuss some of the details involved in configuring these applications.

Prometheus

Prometheus collects its metrics by scraping an http endpoint at a defined interval. It should be configured to point to port 9301 on the machine where the mite prometheus_exporter command runs. Here is a minimal prometheus.yml config file:

global:
  scrape_interval: 1s

scrape_configs:
  - job_name: 'mite'
    static_configs:
      - targets: ['127.0.0.1:9301']

The targets is configured on the assumption that the prometheus process runs on the same machine as the mite exporter process (as is the case in our teamʼs virtual machine deployment). If this is not the case, you will have to change the localhost IP to an actual IP or hostname (as well as making sure that the mite box is accessible to the prometheus from a firewall perspective).

Grafana

The grafana instance you are using will need to be set up with your prometheus as a data source. The Prometheus documentation has an example of how to accomplish this.

The docker compose stack at the root of the repository provisions its own dashboard, already wired to the prometheus in that stack, so there is nothing to edit if you only want to see mite reporting locally. If you are not using the docker compose stack, you can still import that same dashboard manually and point it at your own prometheus datasource.