Viewing resource monitoring usage data on Grafana

After you add and configure monitoring sources in HCL DevOps Test Hub (Test Hub), you can view the resource monitoring usage data in a graph for each monitored source and for each of the selected counters on Grafana.

Before you begin

You must have completed the following tasks:
  • Added and connected a monitoring source, and an agent when required, to your project to view the list of available sources and agents, and the resource monitoring usage data in your project.
  • Configured a test with advanced parameters to view persistent usage data in a graph. See Configuring a test.
  • Installed the DevOps Test Hub Results Data plug-in and created an instance of data source for DevOps Test Hub Results Data. See Installing and configuring the DevOps Test Hub Results Data plugin.
  • Opened Grafana with one of these ports: http://localhost:3000 or http://localhost:8080.
  • Started the test execution on Test Hub.

About this task

After you add a monitoring source to Test Hub, you must configure the source, and select monitoring counters. You can view the resource monitoring usage data for each of the selected counters in a graph on Grafana. You must configure the test to collect and view the resource monitoring usage data that is collected for a defined timeframe. During the test execution, the data can be seen with the default time range on Grafana. After the test execution is complete, you must carefully select the time range so that it corresponds to the test execution start and end time.

Procedure

  1. Click Explore in the Toggle menu in Grafana.

    The Data query page with the default data source is displayed.

  2. Select DevOps Test Hub Results Data from the list of data sources.
  3. Select the type of query by performing any of the following actions when you want to view statistics from the test data:
    To view Actions
    The variation of a metric over time. Perform the following steps:
    1. Click the time-series statistics tab icon Image of the time-series statistics icon..
    2. Go to Step 4.
    The values of the metric that are computed over the entire time range. Perform the following steps:
    1. Click the overall statistics tab icon Image of the overall statistics icon..
    2. Go to Step 4.
  4. Define the scope of the query by performing the actions indicated in the following table:
    Options Actions
    If you want to use the data from the team space Perform the following steps:
    1. Select the Team Space option.
    2. Select the team space from the list of team spaces that are listed.
    3. Select Resource Monitoring from the list in the Service option.
    4. Go to Step 5.
    If you want to use the data from your project
    Note: You can select the project as the scope for your query if you want to view any of the supported query types.
    Perform the following steps:
    1. Select the Project option.
    2. Select the project from the list of projects that are listed.
    3. Select the Service option.
    4. Select Resource Monitoring from the list
    5. Go to Step 5.
  5. Optionally, enter a name for the metric that helps you identify it in the Metric field.
  6. Select a metric from the list of metrics in the row of the Metrics option.
  7. Select the aggregation factor for the metric. For example, select Sum to add all values of the metric.
  8. Optionally, click the Cumulated toggle button to add the values for the metric cumulatively over time.
    Note: The Cumulated is set to off. This is the default selection.
  9. Add another metric by clicking the Add metric icon Imge of the add metic icon..
    Note: If you added multiple metrics and you want to remove a metric, you can click the Remove metric icon Imge of the remove metic icon. of the metric.
  10. Click Add query if you want to combine queries from different projects, results ids, or with different properties in the query filters.
  11. Click Run query.
    A graph is displayed for the selected metrics.

Results

You viewed the resource monitoring usage data in a graph for each monitored source and for each of the selected counters on Grafana.

What to do next

You can build a dashboard including graphs, charts, gauges, and tables to get customized visual representations of your resource monitoring usage data. See Dashboard overview.