Skip to main content
Version: 2.2

Monitoring with Prometheus and Grafana

caution

There is a known issue with this feature for this version of Data Migrator. See this Knowledge base article for more information.

Data Migrator provides detailed metrics about recent and ongoing events, activity, and performance through the UI or the CLI. Use Prometheus and Grafana to capture and visualize this data:

  • Prometheus is an open-source monitoring system that records real-time metrics in a time series database.

  • Grafana is an open-source interactive visualization web application that provides charts, graphs, and alerting functionality when connected to supported data sources.

Set up monitoring with Prometheus and Grafana

Set up a host machine

You will need a machine with network access to the Data Migrator node on port 18080.

note

We do not recommend installing additional applications on the Data Migrator node.

For more information on the minimum requirements to run Grafana, see the official documentation.

Install Prometheus

See First steps with Prometheus for information on installing Prometheus on your new node.

Install Grafana

See Install Grafana for information on installing Grafana on your new node.

In these examples, we use the .tar file installation steps.

Configure Prometheus

See the official documentation for information on configuring Prometheus.

To let Prometheus know which source to collect data from, create or update the Prometheus configuration file to point to the correct endpoint on the Data Migrator host. Use the default configuration file (prometheus.yml) or create your own and point to it when running Prometheus.

note

The Data Migrator (livedata-migrator-1.17.3) Prometheus endpoint is http(s)://hostname:18080/actuator/prometheus.

The following example configuration shows Prometheus pointing to a Data Migrator instance with IP 172.31.44.14 and a metrics_path value of /actuator/prometheus:

scrape_interval: 1s
evaluation_interval: 1s

alerting:
alertmanagers:
- static_configs:
- targets:

scrape_configs:
- job_name: "Data Migrator Prometheus"
metrics_path: '/actuator/prometheus'
static_configs:
- targets: ["172.31.44.14:18080"]

Collect data

Start Prometheus

See the official documentation for your version for information on how to run Prometheus.

Example
Starting Prometheus pointing to a specified config file from the.tar file installation method:
/var/tmp/builds/prometheus/prometheus-2.33.5.linux-amd64/prometheus --config.file="prometheus.yml

Prometheus will start collecting data from the endpoint specified in its configuration and store it in its own time-series database, ready to be analyzed. When you stop the process, it will stop collecting data.

Visualize data

Start Grafana

See the official documentation for your version for information on how to run Grafana.

Starting Grafana - .tar file installation method:
/var/tmp/grafana/grafana-8.4.3/bin/grafana-server

While Grafana is running, go to the hostname or IP on port 3000 to sign in. Enter the following default credentials and update them when prompted:

**Username**: admin
**Password**: admin

Add the data source

When signed in to Grafana for the first time, you won't see any data until you've set up a data source. Create a Prometheus data source to get started.

Visualize the data

See the Grafana documentation for information on using panels, visualizations, and dashboards to visualize your data.

View Prometheus metrics

See the endpoint below for the latest list of available metrics for Prometheus:

URL for Data Migrator Prometheus metrics documentation on your server:
http://localhost:18080/actuator/prometheus
URL for Hive Migrator Prometheus metrics documentation on your server:
http://localhost:6780/prometheus
info

For more information on accessing the Data Migrator REST API documentation, see API Reference.