Testing Prometheus

Run a few tests to verify that your Prometheus setup works.

About this task

You can use the Prometheus UI or the OpenShift® web console to do the testing. The steps and the interaction with the UI are very simillar. The description in this topic is for the OpenShift web console.

Procedure

  1. Open the OpenShift web console.
  2. In the navigation sidebar on the left, click Observe > Metrics
    The following page is displayed:
    Figure 1. Prometheus metrics displayed on the OpenShift web console
    The OpenShift web console allows you to retrieve and view Prometheus metrics if you select ObserveMetrics on the sidebar.
  3. A good first test is a query of the Data Gate synchronization latency. To retrieve the values:
    1. Under the label Queries, select Select query.
    2. From the drop-down list next to the nameless text field underneath, select:
      datagate-table-sync-latency-milliseconds
    3. Click Run queries.
      If Prometheus has been set up correctly, you see a curve in the graph on top that shows the recent history of the synchronization latency.
  4. Repeat the steps under 3 to check the status of the Data Gate synchronization function. In step 3.b, select:
    datagate-table-sync-state == 1
    In the table at the bottom of the window, you should see the value started in the State column on the right.
  5. Repeat the steps under 3 to check the numbers of successful synchronization metric retrievals (refreshes) over the last 5 minutes. In step 3.b, select:
    rate(datagate_table_sync_metrics_refresh_success_total[5m])
    In the graph on the upper half of the window, you should see a curve that combines the individual values (numbers of successful refreshes.
  6. Repeat the steps under 3 to check the numbers of unsuccessful synchronization metric retrievals (refreshes) over the last 5 minutes. In step 3.b, select:
    rate(datagate_table_sync_metrics_refresh_failures_total[5m])
    In the graph on the upper half of the window, you should see a curve that combines the individual values (numbers of refresh failures.

Results

All suggested queries in this topic should run successfully.