Prometheus monitor

LoadRunner Professional's integration with Prometheus fetches data collected by Prometheus and displays it in Controller and Analysis.

Prometheus integration

Prometheus is a systems monitoring and alerting application that records real-time metrics in a time series database. LoadRunner Professional's Prometheus monitor fetches measurements from the Prometheus server and displays them during the scenario run in Controller's online Prometheus graph. For example, if you use Prometheus to monitor your load generator machine, you can select Prometheus measurements related to the load generator to display in LoadRunner Professional.

We recommend using the latest stable version of Prometheus when working with LoadRunner Professional's Prometheus integration.

Back to top

Set up the Prometheus monitor

Set up the Prometheus monitor to collect data from the Prometheus server.

To set up the Prometheus monitor:

  1. In Controller, in the Run tab, select Graphs > Prometheus Graphs > Prometheus. The Prometheus graph opens in the display area.

  2. In the Prometheus graph display box, click Add measurements.

  3. In the Prometheus dialog box, in the Monitored Server Machines area, click Add.

  4. In the Host Selection dialog box:

    1. Enter the host URL and port number to connect to the Prometheus server.
    2. If the Prometheus server uses an HTTP connection, clear the Use HTTPS checkbox.
    3. Click Connect. When you have successfully connected, the Resource Measurements area of the Prometheus dialog box becomes active.
  5. In the Resource Measurements area, click Add.

  6. In the Add Measurements dialog box, select the measurements to display in the graph. You can select measurements from the Available measurements list.

    You can also add custom measurements based on parameters you define. For details, see Add custom measurements.

  7. When done, click OK in the Add Measurements dialog box. The measurements are displayed in the Resource Measurements pane of the Prometheus dialog box.

  8. Click OK in the Prometheus dialog box. When you run the scenario, the selected measurements are displayed in the graph.

Back to top

Add custom measurements

You can add custom measurements to the Prometheus monitor by creating a custom Prometheus query that adds measurements based on parameters you define.

To add custom measurements:

  1. Set up the Prometheus monitor. For details, see Set up the Prometheus monitor (steps 1-5).

  2. In the Add Measurements dialog box, select a measurement from the Available measurements list to serve as the basis for your custom query. Make sure that only one measurement is selected.

  3. Click Custom.

  4. In the Customize query dialog box, enter your custom query. The query must be based on the selected measurement and must be written in PromQL, Prometheus's functional query language. For more information, refer to the Querying Prometheus section in the Prometheus product documentation.

    Tip: To retrieve all possible metrics for a measurement, enter the measurement followed by empty curly brackets. For example: go_gc_duration_seconds{}

  5. Click OK. All measurements that match the custom query are added to the Selected measurements list.

Example: The following custom query is based on the go_gc_duration_seconds measurement. Two parameters are added to the query. The first parameter restricts the query to the instance localhost:9090, and the second parameter instructs the query to find measurements in which quantile matches the regular expression "0.*".

go_gc_duration_seconds{instance="localhost:9090", quantile=~"0.*"}

When the above custom query is entered into the Customize query dialog box, all measurements that match the query are added to the Selected measurements list:

Back to top

See also: